@xgent-ai/skills 0.7.4 → 0.7.6
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/.claude/hooks/xgent-statusline.js +32 -18
- package/README.md +65 -37
- package/bin/phoenix-diagram.js +14 -0
- package/bin/xgent-skills.js +259 -243
- package/dist/phoenix-diagram/LICENSE +21 -0
- package/dist/phoenix-diagram/NOTICE.md +34 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/005fc765ddc5115da796cca915baa9557abae13ff35e0a47c47affc56f6c414d.txt +272 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/010492e490b92ec85db01daad2a290ea5959f29314a1c4ff25e7a172e223abf9.txt +18 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f.txt +3 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0218327e7a480793ffdd4eb792379a9709e5c135c7ba267f709d6f6d4d70af0a.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/02bb8c3b4e70190e3986c0404ad2fd8d639b4f534252d82379cc1b502b6d1812.txt +191 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0444c6991eead6822f7b9102e654448d51624431119546492e8b231db42c48bb.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0552c898248eadfc130df0c0e8f6f82776fcb3f1dd5a5af2fa991b5baff9367a.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0ab4d106b6faac07fb6a051815fd1b4d862d730895e2d7d7358c2f13565e7a38.txt +20 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0b28172679e0009b655da42797c03fd163a3379d5cfa67ba1f1655e974a2a1a9.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0d3f7c086c6b6cf3ea4aac714e9aa3e1fb02e355ce35bd21c56acf8d04390885.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/117829c3ca21efb132d81a44b55363d395ab8eea18526873bc828da4c0e5f038.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/123a331b5dbf04c30097fa43b8f858bc85df671fe776de498d01f3d6b7c1f69e.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1a2f5c12ddc934d58956aa5dbdd3255fe55fd957633ab7d0d39e4f0daa73f7df.txt +26 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5.txt +373 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1f485f0d6125658861351e3d6084ea90fefe78f89450be9915044b7c56d5a75a.txt +15 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/209fbbe0ad52d9235e37badf9cadfe4dbdc87203179c0899e738b39ade42177b.txt +26 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/20c7855c364d57ea4c97889a5e8d98470a9952dade37bd9248b9a54431670e5e.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/20fe7b00e904ed690e3b9fd6073784d3fc428141dbd10b81c01fd143d0797f58.txt +176 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/219920e865eee70b7dcfc948a86b099e7f4fe2de01bcca2ca9a20c0a033f2b59.txt +7 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/23860c2a7b5d96b21569afedf033469bab9fe14a1b24a35068b8641c578ce24d.txt +7 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3.txt +23 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5.txt +220 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/27995d58ad5c1145c1a8cd86244ce844886958a35eb2b78c6b772748669999ac.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/28a9529c7d0bb4dc51f4bf5c116a3d16ef247a052f7591466768ddf563fd1cf5.txt +428 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/29e9fe5074bd27e0e5d5d110394fbbcd841baee2651a3c4b4560a632702cede4.txt +26 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/30fefc3a7d6a0041541858293bcbea2dde4caa4c0a5802f996a7f7e8c0085652.txt +23 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3521672491a3479422d5fe1aca6645dd2984090f85da6e5205abfb18fb7a6897.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/35242e7a83f69875e6edeff02291e688c97caafe2f8902e4e19b49d3e78b4cab.txt +176 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/36516aefdc84c5d5a1e7485425913a22dbda69eb1930c5e84d6ae4972b5194b9.txt +23 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/375bdbf54d6584debb4bcc5bce1c9dcfdd581f977c9a8469113dbdf208f4c927.txt +131 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/391a5396cec6230bfabd4ef4eb2350eb895bc5efce377a2218f5702ed020d3e3.txt +20 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/39712155836e5c10ef1b07037b606e4ad2d633e72205d162fdd7e2290aa54f15.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3bb1e548250b3acc43febde65a5cdba9f2e0a3288018aa41f009a3c59ffab51a.txt +390 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3bc70e239e91272782006c638fc0452a714d384224f11f0923036b7be07cf9b5.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3f3d9e0024b1921b067d6f7f88deb4a60cbe7a78e76c64e3f1d7fc3b779b9d04.txt +373 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3f941b3b89cf7b8370ceb83cc76d2120d471b58735d8ca60238a751a48d7f72f.txt +359 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3fa4ca83dcc9237839b1bdeb2e6d16bdfb5ec0c5ce42b24694d8bbf0dcbef72c.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/42fa16951ce7f24b5a467a40e5b449a1d41e662f97ca779864f053f39e097737.txt +26 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4455bf75a91154108304cb283e0fea9948c14f13e20d60887cf2552449dea3b1.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/451167c55c0fa447cc2d5632714f5e3c567fe4f1e1badefab2c1333852198aca.txt +542 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/45f522cacecb1023856e46df79ca625dfc550c94910078bd8aec6e02880b3d42.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/45fd05c4865e7c350b98ad7ac50e1b15462d49af4a91e9b0c9dd933dc9a69742.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4789210f4df8abc03fce1cddd9c2ba517f184840687f2815d741de282c1aa93a.txt +228 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4cada0bd02ea3692eee6f16400d86c6508bbd3bafb2b65fed0419f36d4f83e8f.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/516b24e051bf5630880ebbd55c40a25ce9552ebaf8970a53e8976eb70e522406.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/553fffcd9b1cb158bc3e9edc35da85ca5c3b3d7d2e61c883ebcfa8a65814b583.txt +13 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5757a1f28eff735a8b5e7425478f367812d71e974530f5bedd01219480965f4a.txt +51 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5b698ca13897be3afdb7174256fa1574f8c6892b8bea1a66dd6469d3fe27885a.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5e05b024f653a5ce199e77cbbbd42fb5553562ec714b819421ed0c3e552a75d7.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/60a7062291b01ba068f300612cdbdc20382ac1d4934f07bcdd7167c15299f309.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a.txt +176 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/65f94e99ddaf4f5d1782a6dae23f35d4293a9a01444a13135a6887017d353cee.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/6df43f6f4b5d4587f3d8d71e45532c688fd168afa5fe89d571cb32fa09c4ef51.txt +187 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/709e3175b4212f7b13aa93971c9f62ff8c69ec45ad8c6532a7e0c41d7a7d6f8c.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/71674605ec4c087fe9eb534e3e4f9e26eb2e4aabcd76a29fd156c6a844d44b3d.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7365cc8878a1d7ce155a58c4ca09c3d7a6be413efa5334a80ea842912b669349.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7abd9b6960dcf7d4d0a48606a5b71bfe37d472db68d70637f3a58a56785f1621.txt +13 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7ca6700600dfa9c9497bf5556365067daa802c871ea78239f129309c7a2048f7.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7cfafc877eccc46c0e346ccbaa5c51bb6b894d2b818e617d970211e232785ad4.txt +15 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c.txt +24 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7e5886959f67f8c75063a9d55cd3cb08c5a8cbea9a944fa1df2d4ae038f53721.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7fea0ee51a4ca5d5cea7464135fd55e8b09caf3a61da3d451ac8a22af95c033f.txt +20 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8173d5c29b4f956d532781d2b86e4e30f83e6b7878dce18c919451d6ba707c90.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/83c1763356e822adde0a2cae748d938a73fdc263849ccff6b27776dff213bd32.txt +24 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/86dd7f026f916daf7511e39951ad8ea8cf55a8db67ae64060dacf829761c18f3.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8a35369f3ca263b3c62fbb5032947e53b6bfebc6c8a4d1bb982de1c069f6fba5.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8b43ce8accd61e9d370b5ca9e9c4f953279b5c239926c62315b40e24df51b726.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8bb1b50b0e5c9399ae33bd35fab2769010fa6c14e8860c729a52295d84896b7a.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8bce3b45e49ecd1461f223b46de133d8f62cd39f745cfdaf81bee554b908bd42.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8c7516d4b27b1e495be5e38b612298b63de48d05f49cdac94f70f3cd70f8864b.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9046848b63a5c92bff14e4accca80bd987e0623b74adf9226ce5198d312b79d5.txt +30 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/90eb64f0279b0d9432accfa6023ff803bc4965212383697eee27a0f426d5f8d5.txt +12 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9117d922e667125508dde62b02c1f57ed22f5ad21eb536aa2e2d99e1c796e639.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9387c2d197e2370a740ca457dae1662c56de56b811ee4862024343961307f9bf.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/946c9835d8034d24404f8cfec5f4654cee5dad17e944afc3d06d742cf2882831.txt +240 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/95bd3988beee069fa2848f648dab43cc6e0b2add2ad6bcb17360caf749802bcc.txt +176 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411.txt +396 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9d185ac6703c4b0453974c0d85e9eee43e6941009296bb1f5eb0b54e2329e9f3.txt +202 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9e0dfd2dd4173a530e238cb6adb37aa78c34c6bc7444e0e10c1ab5d8881f63ba.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9f2ae19ef94ba82887729a4a1617ff25eede56611dd21a4b2c6f797df30fca33.txt +2013 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9fa38f610a00115dd1f612bdd3559e3b381ea579538b6ff25a5899da250a5fce.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a00511478c83ebb464ef19d840f061c7444adc4636bb561900e75c5808cfc6cc.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499.txt +121 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a5dea80c1f383cb5f80a6bb0da5e55a2beb9f24adb123ce6300af2cbaaa3bf65.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a825bd853ab71619a4923d7b4311221427848070ff44d990da39b0b274c1683f.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/aaff376532ea30a0cd5330b9502ad4a4c8bf769c539c87ffe78819d188a18ebf.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ae9baa7beea910273c2f384c2a6b721fb7bd02bda3436074a1072e4ee689f985.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b1181a40b2a7b25cf66fd01481713bc1005df082c53ef73e851e55071b102744.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b38f11f6096706e6de553dabe2a7ed142d59b6fa8c97e290c67496154745cdd5.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b3d734001a94efff3579978d953391aa7115f877657d25eb54037a43875d078a.txt +9 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b4eb00df6e2a4d22518fcaa6a2b4646f249b3a3c9814509b22bd2091f1392ff1.txt +27 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b68ad1a3367b825447089e1f8d6829b97f47a89eb78d2f4ebaef4672f5606186.txt +22 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b7e650f3fce5c53249d1cdc608b54df156a97edd636cf9d23498d0cfe7aec63e.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c09aae9d3c77b531f56351a9947bc7446511d6b025b3255312d3e3442a9a7583.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c16f8dcf1a368b83be78d826ea23de4079fe1b4469a0ab9ee20563f37ff3d44b.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c2cfccb812fe482101a8f04597dfc5a9991a6b2748266c47ac91b6a5aae15383.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c30152c94a6d75e021adbc52b3a52470366a46edb917e17deae3259251af244c.txt +42 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c394e3bda1f3b9378f30a7cab11242887eeeafc73c7bef36a0fe13e09691e18b.txt +17 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c962ee4d1d05ddc138b202b2540219ebc57893fcf97b364852094a9a94ce1365.txt +7 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c9a75f18b9ab2927829a208fc6aa2cf4e63b8420887ba29cdb265d6619ae82d5.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30.txt +202 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d1fc1bc0d155df60b2e7705b6b2ae02a05c96f948e1cec6e2fb86360b09f346b.txt +29 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d5c22aa3118d240e877ad41c5d9fa232f9c77d757d4aac0c2f943afc0a95e0ef.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d5fca2653c88ad02d197faead77e22b80c70636b5bec6e02f2805f389a21b86d.txt +10 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/db11fec9946737df39ca3898d9cd8c10ec6f6c3a884a6802b0ad0b81b4e8f23a.txt +1 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/dc91f8200e4b2a1f9261035d4c18c33c246911a6c0f7b543d75347e61b249cff.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ddea4e94a1c35ed9826e54e13a5b50b8f81b21665a00ca07c8861f1859e56b6b.txt +14 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/e271993808fec50ab29350b39539cdec611a9103f827e0aa26d61da70e2d33f8.txt +61 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/e66c269d4819aaab34b49ef5220c4ddab6756f21bb5180761a4eb8561f2b7bbd.txt +438 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ecc269ef87fd38a1d98e30bfac9ba964a9dbd9315c3770fed98d4d7cb5882055.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/efcfee7981ff72431fffb06925cad00a23dce079ed4354f61030ad5abdb78829.txt +22 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f025ccfb7dfb6bdfedc75ca0f67acc69e6fb4998143d834f7c2f38a29989680f.txt +13 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f367c1b8e1aa262435251e442901da4607b4650e0e63a026f5044473ecfb90f2.txt +46 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f51ac2c59a222f7476ce507ca879960e2b64ea64bb2786eefdbeb7b0b538d1b7.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f7715d38a3fa1b4ac97c5729740752505a39cb92ee83ab5b102aeb5eaa7cdea4.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f7db81051789b729fea528a63ec4c938fdcb93d9d61d97dc8cc2e9df6d47f2a1.txt +39 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f9c4c77baa3828004ee54b8a4f2db2e88ed44a6237a493965bf551fac0fcb62d.txt +17 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85.txt +373 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/fb77f0a9c53e473abe5103c8632ef9f0f2874d4fb3f17cb2d8c661aab9cee9d7.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ff8f68cb076caf8cefe7a6430d4ac086ce6af2ca8ce2c4e5a2004d4552ef52a2.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ff92bed461f50338dd703a9ba9aee496a425957873df1d91192776e4bdf5dda7.txt +74 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/COPYRIGHT-library.html +29357 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/Apache-2.0.txt +73 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/BSD-2-Clause.txt +9 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/CC-BY-SA-4.0.txt +427 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GCC-exception-3.1.txt +30 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GPL-2.0-only.txt +133 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GPL-3.0-or-later.txt +202 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/ISC.txt +7 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/LLVM-exception.txt +15 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/MIT.txt +9 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/NCSA.txt +29 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/OFL-1.1.txt +43 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/Unicode-3.0.txt +39 -0
- package/dist/phoenix-diagram/THIRD-PARTY-NOTICES.md +210 -0
- package/dist/phoenix-diagram/THIRD-PARTY.json +5459 -0
- package/dist/phoenix-diagram/VERSION.json +39 -0
- package/dist/phoenix-diagram/bundle/ENGINE.json +39 -0
- package/dist/phoenix-diagram/bundle/SKILL.md +109 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.architecture.json +11 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.class.json +23 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.dataflow.json +11 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.erd.json +25 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.lifecycle.json +11 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.sequence.json +13 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.timeline.json +15 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.tree.json +13 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.waterfall.json +12 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.workflow.json +12 -0
- package/dist/phoenix-diagram/bundle/manifest.json +253 -0
- package/dist/phoenix-diagram/bundle/references/architecture-compare.md +111 -0
- package/dist/phoenix-diagram/bundle/references/authoring-defaults.md +42 -0
- package/dist/phoenix-diagram/bundle/references/brand-marks.md +52 -0
- package/dist/phoenix-diagram/bundle/references/compatibility.md +22 -0
- package/dist/phoenix-diagram/bundle/references/delivery-contract.md +127 -0
- package/dist/phoenix-diagram/bundle/references/extending-types.md +14 -0
- package/dist/phoenix-diagram/bundle/references/migration.md +57 -0
- package/dist/phoenix-diagram/bundle/references/preview.md +45 -0
- package/dist/phoenix-diagram/bundle/references/repository-authoring.md +29 -0
- package/dist/phoenix-diagram/bundle/references/viewer-runtime.md +27 -0
- package/dist/phoenix-diagram/bundle/schemas/README.md +23 -0
- package/dist/phoenix-diagram/bundle/schemas/architecture.schema.json +329 -0
- package/dist/phoenix-diagram/bundle/schemas/class.schema.json +348 -0
- package/dist/phoenix-diagram/bundle/schemas/common.schema.json +358 -0
- package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/dataflow.schema.json +36 -8
- package/dist/phoenix-diagram/bundle/schemas/erd.schema.json +384 -0
- package/dist/phoenix-diagram/bundle/schemas/lifecycle.schema.json +202 -0
- package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/sequence.schema.json +41 -10
- package/dist/phoenix-diagram/bundle/schemas/timeline.schema.json +170 -0
- package/dist/phoenix-diagram/bundle/schemas/tree.schema.json +144 -0
- package/dist/phoenix-diagram/bundle/schemas/waterfall.schema.json +150 -0
- package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/workflow.schema.json +42 -10
- package/dist/phoenix-diagram/bundle/scripts/phoenix-bootstrap.cjs +589 -0
- package/dist/phoenix-diagram/bundle/scripts/phoenix-diagram +6 -0
- package/dist/phoenix-diagram/bundle/scripts/phoenix-launcher.cjs +10 -0
- package/dist/phoenix-ui/THIRD-PARTY.json +164 -158
- package/dist/phoenix-ui/VERSION.json +17 -17
- package/dist/phoenix-ui/bundle/blobs/00727f7b333a7be8ac7740aa257a3a3f691db8ae545a6afab2b787acab5e88df +46 -0
- package/dist/phoenix-ui/bundle/blobs/{8b1723fb51e6aad9bfc0bc5ba8e09b5a373b0e33c251331f6ca14ff6b1c261ef → 00f4a6a630f31eb05fbdd5725e4a294233d24574bd70f4f32f4597d8256a7c1c} +2 -5
- package/dist/phoenix-ui/bundle/blobs/{41400e182e2180a567923d58bfa935d2799a54f2a747b2c5813c3884c84f768b → 04057592e18ea9dd3c4edcac14cde3fa5b75239c2552d4459db8e047068f61a8} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{34571f7d46632205d518d15cb008457494dfad745c6b483bb11d63ca3a22ac48 → 0cb3bf26e1980b0e530373fb32edbe5864a171492a04e2abe1952ffe78bff231} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{3133bec6998506bf92baeeabba39438c5ee27aa3330c2e6245f9df216fbe7b2d → 0e684572eb98d24b39cd70fa23e66c163178f5a11756dcf8a98fe2335636b33f} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{d17b3a454146e74ef4ecf69d7b72a8fa45c4fe1c695dffb0d36690b653cd2d8f → 10553c45c7bf38e527a57a281c4365152a768b4dd7ef597ff34ae841e9ff7d41} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{b544da38492c15f5295053b64189a9ec5ebe446c77138ac52ca7bd9da9c0e842 → 125bc7030d7f2ba789d7b1d5f474af34f8902b764e7bc351b98f1f6f55779929} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{74dbcbbad6c3831e95abb38775dd488c59ae9f1d44a95f5fd4bc0051577488fa → 13cf6c054ed424e2eb639ea12d20a4aa2b1c85eeb00afa8cbd8a30c6c22aadd8} +1 -1
- package/dist/phoenix-ui/bundle/blobs/1832ff9624cebd30370eb0e806665c656ac879215f93d33bcc0750baa47459dc +46 -0
- package/dist/phoenix-ui/bundle/blobs/{8e7de5ca347036a07f5f1e9cab942d8ff378d029bc101fa6d126406f3298c9db → 1864a10c29e7062cca5e49d1790dc7d9d8ea777bfa2ab6fd941635965cd0084d} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{784722b72224a7005a80cdcd6408dd2b25b23fd9619d0f6c8788f7ac681fad4c → 1ecc81de39d28b85b95e797bcc338d4213a50231c3315a741d14571fd22c844f} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{b8c614dc7c2eb30ee0f864fec116dbcafb39e5a199dce66d0c1a88b13f76265a → 2079e4146039a8dadf19a39237cbdc0b8b54ea1fa16d320716c2cbf58161c835} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{dba6e4a09c5d752e5ddebe7c2c1aefc9c4b2a84e01a3178599579778ed2d09e9 → 2813aa68c0804a7fe061d88201d8a684cac9987b48511e1e2cbfe0a869a67a82} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{2889c2817b5079abff254bb6d13f92dbde0fabc38be4acc7d20e613eef5e5829 → 2873e340be947c83c3d03520139b73524fd166a34063d2693d3b711021ea5b87} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{64c4aa2d1c24ae5028e987498ac544020d48600a51d9654b2df562681ba480f2 → 298ef41899acefa056eccf2345378078832db6d868d2377f471f896d5c1599f9} +6 -14
- package/dist/phoenix-ui/bundle/blobs/{1b7174a6f3f49a8efc8f7fa74ff84cf8960e2646b9bc976e4129a7c8ad608faa → 2b5cef2a14a5b1256ec6de9172a4f57f227948ced1921ef86e899f48524d7fb8} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{f148f630f43f3c91cf10feeda5a3c21448ca0683ce82d0fe763c1b43dee584d6 → 2d376cbbf7ec1e262614aac4f1b200e8f60e86e940c7137a2a26788bc857e509} +6 -7
- package/dist/phoenix-ui/bundle/blobs/2e5985a6eb339d70cfa25f6d2b420a0ef286caa8467f0226eb841702ec438d0b +46 -0
- package/dist/phoenix-ui/bundle/blobs/{7e199833376de5d2b6e088ee2965b448f94da842f28ccbd707e1cc3a295147c8 → 3322d691bf7b578b38723576df6b266993b2afb9e567b0cd1ded898ffe1dc17e} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{6530364f99c98b9ae9a8f9f3d34866a6393a75e75db48d8c0cbb49dd93a69f81 → 3625c5c2750f117021232ce81c1e39ac5ef7c21445729327b88cf54dfc937df0} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{335ccd78685b679dc0c880fc46139d0fa94aebcfa6e5ff848fd0599b187d25c4 → 36310febe3e7bd4c9b21407603f2a04afefdc87b7821758bb47098b1b2876765} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{24d92a176573768bfffaf8f9c6483e58bceb5bf2a095d1cdf3d3a2c0bcda0707 → 3a9c2daf4ef284ca83b0e7f6fef3a5300e273c32b20769e090463cb8a8b0b06f} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{153e377c44b162cf0074698a61716db7f664db78f5635efa926bed484de4f54c → 3ce1a44efe39b93e7a39307c6a5e5f514e938fbae818e358986b4db1b05883ca} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{ad8ad0b7acf6c88ef9ce0ee1a640c2200da77821f0d97d605d4f1d4a10e5897a → 403fcde498d75abec7844ee31434201152ac229f7675772164d69563f0572da4} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{e8ee6c08e94b80324173d89d6f4cdc5b4829ea6858b3a11fc186588a490cada4 → 45d0e7eff0923c40296e971318756617944c4f1c97f03126cd74c0f8c629f8a4} +3 -1
- package/dist/phoenix-ui/bundle/blobs/{e23dabf908842be08751fc4e7f3b586e8c6b1ca0fc30303ec5317c77f83dcf26 → 4c0f396bfa85171f61972d3f3765733318769bb53fe06d2cdcb5d7f64578b5b8} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{a5517d32c1539c388c47c00879a0d807ed2989647bfa8c0844ef22328f75f5be → 4f6563876e0e0cc51c38a06767b8800eb3238611e9fdd11e5ff9dd487c742e74} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{a9d2203acd45ca33a13d5c68b02b23ed512425ac15f0e8438318ed124b43729d → 4fcada229d0c689c1a493d13184145a81ff40c498e882142ae390bda8e5b2492} +15 -0
- package/dist/phoenix-ui/bundle/blobs/5293adc55cf66068b6df20468ad9e91433fd1c48e75d66c86f874aca951a8fb9 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{96e2e6bd4fcf9a2c6da65fb029f96d9176308fae2efd9d8653d3b8d838960e07 → 5436f0301ec258f3badcc6842019ee29a9b870d2727dc425fbc9cc0f4f88a284} +3 -1
- package/dist/phoenix-ui/bundle/blobs/{d0f4939e86a62b0ca437d51a997ceba7e77d64566b7fa8ca2747487e31ca819d → 54a09a4afdffca3cc135e5007716ea684dc1ed7a78349de859225c55a2fed810} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{d9f1d8e01b40a8d7310e367f7e3da7d1fac5850313082feb853093b7eb36d2bd → 55277fa15eb4bd2f09bf7bb24c4e79df417b06654b1e10f502c7928b192fd7cc} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{3759780bd25526f7eaa3793c010356bccb850d40db931e0c6d47d35e81e96f96 → 567c3f42394f9aee9b048a001016a7ba9d8773d78027f8c995c379886634e719} +6 -3
- package/dist/phoenix-ui/bundle/blobs/57c8f33a7401f918566b8a4883871a69ef2223438c51f158c67f69e3250be465 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{5f5fc6bb04605feb7ac6f6b19e35ff2f8d39e11a89fdd260159c6829f27b4a4d → 61450dbef64859e3136cd17ae3e997134d5df5721d96985c4e07367f38522129} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{e3c1e925be0b2deb0e3765b83ab94b86560292364f275e98bb23a8bdf2c2e049 → 656bbfda3e72b40d53b5832293dc8700ad8a784e804a6246271bf0ea23527822} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{b49cdd7f125d9cb5ce10de7d39c5e3daff7d6649b9ac1c5ffd36a0aebdc4e7ca → 68b454a99ba72c3b9b93ed96c4267847297169f6a5bf321b20e60d637c271068} +6 -3
- package/dist/phoenix-ui/bundle/blobs/68e44832c82b873b0aeb2da56def7b1de5f612c019445e5e28238c690124cbbe +46 -0
- package/dist/phoenix-ui/bundle/blobs/{ec8968ee6a8e42b952e5ece2369ba69f40185c62a135ed54e930df3170421d9c → 6b8d4c71355429a0b16bf367163fea46103a0a99b4e34f87608a39d85b1b980a} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{264815d0080e4862715a4f82542e66241c6563f07259d32aed4a17bbc329b9cc → 6cef874722442de7c60ea96f4221dc54cc4250a270cd05a1e818b58c5b43e232} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{2028a857c0476324a4256faf66693e2a869275e53a88d2b182a28b62c2a17893 → 7181f1f4c452c4345695f9100f6deb610f54f4c55f126043433a65b8491fc680} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{ccb76aabba47938d518a5d46a09d7e70c4a9222bc391e163763f2a7f12d30437 → 75850a8c9d2a8259f71ef1f86dd5d1325415227c1887e81a3467ae1ee400979f} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{4b03cdb5b17d534b5c7e84b079c066f59e8b60b9e454671a453867c4aeb9920d → 77bcc6c2d6ac00a8bfead3b6c6b5fc69f4b60bf086ebbc89271e1b23003168c9} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{9520e25a381c82af6f46e175b7c347d1dc513d933dd6cf8c52570c72abb4ca7f → 792552563745d208594cf4ade19110f2c811a0e1a2661ae1ef43a185ccff5a69} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{f7c8af35acf71a96056afb6afcff6a3ea42f65561f02652d04e11ad9ece9b8e9 → 7acd9b6f2f61b509c6a518508b8b52c2f0de67cdea4fd3f3d383b3ce8b38cf5e} +6 -7
- package/dist/phoenix-ui/bundle/blobs/7bacc1e3da7e8b7127ca3f8f69a2422098b9b2d23fbedefc56dfe76117c1c0e3 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{3077452231f1ce3c48ae5d8dd912b14ab30de55a270a031d07065357bc1cca94 → 8078b804bea630ed9c4ea07ec2f8ac92aba4128725860a66599eda90390d98f6} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{99f49df49ade2ca21deffcc752fc8a76c9a6645f5416b9314ea3ab1bd010f34c → 88b150cb804bc141b80a5687a091f61b99627155c465a27adb88546ef615af92} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{a64a45a4e082a0d05daf711080cb7c3195f15fb6b3f3dce0521f4816b64452f3 → 90f8b07ec12b78e633e306322cda58415aea70d8e0f9ff85bd439361c01dabe1} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{486145071d3445e82774f1b39b2bb15986ce52277e798a31ef7e9c27afb42af3 → 95b2944686e8258a655c3b5e6db68593e24e5199354e46aac553918ea2c0f55a} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{a1998e37084c11f496d4970f86a85d5a6375bbeaa4797b9f42bbac2d44048d23 → 979639f0e8859d600a8db57e733566d9ad37ff8258c3e05a6f9c0f3008e92373} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{3173293607055ea6e1a153ec6f51fb8154782157c8a61abf411da1f41be61728 → 9eaaa00049844060f842fe7fb73cc8edc4be5225cf38a96f33bda3ffc381456c} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{69086f7cb235b35ccc230e1f2da41cbb10cea8f0636b6d4514672113a3adc2cb → a420bbda622399399a6b5c7c3614dcaebc6c62faceaf7b3c83c97db53d26b165} +1 -1
- package/dist/phoenix-ui/bundle/blobs/a63054b8920905045753facece83f154bf806158c6f46ef380036e7a82d4fde5 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{e802e4f7bdc89050a9c0f2ca506e1d493a2316e6e810c0336c57aa073717ef3e → a63788c764b0e4fdcbc029d46093016310edcbcf702d62688e5aaac7ddeee6fd} +3 -1
- package/dist/phoenix-ui/bundle/blobs/{827a211ea03d2cb44b4ea1bc81ba1a6dc51a87fa16d6692997c4e4751241c815 → acfc4c26b135d5b27fc0930738486c9d43d379704102fab45564320180942e4b} +4 -2
- package/dist/phoenix-ui/bundle/blobs/{8da14f3eabac53c990a66e721387367b46cb676cc4204e8c67d6f88c95a6217f → ad243ca615349127aa422bccc1a6604ad17149735659087ca5bab3c5fae97f4e} +6 -7
- package/dist/phoenix-ui/bundle/blobs/b63931066e2b2623d012e1a3c1a0769cc43ed6640460c3899669b45539d6a20d +46 -0
- package/dist/phoenix-ui/bundle/blobs/{bb65af58ecc3e0c0093dc9a705a7ab643035e4e592c3adb93583c82d1aef1f51 → bde793ab5ad776f7e6f6d25ce2b838c1b5022054a1dad5502a873423eb0ad917} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{48b7e6acf597d4f0320834db1393003451d1bd7c0d024dd62f7577a398b2e320 → c0a70ab2889e5c16e1f09249aefad948ce352c42cfe2b5afb758a4524e1b21b6} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{60b2914df394800688c4e20f4eb34e117cd430df9954cf4d48574734507723f4 → c9ee9006ae6c0194a5d39a9f0cb275c52d74a71ea3f6dc2b4c1c7bd89f48a2c0} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{d21ccafc83495872c80ec9873ad4fbfb4223837a747b524aa03b6d819f7c08e3 → cadc2daefcf238aab981fa56388381d3d5ab9c0686bb9dd8187035c9933dfcee} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{d7b744fcc95164d96d9f811a93e2e8a374887146eb762ef775f3d3c7f27abc8d → cbea5728b90f58ff047be6ec4f14eed9d63c7148f5db99b5f147d2f17b472317} +1 -1
- package/dist/phoenix-ui/bundle/blobs/d408a4fea71b656aa8a5f6b5c037815a6e4229df336629ebddf4b5c85ed82fac +46 -0
- package/dist/phoenix-ui/bundle/blobs/{6ff950a5729ad9ea480ddf8c1b489b1c84189bbf7d6034b3b5a98e7c11a28cec → d9ae0c782d8a77787561536c0d7bc3b61175d59303f3cb8c20796f85140c6984} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{1d53e2226465b1047faec7cda2e743e61540ea69e073a3a4057e8d86b277405f → e2932d63eb7f52a82960a19ba79bc800ef4f212164e098f96dee7a4326302f38} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{fa576f6655b235bdea535198647305b7a3855e810180cbdf5d4c246c03c7d190 → e381bcfec42ac541d574011460600cf0818aa0e3362e8c6d205b4157890bf821} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{8fbce5b4859e6011afa83b1c07c4436589cd7181f9cb997538f4c27f196d0d34 → e415657d8725d9b60ece42cc18581da177c42fc47cb11e501db722a5f524ecf7} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{1ba392d45294b3e90cc7f3964f134ae685118bbbcc84ca944953a4270ec67a54 → e46d63e5f8a6ead1d44c8b6302a0c7247af8585b975ab5715518381777622ede} +6 -3
- package/dist/phoenix-ui/bundle/blobs/ee63b3f9b354d69443d05ea4a338af56546897335ace7533546e10be56ea2207 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{c23617601e9c4d97b775c175a5ce1642c40459b157d0821609fe1d253b83ced8 → ef7d57633252f4604749447608850e299c277f7dd1a32776685df0724b1051c8} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{0581c8428246f43c5374393878a29e38f2b1865df87e6f13f2309b8eae54e76f → f0652c6ce41e6949133360178f192ea4ee9f6129a018c7a8b6652870c2330392} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{cfac9eaf96481a8874391e5cecc6149abea1f1f19622f77f1ebb9e1876720e91 → f06c9d797ca2ac8c6a49d3dcd2e99d1b4df8bc9637a49c7e80f3161f49d06b1b} +4 -2
- package/dist/phoenix-ui/bundle/blobs/{882bfe4d8ffd9bc217b0c1bdd5e3cf659cd4b46598d631c4649aaaf0e13333ce → f077545caeb3ecb9f51a3f703a09736ca924869f4b4345c1b1ffbd9bf927a287} +6 -3
- package/dist/phoenix-ui/bundle/blobs/f781c5874bcd79ebe1b3b012275b9af7eae6c4867e9a16e29bb3d3ed3dc1940b +46 -0
- package/dist/phoenix-ui/bundle/blobs/fa10c0c926997387c89b7c1070e25b1b2b53ee891741e3c450a89ec6c6dcaf7d +46 -0
- package/dist/phoenix-ui/bundle/blobs/fb1a36ab7116b0c6709b89720cdded29d80982114c2f87cad614e01e126270dd +46 -0
- package/dist/phoenix-ui/bundle/blobs/fbd3214fc12ba70d9c69a995742ba73dc5365823af63afdc93c0c8a8f0c484af +46 -0
- package/dist/phoenix-ui/bundle/blobs/{77682e9d63b484f94a699f2c0b393e4540797d311362c384a3d643aec11d6985 → fea19b8381ec10ff8ed1923a336332974bbb552227ed215e7ddaaf0ec0112c1d} +1 -1
- package/dist/phoenix-ui/bundle/manifest.json +126 -126
- package/docs/phoenix-diagram.md +173 -0
- package/docs/phoenix-ui.md +57 -16
- package/package.json +14 -10
- package/skills/agi-mode/SKILL.md +3 -1
- package/skills/agi-mode/assets/sdlc/event.md +4 -5
- package/skills/agi-mode/assets/sdlc/object-status.md +1 -1
- package/skills/agi-mode/assets/sdlc/protocol.md +4 -2
- package/skills/agi-mode/evals/scenarios.md +108 -3
- package/skills/agi-mode/playbooks/authoring-a-skill.md +13 -2
- package/skills/agi-mode/playbooks/eval.md +19 -3
- package/skills/agi-mode/playbooks/hillclimb.md +4 -2
- package/skills/agi-mode/playbooks/reflection.md +1 -1
- package/skills/agi-mode/playbooks/sdlc.md +10 -6
- package/skills/agi-mode/playbooks/what-next.md +6 -2
- package/skills/agi-mode/references/eval-protocol.md +13 -4
- package/skills/agi-mode/references/interface-design.md +1 -0
- package/skills/agi-mode/references/remote-evolution.md +178 -0
- package/skills/agi-mode/references/skill-evolution.md +2 -0
- package/skills/agi-mode/scripts/evolution/compare.py +569 -0
- package/skills/agi-mode/scripts/evolution/evolution.py +2886 -0
- package/skills/agi-mode/scripts/evolution/examples/public-smoke.json +128 -0
- package/skills/agi-mode/scripts/evolution/examples/quality-calibration.json +128 -0
- package/skills/agi-mode/scripts/evolution/examples/quality-rubric.json +133 -0
- package/skills/agi-mode/scripts/evolution/protocol.py +1586 -0
- package/skills/agi-mode/scripts/evolution/pyproject.toml +16 -0
- package/skills/agi-mode/scripts/evolution/quality.py +689 -0
- package/skills/agi-mode/scripts/evolution/remote.py +2303 -0
- package/skills/agi-mode/scripts/evolution/tests/support.py +201 -0
- package/skills/agi-mode/scripts/evolution/tests/test_apply.py +643 -0
- package/skills/agi-mode/scripts/evolution/tests/test_bounded_exploration.py +236 -0
- package/skills/agi-mode/scripts/evolution/tests/test_bundles.py +414 -0
- package/skills/agi-mode/scripts/evolution/tests/test_calibration.py +460 -0
- package/skills/agi-mode/scripts/evolution/tests/test_compare.py +377 -0
- package/skills/agi-mode/scripts/evolution/tests/test_protocol.py +357 -0
- package/skills/agi-mode/scripts/evolution/tests/test_quality.py +647 -0
- package/skills/agi-mode/scripts/evolution/tests/test_remote.py +857 -0
- package/skills/agi-mode/scripts/evolution/tests/test_search.py +1109 -0
- package/skills/agi-mode/scripts/evolution/tests/test_typesafe.py +624 -0
- package/skills/agi-mode/scripts/evolution/tests/test_verifier_context.py +132 -0
- package/skills/agi-mode/scripts/evolution/typesafe_worker.py +145 -0
- package/skills/agi-mode/scripts/evolution/uv.lock +2548 -0
- package/skills/apply-code-review/SKILL.md +1 -0
- package/skills/apply-code-review/agents/openai.yaml +2 -0
- package/skills/apply-doc-review/SKILL.md +1 -0
- package/skills/apply-doc-review/agents/openai.yaml +2 -0
- package/skills/apply-ui-review/SKILL.md +1 -0
- package/skills/apply-ui-review/agents/openai.yaml +2 -0
- package/skills/autoresearch/SKILL.md +1 -0
- package/skills/clean-artifacts/SKILL.md +52 -0
- package/skills/clean-artifacts/agents/openai.yaml +4 -0
- package/skills/clean-artifacts/evals/scenarios.md +13 -0
- package/skills/clean-artifacts/references/history-cleanup.md +41 -0
- package/skills/crd/SKILL.md +100 -65
- package/skills/crd/assets/cr-template.md +15 -0
- package/skills/crd-respond/SKILL.md +17 -5
- package/skills/crd-respond/agents/openai.yaml +2 -2
- package/skills/crd-respond/assets/response-template.md +7 -0
- package/skills/crd-respond/evals/scenarios.md +7 -0
- package/skills/create-verification-skill/SKILL.md +1 -0
- package/skills/debugging/SKILL.md +1 -0
- package/skills/design-md/SKILL.md +1 -0
- package/skills/design-reference/SKILL.md +6 -2
- package/skills/design-reference/evals/scenarios.md +4 -0
- package/skills/dev-plan/SKILL.md +11 -6
- package/skills/dev-plan/references/execution-workflow.md +1 -1
- package/skills/dev-plan/references/plan-skeleton.md +234 -69
- package/skills/dev-plan/scripts/check_plan.py +1 -1
- package/skills/documentation-writer/SKILL.md +19 -14
- package/skills/documentation-writer/references/architecture.md +6 -2
- package/skills/documentation-writer/references/user-manual.md +2 -2
- package/skills/elintp/SKILL.md +12 -6
- package/skills/experience-capture/SKILL.md +1 -0
- package/skills/gdpr-compliant/SKILL.md +1 -0
- package/skills/kpi-dashboard-design/SKILL.md +1 -0
- package/skills/landing-page-conversion-audit/SKILL.md +1 -0
- package/skills/mcp-release-qa/SKILL.md +2 -1
- package/skills/meeting-minutes/SKILL.md +1 -0
- package/skills/optimize-agents-md/SKILL.md +128 -0
- package/skills/optimize-agents-md/assets/coding-principles.md +118 -0
- package/skills/phoenix-diagram/ENGINE.json +39 -0
- package/skills/phoenix-diagram/SKILL.md +109 -0
- package/skills/phoenix-diagram/examples/legacy.agent-tool-call.workflow.json +94 -0
- package/skills/phoenix-diagram/examples/legacy.async-job-roundtrip.sequence.json +61 -0
- package/skills/phoenix-diagram/examples/legacy.deployment-release.lifecycle.json +49 -0
- package/skills/phoenix-diagram/examples/legacy.product-analytics.dataflow.json +76 -0
- package/skills/{archify/test/fixtures/v1-baseline/web-app.architecture.json → phoenix-diagram/examples/legacy.web-app.architecture.json} +16 -11
- package/skills/phoenix-diagram/examples/minimal.architecture.json +11 -0
- package/skills/phoenix-diagram/examples/minimal.class.json +23 -0
- package/skills/phoenix-diagram/examples/minimal.dataflow.json +11 -0
- package/skills/phoenix-diagram/examples/minimal.erd.json +25 -0
- package/skills/phoenix-diagram/examples/minimal.lifecycle.json +11 -0
- package/skills/phoenix-diagram/examples/minimal.sequence.json +13 -0
- package/skills/phoenix-diagram/examples/minimal.timeline.json +15 -0
- package/skills/phoenix-diagram/examples/minimal.tree.json +13 -0
- package/skills/phoenix-diagram/examples/minimal.waterfall.json +12 -0
- package/skills/phoenix-diagram/examples/minimal.workflow.json +12 -0
- package/skills/phoenix-diagram/references/architecture-compare.md +111 -0
- package/skills/phoenix-diagram/references/authoring-defaults.md +42 -0
- package/skills/phoenix-diagram/references/brand-marks.md +52 -0
- package/skills/phoenix-diagram/references/compatibility.md +22 -0
- package/skills/phoenix-diagram/references/delivery-contract.md +127 -0
- package/skills/phoenix-diagram/references/extending-types.md +14 -0
- package/skills/phoenix-diagram/references/migration.md +57 -0
- package/skills/phoenix-diagram/references/preview.md +45 -0
- package/skills/phoenix-diagram/references/repository-authoring.md +29 -0
- package/skills/phoenix-diagram/references/viewer-runtime.md +27 -0
- package/skills/phoenix-diagram/schemas/README.md +23 -0
- package/skills/phoenix-diagram/schemas/architecture.schema.json +329 -0
- package/skills/phoenix-diagram/schemas/class.schema.json +348 -0
- package/skills/phoenix-diagram/schemas/common.schema.json +358 -0
- package/skills/{archify/schemas/lifecycle.schema.json → phoenix-diagram/schemas/dataflow.schema.json} +63 -58
- package/skills/phoenix-diagram/schemas/erd.schema.json +384 -0
- package/skills/phoenix-diagram/schemas/lifecycle.schema.json +202 -0
- package/skills/phoenix-diagram/schemas/sequence.schema.json +254 -0
- package/skills/phoenix-diagram/schemas/timeline.schema.json +170 -0
- package/skills/phoenix-diagram/schemas/tree.schema.json +144 -0
- package/skills/phoenix-diagram/schemas/waterfall.schema.json +150 -0
- package/skills/phoenix-diagram/schemas/workflow.schema.json +460 -0
- package/skills/phoenix-diagram/scripts/phoenix-bootstrap.cjs +589 -0
- package/skills/phoenix-diagram/scripts/phoenix-diagram +6 -0
- package/skills/phoenix-diagram/scripts/phoenix-launcher.cjs +10 -0
- package/skills/phoenix-ui/GENERATED.json +255 -240
- package/skills/phoenix-ui/SKILL.md +7 -4
- package/skills/phoenix-ui/evals/scenarios.md +8 -1
- package/skills/phoenix-ui/reference/craft-floor.md +3 -1
- package/skills/phoenix-ui/reference/critique.md +6 -14
- package/skills/phoenix-ui/reference/init.md +1 -1
- package/skills/phoenix-ui/reference/live.md +1 -1
- package/skills/phoenix-ui/reference/operate.md +15 -0
- package/skills/phoenix-ui/scripts/ENGINE.json +17 -17
- package/skills/phoenix-ui/scripts/phoenix-bootstrap.cjs +2 -5
- package/skills/portal-app-exchange/SKILL.md +1 -0
- package/skills/portal-dev-setup/SKILL.md +71 -12
- package/skills/portal-dev-setup/scripts/onebox.sh +69 -6
- package/skills/portal-external-app/SKILL.md +55 -16
- package/skills/portal-external-app/references/config-placement.md +108 -2
- package/skills/portal-external-app/references/registration-and-onebox.md +56 -2
- package/skills/portal-logging/SKILL.md +1 -0
- package/skills/portal-micro-app/SKILL.md +2 -1
- package/skills/portal-micro-app/references/sdk-reference.md +3 -1
- package/skills/prd/SKILL.md +238 -159
- package/skills/prd/evals/scenarios.md +13 -0
- package/skills/prd/references/prd-skeleton.md +14 -4
- package/skills/react/SKILL.md +1 -0
- package/skills/resolve-blocked/SKILL.md +46 -19
- package/skills/resolve-blocked/agents/openai.yaml +2 -2
- package/skills/resolve-blocked/evals/scenarios.md +22 -0
- package/skills/resolve-blocked/references/decisions-contract.md +7 -4
- package/skills/review-code/SKILL.md +308 -46
- package/skills/review-code/agents/openai.yaml +2 -0
- package/skills/review-dev-plan/SKILL.md +88 -33
- package/skills/review-dev-plan/agents/openai.yaml +2 -0
- package/skills/review-dev-plan/references/report-contract.md +53 -19
- package/skills/review-dev-plan/references/review-lenses.md +2 -1
- package/skills/review-prd/SKILL.md +90 -34
- package/skills/review-prd/agents/openai.yaml +2 -0
- package/skills/review-prd/references/report-contract.md +54 -18
- package/skills/review-prd-dev-gaps/SKILL.md +1 -0
- package/skills/review-prd-dev-gaps/agents/openai.yaml +2 -0
- package/skills/review-ui/SKILL.md +369 -71
- package/skills/review-ui/agents/openai.yaml +2 -0
- package/skills/review-ui/evals/scenarios.md +2 -0
- package/skills/rust/SKILL.md +76 -84
- package/skills/rust/references/api-design.md +97 -0
- package/skills/rust/references/{chapter_10.md → async-tokio.md} +42 -18
- package/skills/rust/references/behavioral-patterns.md +49 -0
- package/skills/rust/references/bevy.md +95 -0
- package/skills/rust/references/{chapter_02.md → clippy-and-linting.md} +26 -15
- package/skills/rust/references/{chapter_01.md → coding-idioms.md} +58 -7
- package/skills/rust/references/crates-and-dependencies.md +66 -0
- package/skills/rust/references/{chapter_08.md → documentation.md} +30 -3
- package/skills/rust/references/{chapter_04.md → error-handling.md} +32 -6
- package/skills/rust/references/{chapter_06.md → generics-and-dispatch.md} +28 -11
- package/skills/rust/references/macros.md +45 -0
- package/skills/rust/references/{chapter_03.md → performance.md} +25 -2
- package/skills/rust/references/{chapter_09.md → pointers-and-ownership.md} +37 -17
- package/skills/rust/references/{chapter_05.md → testing.md} +18 -2
- package/skills/rust/references/{chapter_07.md → type-state.md} +5 -1
- package/skills/rust/references/unsafe-and-ffi.md +56 -0
- package/skills/rust-port/SKILL.md +144 -0
- package/skills/rust-review/SKILL.md +177 -0
- package/skills/security-audit/SKILL.md +1 -0
- package/skills/spec-human-decision/SKILL.md +1 -0
- package/skills/sql-optimization/SKILL.md +1 -0
- package/skills/story-points/SKILL.md +1 -0
- package/skills/swarm/SKILL.md +1 -0
- package/skills/test-plan/SKILL.md +1 -0
- package/skills/ui-loop/SKILL.md +39 -0
- package/skills/ui-loop/agents/openai.yaml +3 -0
- package/skills/ui-pattern-research/SKILL.md +1 -0
- package/skills/use-llm-gateway/SKILL.md +58 -0
- package/skills/use-llm-gateway/agents/openai.yaml +4 -0
- package/skills/use-llm-gateway/references/api.md +129 -0
- package/skills/use-llm-gateway/references/recovery.md +86 -0
- package/skills/use-prompt-dsl/SKILL.md +165 -0
- package/skills/use-prompt-dsl/references/examples.md +726 -0
- package/skills/use-prompt-dsl/references/language.md +938 -0
- package/skills/use-rustify-docs/SKILL.md +60 -0
- package/skills/use-rustify-docs/agents/openai.yaml +4 -0
- package/skills/use-rustify-docs/references/rustify-docs.md +138 -0
- package/skills/use-task-gateway/SKILL.md +60 -0
- package/skills/use-task-gateway/agents/openai.yaml +3 -0
- package/skills/use-task-gateway/references/authentication.md +75 -0
- package/skills/use-task-gateway/references/task-api.md +121 -0
- package/skills/use-task-gateway/references/workers.md +85 -0
- package/skills/use-task-gateway/references/workflow-actions.md +66 -0
- package/skills/use-workflow-service/SKILL.md +57 -0
- package/skills/use-workflow-service/agents/openai.yaml +3 -0
- package/skills/use-workflow-service/references/action-provider.md +84 -0
- package/skills/use-workflow-service/references/authentication.md +76 -0
- package/skills/use-workflow-service/references/authoring.md +62 -0
- package/skills/use-workflow-service/references/mcp.md +47 -0
- package/skills/use-workflow-service/references/open-api.md +88 -0
- package/skills/use-workflow-service/references/orchestration-choice.md +63 -0
- package/skills/working-with-mbx/SKILL.md +1 -0
- package/skills/working-with-mise/SKILL.md +1 -0
- package/skills/xgent-app-release/SKILL.md +114 -16
- package/skills/xgent-app-release/references/build-and-package.md +2 -1
- package/skills/xgent-app-release/references/publish-api.md +6 -1
- package/skills/xgent-app-release/references/troubleshooting.md +2 -1
- package/skills/xgent-app-release/references/verify-preflight.mjs +21 -1
- package/skills/xgent-app-release/scripts/preflight.mjs +42 -3
- package/skills/xgent-image-push/SKILL.md +1 -0
- package/skills/xgent-init/SKILL.md +1 -0
- package/docs/claude-context-goal-guard.md +0 -124
- package/docs/codex-context-goal-guard.md +0 -109
- package/hooks/claude/context-goal-guard.js +0 -139
- package/hooks/claude/settings.example.json +0 -26
- package/hooks/codex/context-goal-guard.py +0 -189
- package/hooks/codex/hooks.example.json +0 -26
- package/skills/archify/SKILL.md +0 -137
- package/skills/archify/assets/template.html +0 -14937
- package/skills/archify/bin/archify.mjs +0 -2139
- package/skills/archify/bin/open-artifact.mjs +0 -86
- package/skills/archify/bin/preview.mjs +0 -653
- package/skills/archify/bin/visual-check.mjs +0 -829
- package/skills/archify/brand-marks/README.md +0 -31
- package/skills/archify/brand-marks/catalog.json +0 -131
- package/skills/archify/delta/architecture-delta.mjs +0 -1232
- package/skills/archify/examples/agent-run.lifecycle.json +0 -60
- package/skills/archify/examples/brand-aware-delivery.architecture.json +0 -47
- package/skills/archify/examples/cache-miss-request.sequence.json +0 -82
- package/skills/archify/examples/checkout-platform.base.architecture.json +0 -31
- package/skills/archify/examples/checkout-platform.head.architecture.json +0 -31
- package/skills/archify/examples/dataflow-product-analytics.html +0 -15048
- package/skills/archify/examples/event-stream.dataflow.json +0 -57
- package/skills/archify/examples/incident-response.workflow.json +0 -64
- package/skills/archify/examples/lifecycle-agent-run.html +0 -14983
- package/skills/archify/examples/production-deployment.architecture.json +0 -71
- package/skills/archify/examples/release-delivery.workflow.json +0 -62
- package/skills/archify/examples/sequence-cache-miss-request.html +0 -15063
- package/skills/archify/examples/web-app-rendered.html +0 -15012
- package/skills/archify/examples/workflow-agent-tool-call-rendered.html +0 -15054
- package/skills/archify/migrations/workflow-v2.mjs +0 -279
- package/skills/archify/package-lock.json +0 -149
- package/skills/archify/package.json +0 -39
- package/skills/archify/recipes/scenarios.mjs +0 -391
- package/skills/archify/references/authoring-contract.md +0 -247
- package/skills/archify/references/brand-marks.md +0 -65
- package/skills/archify/references/delivery-contract.md +0 -138
- package/skills/archify/references/viewer-runtime.md +0 -45
- package/skills/archify/renderers/architecture/grid.mjs +0 -62
- package/skills/archify/renderers/architecture/render-architecture.mjs +0 -1078
- package/skills/archify/renderers/dataflow/README.md +0 -104
- package/skills/archify/renderers/dataflow/render-dataflow.mjs +0 -483
- package/skills/archify/renderers/lifecycle/README.md +0 -115
- package/skills/archify/renderers/lifecycle/render-lifecycle.mjs +0 -561
- package/skills/archify/renderers/sequence/README.md +0 -114
- package/skills/archify/renderers/sequence/render-sequence.mjs +0 -464
- package/skills/archify/renderers/shared/brand-marks.mjs +0 -563
- package/skills/archify/renderers/shared/cli.mjs +0 -218
- package/skills/archify/renderers/shared/desktop-readability.mjs +0 -26
- package/skills/archify/renderers/shared/diagnostics.mjs +0 -160
- package/skills/archify/renderers/shared/engineering-profiles.mjs +0 -157
- package/skills/archify/renderers/shared/generated-brand-marks.mjs +0 -2003
- package/skills/archify/renderers/shared/generated-validators.mjs +0 -13
- package/skills/archify/renderers/shared/geometry.mjs +0 -1423
- package/skills/archify/renderers/shared/i18n.mjs +0 -595
- package/skills/archify/renderers/shared/layout-report.mjs +0 -40
- package/skills/archify/renderers/shared/legend.mjs +0 -217
- package/skills/archify/renderers/shared/output-path.mjs +0 -340
- package/skills/archify/renderers/shared/repository-evidence.mjs +0 -239
- package/skills/archify/renderers/shared/repository-location.mjs +0 -58
- package/skills/archify/renderers/shared/text-fit.mjs +0 -49
- package/skills/archify/renderers/shared/utils.mjs +0 -232
- package/skills/archify/renderers/shared/validator.mjs +0 -86
- package/skills/archify/renderers/workflow/README.md +0 -223
- package/skills/archify/renderers/workflow/render-workflow.mjs +0 -35
- package/skills/archify/renderers/workflow/workflow-compiler.mjs +0 -4400
- package/skills/archify/renderers/workflow/workflow-migration-geometry.mjs +0 -144
- package/skills/archify/schemas/README.md +0 -211
- package/skills/archify/schemas/architecture.schema.json +0 -178
- package/skills/archify/schemas/common.schema.json +0 -115
- package/skills/archify/scripts/check-render-output.mjs +0 -916
- package/skills/archify/scripts/check-update.mjs +0 -1667
- package/skills/archify/scripts/generate-brand-marks.mjs +0 -141
- package/skills/archify/scripts/generate-validators.mjs +0 -66
- package/skills/archify/scripts/render-examples.mjs +0 -26
- package/skills/archify/scripts/update-contract.mjs +0 -182
- package/skills/archify/skill-release.json +0 -10
- package/skills/archify/test/adaptive-reader-layout.test.mjs +0 -86
- package/skills/archify/test/animation.test.mjs +0 -179
- package/skills/archify/test/architecture-compare-recovery.test.mjs +0 -157
- package/skills/archify/test/architecture-delta-markers.test.mjs +0 -137
- package/skills/archify/test/architecture-delta.test.mjs +0 -705
- package/skills/archify/test/artifact-receipt-flush.test.mjs +0 -126
- package/skills/archify/test/authored-reachability.test.mjs +0 -95
- package/skills/archify/test/authoring-safety-contract.test.mjs +0 -54
- package/skills/archify/test/automatic-port-spread.test.mjs +0 -376
- package/skills/archify/test/base-input-compatibility.test.mjs +0 -42
- package/skills/archify/test/brand-marks.test.mjs +0 -678
- package/skills/archify/test/chapter-delta-preview.test.mjs +0 -157
- package/skills/archify/test/chapter-handoff.test.mjs +0 -97
- package/skills/archify/test/chapter-rail.test.mjs +0 -86
- package/skills/archify/test/checkout-line-endings.test.mjs +0 -72
- package/skills/archify/test/ci-scope.test.mjs +0 -59
- package/skills/archify/test/clean-skill-staging.test.mjs +0 -440
- package/skills/archify/test/cli-output-types.test.mjs +0 -201
- package/skills/archify/test/cli.test.mjs +0 -986
- package/skills/archify/test/community-proof-intake.test.mjs +0 -125
- package/skills/archify/test/cursor-onboarding.test.mjs +0 -74
- package/skills/archify/test/degraded.test.mjs +0 -161
- package/skills/archify/test/delivery-contract.test.mjs +0 -52
- package/skills/archify/test/desktop-reader-browser.test.mjs +0 -80
- package/skills/archify/test/diagram-guide.test.mjs +0 -92
- package/skills/archify/test/engineering-profile.test.mjs +0 -209
- package/skills/archify/test/export-browser.test.mjs +0 -305
- package/skills/archify/test/export-cleanup-browser.test.mjs +0 -294
- package/skills/archify/test/finder-browser.test.mjs +0 -274
- package/skills/archify/test/finder.test.mjs +0 -104
- package/skills/archify/test/fixtures/automatic-routing-node-border-clearance.workflow.json +0 -40
- package/skills/archify/test/fixtures/fail-migration-cleanup.mjs +0 -17
- package/skills/archify/test/fixtures/issue-126/custom-widths.workflow.json +0 -18
- package/skills/archify/test/fixtures/issue-126/explicit-route.workflow.json +0 -28
- package/skills/archify/test/fixtures/issue-126/explicit-viewbox.workflow.json +0 -19
- package/skills/archify/test/fixtures/issue-126/labels.workflow.json +0 -18
- package/skills/archify/test/fixtures/v1-baseline/agent-run.lifecycle.json +0 -64
- package/skills/archify/test/fixtures/v1-baseline/agent-tool-call.workflow.json +0 -88
- package/skills/archify/test/fixtures/v1-baseline/cache-miss-request.sequence.json +0 -75
- package/skills/archify/test/fixtures/v1-baseline/event-stream.dataflow.json +0 -57
- package/skills/archify/test/fixtures/v1-baseline/product-analytics.dataflow.json +0 -70
- package/skills/archify/test/fixtures/v1-baseline/production-deployment.architecture.json +0 -71
- package/skills/archify/test/fixtures/v1-workflow-700x400.workflow.json +0 -22
- package/skills/archify/test/fixtures/v1-workflow-explicit-coordinates.workflow.json +0 -47
- package/skills/archify/test/focus-browser.test.mjs +0 -226
- package/skills/archify/test/gallery.test.mjs +0 -130
- package/skills/archify/test/generate-validators.test.mjs +0 -59
- package/skills/archify/test/generate-viewer.test.mjs +0 -165
- package/skills/archify/test/generated-artifact-xml.test.mjs +0 -88
- package/skills/archify/test/geometry.test.mjs +0 -739
- package/skills/archify/test/golden.mjs +0 -207
- package/skills/archify/test/grid.test.mjs +0 -47
- package/skills/archify/test/guide-page.test.mjs +0 -85
- package/skills/archify/test/guide.test.mjs +0 -81
- package/skills/archify/test/guided-views-browser.test.mjs +0 -460
- package/skills/archify/test/guided-views.test.mjs +0 -144
- package/skills/archify/test/helpers/desktop-browser.mjs +0 -48
- package/skills/archify/test/helpers/offline-fonts.mjs +0 -76
- package/skills/archify/test/helpers/viewer-click.mjs +0 -72
- package/skills/archify/test/helpers/xml.mjs +0 -37
- package/skills/archify/test/i18n.test.mjs +0 -422
- package/skills/archify/test/intent-trace-browser.test.mjs +0 -284
- package/skills/archify/test/intent-trace.test.mjs +0 -111
- package/skills/archify/test/landing.test.mjs +0 -97
- package/skills/archify/test/layout-rules.test.mjs +0 -1498
- package/skills/archify/test/legend-contract.test.mjs +0 -404
- package/skills/archify/test/motion-governor-browser.test.mjs +0 -342
- package/skills/archify/test/motion-governor.test.mjs +0 -111
- package/skills/archify/test/offline-font-browser.test.mjs +0 -210
- package/skills/archify/test/offline-self-containment.test.mjs +0 -80
- package/skills/archify/test/open-artifact.test.mjs +0 -118
- package/skills/archify/test/ordinary-model-floor.test.mjs +0 -1052
- package/skills/archify/test/output-path.test.mjs +0 -587
- package/skills/archify/test/presentation.test.mjs +0 -71
- package/skills/archify/test/preset-tryon.test.mjs +0 -113
- package/skills/archify/test/preview-contract.test.mjs +0 -40
- package/skills/archify/test/preview.test.mjs +0 -530
- package/skills/archify/test/proof-aperture.test.mjs +0 -78
- package/skills/archify/test/reach-share-card.test.mjs +0 -149
- package/skills/archify/test/reader-layout-browser.test.mjs +0 -320
- package/skills/archify/test/readme-showcase.test.mjs +0 -319
- package/skills/archify/test/real-repository-proof.test.mjs +0 -209
- package/skills/archify/test/relationship-direct-explorer.test.mjs +0 -115
- package/skills/archify/test/relationship-lens.test.mjs +0 -128
- package/skills/archify/test/relationship-permalink.test.mjs +0 -130
- package/skills/archify/test/relationship-pulse.test.mjs +0 -122
- package/skills/archify/test/release-identity.test.mjs +0 -476
- package/skills/archify/test/release-package-gates.test.mjs +0 -750
- package/skills/archify/test/render-output-checks.test.mjs +0 -588
- package/skills/archify/test/renderer-diagnostic-boundary.test.mjs +0 -107
- package/skills/archify/test/repair-receipt.test.mjs +0 -181
- package/skills/archify/test/repository-evidence-replacement.test.mjs +0 -136
- package/skills/archify/test/repository-evidence.test.mjs +0 -605
- package/skills/archify/test/repository-language-metadata.test.mjs +0 -67
- package/skills/archify/test/route-journey.test.mjs +0 -125
- package/skills/archify/test/route-probe-browser.test.mjs +0 -363
- package/skills/archify/test/route-probe.test.mjs +0 -114
- package/skills/archify/test/route-share-card.test.mjs +0 -163
- package/skills/archify/test/semantic-camera.test.mjs +0 -88
- package/skills/archify/test/semantic-flow.test.mjs +0 -90
- package/skills/archify/test/semantic-legend-gateway.test.mjs +0 -156
- package/skills/archify/test/semantic-lens-browser.test.mjs +0 -372
- package/skills/archify/test/semantic-lens.test.mjs +0 -103
- package/skills/archify/test/semantic-passport.test.mjs +0 -99
- package/skills/archify/test/semantic-radar.test.mjs +0 -735
- package/skills/archify/test/semantic-zoom.test.mjs +0 -86
- package/skills/archify/test/sequence-column-fit.test.mjs +0 -137
- package/skills/archify/test/settled-flow.test.mjs +0 -97
- package/skills/archify/test/share-card-export.test.mjs +0 -132
- package/skills/archify/test/site-language-continuity.test.mjs +0 -569
- package/skills/archify/test/site-language-integration.mjs +0 -9
- package/skills/archify/test/skill-metadata.test.mjs +0 -84
- package/skills/archify/test/stable-update-manifest.test.mjs +0 -167
- package/skills/archify/test/start-page.test.mjs +0 -312
- package/skills/archify/test/story-beat-navigator.test.mjs +0 -103
- package/skills/archify/test/story-carrier.test.mjs +0 -90
- package/skills/archify/test/story-director-strip.test.mjs +0 -91
- package/skills/archify/test/story-follow-camera.test.mjs +0 -103
- package/skills/archify/test/story-horizon.test.mjs +0 -91
- package/skills/archify/test/story-moment-link.test.mjs +0 -93
- package/skills/archify/test/story-shelf.test.mjs +0 -84
- package/skills/archify/test/story-trail.test.mjs +0 -81
- package/skills/archify/test/toolbar-polish.test.mjs +0 -57
- package/skills/archify/test/update-contract.test.mjs +0 -133
- package/skills/archify/test/update-notifier.test.mjs +0 -3317
- package/skills/archify/test/v1-compatibility.test.mjs +0 -329
- package/skills/archify/test/vertical-edge.test.mjs +0 -68
- package/skills/archify/test/viewer-camera-browser.test.mjs +0 -395
- package/skills/archify/test/viewer-chrome-layout.test.mjs +0 -1104
- package/skills/archify/test/viewer-identifiers-browser.test.mjs +0 -135
- package/skills/archify/test/visual-check.test.mjs +0 -400
- package/skills/archify/test/webm-artifact.smoke.mjs +0 -1855
- package/skills/archify/test/workflow-compiler-hard-contract.test.mjs +0 -2136
- package/skills/archify/test/workflow-compiler.test.mjs +0 -1163
- package/skills/archify/test/workflow-migration.test.mjs +0 -620
- package/skills/archify/test/workflow-semantic-contract.test.mjs +0 -131
- /package/{skills/archify/THIRD_PARTY_NOTICES.md → dist/phoenix-diagram/THIRD-PARTY-LICENSES/0b7fb59365dc21c93b0f62526d74ee913aeec9ae532c112bc76afa7edcd56e14.txt} +0 -0
- /package/{skills/archify/LICENSE → dist/phoenix-diagram/THIRD-PARTY-LICENSES/b799ab081703e7821ae5096d2c1abdf14bbdc75e8ea1c4045998c36ed6db9706.txt} +0 -0
- /package/{skills/archify/assets/JetBrainsMono-OFL.txt → dist/phoenix-diagram/THIRD-PARTY-LICENSES/c1ab7c666206842a02b35b30770dac0d7a10156ed401c9defc3f02a754d89e90.txt} +0 -0
- /package/{skills/archify/examples/agent-tool-call.workflow.json → dist/phoenix-diagram/bundle/examples/legacy.agent-tool-call.workflow.json} +0 -0
- /package/{skills/archify/examples/async-job-roundtrip.sequence.json → dist/phoenix-diagram/bundle/examples/legacy.async-job-roundtrip.sequence.json} +0 -0
- /package/{skills/archify/examples/deployment-release.lifecycle.json → dist/phoenix-diagram/bundle/examples/legacy.deployment-release.lifecycle.json} +0 -0
- /package/{skills/archify/examples/product-analytics.dataflow.json → dist/phoenix-diagram/bundle/examples/legacy.product-analytics.dataflow.json} +0 -0
- /package/{skills/archify/examples/web-app.architecture.json → dist/phoenix-diagram/bundle/examples/legacy.web-app.architecture.json} +0 -0
|
@@ -1,1423 +0,0 @@
|
|
|
1
|
-
// Geometry helpers shared by all typed renderers. Every function here is
|
|
2
|
-
// pure; renderers own their layout tables and pass measured rects
|
|
3
|
-
// ({x, y, width, height, cx, cy}) in.
|
|
4
|
-
|
|
5
|
-
import { recordDiagnostic } from './diagnostics.mjs';
|
|
6
|
-
|
|
7
|
-
// In degraded mode (no ajv) a type-wrong top-level field reaches the renderer.
|
|
8
|
-
// Coerce non-arrays to [] so the module-level Maps build without throwing and
|
|
9
|
-
// the friendly validator checks (which run later) report the real problem.
|
|
10
|
-
export function asArray(value) {
|
|
11
|
-
return Array.isArray(value) ? value : [];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// A computed coordinate must be a finite number; NaN/undefined would silently
|
|
15
|
-
// write `<rect x="NaN">` into the output. Used by the validators as a backstop.
|
|
16
|
-
export function isFinitePoint(...coords) {
|
|
17
|
-
return coords.every((c) => Number.isFinite(c));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function rectsOverlap(a, b, gap = 0) {
|
|
21
|
-
// Non-finite geometry means "unknown", not "overlapping". Every comparison
|
|
22
|
-
// below is false for NaN, so without this guard the negation reports a
|
|
23
|
-
// collision for every pair. Callers surface non-finite pos/size through their
|
|
24
|
-
// own diagnostic; reporting it again as an overlap buries that message under
|
|
25
|
-
// one bogus separation hint per pair.
|
|
26
|
-
if (!isFinitePoint(a.x, a.y, a.width, a.height, b.x, b.y, b.width, b.height)) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return !(
|
|
30
|
-
a.x + a.width + gap <= b.x ||
|
|
31
|
-
b.x + b.width + gap <= a.x ||
|
|
32
|
-
a.y + a.height + gap <= b.y ||
|
|
33
|
-
b.y + b.height + gap <= a.y
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function segmentIntersectsRect(segment, rect, gap = 0) {
|
|
38
|
-
const box = {
|
|
39
|
-
x1: rect.x - gap,
|
|
40
|
-
y1: rect.y - gap,
|
|
41
|
-
x2: rect.x + rect.width + gap,
|
|
42
|
-
y2: rect.y + rect.height + gap
|
|
43
|
-
};
|
|
44
|
-
const [a, b] = [segment.start, segment.end];
|
|
45
|
-
if (pointInBox(a, box) || pointInBox(b, box)) return true;
|
|
46
|
-
return (
|
|
47
|
-
segmentsIntersect(a, b, [box.x1, box.y1], [box.x2, box.y1]) ||
|
|
48
|
-
segmentsIntersect(a, b, [box.x2, box.y1], [box.x2, box.y2]) ||
|
|
49
|
-
segmentsIntersect(a, b, [box.x2, box.y2], [box.x1, box.y2]) ||
|
|
50
|
-
segmentsIntersect(a, b, [box.x1, box.y2], [box.x1, box.y1])
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function segmentRectClearance(segment, rect) {
|
|
55
|
-
if (!segment || !rect) return null;
|
|
56
|
-
const { start, end } = segment;
|
|
57
|
-
if (!Array.isArray(start) || !Array.isArray(end) || start.length !== 2 || end.length !== 2) return null;
|
|
58
|
-
if (!isFinitePoint(...start, ...end, rect.x, rect.y, rect.width, rect.height)) return null;
|
|
59
|
-
if (rect.width < 0 || rect.height < 0) return null;
|
|
60
|
-
if (segmentIntersectsRect(segment, rect)) return 0;
|
|
61
|
-
|
|
62
|
-
const corners = [
|
|
63
|
-
[rect.x, rect.y],
|
|
64
|
-
[rect.x + rect.width, rect.y],
|
|
65
|
-
[rect.x + rect.width, rect.y + rect.height],
|
|
66
|
-
[rect.x, rect.y + rect.height],
|
|
67
|
-
];
|
|
68
|
-
return Math.min(
|
|
69
|
-
pointRectDistance(start, rect),
|
|
70
|
-
pointRectDistance(end, rect),
|
|
71
|
-
...corners.map((corner) => pointSegmentDistance(corner, start, end)),
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function segmentRectIntersectionLength(segment, rect) {
|
|
76
|
-
if (!segment || !rect) return null;
|
|
77
|
-
const { start, end } = segment;
|
|
78
|
-
if (!Array.isArray(start) || !Array.isArray(end) || start.length !== 2 || end.length !== 2) return null;
|
|
79
|
-
if (!isFinitePoint(...start, ...end, rect.x, rect.y, rect.width, rect.height)) return null;
|
|
80
|
-
if (rect.width < 0 || rect.height < 0) return null;
|
|
81
|
-
|
|
82
|
-
const dx = end[0] - start[0];
|
|
83
|
-
const dy = end[1] - start[1];
|
|
84
|
-
const length = Math.hypot(dx, dy);
|
|
85
|
-
if (length <= 0.0000001) return 0;
|
|
86
|
-
const bounds = [
|
|
87
|
-
[-dx, start[0] - rect.x],
|
|
88
|
-
[dx, rect.x + rect.width - start[0]],
|
|
89
|
-
[-dy, start[1] - rect.y],
|
|
90
|
-
[dy, rect.y + rect.height - start[1]],
|
|
91
|
-
];
|
|
92
|
-
let enter = 0;
|
|
93
|
-
let leave = 1;
|
|
94
|
-
for (const [direction, distance] of bounds) {
|
|
95
|
-
if (Math.abs(direction) <= 0.0000001) {
|
|
96
|
-
if (distance < -0.0000001) return 0;
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
const ratio = distance / direction;
|
|
100
|
-
if (direction < 0) enter = Math.max(enter, ratio);
|
|
101
|
-
else leave = Math.min(leave, ratio);
|
|
102
|
-
if (enter > leave + 0.0000001) return 0;
|
|
103
|
-
}
|
|
104
|
-
return length * Math.max(0, leave - enter);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export function collectLabelRouteClearance({ labels, routedRelations, threshold }) {
|
|
108
|
-
if (!Number.isFinite(threshold) || threshold < 0) return [];
|
|
109
|
-
const routeCandidates = asArray(routedRelations).map((entry, fallbackIndex) => {
|
|
110
|
-
const relation = entry?.relation || entry;
|
|
111
|
-
const points = normalizeRoutePoints(entry?.points || relation?.routePoints);
|
|
112
|
-
if (!relation || points.length < 2) return null;
|
|
113
|
-
return {
|
|
114
|
-
relation,
|
|
115
|
-
relationIndex: Number.isInteger(entry?.relationIndex) ? entry.relationIndex : fallbackIndex,
|
|
116
|
-
points,
|
|
117
|
-
};
|
|
118
|
-
}).filter(Boolean);
|
|
119
|
-
const seenRoutes = new Set();
|
|
120
|
-
const routes = routeCandidates.filter((route) => {
|
|
121
|
-
const identity = relationshipIdentity(route.relation, route.relationIndex);
|
|
122
|
-
if (seenRoutes.has(identity)) return false;
|
|
123
|
-
seenRoutes.add(identity);
|
|
124
|
-
return true;
|
|
125
|
-
});
|
|
126
|
-
const hits = [];
|
|
127
|
-
const seenLabels = new Set();
|
|
128
|
-
|
|
129
|
-
for (const [fallbackIndex, label] of asArray(labels).entries()) {
|
|
130
|
-
const rect = label?.rect || label;
|
|
131
|
-
if (!rect || !isFinitePoint(rect.x, rect.y, rect.width, rect.height) || rect.width < 0 || rect.height < 0) continue;
|
|
132
|
-
const relationIndex = Number.isInteger(label?.relationIndex) ? label.relationIndex : fallbackIndex;
|
|
133
|
-
const labelIdentity = relationshipIdentity(label?.relation, relationIndex);
|
|
134
|
-
if (seenLabels.has(labelIdentity)) continue;
|
|
135
|
-
seenLabels.add(labelIdentity);
|
|
136
|
-
for (const route of routes) {
|
|
137
|
-
if (relationIndex === route.relationIndex || sameRelationship(label?.relation, route.relation)) continue;
|
|
138
|
-
let nearest = null;
|
|
139
|
-
for (let segmentIndex = 0; segmentIndex < route.points.length - 1; segmentIndex += 1) {
|
|
140
|
-
const start = route.points[segmentIndex];
|
|
141
|
-
const end = route.points[segmentIndex + 1];
|
|
142
|
-
const clearance = segmentRectClearance({ start, end }, rect);
|
|
143
|
-
if (clearance == null) continue;
|
|
144
|
-
if (!nearest || clearance < nearest.clearance) {
|
|
145
|
-
nearest = {
|
|
146
|
-
clearance,
|
|
147
|
-
intersectionLength: segmentRectIntersectionLength({ start, end }, rect),
|
|
148
|
-
segmentIndex,
|
|
149
|
-
start,
|
|
150
|
-
end,
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (!nearest || nearest.clearance + 0.0001 >= threshold) continue;
|
|
155
|
-
hits.push({
|
|
156
|
-
label,
|
|
157
|
-
labelRelation: label?.relation,
|
|
158
|
-
labelRelationIndex: relationIndex,
|
|
159
|
-
otherRelation: route.relation,
|
|
160
|
-
otherRelationIndex: route.relationIndex,
|
|
161
|
-
rect,
|
|
162
|
-
...nearest,
|
|
163
|
-
threshold,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return hits;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function relationshipIdentity(relation, relationIndex) {
|
|
171
|
-
if (relation?.key !== undefined) return `key:${relation.key}`;
|
|
172
|
-
if (relation?.id) return `id:${relation.from || ''}\u0000${relation.to || ''}\u0000${relation.id}`;
|
|
173
|
-
return `index:${relationIndex}`;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function sameRelationship(left, right) {
|
|
177
|
-
if (!left || !right) return false;
|
|
178
|
-
if (left === right) return true;
|
|
179
|
-
if (left.key !== undefined && right.key !== undefined) return left.key === right.key;
|
|
180
|
-
return Boolean(left.id && right.id && left.id === right.id && left.from === right.from && left.to === right.to);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function relationshipSubject(diagramType, relationCollection, relationIndex, relation) {
|
|
184
|
-
return {
|
|
185
|
-
diagramType,
|
|
186
|
-
collection: relationCollection,
|
|
187
|
-
index: relationIndex,
|
|
188
|
-
...(relation?.id ? { id: relation.id } : {}),
|
|
189
|
-
...(relation?.from ? { from: relation.from } : {}),
|
|
190
|
-
...(relation?.to ? { to: relation.to } : {}),
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
const ENDPOINT_SIDE_RULES = {
|
|
195
|
-
left: {
|
|
196
|
-
axis: 'horizontal',
|
|
197
|
-
sourceSign: -1,
|
|
198
|
-
targetSign: 1,
|
|
199
|
-
sourceDirection: 'leftward',
|
|
200
|
-
targetDirection: 'rightward from the left',
|
|
201
|
-
},
|
|
202
|
-
right: {
|
|
203
|
-
axis: 'horizontal',
|
|
204
|
-
sourceSign: 1,
|
|
205
|
-
targetSign: -1,
|
|
206
|
-
sourceDirection: 'rightward',
|
|
207
|
-
targetDirection: 'leftward from the right',
|
|
208
|
-
},
|
|
209
|
-
top: {
|
|
210
|
-
axis: 'vertical',
|
|
211
|
-
sourceSign: -1,
|
|
212
|
-
targetSign: 1,
|
|
213
|
-
sourceDirection: 'upward',
|
|
214
|
-
targetDirection: 'downward from above',
|
|
215
|
-
},
|
|
216
|
-
bottom: {
|
|
217
|
-
axis: 'vertical',
|
|
218
|
-
sourceSign: 1,
|
|
219
|
-
targetSign: -1,
|
|
220
|
-
sourceDirection: 'downward',
|
|
221
|
-
targetDirection: 'upward from below',
|
|
222
|
-
},
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
function endpointSideIssue(points, endpoint, side) {
|
|
226
|
-
const rule = ENDPOINT_SIDE_RULES[side];
|
|
227
|
-
if (!rule) return null;
|
|
228
|
-
const normalized = normalizeRoutePoints(points);
|
|
229
|
-
if (normalized.length < 2) return null;
|
|
230
|
-
const segmentIndex = endpoint === 'source' ? 0 : normalized.length - 2;
|
|
231
|
-
const start = normalized[segmentIndex];
|
|
232
|
-
const end = normalized[segmentIndex + 1];
|
|
233
|
-
const dx = end[0] - start[0];
|
|
234
|
-
const dy = end[1] - start[1];
|
|
235
|
-
const along = rule.axis === 'horizontal' ? dx : dy;
|
|
236
|
-
const across = rule.axis === 'horizontal' ? dy : dx;
|
|
237
|
-
const expectedSign = endpoint === 'source' ? rule.sourceSign : rule.targetSign;
|
|
238
|
-
if (Math.abs(across) <= 0.0001 && along * expectedSign > 0.0001) return null;
|
|
239
|
-
return {
|
|
240
|
-
endpoint,
|
|
241
|
-
side,
|
|
242
|
-
segmentIndex,
|
|
243
|
-
start,
|
|
244
|
-
end,
|
|
245
|
-
expectedAxis: rule.axis,
|
|
246
|
-
expectedDirection: endpoint === 'source' ? rule.sourceDirection : rule.targetDirection,
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// A side is a direction contract, not just a point on a box border. This pure
|
|
251
|
-
// predicate lets automatic routers prefer a dogleg whose first and final
|
|
252
|
-
// segments leave/enter the chosen sides perpendicularly.
|
|
253
|
-
export function routeHonorsEndpointSides(points, fromSide, toSide) {
|
|
254
|
-
return !endpointSideIssue(points, 'source', fromSide)
|
|
255
|
-
&& !endpointSideIssue(points, 'target', toSide);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// Explicit fromSide/toSide are authored geometry, so a tangent or backwards
|
|
259
|
-
// endpoint segment changes their meaning. Fail this universally instead of
|
|
260
|
-
// leaving a malformed arrow for visual review to discover. Named routes and
|
|
261
|
-
// authored via points already carry their own geometry semantics: when they
|
|
262
|
-
// omit endpoint sides, do not invent a relative-position side and then reject
|
|
263
|
-
// the route for disagreeing with that invention. Pure automatic routes may
|
|
264
|
-
// still be checked against renderer-inferred sides.
|
|
265
|
-
export function cleanEndpointSideProblems({
|
|
266
|
-
relations,
|
|
267
|
-
endpointIds,
|
|
268
|
-
pathFor,
|
|
269
|
-
diagramType,
|
|
270
|
-
relationCollection,
|
|
271
|
-
fromSideFor,
|
|
272
|
-
toSideFor,
|
|
273
|
-
shouldCheckRelation = () => true,
|
|
274
|
-
routeHint = 'align the first/final via segment with fromSide/toSide, change the side, or remove explicit routing so auto can choose a perpendicular approach',
|
|
275
|
-
}) {
|
|
276
|
-
const problems = [];
|
|
277
|
-
for (const [relationIndex, relation] of asArray(relations).entries()) {
|
|
278
|
-
if (!relation || !endpointIds?.has(relation.from) || !endpointIds?.has(relation.to)) continue;
|
|
279
|
-
if (!shouldCheckRelation(relation, relationIndex)) continue;
|
|
280
|
-
const points = pathFor(relation)?.points;
|
|
281
|
-
if (!Array.isArray(points) || points.length < 2) continue;
|
|
282
|
-
const authoredFromSide = relation.fromSide && relation.fromSide !== 'auto' ? relation.fromSide : null;
|
|
283
|
-
const authoredToSide = relation.toSide && relation.toSide !== 'auto' ? relation.toSide : null;
|
|
284
|
-
const hasAuthoredRouteGeometry = Boolean(
|
|
285
|
-
(relation.route && relation.route !== 'auto') || Array.isArray(relation.via),
|
|
286
|
-
);
|
|
287
|
-
const inferredFromSide = !hasAuthoredRouteGeometry && typeof fromSideFor === 'function'
|
|
288
|
-
? fromSideFor(relation)
|
|
289
|
-
: null;
|
|
290
|
-
const inferredToSide = !hasAuthoredRouteGeometry && typeof toSideFor === 'function'
|
|
291
|
-
? toSideFor(relation)
|
|
292
|
-
: null;
|
|
293
|
-
const fromSide = authoredFromSide ?? inferredFromSide;
|
|
294
|
-
const toSide = authoredToSide ?? inferredToSide;
|
|
295
|
-
const checks = [
|
|
296
|
-
fromSide
|
|
297
|
-
? { ...endpointSideIssue(points, 'source', fromSide), sideOrigin: authoredFromSide ? 'authored' : 'inferred' }
|
|
298
|
-
: null,
|
|
299
|
-
toSide
|
|
300
|
-
? { ...endpointSideIssue(points, 'target', toSide), sideOrigin: authoredToSide ? 'authored' : 'inferred' }
|
|
301
|
-
: null,
|
|
302
|
-
].filter((issue) => issue?.endpoint);
|
|
303
|
-
for (const issue of checks) {
|
|
304
|
-
const relationId = relation.id ? ` id "${relation.id}"` : '';
|
|
305
|
-
const authoredField = issue.endpoint === 'source' ? 'fromSide' : 'toSide';
|
|
306
|
-
const sideField = issue.sideOrigin === 'inferred' ? `inferred ${authoredField}` : authoredField;
|
|
307
|
-
const segmentRole = issue.endpoint === 'source' ? 'first' : 'final';
|
|
308
|
-
const from = issue.start.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
309
|
-
const to = issue.end.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
310
|
-
const message = `[clean-flow/endpoint-side-direction] ${diagramType} ${relationCollection}[${relationIndex}]${relationId} "${relation.from}" -> "${relation.to}" ${segmentRole} segment ${issue.segmentIndex} [${from}] -> [${to}] does not honor ${sideField} "${issue.side}" — it must run ${issue.expectedAxis} ${issue.expectedDirection}; ${routeHint}.`;
|
|
311
|
-
recordDiagnostic({
|
|
312
|
-
code: 'clean-flow/endpoint-side-direction',
|
|
313
|
-
severity: 'error',
|
|
314
|
-
message,
|
|
315
|
-
subject: relationshipSubject(diagramType, relationCollection, relationIndex, relation),
|
|
316
|
-
evidence: {
|
|
317
|
-
endpoint: issue.endpoint,
|
|
318
|
-
authoredField,
|
|
319
|
-
sideOrigin: issue.sideOrigin,
|
|
320
|
-
side: issue.side,
|
|
321
|
-
segmentIndex: issue.segmentIndex,
|
|
322
|
-
from: issue.start,
|
|
323
|
-
to: issue.end,
|
|
324
|
-
expectedAxis: issue.expectedAxis,
|
|
325
|
-
expectedDirection: issue.expectedDirection,
|
|
326
|
-
},
|
|
327
|
-
supportedFixes: [routeHint],
|
|
328
|
-
});
|
|
329
|
-
problems.push(message);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
return problems;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
// One mechanical quality gate for every renderer-owned relationship path.
|
|
336
|
-
// A renderer supplies its semantic obstacle set; source/target boxes are
|
|
337
|
-
// always exempt because paths are expected to terminate on their boundaries.
|
|
338
|
-
// Containers, lifelines, and other intentionally pass-through geometry should
|
|
339
|
-
// simply not be supplied as obstacles.
|
|
340
|
-
export function cleanFlowProblems({
|
|
341
|
-
relations,
|
|
342
|
-
obstacles,
|
|
343
|
-
pathFor,
|
|
344
|
-
diagramType,
|
|
345
|
-
relationCollection,
|
|
346
|
-
obstacleKind,
|
|
347
|
-
clearance = 2,
|
|
348
|
-
routeHint = 'adjust fromSide/toSide, set route/via or channel coordinates, or move the obstacle'
|
|
349
|
-
}) {
|
|
350
|
-
// A relationship hidden behind an unrelated opaque node changes the
|
|
351
|
-
// diagram's meaning, so this is a correctness invariant rather than an
|
|
352
|
-
// opt-in composition preference. Keep it active even when the author omits
|
|
353
|
-
// quality_profile; standard/showcase still control stricter visual budgets.
|
|
354
|
-
const problems = [];
|
|
355
|
-
const obstacleList = [...obstacles];
|
|
356
|
-
const obstacleIds = new Set(obstacleList.map((obstacle) => obstacle?.id));
|
|
357
|
-
for (const [relationIndex, relation] of asArray(relations).entries()) {
|
|
358
|
-
if (!relation || typeof relation.from !== 'string' || typeof relation.to !== 'string') continue;
|
|
359
|
-
if (!obstacleIds.has(relation.from) || !obstacleIds.has(relation.to)) continue;
|
|
360
|
-
const points = pathFor(relation)?.points;
|
|
361
|
-
if (!Array.isArray(points) || points.length < 2) continue;
|
|
362
|
-
if (!points.every((point) => Array.isArray(point) && point.length === 2 && isFinitePoint(...point))) continue;
|
|
363
|
-
|
|
364
|
-
const endpointIds = new Set([relation.from, relation.to]);
|
|
365
|
-
for (const obstacle of obstacleList) {
|
|
366
|
-
if (!obstacle || endpointIds.has(obstacle.id)) continue;
|
|
367
|
-
if (!isFinitePoint(obstacle.x, obstacle.y, obstacle.width, obstacle.height)) continue;
|
|
368
|
-
let hitSegment = -1;
|
|
369
|
-
for (let segmentIndex = 0; segmentIndex < points.length - 1; segmentIndex += 1) {
|
|
370
|
-
if (segmentIntersectsRect({ start: points[segmentIndex], end: points[segmentIndex + 1] }, obstacle, clearance)) {
|
|
371
|
-
hitSegment = segmentIndex;
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
if (hitSegment === -1) continue;
|
|
376
|
-
const from = points[hitSegment].map(Math.round).join(', ');
|
|
377
|
-
const to = points[hitSegment + 1].map(Math.round).join(', ');
|
|
378
|
-
const relationId = relation.id ? ` id "${relation.id}"` : '';
|
|
379
|
-
const message = `[clean-flow/edge-through-node] ${diagramType} ${relationCollection}[${relationIndex}]${relationId} "${relation.from}" -> "${relation.to}" crosses ${obstacleKind} "${obstacle.id}" (unrelated to this relationship) on segment ${hitSegment} [${from}] -> [${to}] (${clearance}px clearance) — ${routeHint}.`;
|
|
380
|
-
recordDiagnostic({
|
|
381
|
-
code: 'clean-flow/edge-through-node',
|
|
382
|
-
severity: 'error',
|
|
383
|
-
message,
|
|
384
|
-
subject: relationshipSubject(diagramType, relationCollection, relationIndex, relation),
|
|
385
|
-
evidence: {
|
|
386
|
-
obstacleKind,
|
|
387
|
-
obstacleId: obstacle.id,
|
|
388
|
-
segmentIndex: hitSegment,
|
|
389
|
-
from: points[hitSegment],
|
|
390
|
-
to: points[hitSegment + 1],
|
|
391
|
-
clearancePx: clearance,
|
|
392
|
-
},
|
|
393
|
-
supportedFixes: [routeHint],
|
|
394
|
-
});
|
|
395
|
-
problems.push(message);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
return problems;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
// Build a read-only analysis copy of a polyline with straight-through
|
|
402
|
-
// waypoints removed. A waypoint on a forward-collinear run is not a visual
|
|
403
|
-
// endpoint, so treating it as one would hide a proper X that lands exactly on
|
|
404
|
-
// that waypoint. Reversals and real bends stay split: their shared point can
|
|
405
|
-
// still be an authored touch rather than a crossing. The source points are
|
|
406
|
-
// retained on every merged segment so diagnostics can name the authored
|
|
407
|
-
// segment that contains a hit without changing rendered/receipt geometry.
|
|
408
|
-
export function forwardCollinearAnalysisSegments(points) {
|
|
409
|
-
const segments = [];
|
|
410
|
-
for (let segmentIndex = 0; segmentIndex < asArray(points).length - 1; segmentIndex += 1) {
|
|
411
|
-
const authoredStart = points[segmentIndex];
|
|
412
|
-
const authoredEnd = points[segmentIndex + 1];
|
|
413
|
-
const start = Array.isArray(authoredStart) ? [...authoredStart] : authoredStart;
|
|
414
|
-
const end = Array.isArray(authoredEnd) ? [...authoredEnd] : authoredEnd;
|
|
415
|
-
const sourceSegment = { start, end, segmentIndex };
|
|
416
|
-
const previous = segments.at(-1);
|
|
417
|
-
if (previous && segmentsContinueForward(previous.start, previous.end, start, end)) {
|
|
418
|
-
previous.end = end;
|
|
419
|
-
previous.sourceSegments.push(sourceSegment);
|
|
420
|
-
continue;
|
|
421
|
-
}
|
|
422
|
-
segments.push({
|
|
423
|
-
start,
|
|
424
|
-
end,
|
|
425
|
-
segmentIndex,
|
|
426
|
-
sourceSegments: [sourceSegment],
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
return segments;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
export function sourceSegmentIndexAtPoint(segment, point) {
|
|
433
|
-
const source = asArray(segment?.sourceSegments).find(({ start, end }) => (
|
|
434
|
-
pointLiesOnSegment(point, start, end)
|
|
435
|
-
));
|
|
436
|
-
return source?.segmentIndex ?? segment?.segmentIndex ?? 0;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
function authoredAnalysisSegments(points) {
|
|
440
|
-
return asArray(points).slice(0, -1).map((start, segmentIndex) => ({
|
|
441
|
-
start,
|
|
442
|
-
end: points[segmentIndex + 1],
|
|
443
|
-
segmentIndex,
|
|
444
|
-
sourceSegments: [{ start, end: points[segmentIndex + 1], segmentIndex }],
|
|
445
|
-
}));
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
function segmentsContinueForward(firstStart, firstEnd, secondStart, secondEnd) {
|
|
449
|
-
if (![firstStart, firstEnd, secondStart, secondEnd].every((point) => (
|
|
450
|
-
Array.isArray(point) && point.length === 2 && isFinitePoint(...point)
|
|
451
|
-
))) return false;
|
|
452
|
-
const epsilon = 0.0001;
|
|
453
|
-
if (Math.abs(firstEnd[0] - secondStart[0]) > epsilon
|
|
454
|
-
|| Math.abs(firstEnd[1] - secondStart[1]) > epsilon) return false;
|
|
455
|
-
const firstVector = [firstEnd[0] - firstStart[0], firstEnd[1] - firstStart[1]];
|
|
456
|
-
const secondVector = [secondEnd[0] - secondStart[0], secondEnd[1] - secondStart[1]];
|
|
457
|
-
const firstLength = Math.hypot(...firstVector);
|
|
458
|
-
const secondLength = Math.hypot(...secondVector);
|
|
459
|
-
if (firstLength <= epsilon || secondLength <= epsilon) return false;
|
|
460
|
-
const cross = firstVector[0] * secondVector[1] - firstVector[1] * secondVector[0];
|
|
461
|
-
if (Math.abs(cross) > epsilon) return false;
|
|
462
|
-
const dot = firstVector[0] * secondVector[0] + firstVector[1] * secondVector[1];
|
|
463
|
-
return dot > epsilon;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
function pointLiesOnSegment(point, start, end) {
|
|
467
|
-
if (![point, start, end].every((candidate) => (
|
|
468
|
-
Array.isArray(candidate) && candidate.length === 2 && isFinitePoint(...candidate)
|
|
469
|
-
))) return false;
|
|
470
|
-
const epsilon = 0.0001;
|
|
471
|
-
const length = Math.hypot(end[0] - start[0], end[1] - start[1]);
|
|
472
|
-
if (length <= epsilon) return Math.hypot(point[0] - start[0], point[1] - start[1]) <= epsilon;
|
|
473
|
-
if (Math.abs(crossProduct(start, end, point)) > epsilon * length) return false;
|
|
474
|
-
return point[0] >= Math.min(start[0], end[0]) - epsilon
|
|
475
|
-
&& point[0] <= Math.max(start[0], end[0]) + epsilon
|
|
476
|
-
&& point[1] >= Math.min(start[1], end[1]) - epsilon
|
|
477
|
-
&& point[1] <= Math.max(start[1], end[1]) + epsilon;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
// Reject only a proper interior X between relationships that share no semantic
|
|
481
|
-
// endpoint. Endpoint touches, branch/merge ports, and collinear shared
|
|
482
|
-
// corridors are intentionally outside this contract because geometry alone
|
|
483
|
-
// cannot tell whether those are authored junctions.
|
|
484
|
-
export function cleanCrossingProblems({
|
|
485
|
-
relations,
|
|
486
|
-
endpointIds,
|
|
487
|
-
pathFor,
|
|
488
|
-
diagramType,
|
|
489
|
-
relationCollection,
|
|
490
|
-
profile = 'standard',
|
|
491
|
-
profileIsAuthoritative = false,
|
|
492
|
-
mergeForwardCollinearWaypoints = false,
|
|
493
|
-
routeHint = 'adjust route/via or channel coordinates so the relationships use separate corridors'
|
|
494
|
-
}) {
|
|
495
|
-
if (qualityProfileForGate(profile, profileIsAuthoritative) !== 'showcase') return [];
|
|
496
|
-
const routed = asArray(relations).map((relation, index) => {
|
|
497
|
-
if (!relation || !endpointIds.has(relation.from) || !endpointIds.has(relation.to)) return null;
|
|
498
|
-
const points = pathFor(relation)?.points;
|
|
499
|
-
if (!Array.isArray(points) || points.length < 2) return null;
|
|
500
|
-
if (!points.every((point) => Array.isArray(point) && point.length === 2 && isFinitePoint(...point))) return null;
|
|
501
|
-
return {
|
|
502
|
-
relation,
|
|
503
|
-
index,
|
|
504
|
-
points,
|
|
505
|
-
analysisSegments: mergeForwardCollinearWaypoints
|
|
506
|
-
? forwardCollinearAnalysisSegments(points)
|
|
507
|
-
: authoredAnalysisSegments(points),
|
|
508
|
-
};
|
|
509
|
-
}).filter(Boolean);
|
|
510
|
-
const problems = [];
|
|
511
|
-
|
|
512
|
-
for (let leftIndex = 0; leftIndex < routed.length; leftIndex += 1) {
|
|
513
|
-
const left = routed[leftIndex];
|
|
514
|
-
for (let rightIndex = leftIndex + 1; rightIndex < routed.length; rightIndex += 1) {
|
|
515
|
-
const right = routed[rightIndex];
|
|
516
|
-
if ([left.relation.from, left.relation.to].some((id) => id === right.relation.from || id === right.relation.to)) continue;
|
|
517
|
-
|
|
518
|
-
let hit = null;
|
|
519
|
-
for (const leftSegment of left.analysisSegments) {
|
|
520
|
-
if (hit) break;
|
|
521
|
-
for (const rightSegment of right.analysisSegments) {
|
|
522
|
-
const point = properSegmentIntersection(
|
|
523
|
-
leftSegment.start,
|
|
524
|
-
leftSegment.end,
|
|
525
|
-
rightSegment.start,
|
|
526
|
-
rightSegment.end
|
|
527
|
-
);
|
|
528
|
-
if (point) {
|
|
529
|
-
hit = {
|
|
530
|
-
point,
|
|
531
|
-
leftSegment: sourceSegmentIndexAtPoint(leftSegment, point),
|
|
532
|
-
rightSegment: sourceSegmentIndexAtPoint(rightSegment, point),
|
|
533
|
-
};
|
|
534
|
-
break;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
if (!hit) continue;
|
|
539
|
-
|
|
540
|
-
const describe = ({ relation, index }) => {
|
|
541
|
-
const id = relation.id ? ` id "${relation.id}"` : '';
|
|
542
|
-
return `${relationCollection}[${index}]${id} "${relation.from}" -> "${relation.to}"`;
|
|
543
|
-
};
|
|
544
|
-
const point = hit.point.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
545
|
-
const message = `[composition/proper-crossing] showcase ${diagramType} ${describe(left)} crosses ${describe(right)} at [${point}] (segments ${hit.leftSegment} and ${hit.rightSegment}) — ${routeHint}.`;
|
|
546
|
-
recordDiagnostic({
|
|
547
|
-
code: 'composition/proper-crossing',
|
|
548
|
-
severity: 'error',
|
|
549
|
-
message,
|
|
550
|
-
subject: relationshipSubject(diagramType, relationCollection, left.index, left.relation),
|
|
551
|
-
evidence: {
|
|
552
|
-
otherRelationship: relationshipSubject(diagramType, relationCollection, right.index, right.relation),
|
|
553
|
-
point: hit.point,
|
|
554
|
-
segmentIndex: hit.leftSegment,
|
|
555
|
-
otherSegmentIndex: hit.rightSegment,
|
|
556
|
-
},
|
|
557
|
-
supportedFixes: [routeHint],
|
|
558
|
-
});
|
|
559
|
-
problems.push(message);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
return problems;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
// Two unrelated relationships that occupy the same visible corridor can read
|
|
566
|
-
// as one authored branch or merge even when neither relationship crosses a
|
|
567
|
-
// node or forms a proper X. Keep shared semantic endpoints exempt: their
|
|
568
|
-
// initial/final fan-out is real topology. Tiny overlaps below the route rhythm
|
|
569
|
-
// floor are ignored to avoid turning sub-pixel rounding into a quality debt.
|
|
570
|
-
export function collectAmbiguousCorridors({
|
|
571
|
-
routedRelations,
|
|
572
|
-
minOverlapPx = 8,
|
|
573
|
-
}) {
|
|
574
|
-
const routed = asArray(routedRelations).map((entry, fallbackIndex) => {
|
|
575
|
-
const relation = entry?.relation;
|
|
576
|
-
if (!relation || typeof relation.from !== 'string' || typeof relation.to !== 'string') return null;
|
|
577
|
-
const points = normalizeRoutePoints(entry?.points);
|
|
578
|
-
if (points.length < 2) return null;
|
|
579
|
-
return {
|
|
580
|
-
relation,
|
|
581
|
-
relationIndex: Number.isInteger(entry.relationIndex) ? entry.relationIndex : fallbackIndex,
|
|
582
|
-
points,
|
|
583
|
-
};
|
|
584
|
-
}).filter(Boolean);
|
|
585
|
-
const hits = [];
|
|
586
|
-
|
|
587
|
-
for (let leftIndex = 0; leftIndex < routed.length; leftIndex += 1) {
|
|
588
|
-
const left = routed[leftIndex];
|
|
589
|
-
for (let rightIndex = leftIndex + 1; rightIndex < routed.length; rightIndex += 1) {
|
|
590
|
-
const right = routed[rightIndex];
|
|
591
|
-
if ([left.relation.from, left.relation.to].some((id) => id === right.relation.from || id === right.relation.to)) continue;
|
|
592
|
-
|
|
593
|
-
let longest = null;
|
|
594
|
-
for (let leftSegment = 0; leftSegment < left.points.length - 1; leftSegment += 1) {
|
|
595
|
-
for (let rightSegment = 0; rightSegment < right.points.length - 1; rightSegment += 1) {
|
|
596
|
-
const overlap = collinearAxisOverlap(
|
|
597
|
-
left.points[leftSegment],
|
|
598
|
-
left.points[leftSegment + 1],
|
|
599
|
-
right.points[rightSegment],
|
|
600
|
-
right.points[rightSegment + 1],
|
|
601
|
-
);
|
|
602
|
-
if (!overlap || overlap.length + 0.0001 < minOverlapPx) continue;
|
|
603
|
-
if (!longest || overlap.length > longest.overlapLength + 0.0001) {
|
|
604
|
-
longest = {
|
|
605
|
-
left,
|
|
606
|
-
right,
|
|
607
|
-
leftSegment,
|
|
608
|
-
rightSegment,
|
|
609
|
-
overlapLength: overlap.length,
|
|
610
|
-
overlapStart: overlap.start,
|
|
611
|
-
overlapEnd: overlap.end,
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
if (longest) hits.push(longest);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
return hits;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
export function cleanAmbiguousCorridorProblems({
|
|
623
|
-
relations,
|
|
624
|
-
endpointIds,
|
|
625
|
-
pathFor,
|
|
626
|
-
diagramType,
|
|
627
|
-
relationCollection,
|
|
628
|
-
profile = 'standard',
|
|
629
|
-
profileIsAuthoritative = false,
|
|
630
|
-
routeHint = 'adjust route/via or channel coordinates so the relationships use separate corridors',
|
|
631
|
-
minOverlapPx = 8,
|
|
632
|
-
}) {
|
|
633
|
-
if (qualityProfileForGate(profile, profileIsAuthoritative) !== 'showcase') return [];
|
|
634
|
-
const routedRelations = collectEligibleRoutedRelations({ relations, endpointIds, pathFor });
|
|
635
|
-
|
|
636
|
-
return collectAmbiguousCorridors({ routedRelations, minOverlapPx }).map((hit) => {
|
|
637
|
-
const describe = ({ relation, relationIndex }) => {
|
|
638
|
-
const id = relation.id ? ` id "${relation.id}"` : '';
|
|
639
|
-
return `${relationCollection}[${relationIndex}]${id} "${relation.from}" -> "${relation.to}"`;
|
|
640
|
-
};
|
|
641
|
-
const length = Math.round(hit.overlapLength * 10) / 10;
|
|
642
|
-
const from = hit.overlapStart.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
643
|
-
const to = hit.overlapEnd.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
644
|
-
const message = `[composition/ambiguous-corridor] showcase ${diagramType} ${describe(hit.left)} shares a ${length}px corridor with ${describe(hit.right)} at [${from}] -> [${to}] (segments ${hit.leftSegment} and ${hit.rightSegment}; minimum ${minOverlapPx}px) — ${routeHint}.`;
|
|
645
|
-
recordDiagnostic({
|
|
646
|
-
code: 'composition/ambiguous-corridor',
|
|
647
|
-
severity: 'error',
|
|
648
|
-
message,
|
|
649
|
-
subject: relationshipSubject(diagramType, relationCollection, hit.left.relationIndex, hit.left.relation),
|
|
650
|
-
evidence: {
|
|
651
|
-
otherRelationship: relationshipSubject(diagramType, relationCollection, hit.right.relationIndex, hit.right.relation),
|
|
652
|
-
overlapLengthPx: length,
|
|
653
|
-
minimumPx: minOverlapPx,
|
|
654
|
-
from: hit.overlapStart,
|
|
655
|
-
to: hit.overlapEnd,
|
|
656
|
-
segmentIndex: hit.leftSegment,
|
|
657
|
-
otherSegmentIndex: hit.rightSegment,
|
|
658
|
-
},
|
|
659
|
-
supportedFixes: [routeHint],
|
|
660
|
-
});
|
|
661
|
-
return message;
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
// Relationship paths may cross a structural frame, but they must not borrow a
|
|
666
|
-
// frame side as a routing corridor. Rounded rectangle corners are trimmed from
|
|
667
|
-
// the modeled straight sides so a short corner touch is not mistaken for a
|
|
668
|
-
// border run. Any positive straight overlap beyond the numeric epsilon is a
|
|
669
|
-
// hard failure in every quality profile; 16px belongs only to the separate,
|
|
670
|
-
// neutral short-segment metric and is not a corridor exemption.
|
|
671
|
-
export function collectBorderRuns({ routedRelations, frames }) {
|
|
672
|
-
const hits = [];
|
|
673
|
-
for (const routed of asArray(routedRelations)) {
|
|
674
|
-
const routeSegments = Array.isArray(routed?.segments)
|
|
675
|
-
? routed.segments
|
|
676
|
-
: asArray(routed?.points).slice(0, -1).map((start, index) => ({ start, end: routed.points[index + 1] }));
|
|
677
|
-
if (!routeSegments.length) continue;
|
|
678
|
-
if (!routeSegments.every((segment) => (
|
|
679
|
-
Array.isArray(segment?.start) && segment.start.length === 2 && isFinitePoint(...segment.start)
|
|
680
|
-
&& Array.isArray(segment?.end) && segment.end.length === 2 && isFinitePoint(...segment.end)
|
|
681
|
-
))) continue;
|
|
682
|
-
for (const [frameIndex, frame] of asArray(frames).entries()) {
|
|
683
|
-
for (const border of frameBorderSegments(frame)) {
|
|
684
|
-
const overlaps = [];
|
|
685
|
-
for (let segmentIndex = 0; segmentIndex < routeSegments.length; segmentIndex += 1) {
|
|
686
|
-
const segment = routeSegments[segmentIndex];
|
|
687
|
-
const overlap = collinearAxisOverlap(
|
|
688
|
-
segment.start,
|
|
689
|
-
segment.end,
|
|
690
|
-
border.start,
|
|
691
|
-
border.end,
|
|
692
|
-
);
|
|
693
|
-
if (!overlap || overlap.length <= 0.0001) continue;
|
|
694
|
-
overlaps.push({ ...overlap, segmentIndex });
|
|
695
|
-
}
|
|
696
|
-
if (!overlaps.length) continue;
|
|
697
|
-
const merged = mergeBorderOverlaps(overlaps, border);
|
|
698
|
-
const longest = [...merged].sort((left, right) => right.length - left.length || left.low - right.low)[0];
|
|
699
|
-
hits.push({
|
|
700
|
-
...routed,
|
|
701
|
-
frame,
|
|
702
|
-
frameIndex,
|
|
703
|
-
side: border.side,
|
|
704
|
-
segmentIndex: Math.min(...overlaps.map((overlap) => overlap.segmentIndex)),
|
|
705
|
-
overlapLength: merged.reduce((total, overlap) => total + overlap.length, 0),
|
|
706
|
-
overlapStart: longest.start,
|
|
707
|
-
overlapEnd: longest.end,
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
return hits;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
export function cleanBorderRunProblems({
|
|
716
|
-
relations,
|
|
717
|
-
endpointIds,
|
|
718
|
-
frames,
|
|
719
|
-
pathFor,
|
|
720
|
-
diagramType,
|
|
721
|
-
relationCollection,
|
|
722
|
-
profile,
|
|
723
|
-
profileIsAuthoritative = false,
|
|
724
|
-
routeHint = 'adjust route/via or channel coordinates so the relationship crosses the frame perpendicularly through a clear opening'
|
|
725
|
-
}) {
|
|
726
|
-
if (!qualityProfileForGate(profile, profileIsAuthoritative)) return [];
|
|
727
|
-
const routedRelations = collectEligibleRoutedRelations({ relations, endpointIds, pathFor });
|
|
728
|
-
return collectBorderRuns({ routedRelations, frames }).map((hit) => {
|
|
729
|
-
const relation = hit.relation || {};
|
|
730
|
-
const relationId = relation.id ? ` id "${relation.id}"` : '';
|
|
731
|
-
const frameKind = hit.frame?.kind || hit.frame?.shape || 'frame';
|
|
732
|
-
const frameIdentity = hit.frame?.label || hit.frame?.id || hit.frameIndex;
|
|
733
|
-
const length = Math.round(hit.overlapLength * 10) / 10;
|
|
734
|
-
const from = hit.overlapStart.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
735
|
-
const to = hit.overlapEnd.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
736
|
-
const message = `[composition/container-border-run] ${diagramType} ${relationCollection}[${hit.relationIndex}]${relationId} "${relation.from}" -> "${relation.to}" follows ${frameKind} "${frameIdentity}" ${hit.side} border for ${length}px on segment ${hit.segmentIndex} [${from}] -> [${to}] — ${routeHint}.`;
|
|
737
|
-
recordDiagnostic({
|
|
738
|
-
code: 'composition/container-border-run',
|
|
739
|
-
severity: 'error',
|
|
740
|
-
message,
|
|
741
|
-
subject: relationshipSubject(diagramType, relationCollection, hit.relationIndex, relation),
|
|
742
|
-
evidence: {
|
|
743
|
-
frameKind,
|
|
744
|
-
frameId: hit.frame?.id,
|
|
745
|
-
frameLabel: hit.frame?.label,
|
|
746
|
-
side: hit.side,
|
|
747
|
-
segmentIndex: hit.segmentIndex,
|
|
748
|
-
overlapLengthPx: length,
|
|
749
|
-
from: hit.overlapStart,
|
|
750
|
-
to: hit.overlapEnd,
|
|
751
|
-
},
|
|
752
|
-
supportedFixes: [routeHint],
|
|
753
|
-
});
|
|
754
|
-
return message;
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
export function routeBudgetMetrics({
|
|
759
|
-
routedRelations,
|
|
760
|
-
bendsPerRelationship = 2,
|
|
761
|
-
stretch = 1.35,
|
|
762
|
-
segmentPx = 16,
|
|
763
|
-
microSegmentPx = 8,
|
|
764
|
-
}) {
|
|
765
|
-
let maxBends = 0;
|
|
766
|
-
let routesOverSuggestedBends = 0;
|
|
767
|
-
let maxStretch = null;
|
|
768
|
-
let routesOverSuggestedStretch = 0;
|
|
769
|
-
let minSegmentPx = null;
|
|
770
|
-
let minInteriorSegmentPx = null;
|
|
771
|
-
let shortSegmentCount = 0;
|
|
772
|
-
let shortEndpointSegmentCount = 0;
|
|
773
|
-
let shortInteriorSegmentCount = 0;
|
|
774
|
-
let microSegmentCount = 0;
|
|
775
|
-
|
|
776
|
-
for (const routed of asArray(routedRelations)) {
|
|
777
|
-
const points = normalizeRoutePoints(routed?.points);
|
|
778
|
-
if (points.length < 2) continue;
|
|
779
|
-
const bends = Math.max(0, points.length - 2);
|
|
780
|
-
maxBends = Math.max(maxBends, bends);
|
|
781
|
-
if (bends > bendsPerRelationship) routesOverSuggestedBends += 1;
|
|
782
|
-
|
|
783
|
-
let routeLength = 0;
|
|
784
|
-
for (let index = 0; index < points.length - 1; index += 1) {
|
|
785
|
-
const length = Math.abs(points[index + 1][0] - points[index][0]) + Math.abs(points[index + 1][1] - points[index][1]);
|
|
786
|
-
if (length <= 0.0001) continue;
|
|
787
|
-
const position = segmentPosition(index, points.length - 1);
|
|
788
|
-
routeLength += length;
|
|
789
|
-
minSegmentPx = minSegmentPx == null ? length : Math.min(minSegmentPx, length);
|
|
790
|
-
if (position === 'interior') {
|
|
791
|
-
minInteriorSegmentPx = minInteriorSegmentPx == null ? length : Math.min(minInteriorSegmentPx, length);
|
|
792
|
-
}
|
|
793
|
-
if (length < segmentPx) {
|
|
794
|
-
shortSegmentCount += 1;
|
|
795
|
-
if (position === 'interior') shortInteriorSegmentCount += 1;
|
|
796
|
-
else shortEndpointSegmentCount += 1;
|
|
797
|
-
}
|
|
798
|
-
if (length < microSegmentPx) microSegmentCount += 1;
|
|
799
|
-
}
|
|
800
|
-
const direct = Math.abs(points.at(-1)[0] - points[0][0]) + Math.abs(points.at(-1)[1] - points[0][1]);
|
|
801
|
-
if (direct > 0.0001) {
|
|
802
|
-
const routeStretch = routeLength / direct;
|
|
803
|
-
maxStretch = maxStretch == null ? routeStretch : Math.max(maxStretch, routeStretch);
|
|
804
|
-
if (routeStretch > stretch + 0.0001) routesOverSuggestedStretch += 1;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
return {
|
|
809
|
-
maxBends,
|
|
810
|
-
routesOverSuggestedBends,
|
|
811
|
-
maxStretch,
|
|
812
|
-
routesOverSuggestedStretch,
|
|
813
|
-
minSegmentPx,
|
|
814
|
-
minInteriorSegmentPx,
|
|
815
|
-
shortSegmentCount,
|
|
816
|
-
shortEndpointSegmentCount,
|
|
817
|
-
shortInteriorSegmentCount,
|
|
818
|
-
microSegmentCount,
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
export function collectRouteRhythmIssues({
|
|
823
|
-
routedRelations,
|
|
824
|
-
interiorSegmentPx = 16,
|
|
825
|
-
microSegmentPx = 8,
|
|
826
|
-
}) {
|
|
827
|
-
const issues = [];
|
|
828
|
-
for (const [fallbackIndex, routed] of asArray(routedRelations).entries()) {
|
|
829
|
-
const points = normalizeRoutePoints(routed?.points);
|
|
830
|
-
if (points.length < 2) continue;
|
|
831
|
-
for (let segmentIndex = 0; segmentIndex < points.length - 1; segmentIndex += 1) {
|
|
832
|
-
const start = points[segmentIndex];
|
|
833
|
-
const end = points[segmentIndex + 1];
|
|
834
|
-
const length = Math.abs(end[0] - start[0]) + Math.abs(end[1] - start[1]);
|
|
835
|
-
if (length <= 0.0001) continue;
|
|
836
|
-
const position = segmentPosition(segmentIndex, points.length - 1);
|
|
837
|
-
const code = length < microSegmentPx - 0.0001
|
|
838
|
-
? 'composition/micro-segment'
|
|
839
|
-
: position === 'interior' && length < interiorSegmentPx - 0.0001
|
|
840
|
-
? 'composition/short-interior-segment'
|
|
841
|
-
: null;
|
|
842
|
-
if (!code) continue;
|
|
843
|
-
issues.push({
|
|
844
|
-
code,
|
|
845
|
-
relation: routed.relation,
|
|
846
|
-
relationIndex: Number.isInteger(routed.relationIndex) ? routed.relationIndex : fallbackIndex,
|
|
847
|
-
segmentIndex,
|
|
848
|
-
position,
|
|
849
|
-
length,
|
|
850
|
-
start,
|
|
851
|
-
end,
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
return issues;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
export function cleanRouteRhythmProblems({
|
|
859
|
-
relations,
|
|
860
|
-
endpointIds,
|
|
861
|
-
pathFor,
|
|
862
|
-
diagramType,
|
|
863
|
-
relationCollection,
|
|
864
|
-
profile,
|
|
865
|
-
profileIsAuthoritative = false,
|
|
866
|
-
routeHint = 'move the channel/via point to remove the cramped turn or give the route more corridor space',
|
|
867
|
-
interiorSegmentPx = 16,
|
|
868
|
-
microSegmentPx = 8,
|
|
869
|
-
}) {
|
|
870
|
-
if (qualityProfileForGate(profile, profileIsAuthoritative) !== 'showcase') return [];
|
|
871
|
-
const routedRelations = collectEligibleRoutedRelations({ relations, endpointIds, pathFor });
|
|
872
|
-
return collectRouteRhythmIssues({ routedRelations, interiorSegmentPx, microSegmentPx }).map((hit) => {
|
|
873
|
-
const relation = hit.relation || {};
|
|
874
|
-
const relationId = relation.id ? ` id "${relation.id}"` : '';
|
|
875
|
-
const length = Math.round(hit.length * 10) / 10;
|
|
876
|
-
const from = hit.start.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
877
|
-
const to = hit.end.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
878
|
-
const rule = hit.code === 'composition/micro-segment'
|
|
879
|
-
? `is below the ${microSegmentPx}px micro-segment floor`
|
|
880
|
-
: `is below the ${interiorSegmentPx}px interior-segment floor`;
|
|
881
|
-
const message = `[${hit.code}] showcase ${diagramType} ${relationCollection}[${hit.relationIndex}]${relationId} "${relation.from}" -> "${relation.to}" has a ${length}px ${hit.position} segment ${hit.segmentIndex} [${from}] -> [${to}] that ${rule} — ${routeHint}.`;
|
|
882
|
-
recordDiagnostic({
|
|
883
|
-
code: hit.code,
|
|
884
|
-
severity: 'error',
|
|
885
|
-
message,
|
|
886
|
-
subject: relationshipSubject(diagramType, relationCollection, hit.relationIndex, relation),
|
|
887
|
-
evidence: {
|
|
888
|
-
segmentIndex: hit.segmentIndex,
|
|
889
|
-
position: hit.position,
|
|
890
|
-
lengthPx: length,
|
|
891
|
-
minimumPx: hit.code === 'composition/micro-segment' ? microSegmentPx : interiorSegmentPx,
|
|
892
|
-
from: hit.start,
|
|
893
|
-
to: hit.end,
|
|
894
|
-
},
|
|
895
|
-
supportedFixes: [routeHint],
|
|
896
|
-
});
|
|
897
|
-
return message;
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
export function cleanLabelRouteClearanceProblems({
|
|
902
|
-
relations,
|
|
903
|
-
labels,
|
|
904
|
-
endpointIds,
|
|
905
|
-
pathFor,
|
|
906
|
-
diagramType,
|
|
907
|
-
relationCollection,
|
|
908
|
-
profile,
|
|
909
|
-
profileIsAuthoritative = false,
|
|
910
|
-
threshold = 4,
|
|
911
|
-
routeHint = 'adjust labelAt, labelDx, labelDy, or labelSegment; otherwise adjust the other relationship route/via/channel',
|
|
912
|
-
}) {
|
|
913
|
-
if (qualityProfileForGate(profile, profileIsAuthoritative) !== 'showcase') return [];
|
|
914
|
-
const routedRelations = collectEligibleRoutedRelations({ relations, endpointIds, pathFor });
|
|
915
|
-
return collectLabelRouteClearance({ labels, routedRelations, threshold }).map((hit) => {
|
|
916
|
-
const describe = (relation, relationIndex) => {
|
|
917
|
-
const relationId = relation?.id ? ` id "${relation.id}"` : '';
|
|
918
|
-
const relationLabel = relation?.label ? ` label "${relation.label}"` : '';
|
|
919
|
-
return `${relationCollection}[${relationIndex}]${relationId} "${relation?.from}" -> "${relation?.to}"${relationLabel}`;
|
|
920
|
-
};
|
|
921
|
-
const clearance = Math.round(hit.clearance * 10) / 10;
|
|
922
|
-
const from = hit.start.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
923
|
-
const to = hit.end.map((value) => Math.round(value * 10) / 10).join(', ');
|
|
924
|
-
const message = `[composition/label-route-clearance] showcase ${diagramType} label "${hit.label?.label || hit.labelRelation?.label || ''}" on ${describe(hit.labelRelation, hit.labelRelationIndex)} is ${clearance}px from ${describe(hit.otherRelation, hit.otherRelationIndex)} segment ${hit.segmentIndex} [${from}] -> [${to}] (label rect ${formatRect(hit.rect)}; minimum ${threshold}px) — ${routeHint}.`;
|
|
925
|
-
recordDiagnostic({
|
|
926
|
-
code: 'composition/label-route-clearance',
|
|
927
|
-
severity: 'error',
|
|
928
|
-
message,
|
|
929
|
-
subject: relationshipSubject(diagramType, relationCollection, hit.labelRelationIndex, hit.labelRelation),
|
|
930
|
-
evidence: {
|
|
931
|
-
label: hit.label?.label || hit.labelRelation?.label || '',
|
|
932
|
-
otherRelationship: relationshipSubject(diagramType, relationCollection, hit.otherRelationIndex, hit.otherRelation),
|
|
933
|
-
segmentIndex: hit.segmentIndex,
|
|
934
|
-
clearancePx: clearance,
|
|
935
|
-
minimumPx: threshold,
|
|
936
|
-
labelRect: hit.rect,
|
|
937
|
-
from: hit.start,
|
|
938
|
-
to: hit.end,
|
|
939
|
-
},
|
|
940
|
-
supportedFixes: [routeHint],
|
|
941
|
-
});
|
|
942
|
-
return message;
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
function qualityProfileForGate(profile, profileIsAuthoritative) {
|
|
947
|
-
return profileIsAuthoritative
|
|
948
|
-
? profile
|
|
949
|
-
: process.env.ARCHIFY_QUALITY_PROFILE || profile;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
function collectEligibleRoutedRelations({ relations, endpointIds, pathFor }) {
|
|
953
|
-
return asArray(relations).map((relation, relationIndex) => {
|
|
954
|
-
if (!relation || typeof relation.from !== 'string' || typeof relation.to !== 'string') return null;
|
|
955
|
-
if (endpointIds && (!endpointIds.has(relation.from) || !endpointIds.has(relation.to))) return null;
|
|
956
|
-
return { relation, relationIndex, points: pathFor(relation)?.points };
|
|
957
|
-
}).filter(Boolean);
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
function segmentPosition(index, segmentCount) {
|
|
961
|
-
if (index === 0) return 'source-stub';
|
|
962
|
-
if (index === segmentCount - 1) return 'target-stub';
|
|
963
|
-
return 'interior';
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
export function normalizeRoutePoints(points) {
|
|
967
|
-
const finite = asArray(points).filter((point) => Array.isArray(point) && point.length === 2 && isFinitePoint(...point));
|
|
968
|
-
const deduped = [];
|
|
969
|
-
for (const point of finite) {
|
|
970
|
-
const previous = deduped.at(-1);
|
|
971
|
-
if (!previous || Math.abs(point[0] - previous[0]) > 0.0001 || Math.abs(point[1] - previous[1]) > 0.0001) deduped.push(point);
|
|
972
|
-
}
|
|
973
|
-
const normalized = [];
|
|
974
|
-
for (const point of deduped) {
|
|
975
|
-
while (normalized.length >= 2 && collinearForward(normalized.at(-2), normalized.at(-1), point)) normalized.pop();
|
|
976
|
-
normalized.push(point);
|
|
977
|
-
}
|
|
978
|
-
return normalized;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
function pointRectDistance(point, rect) {
|
|
982
|
-
const dx = Math.max(rect.x - point[0], 0, point[0] - (rect.x + rect.width));
|
|
983
|
-
const dy = Math.max(rect.y - point[1], 0, point[1] - (rect.y + rect.height));
|
|
984
|
-
return Math.hypot(dx, dy);
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
function pointSegmentDistance(point, start, end) {
|
|
988
|
-
const dx = end[0] - start[0];
|
|
989
|
-
const dy = end[1] - start[1];
|
|
990
|
-
const lengthSquared = dx * dx + dy * dy;
|
|
991
|
-
if (lengthSquared <= 0.0000001) return Math.hypot(point[0] - start[0], point[1] - start[1]);
|
|
992
|
-
const projection = Math.max(0, Math.min(1, ((point[0] - start[0]) * dx + (point[1] - start[1]) * dy) / lengthSquared));
|
|
993
|
-
return Math.hypot(point[0] - (start[0] + projection * dx), point[1] - (start[1] + projection * dy));
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
function collinearForward(a, b, c) {
|
|
997
|
-
if (Math.abs(crossProduct(a, b, c)) > 0.0001) return false;
|
|
998
|
-
return (b[0] - a[0]) * (c[0] - b[0]) + (b[1] - a[1]) * (c[1] - b[1]) >= -0.0001;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
function frameBorderSegments(frame) {
|
|
1002
|
-
if (!frame || typeof frame !== 'object') return [];
|
|
1003
|
-
if (frame.shape === 'line') {
|
|
1004
|
-
const start = frame.start || [frame.x1, frame.y1];
|
|
1005
|
-
const end = frame.end || [frame.x2, frame.y2];
|
|
1006
|
-
return isFinitePoint(...start, ...end) ? [{ side: 'line', start, end }] : [];
|
|
1007
|
-
}
|
|
1008
|
-
if (!isFinitePoint(frame.x, frame.y, frame.width, frame.height) || frame.width <= 0 || frame.height <= 0) return [];
|
|
1009
|
-
const radius = Math.max(0, Math.min(Number(frame.radius) || 0, frame.width / 2, frame.height / 2));
|
|
1010
|
-
const left = frame.x;
|
|
1011
|
-
const right = frame.x + frame.width;
|
|
1012
|
-
const top = frame.y;
|
|
1013
|
-
const bottom = frame.y + frame.height;
|
|
1014
|
-
return [
|
|
1015
|
-
{ side: 'top', start: [left + radius, top], end: [right - radius, top] },
|
|
1016
|
-
{ side: 'right', start: [right, top + radius], end: [right, bottom - radius] },
|
|
1017
|
-
{ side: 'bottom', start: [right - radius, bottom], end: [left + radius, bottom] },
|
|
1018
|
-
{ side: 'left', start: [left, bottom - radius], end: [left, top + radius] },
|
|
1019
|
-
].filter(({ start, end }) => Math.hypot(end[0] - start[0], end[1] - start[1]) > 0.0001);
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
function mergeBorderOverlaps(overlaps, border) {
|
|
1023
|
-
const horizontal = Math.abs(border.start[1] - border.end[1]) <= 0.0001;
|
|
1024
|
-
const axis = horizontal ? 0 : 1;
|
|
1025
|
-
const fixed = horizontal ? border.start[1] : border.start[0];
|
|
1026
|
-
const sorted = overlaps.map((overlap) => ({
|
|
1027
|
-
low: Math.min(overlap.start[axis], overlap.end[axis]),
|
|
1028
|
-
high: Math.max(overlap.start[axis], overlap.end[axis]),
|
|
1029
|
-
})).sort((left, right) => left.low - right.low || left.high - right.high);
|
|
1030
|
-
const merged = [];
|
|
1031
|
-
for (const interval of sorted) {
|
|
1032
|
-
const previous = merged.at(-1);
|
|
1033
|
-
if (previous && interval.low <= previous.high + 0.0001) previous.high = Math.max(previous.high, interval.high);
|
|
1034
|
-
else merged.push({ ...interval });
|
|
1035
|
-
}
|
|
1036
|
-
return merged.map((interval) => ({
|
|
1037
|
-
...interval,
|
|
1038
|
-
length: interval.high - interval.low,
|
|
1039
|
-
start: horizontal ? [interval.low, fixed] : [fixed, interval.low],
|
|
1040
|
-
end: horizontal ? [interval.high, fixed] : [fixed, interval.high],
|
|
1041
|
-
}));
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
function collinearAxisOverlap(a, b, c, d) {
|
|
1045
|
-
const epsilon = 0.0001;
|
|
1046
|
-
const horizontal = Math.abs(a[1] - b[1]) <= epsilon
|
|
1047
|
-
&& Math.abs(c[1] - d[1]) <= epsilon
|
|
1048
|
-
&& Math.abs(a[1] - c[1]) <= epsilon;
|
|
1049
|
-
const vertical = Math.abs(a[0] - b[0]) <= epsilon
|
|
1050
|
-
&& Math.abs(c[0] - d[0]) <= epsilon
|
|
1051
|
-
&& Math.abs(a[0] - c[0]) <= epsilon;
|
|
1052
|
-
if (!horizontal && !vertical) return null;
|
|
1053
|
-
const axis = horizontal ? 0 : 1;
|
|
1054
|
-
const low = Math.max(Math.min(a[axis], b[axis]), Math.min(c[axis], d[axis]));
|
|
1055
|
-
const high = Math.min(Math.max(a[axis], b[axis]), Math.max(c[axis], d[axis]));
|
|
1056
|
-
if (high - low <= epsilon) return null;
|
|
1057
|
-
const fixed = horizontal ? a[1] : a[0];
|
|
1058
|
-
return {
|
|
1059
|
-
length: high - low,
|
|
1060
|
-
start: horizontal ? [low, fixed] : [fixed, low],
|
|
1061
|
-
end: horizontal ? [high, fixed] : [fixed, high],
|
|
1062
|
-
};
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
function properSegmentIntersection(a, b, c, d) {
|
|
1066
|
-
const abC = crossProduct(a, b, c);
|
|
1067
|
-
const abD = crossProduct(a, b, d);
|
|
1068
|
-
const cdA = crossProduct(c, d, a);
|
|
1069
|
-
const cdB = crossProduct(c, d, b);
|
|
1070
|
-
const epsilon = 0.0001;
|
|
1071
|
-
const opposite = (left, right) => (left > epsilon && right < -epsilon) || (left < -epsilon && right > epsilon);
|
|
1072
|
-
if (!opposite(abC, abD) || !opposite(cdA, cdB)) return null;
|
|
1073
|
-
|
|
1074
|
-
const denominator = (a[0] - b[0]) * (c[1] - d[1]) - (a[1] - b[1]) * (c[0] - d[0]);
|
|
1075
|
-
if (Math.abs(denominator) < epsilon) return null;
|
|
1076
|
-
const ab = a[0] * b[1] - a[1] * b[0];
|
|
1077
|
-
const cd = c[0] * d[1] - c[1] * d[0];
|
|
1078
|
-
return [
|
|
1079
|
-
(ab * (c[0] - d[0]) - (a[0] - b[0]) * cd) / denominator,
|
|
1080
|
-
(ab * (c[1] - d[1]) - (a[1] - b[1]) * cd) / denominator
|
|
1081
|
-
];
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
function crossProduct(a, b, c) {
|
|
1085
|
-
return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
function pointInBox(point, box) {
|
|
1089
|
-
return point[0] >= box.x1 && point[0] <= box.x2 && point[1] >= box.y1 && point[1] <= box.y2;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
function segmentsIntersect(a, b, c, d) {
|
|
1093
|
-
const o1 = orientation(a, b, c);
|
|
1094
|
-
const o2 = orientation(a, b, d);
|
|
1095
|
-
const o3 = orientation(c, d, a);
|
|
1096
|
-
const o4 = orientation(c, d, b);
|
|
1097
|
-
|
|
1098
|
-
if (o1 === 0 && onSegment(a, c, b)) return true;
|
|
1099
|
-
if (o2 === 0 && onSegment(a, d, b)) return true;
|
|
1100
|
-
if (o3 === 0 && onSegment(c, a, d)) return true;
|
|
1101
|
-
if (o4 === 0 && onSegment(c, b, d)) return true;
|
|
1102
|
-
|
|
1103
|
-
return o1 !== o2 && o3 !== o4;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
function orientation(a, b, c) {
|
|
1107
|
-
const value = (b[1] - a[1]) * (c[0] - b[0]) - (b[0] - a[0]) * (c[1] - b[1]);
|
|
1108
|
-
if (Math.abs(value) < 0.0001) return 0;
|
|
1109
|
-
return value > 0 ? 1 : 2;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
function onSegment(a, b, c) {
|
|
1113
|
-
return (
|
|
1114
|
-
b[0] <= Math.max(a[0], c[0]) &&
|
|
1115
|
-
b[0] >= Math.min(a[0], c[0]) &&
|
|
1116
|
-
b[1] <= Math.max(a[1], c[1]) &&
|
|
1117
|
-
b[1] >= Math.min(a[1], c[1])
|
|
1118
|
-
);
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
export function anchor(rect, side) {
|
|
1122
|
-
switch (side) {
|
|
1123
|
-
case 'left': return [rect.x, rect.cy];
|
|
1124
|
-
case 'right': return [rect.x + rect.width, rect.cy];
|
|
1125
|
-
case 'top': return [rect.cx, rect.y];
|
|
1126
|
-
case 'bottom': return [rect.cx, rect.y + rect.height];
|
|
1127
|
-
default:
|
|
1128
|
-
return [rect.x + rect.width, rect.cy];
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
const PORT_OUTWARD_VECTOR = {
|
|
1133
|
-
left: [-1, 0],
|
|
1134
|
-
right: [1, 0],
|
|
1135
|
-
top: [0, -1],
|
|
1136
|
-
bottom: [0, 1],
|
|
1137
|
-
};
|
|
1138
|
-
|
|
1139
|
-
// Automatic port spreading can put otherwise parallel anchors only a few
|
|
1140
|
-
// pixels apart. A conventional midpoint dogleg then violates the renderer's
|
|
1141
|
-
// own 8px/16px route-rhythm floors. Return a full outside-channel route when
|
|
1142
|
-
// that happens, or null when the normal automatic route remains appropriate.
|
|
1143
|
-
export function automaticPortRhythmBridge(
|
|
1144
|
-
start,
|
|
1145
|
-
end,
|
|
1146
|
-
fromSide,
|
|
1147
|
-
toSide,
|
|
1148
|
-
{ endpointStubPx = 24, interiorSegmentPx = 16, accept } = {},
|
|
1149
|
-
) {
|
|
1150
|
-
if (!Array.isArray(start) || !Array.isArray(end)
|
|
1151
|
-
|| start.length !== 2 || end.length !== 2
|
|
1152
|
-
|| !isFinitePoint(...start, ...end)) return null;
|
|
1153
|
-
const fromVector = PORT_OUTWARD_VECTOR[fromSide];
|
|
1154
|
-
const toVector = PORT_OUTWARD_VECTOR[toSide];
|
|
1155
|
-
if (!fromVector || !toVector) return null;
|
|
1156
|
-
|
|
1157
|
-
const startStub = [
|
|
1158
|
-
start[0] + fromVector[0] * endpointStubPx,
|
|
1159
|
-
start[1] + fromVector[1] * endpointStubPx,
|
|
1160
|
-
];
|
|
1161
|
-
const endStub = [
|
|
1162
|
-
end[0] + toVector[0] * endpointStubPx,
|
|
1163
|
-
end[1] + toVector[1] * endpointStubPx,
|
|
1164
|
-
];
|
|
1165
|
-
const candidates = [];
|
|
1166
|
-
const verticalSides = new Set(['top', 'bottom']);
|
|
1167
|
-
const horizontalSides = new Set(['left', 'right']);
|
|
1168
|
-
|
|
1169
|
-
if (verticalSides.has(fromSide) && verticalSides.has(toSide)
|
|
1170
|
-
&& Math.abs(start[0] - end[0]) < interiorSegmentPx) {
|
|
1171
|
-
for (const channelX of [
|
|
1172
|
-
Math.max(start[0], end[0]) + interiorSegmentPx,
|
|
1173
|
-
Math.min(start[0], end[0]) - interiorSegmentPx,
|
|
1174
|
-
]) {
|
|
1175
|
-
candidates.push([
|
|
1176
|
-
start,
|
|
1177
|
-
startStub,
|
|
1178
|
-
[channelX, startStub[1]],
|
|
1179
|
-
[channelX, endStub[1]],
|
|
1180
|
-
endStub,
|
|
1181
|
-
end,
|
|
1182
|
-
]);
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
if (horizontalSides.has(fromSide) && horizontalSides.has(toSide)
|
|
1186
|
-
&& Math.abs(start[1] - end[1]) < interiorSegmentPx) {
|
|
1187
|
-
for (const channelY of [
|
|
1188
|
-
Math.max(start[1], end[1]) + interiorSegmentPx,
|
|
1189
|
-
Math.min(start[1], end[1]) - interiorSegmentPx,
|
|
1190
|
-
]) {
|
|
1191
|
-
candidates.push([
|
|
1192
|
-
start,
|
|
1193
|
-
startStub,
|
|
1194
|
-
[startStub[0], channelY],
|
|
1195
|
-
[endStub[0], channelY],
|
|
1196
|
-
endStub,
|
|
1197
|
-
end,
|
|
1198
|
-
]);
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
return candidates
|
|
1203
|
-
.map((points) => normalizeRoutePoints(points))
|
|
1204
|
-
.find((points) => (
|
|
1205
|
-
routeHonorsEndpointSides(points, fromSide, toSide)
|
|
1206
|
-
&& collectRouteRhythmIssues({ routedRelations: [{ points }], interiorSegmentPx }).length === 0
|
|
1207
|
-
&& (typeof accept !== 'function' || accept(points))
|
|
1208
|
-
)) || null;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
// Keep conservative auto-routed fan-out/fan-in relationships visually
|
|
1212
|
-
// distinct without changing authored route controls. The returned map only
|
|
1213
|
-
// contains endpoints that belong to a shared automatic midpoint anchor.
|
|
1214
|
-
export function automaticPortSpread(relations, boxes, { gutter = 16, maxSpacing = 14, sideFor } = {}) {
|
|
1215
|
-
const groups = new Map();
|
|
1216
|
-
const spread = new Map();
|
|
1217
|
-
|
|
1218
|
-
const add = (relation, endpoint, rect, side, counterpart) => {
|
|
1219
|
-
const key = `${rect.id}\u0000${side}`;
|
|
1220
|
-
const items = groups.get(key) || [];
|
|
1221
|
-
items.push({ relation, endpoint, rect, side, counterpart });
|
|
1222
|
-
groups.set(key, items);
|
|
1223
|
-
};
|
|
1224
|
-
|
|
1225
|
-
for (const relation of asArray(relations)) {
|
|
1226
|
-
if (!relation || (relation.route && relation.route !== 'auto')) continue;
|
|
1227
|
-
if (relation.via || relation.channelX !== undefined || relation.channelY !== undefined || relation.labelAt) continue;
|
|
1228
|
-
const from = boxes.get(relation.from);
|
|
1229
|
-
const to = boxes.get(relation.to);
|
|
1230
|
-
if (!from || !to) continue;
|
|
1231
|
-
const fromSide = chosenSide(
|
|
1232
|
-
relation.fromSide,
|
|
1233
|
-
sideFor?.(relation, 'source') || defaultFromSide(from, to),
|
|
1234
|
-
);
|
|
1235
|
-
const toSide = chosenSide(
|
|
1236
|
-
relation.toSide,
|
|
1237
|
-
sideFor?.(relation, 'target') || defaultToSide(from, to),
|
|
1238
|
-
);
|
|
1239
|
-
add(relation, 'from', from, fromSide, to);
|
|
1240
|
-
add(relation, 'to', to, toSide, from);
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
for (const items of groups.values()) {
|
|
1244
|
-
if (items.length < 2) continue;
|
|
1245
|
-
const verticalSide = items[0].side === 'left' || items[0].side === 'right';
|
|
1246
|
-
items.sort((a, b) => {
|
|
1247
|
-
const aCoordinate = verticalSide ? a.counterpart.cy : a.counterpart.cx;
|
|
1248
|
-
const bCoordinate = verticalSide ? b.counterpart.cy : b.counterpart.cx;
|
|
1249
|
-
if (aCoordinate !== bCoordinate) return aCoordinate - bCoordinate;
|
|
1250
|
-
const aKey = `${a.relation.id || ''}\u0000${a.relation.from}\u0000${a.relation.to}\u0000${a.relation.label || ''}`;
|
|
1251
|
-
const bKey = `${b.relation.id || ''}\u0000${b.relation.from}\u0000${b.relation.to}\u0000${b.relation.label || ''}`;
|
|
1252
|
-
return aKey < bKey ? -1 : aKey > bKey ? 1 : 0;
|
|
1253
|
-
});
|
|
1254
|
-
|
|
1255
|
-
const extent = verticalSide ? items[0].rect.height : items[0].rect.width;
|
|
1256
|
-
const usable = Math.max(0, extent - gutter * 2);
|
|
1257
|
-
const spacing = Math.min(maxSpacing, usable / (items.length - 1));
|
|
1258
|
-
if (!(spacing > 0)) continue;
|
|
1259
|
-
|
|
1260
|
-
for (const [index, item] of items.entries()) {
|
|
1261
|
-
const offset = (index - (items.length - 1) / 2) * spacing;
|
|
1262
|
-
const point = anchor(item.rect, item.side);
|
|
1263
|
-
if (verticalSide) point[1] += offset;
|
|
1264
|
-
else point[0] += offset;
|
|
1265
|
-
const endpoints = spread.get(item.relation) || {};
|
|
1266
|
-
endpoints[item.endpoint] = point;
|
|
1267
|
-
spread.set(item.relation, endpoints);
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
return spread;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
export function defaultFromSide(from, to) {
|
|
1275
|
-
if (to.cx < from.cx) return 'left';
|
|
1276
|
-
if (to.cx > from.cx) return 'right';
|
|
1277
|
-
if (to.cy > from.cy) return 'bottom';
|
|
1278
|
-
return 'top';
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
export function defaultToSide(from, to) {
|
|
1282
|
-
if (to.cx < from.cx) return 'right';
|
|
1283
|
-
if (to.cx > from.cx) return 'left';
|
|
1284
|
-
if (to.cy > from.cy) return 'top';
|
|
1285
|
-
return 'bottom';
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
export function chosenSide(side, fallback) {
|
|
1289
|
-
return side && side !== 'auto' ? side : fallback;
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
export function polylinePath(points) {
|
|
1293
|
-
return points.map(([x, y], index) => `${index === 0 ? 'M' : 'L'} ${x} ${y}`).join(' ');
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
export function routePointsValue(points) {
|
|
1297
|
-
return asArray(points)
|
|
1298
|
-
.filter((point) => Array.isArray(point) && point.length === 2 && isFinitePoint(...point))
|
|
1299
|
-
.map(([x, y]) => `${x},${y}`)
|
|
1300
|
-
.join(';');
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
export function roundedPath(points, radius) {
|
|
1304
|
-
if (points.length < 3 || radius <= 0) {
|
|
1305
|
-
return polylinePath(points);
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
const commands = [`M ${points[0][0]} ${points[0][1]}`];
|
|
1309
|
-
for (let i = 1; i < points.length - 1; i += 1) {
|
|
1310
|
-
const [px, py] = points[i - 1];
|
|
1311
|
-
const [cx, cy] = points[i];
|
|
1312
|
-
const [nx, ny] = points[i + 1];
|
|
1313
|
-
const prevLen = Math.hypot(cx - px, cy - py);
|
|
1314
|
-
const nextLen = Math.hypot(nx - cx, ny - cy);
|
|
1315
|
-
const r = Math.min(radius, prevLen / 2, nextLen / 2);
|
|
1316
|
-
if (r < 1) {
|
|
1317
|
-
commands.push(`L ${cx} ${cy}`);
|
|
1318
|
-
continue;
|
|
1319
|
-
}
|
|
1320
|
-
const before = [cx - ((cx - px) / prevLen) * r, cy - ((cy - py) / prevLen) * r];
|
|
1321
|
-
const after = [cx + ((nx - cx) / nextLen) * r, cy + ((ny - cy) / nextLen) * r];
|
|
1322
|
-
commands.push(`L ${before[0]} ${before[1]}`);
|
|
1323
|
-
commands.push(`Q ${cx} ${cy} ${after[0]} ${after[1]}`);
|
|
1324
|
-
}
|
|
1325
|
-
const [endX, endY] = points[points.length - 1];
|
|
1326
|
-
commands.push(`L ${endX} ${endY}`);
|
|
1327
|
-
return commands.join(' ');
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
// Shared by edges/flows/transitions: all carry the same optional
|
|
1331
|
-
// labelAt/labelDx/labelDy/labelSegment knobs.
|
|
1332
|
-
export function labelPoint(item, points) {
|
|
1333
|
-
if (item.labelAt) return item.labelAt;
|
|
1334
|
-
if (points.length === 2) {
|
|
1335
|
-
return [
|
|
1336
|
-
(points[0][0] + points[1][0]) / 2 + (item.labelDx || 0),
|
|
1337
|
-
points[0][1] - 10 + (item.labelDy || 0)
|
|
1338
|
-
];
|
|
1339
|
-
}
|
|
1340
|
-
const segmentIndex = Math.min(points.length - 2, Math.max(0, item.labelSegment ?? 1));
|
|
1341
|
-
const a = points[segmentIndex];
|
|
1342
|
-
const b = points[segmentIndex + 1];
|
|
1343
|
-
return [(a[0] + b[0]) / 2 + (item.labelDx || 0), (a[1] + b[1]) / 2 - 10 + (item.labelDy || 0)];
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
export const componentFill = {
|
|
1347
|
-
frontend: 'c-frontend',
|
|
1348
|
-
backend: 'c-backend',
|
|
1349
|
-
database: 'c-database',
|
|
1350
|
-
cloud: 'c-cloud',
|
|
1351
|
-
security: 'c-security',
|
|
1352
|
-
messagebus: 'c-messagebus',
|
|
1353
|
-
external: 'c-external'
|
|
1354
|
-
};
|
|
1355
|
-
|
|
1356
|
-
export const componentText = {
|
|
1357
|
-
frontend: 't-frontend',
|
|
1358
|
-
backend: 't-backend',
|
|
1359
|
-
database: 't-database',
|
|
1360
|
-
cloud: 't-cloud',
|
|
1361
|
-
security: 't-security',
|
|
1362
|
-
messagebus: 't-messagebus',
|
|
1363
|
-
external: 't-external'
|
|
1364
|
-
};
|
|
1365
|
-
|
|
1366
|
-
export const arrowClassMap = {
|
|
1367
|
-
default: ['a-default', 'arrowhead'],
|
|
1368
|
-
emphasis: ['a-emphasis', 'arrowhead-emphasis'],
|
|
1369
|
-
security: ['a-security', 'arrowhead-security'],
|
|
1370
|
-
dashed: ['a-dashed', 'arrowhead-dashed']
|
|
1371
|
-
};
|
|
1372
|
-
|
|
1373
|
-
// Label accent per edge variant. Workflow colors dashed (async trace) labels
|
|
1374
|
-
// like the trace store it points at; the other renderers use the bus color.
|
|
1375
|
-
export function variantAccent(variant, { dashed = 't-messagebus' } = {}) {
|
|
1376
|
-
return variant === 'security'
|
|
1377
|
-
? 't-security'
|
|
1378
|
-
: variant === 'emphasis'
|
|
1379
|
-
? 't-backend'
|
|
1380
|
-
: variant === 'dashed'
|
|
1381
|
-
? dashed
|
|
1382
|
-
: 't-muted';
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
export function formatRect(r) {
|
|
1386
|
-
return `[${Math.round(r.x)}, ${Math.round(r.y)}, ${Math.round(r.width)}, ${Math.round(r.height)}]`;
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
function formatDelta(n) {
|
|
1390
|
-
const v = Math.round(n);
|
|
1391
|
-
return v >= 0 ? `+${v}` : String(v);
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
/** Actionable hint when an edge label rect hits a node/component box (#7). */
|
|
1395
|
-
export function suggestLabelObstacleFix(labelRect, lx, ly, obstacle, obstacleKind = 'component') {
|
|
1396
|
-
const lxR = Math.round(lx);
|
|
1397
|
-
const lyR = Math.round(ly);
|
|
1398
|
-
const belowY = Math.round(obstacle.y + obstacle.height + 14);
|
|
1399
|
-
const aboveY = Math.round(obstacle.y - 4);
|
|
1400
|
-
return [
|
|
1401
|
-
` label rect: ${formatRect(labelRect)}`,
|
|
1402
|
-
` ${obstacleKind} "${obstacle.id}" rect: ${formatRect(obstacle)}`,
|
|
1403
|
-
` Suggested fix: labelAt [${lxR}, ${belowY}] or labelDy ${formatDelta(belowY - lyR)} (below); or labelAt [${lxR}, ${aboveY}] or labelDy ${formatDelta(aboveY - lyR)} (above)`,
|
|
1404
|
-
].join('\n');
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
/** Hint when two edge labels collide. */
|
|
1408
|
-
export function suggestLabelPairFix(a, b) {
|
|
1409
|
-
return [
|
|
1410
|
-
` "${a.label}" ${formatRect(a)}; "${b.label}" ${formatRect(b)}`,
|
|
1411
|
-
' Suggested fix: adjust labelDx/labelDy/labelSegment, or route one relationship through a separate corridor',
|
|
1412
|
-
].join('\n');
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
/** Hint when two components/nodes are too close. */
|
|
1416
|
-
export function suggestComponentSeparation(a, b, minGap = 8) {
|
|
1417
|
-
const rightX = Math.round(a.x + a.width + minGap);
|
|
1418
|
-
const belowY = Math.round(a.y + a.height + minGap);
|
|
1419
|
-
return [
|
|
1420
|
-
` "${a.id}" ${formatRect(a)}; "${b.id}" ${formatRect(b)}`,
|
|
1421
|
-
` Suggested fix: move "${b.id}" pos to [${rightX}, ${Math.round(b.y)}] (right of "${a.id}") or [${Math.round(b.x)}, ${belowY}] (below)`,
|
|
1422
|
-
].join('\n');
|
|
1423
|
-
}
|