@peter.naydenov/morph 3.3.1 → 3.3.3

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.
Files changed (140) hide show
  1. package/.claude/scheduled_tasks.lock +1 -0
  2. package/.claude/settings.local.json +14 -0
  3. package/.graphify_cached.json +1 -0
  4. package/.graphify_semantic_new.json +1 -0
  5. package/.graphify_uncached.txt +14 -0
  6. package/.opencode/package-lock.json +115 -0
  7. package/.opencode/plugins/graphify.js +22 -0
  8. package/AGENTS.md +8 -0
  9. package/Changelog.md +16 -0
  10. package/dist/morph.cjs +1 -1
  11. package/dist/morph.esm.mjs +1 -1
  12. package/dist/morph.umd.js +1 -1
  13. package/dist/src/main.d.ts +100 -0
  14. package/dist/src/methods/_actionSupply.d.ts +18 -0
  15. package/dist/src/methods/_chopTemplates.d.ts +22 -0
  16. package/dist/src/methods/_defineData.d.ts +25 -0
  17. package/dist/src/methods/_defineType.d.ts +15 -0
  18. package/dist/src/methods/_readTemplate.d.ts +24 -0
  19. package/dist/src/methods/_renderHolder.d.ts +17 -0
  20. package/dist/src/methods/_setupActions.d.ts +19 -0
  21. package/dist/src/methods/actionData.d.ts +10 -0
  22. package/dist/src/methods/actionExtendedRender.d.ts +10 -0
  23. package/dist/src/methods/actionMix.d.ts +10 -0
  24. package/dist/src/methods/actionRender.d.ts +13 -0
  25. package/dist/src/methods/actionSave.d.ts +8 -0
  26. package/dist/src/methods/build.d.ts +61 -0
  27. package/dist/src/methods/executeActions.d.ts +11 -0
  28. package/dist/src/methods/processCommands.d.ts +46 -0
  29. package/dist/src/methods/processPlaceholders.d.ts +27 -0
  30. package/dist/src/methods/render.d.ts +14 -0
  31. package/dist/src/methods/settings.d.ts +7 -0
  32. package/graphify-out/.graphify_python +1 -0
  33. package/graphify-out/GRAPH_REPORT.md +147 -0
  34. package/graphify-out/cache/12d38a6879ec5b7a18b61b92920684a5e915c2255c41e2c56168c678dba94023.json +1 -0
  35. package/graphify-out/cache/1ba574be094f9bd868bbce1091b9988d6188ae071762a73d483516498b742434.json +1 -0
  36. package/graphify-out/cache/2dfd19c49f88b8af0c95f7692ae9453b54cf898dba6c24cad9cbd555b365f5e7.json +1 -0
  37. package/graphify-out/cache/343264caa0702ae2210efeb2d673fb69b59bd01403803c84f9da0ce21d93c6fe.json +1 -0
  38. package/graphify-out/cache/38f82a17b2933bf14206263846c7396b46ac0db01af525300ac20f2f3f2b0534.json +1 -0
  39. package/graphify-out/cache/3a8b3ccf38f1d380228dda52c3c595ec76b5827b6905ef7e2bef6e265ee4ac16.json +1 -0
  40. package/graphify-out/cache/3b3e764a57e1d2ce17e5a74bea1c7ee493260e27266c114a72688d441f712e52.json +1 -0
  41. package/graphify-out/cache/42bc18f8ec31b043b4c4ecc11c79c288afe0801207d60a7cc322d11ab4579864.json +1 -0
  42. package/graphify-out/cache/4e3d45485b073109c7d91f18dac64ffbf0cbc21ae0edac016cb7b5f061954af6.json +1 -0
  43. package/graphify-out/cache/4ed08a09c3f090fe62cd56647a5251d60cf2f095156e502244a4f732929e342c.json +1 -0
  44. package/graphify-out/cache/51c174d3534ae05ed6dcbdb7f0d16da0b22f05677ef2863920e0a541b06090dd.json +1 -0
  45. package/graphify-out/cache/51d65b15aad6e35883d6ccaa0688273d7e14d8b7b85b194c50c365e5ea6710c6.json +1 -0
  46. package/graphify-out/cache/5d96cf59b7e5e3ea65c2ddcc6267178ea8916e104ff3f82a5a4d90179f762d11.json +1 -0
  47. package/graphify-out/cache/63fa82962f6899c2c099e95b595c5106f5dd53b2dc65037b89d6c6578033c03c.json +1 -0
  48. package/graphify-out/cache/6878c29d96e13e9fee1e01e4ca4e77d28b1e8e6c4f1d05dbffdca58625ef5694.json +1 -0
  49. package/graphify-out/cache/6c7082448b871f8cce9c6e26f788252a3b0c7e88ce40b4d3652ca9b78a2df049.json +1 -0
  50. package/graphify-out/cache/7cb42a4ad6e7c2f8b66560c9c40053e479cc1cffdf074d6b00bc23e607535376.json +1 -0
  51. package/graphify-out/cache/8712e549b4b42d5dc14c3e4b56f384c9d8e37116dc61ad906a05e10a1445ff40.json +1 -0
  52. package/graphify-out/cache/8b1ea63dfe0d47683be14dd72078eb83cf5b182d497237adbcd50ebdc1fee1bc.json +1 -0
  53. package/graphify-out/cache/8cd02cb84a50696666d33fee84a4a7e75fce651780ba7a4474bfe9b4a2b79c46.json +1 -0
  54. package/graphify-out/cache/8d0520a089ffaa71927ddddad5cb4d8f796a9febf0b8c4d54f78453b955520c5.json +1 -0
  55. package/graphify-out/cache/9406e0a23a011eaa9d74fe717280e5be52142ba4db8b7baee948dcdea6fe2617.json +1 -0
  56. package/graphify-out/cache/98abf9b9fbeb7f5fdaef6b853c949d297586b99e2965330906234f2ae331c0af.json +1 -0
  57. package/graphify-out/cache/9decf23c89efbaa42811f95c737234abee72478582ce4a46d99ba12d7446bb7b.json +1 -0
  58. package/graphify-out/cache/a37bc5340c5f31d2ef717845d339f468853e6554f753466ba2d995147d25fedf.json +1 -0
  59. package/graphify-out/cache/a77d81d5705a824ba81dc3556452ecc99978bc335e65e961aee29ce01e7cf81c.json +1 -0
  60. package/graphify-out/cache/ast/v0.8.39/21cd1a6bc5dbd687522c86e9f7db1842400b31ee3ba62127533aba56a478da5d.json +1 -0
  61. package/graphify-out/cache/ast/v0.8.39/29c3826c5e1938406f9eaf50a1354609aeb16e8f0d27e5a454c069c982f21180.json +1 -0
  62. package/graphify-out/cache/ast/v0.8.39/c31ea4d76660d1000df3bd29929d120e900297c7a1c26e5266312c21a9432e55.json +1 -0
  63. package/graphify-out/cache/ast/v0.8.39/de54c2617a64a2a1c1db34e6494216dd949fe730b51270bebba55c63d54a31e9.json +1 -0
  64. package/graphify-out/cache/b83cba0b46f18ae8fc4d50b540eaa276c28745ea4639863c082cb41681220b9d.json +1 -0
  65. package/graphify-out/cache/bd607a8d62efb3cceb791e36c2495c5ceee38e913c2386d293cca88566f4c0aa.json +1 -0
  66. package/graphify-out/cache/beb2827f4b8ad2aaacd809c8d783eb1f5f3c3c997ce6941d1cc9b2f0df7a0d6e.json +1 -0
  67. package/graphify-out/cache/ca721e7772d7906c5fecc00d69aa50bdc5e73ba087807089f3ca26509e014889.json +1 -0
  68. package/graphify-out/cache/cb49f9ceae6e04f66081b0c73c0574bddaf01240ea0c7efc1880616b94b4c0d8.json +1 -0
  69. package/graphify-out/cache/ce9874dce6f3f855a53dd706b4b83a503dc4ba72f7f36b6d73ec2cc8354f3cdf.json +1 -0
  70. package/graphify-out/cache/d3e24fc669e3f2a2c5e9e864a97ca447f0dcc1c5aad33c88a2280ac97188e888.json +1 -0
  71. package/graphify-out/cache/d6c072004e2ea18f9a5380aa75980cd08b15e7d6d893d396a5baac37dfc24310.json +1 -0
  72. package/graphify-out/cache/d99f1759a41541d9ef41aefdf89a2dbcab7272ccc91a9794062224124222e333.json +1 -0
  73. package/graphify-out/cache/dbb69ddd98951e0d5e51b2e1a2cf97a8febb147e55b81b43b05b680844bf4a1f.json +1 -0
  74. package/graphify-out/cache/df270b9b613de7bbefce4cabc6b3dd6e66ebecdbf6f0cefde05bb676569ee1c3.json +1 -0
  75. package/graphify-out/cache/e56607f0791079dbd05e56cdac41f88124785d367f9da0eb436952406cb317da.json +1 -0
  76. package/graphify-out/cache/ecdfee4e64acdd666f25596341a8ff4a41d7ee1e637de40685ff33c1efa814c7.json +1 -0
  77. package/graphify-out/cache/f0f3005c7ec68d16fcde259d6bc996520841d021ce2531cbb7f3de343996c4ea.json +1 -0
  78. package/graphify-out/cache/f2bfcd400f076a7e8a9e54b821d555c90b93ef4dd8d3652f78ec35acad5e0615.json +1 -0
  79. package/graphify-out/cache/semantic/043be2e32281a59e2bacb95418b95816b558a290aa581434b22666fb9a6a3a6c.json +1 -0
  80. package/graphify-out/cache/semantic/13439df0f4f40e2c190340576c1a46c2cc82b9fc789f262c78d7129cc56ef13c.json +1 -0
  81. package/graphify-out/cache/semantic/136052be0f52f9258076b87da6bde0ea62763a63684cc6729f759910448ae675.json +1 -0
  82. package/graphify-out/cache/semantic/15cbc6ab30bfa8cf7bb9b5646a2598aa78531047ef5096d5d8ab08edbcf8ee7d.json +1 -0
  83. package/graphify-out/cache/semantic/21cd1a6bc5dbd687522c86e9f7db1842400b31ee3ba62127533aba56a478da5d.json +1 -0
  84. package/graphify-out/cache/semantic/22bd0d40f23b81ba30a703fc290cc518f18d3148f5553ffc79f4bf8a0a71722c.json +1 -0
  85. package/graphify-out/cache/semantic/29c3826c5e1938406f9eaf50a1354609aeb16e8f0d27e5a454c069c982f21180.json +1 -0
  86. package/graphify-out/cache/semantic/2e913a06516b6bff22019b157680d17617db82a9ed2277ce1e20eac945939a7e.json +1 -0
  87. package/graphify-out/cache/semantic/30db4df562575c6116ad9e8843f19c557ab6fc25288c7aed8926641748b21fd6.json +1 -0
  88. package/graphify-out/cache/semantic/325abe6948add2e47c2271195503ab21f897e27f2cc9af292f39408b94a2f51c.json +1 -0
  89. package/graphify-out/cache/semantic/3579f6cf2c93aa83eb9396e389c195f17e4cff527d43718e61503e5c0f223f84.json +1 -0
  90. package/graphify-out/cache/semantic/36cda2fb14ba2ee3b8bc721a278f4963bf001c72258dd707b4b141334be01c15.json +1 -0
  91. package/graphify-out/cache/semantic/403b6596e3414f78206fc02adf9b62f07af237be191e0f4b26706041bf1e0ee1.json +1 -0
  92. package/graphify-out/cache/semantic/40f4144bc24d137a1afdcac95143c2bc3e26c0086d150c73df85fdf236bebe01.json +1 -0
  93. package/graphify-out/cache/semantic/45d85f3ac35b83d9a076c6e25c220324a0c92d0e955ba85e04b20ef09ddad9fd.json +1 -0
  94. package/graphify-out/cache/semantic/468d9e0c3d92cce2723852d2f29033326433cdc368203092b8470f2f356e3cec.json +1 -0
  95. package/graphify-out/cache/semantic/5983c77253844a325cb78f45828115ede5a688908bd38fa1b32ca78ab319deb9.json +1 -0
  96. package/graphify-out/cache/semantic/59ef3e18c32f0f877d8854ecb5e9f8714c608d5d90ca7adc71f2859fe496f66f.json +1 -0
  97. package/graphify-out/cache/semantic/71dd26effab66822e1d20111accfa0cc434826661da83b1b86a6fc3119980a66.json +1 -0
  98. package/graphify-out/cache/semantic/78bc10fe7d8d145c2c12af97dd75ea16f6787f1f15f0af0b145ac315ce63dcb6.json +1 -0
  99. package/graphify-out/cache/semantic/7c92d89867073cc9e54a821be558de7322fa42f342cf4c52da9bf02c29f43b1d.json +1 -0
  100. package/graphify-out/cache/semantic/82c3b90b2523c47b43a3212e2d30ed8d06c0027697f89fe177d062baf4d4202f.json +1 -0
  101. package/graphify-out/cache/semantic/8917cb163ec1afce8e5d659680749a553be3aa6aef54ebc757dd1b7c81d707c6.json +1 -0
  102. package/graphify-out/cache/semantic/8da5742abeaeadae80c4f57a4e98432a4bfc789eadb5082d3919780d646546f6.json +1 -0
  103. package/graphify-out/cache/semantic/97f4eb2208c6b1e81c84600ab52507478f5e682e63e5546a92c97b4c3d9371eb.json +1 -0
  104. package/graphify-out/cache/semantic/9c01c0ac53d626004b3d72953063c71f251710e7f23a8765c149159b0f422ecc.json +1 -0
  105. package/graphify-out/cache/semantic/9d0bbf5bdbb2aa4e3507d2e118464ce70d165916e29cae54b5ead974bfc1bd04.json +1 -0
  106. package/graphify-out/cache/semantic/9e59357a8097ad32258c2cb47c066508049e7f8c21fa55a1a5f5a4b0eee41275.json +1 -0
  107. package/graphify-out/cache/semantic/aaaff53eae109640d8e48c4585390fa7a2c2ca04088d314e578c316ca95f53e0.json +1 -0
  108. package/graphify-out/cache/semantic/b18464395b8719578b14148fd37880916c62b10f78942c862da386815c05b628.json +1 -0
  109. package/graphify-out/cache/semantic/c31ea4d76660d1000df3bd29929d120e900297c7a1c26e5266312c21a9432e55.json +1 -0
  110. package/graphify-out/cache/semantic/c74b855b4778be378db8fa05e33582c33cb563d8698ba6dae566e1cd37d0fb09.json +1 -0
  111. package/graphify-out/cache/semantic/cc8bf09a84e6fcc420e2438b3d6403560128b0edbd907761350fa58536d844ff.json +1 -0
  112. package/graphify-out/cache/semantic/d39f7cd9481b6f19c88e62ff5f7a3bddbf3a3593b2b1257a5092b44374c70874.json +1 -0
  113. package/graphify-out/cache/semantic/d5472c5e2c6560c9de5c17a444e2060eb9ccaa5dc7f4f3fe0dc3a5f68625bb91.json +1 -0
  114. package/graphify-out/cache/semantic/de54c2617a64a2a1c1db34e6494216dd949fe730b51270bebba55c63d54a31e9.json +1 -0
  115. package/graphify-out/cache/semantic/e29c1a9e35ffd56ab3b1e2f4800b48e9a6880bddecfc028dfdaf14498f52d8b4.json +1 -0
  116. package/graphify-out/cache/semantic/e39668e1347ee1000e7fba8b922c76488e34c35f2088b8334806e0256cfd71a7.json +1 -0
  117. package/graphify-out/cache/semantic/e9eea1131268a154e037e558c1856fbb2941e129b405659416b4e69746759440.json +1 -0
  118. package/graphify-out/cache/semantic/f3863c3e1c42f444b735cf4042b01a07b4e2f0bff82580bfab9bad1a784b8f4d.json +1 -0
  119. package/graphify-out/cache/semantic/f6dde571c1b88858dbf6da9b447dba7e66d9cb211c0130abcbb0768efed52e7b.json +1 -0
  120. package/graphify-out/cache/semantic/fa84dbd8fb64d52d0d43ea31da6cff178668e3eba7efb6e96ff605f3838a2bea.json +1 -0
  121. package/graphify-out/cache/stat-index.json +1 -0
  122. package/graphify-out/cost.json +18 -0
  123. package/graphify-out/graph.html +307 -0
  124. package/graphify-out/graph.json +6531 -0
  125. package/graphify-out/manifest.json +467 -0
  126. package/opencode.json +6 -0
  127. package/package.json +17 -9
  128. package/src/main.js +3 -7
  129. package/src/methods/_chopTemplates.js +56 -63
  130. package/src/methods/_setupActions.js +7 -14
  131. package/src/methods/actionData.js +35 -21
  132. package/src/methods/actionExtendedRender.js +21 -22
  133. package/src/methods/actionMix.js +47 -49
  134. package/src/methods/actionRender.js +43 -75
  135. package/src/methods/build.js +75 -97
  136. package/src/methods/executeActions.js +63 -49
  137. package/src/methods/processCommands.js +6 -10
  138. package/src/methods/processPlaceholders.js +105 -123
  139. package/src/methods/render.js +11 -13
  140. package/tsconfig.json +2 -1
@@ -0,0 +1 @@
1
+ {"sessionId":"6f39990e-7083-4b68-98ce-336ea2f204fd","pid":73353,"procStart":"Mon Jul 6 18:34:20 2026","acquiredAt":1783362983855}
@@ -0,0 +1,14 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(python3 -c ' *)",
5
+ "Bash(npm test *)",
6
+ "Bash(npx tsc *)",
7
+ "Bash(echo \"exit: $?\")",
8
+ "Bash(echo \"tsc exit: $?\")",
9
+ "Bash(npm run *)",
10
+ "Bash(node simple.js)",
11
+ "Bash(node --input-type=module -e ' *)"
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1 @@
1
+ {"nodes": [{"id": "simple", "label": "simple.js", "file_type": "code", "source_file": "simple.js", "source_location": "L1"}, {"id": "rollup_config", "label": "rollup.config.js", "file_type": "code", "source_file": "rollup.config.js", "source_location": "L1"}, {"id": "usehelper_test", "label": "useHelper.test.js", "file_type": "code", "source_file": "test/useHelper.test.js", "source_location": "L1"}, {"id": "05_data_test", "label": "05-data.test.js", "file_type": "code", "source_file": "test/05-data.test.js", "source_location": "L1"}, {"id": "05_data_test_post1", "label": "post1()", "file_type": "code", "source_file": "test/05-data.test.js", "source_location": "L97"}, {"id": "05_data_test_post2", "label": "post2()", "file_type": "code", "source_file": "test/05-data.test.js", "source_location": "L98"}, {"id": "05_data_test_post3", "label": "post3()", "file_type": "code", "source_file": "test/05-data.test.js", "source_location": "L99"}, {"id": "04_commands", "label": "04-commands.js", "file_type": "code", "source_file": "test/04-commands.js", "source_location": "L1"}, {"id": "01_chop_test", "label": "01-chop.test.js", "file_type": "code", "source_file": "test/01-chop.test.js", "source_location": "L1"}, {"id": "03_storage_test", "label": "03-storage.test.js", "file_type": "code", "source_file": "test/03-storage.test.js", "source_location": "L1"}, {"id": "06_deps_injection", "label": "06-deps-injection.js", "file_type": "code", "source_file": "test/06-deps-injection.js", "source_location": "L1"}, {"id": "06_deps_injection_external", "label": "external()", "file_type": "code", "source_file": "test/06-deps-injection.js", "source_location": "L9"}, {"id": "06_deps_injection_peter", "label": "peter()", "file_type": "code", "source_file": "test/06-deps-injection.js", "source_location": "L81"}, {"id": "06_deps_injection_ivan", "label": "ivan()", "file_type": "code", "source_file": "test/06-deps-injection.js", "source_location": "L85"}, {"id": "06_deps_injection_externalfn", "label": "externalFn()", "file_type": "code", "source_file": "test/06-deps-injection.js", "source_location": "L133"}, {"id": "10_placeholders_test", "label": "10-placeholders.test.js", "file_type": "code", "source_file": "test/10-placeholders.test.js", "source_location": "L1"}, {"id": "07_errors_test", "label": "07-errors.test.js", "file_type": "code", "source_file": "test/07-errors.test.js", "source_location": "L1"}, {"id": "09_debug_test", "label": "09-debug.test.js", "file_type": "code", "source_file": "test/09-debug.test.js", "source_location": "L1"}, {"id": "08_set_test", "label": "08-set.test.js", "file_type": "code", "source_file": "test/08-set.test.js", "source_location": "L1"}, {"id": "block_navigation", "label": "block-navigation.js", "file_type": "code", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L1"}, {"id": "block_navigation_toggleclass", "label": "toggleClass()", "file_type": "code", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L24"}, {"id": "block_navigation_makecurrent", "label": "makeCurrent()", "file_type": "code", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L31"}, {"id": "block_navigation_gotoprevious", "label": "goToPrevious()", "file_type": "code", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L41"}, {"id": "block_navigation_gotonext", "label": "goToNext()", "file_type": "code", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L52"}, {"id": "prettify", "label": "prettify.js", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L1"}, {"id": "prettify_k", "label": "k()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_a", "label": "a()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_b", "label": "B()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_o", "label": "o()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_g", "label": "g()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_i", "label": "i()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_q", "label": "Q()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_d", "label": "D()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_c", "label": "c()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "prettify_y", "label": "y()", "file_type": "code", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2"}, {"id": "sorter", "label": "sorter.js", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L1"}, {"id": "sorter_gettable", "label": "getTable()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L11"}, {"id": "sorter_gettableheader", "label": "getTableHeader()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L15"}, {"id": "sorter_gettablebody", "label": "getTableBody()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L19"}, {"id": "sorter_getnthcolumn", "label": "getNthColumn()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L23"}, {"id": "sorter_onfilterinput", "label": "onFilterInput()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L27"}, {"id": "sorter_addsearchbox", "label": "addSearchBox()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L45"}, {"id": "sorter_loadcolumns", "label": "loadColumns()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L53"}, {"id": "sorter_loadrowdata", "label": "loadRowData()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L78"}, {"id": "sorter_loaddata", "label": "loadData()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L97"}, {"id": "sorter_sortbyindex", "label": "sortByIndex()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L106"}, {"id": "sorter_removesortindicators", "label": "removeSortIndicators()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L137"}, {"id": "sorter_addsortindicators", "label": "addSortIndicators()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L145"}, {"id": "sorter_enableui", "label": "enableUI()", "file_type": "code", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L151"}, {"id": "main", "label": "main.js", "file_type": "code", "source_file": "src/main.js", "source_location": "L1"}, {"id": "main_get", "label": "get()", "file_type": "code", "source_file": "src/main.js", "source_location": "L44"}, {"id": "main_add", "label": "add()", "file_type": "code", "source_file": "src/main.js", "source_location": "L94"}, {"id": "main_list", "label": "list()", "file_type": "code", "source_file": "src/main.js", "source_location": "L131"}, {"id": "main_clear", "label": "clear()", "file_type": "code", "source_file": "src/main.js", "source_location": "L150"}, {"id": "main_remove", "label": "remove()", "file_type": "code", "source_file": "src/main.js", "source_location": "L179"}, {"id": "definedata", "label": "_defineData.js", "file_type": "code", "source_file": "src/methods/_defineData.js", "source_location": "L1"}, {"id": "definedata_definedata", "label": "_defineData()", "file_type": "code", "source_file": "src/methods/_defineData.js", "source_location": "L28"}, {"id": "actionmix", "label": "actionMix.js", "file_type": "code", "source_file": "src/methods/actionMix.js", "source_location": "L1"}, {"id": "actionmix_actionmix", "label": "actionMix()", "file_type": "code", "source_file": "src/methods/actionMix.js", "source_location": "L4"}, {"id": "actionsupply", "label": "_actionSupply.js", "file_type": "code", "source_file": "src/methods/_actionSupply.js", "source_location": "L1"}, {"id": "actiondata", "label": "actionData.js", "file_type": "code", "source_file": "src/methods/actionData.js", "source_location": "L1"}, {"id": "actiondata_actiondata", "label": "actionData()", "file_type": "code", "source_file": "src/methods/actionData.js", "source_location": "L3"}, {"id": "actionrender", "label": "actionRender.js", "file_type": "code", "source_file": "src/methods/actionRender.js", "source_location": "L1"}, {"id": "actionrender_actionrender", "label": "actionRender()", "file_type": "code", "source_file": "src/methods/actionRender.js", "source_location": "L4"}, {"id": "executeactions", "label": "executeActions.js", "file_type": "code", "source_file": "src/methods/executeActions.js", "source_location": "L1"}, {"id": "executeactions_executeactions", "label": "executeActions()", "file_type": "code", "source_file": "src/methods/executeActions.js", "source_location": "L10"}, {"id": "build", "label": "build.js", "file_type": "code", "source_file": "src/methods/build.js", "source_location": "L1"}, {"id": "build_build", "label": "build()", "file_type": "code", "source_file": "src/methods/build.js", "source_location": "L52"}, {"id": "actionextendedrender", "label": "actionExtendedRender.js", "file_type": "code", "source_file": "src/methods/actionExtendedRender.js", "source_location": "L1"}, {"id": "actionextendedrender_actionextendedrender", "label": "actionExtendedRender()", "file_type": "code", "source_file": "src/methods/actionExtendedRender.js", "source_location": "L3"}, {"id": "render", "label": "render.js", "file_type": "code", "source_file": "src/methods/render.js", "source_location": "L1"}, {"id": "render_render", "label": "render()", "file_type": "code", "source_file": "src/methods/render.js", "source_location": "L18"}, {"id": "renderholder", "label": "_renderHolder.js", "file_type": "code", "source_file": "src/methods/_renderHolder.js", "source_location": "L1"}, {"id": "renderholder_renderholder", "label": "_renderHolder()", "file_type": "code", "source_file": "src/methods/_renderHolder.js", "source_location": "L21"}, {"id": "setupactions", "label": "_setupActions.js", "file_type": "code", "source_file": "src/methods/_setupActions.js", "source_location": "L1"}, {"id": "setupactions_setupactions", "label": "_setupActions()", "file_type": "code", "source_file": "src/methods/_setupActions.js", "source_location": "L18"}, {"id": "definetype", "label": "_defineType.js", "file_type": "code", "source_file": "src/methods/_defineType.js", "source_location": "L1"}, {"id": "definetype_definedatatype", "label": "_defineDataType()", "file_type": "code", "source_file": "src/methods/_defineType.js", "source_location": "L14"}, {"id": "processplaceholders", "label": "processPlaceholders.js", "file_type": "code", "source_file": "src/methods/processPlaceholders.js", "source_location": "L1"}, {"id": "processplaceholders_processplaceholders", "label": "processPlaceholders()", "file_type": "code", "source_file": "src/methods/processPlaceholders.js", "source_location": "L23"}, {"id": "choptemplates", "label": "_chopTemplates.js", "file_type": "code", "source_file": "src/methods/_chopTemplates.js", "source_location": "L1"}, {"id": "choptemplates_choptemplate", "label": "_chopTemplate()", "file_type": "code", "source_file": "src/methods/_chopTemplates.js", "source_location": "L16"}, {"id": "choptemplates_showerror", "label": "showError()", "file_type": "code", "source_file": "src/methods/_chopTemplates.js", "source_location": "L62"}, {"id": "readtemplate", "label": "_readTemplate.js", "file_type": "code", "source_file": "src/methods/_readTemplate.js", "source_location": "L1"}, {"id": "readtemplate_readdata", "label": "readData()", "file_type": "code", "source_file": "src/methods/_readTemplate.js", "source_location": "L12"}, {"id": "readtemplate_readtemplate", "label": "_readTemplate()", "file_type": "code", "source_file": "src/methods/_readTemplate.js", "source_location": "L36"}, {"id": "actionsave", "label": "actionSave.js", "file_type": "code", "source_file": "src/methods/actionSave.js", "source_location": "L1"}, {"id": "actionsave_actionsave", "label": "actionSave()", "file_type": "code", "source_file": "src/methods/actionSave.js", "source_location": "L1"}, {"id": "actionsave_actionoverwrite", "label": "actionOverwrite()", "file_type": "code", "source_file": "src/methods/actionSave.js", "source_location": "L5"}, {"id": "settings", "label": "settings.js", "file_type": "code", "source_file": "src/methods/settings.js", "source_location": "L1"}, {"id": "processcommands", "label": "processCommands.js", "file_type": "code", "source_file": "src/methods/processCommands.js", "source_location": "L1"}, {"id": "processcommands_handledebug", "label": "handleDebug()", "file_type": "code", "source_file": "src/methods/processCommands.js", "source_location": "L13"}, {"id": "processcommands_handleset", "label": "handleSet()", "file_type": "code", "source_file": "src/methods/processCommands.js", "source_location": "L47"}, {"id": "processcommands_handlesnippets", "label": "handleSnippets()", "file_type": "code", "source_file": "src/methods/processCommands.js", "source_location": "L85"}], "edges": [{"source": "simple", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "simple.js", "source_location": "L1", "weight": 1.0}, {"source": "rollup_config", "target": "plugin_node_resolve", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "rollup.config.js", "source_location": "L1", "weight": 1.0}, {"source": "rollup_config", "target": "plugin_commonjs", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "rollup.config.js", "source_location": "L2", "weight": 1.0}, {"source": "rollup_config", "target": "plugin_terser", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "rollup.config.js", "source_location": "L3", "weight": 1.0}, {"source": "usehelper_test", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/useHelper.test.js", "source_location": "L2", "weight": 1.0}, {"source": "usehelper_test", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/useHelper.test.js", "source_location": "L3", "weight": 1.0}, {"source": "05_data_test", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/05-data.test.js", "source_location": "L1", "weight": 1.0}, {"source": "05_data_test", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/05-data.test.js", "source_location": "L2", "weight": 1.0}, {"source": "05_data_test", "target": "05_data_test_post1", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/05-data.test.js", "source_location": "L97", "weight": 1.0}, {"source": "05_data_test", "target": "05_data_test_post2", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/05-data.test.js", "source_location": "L98", "weight": 1.0}, {"source": "05_data_test", "target": "05_data_test_post3", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/05-data.test.js", "source_location": "L99", "weight": 1.0}, {"source": "04_commands", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/04-commands.js", "source_location": "L1", "weight": 1.0}, {"source": "04_commands", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/04-commands.js", "source_location": "L2", "weight": 1.0}, {"source": "01_chop_test", "target": "choptemplates_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/01-chop.test.js", "source_location": "L1", "weight": 1.0}, {"source": "01_chop_test", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/01-chop.test.js", "source_location": "L2", "weight": 1.0}, {"source": "03_storage_test", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/03-storage.test.js", "source_location": "L1", "weight": 1.0}, {"source": "03_storage_test", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/03-storage.test.js", "source_location": "L2", "weight": 1.0}, {"source": "06_deps_injection", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L1", "weight": 1.0}, {"source": "06_deps_injection", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L2", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_external", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L9", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_external", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L27", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_external", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L45", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_external", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L63", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_peter", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L81", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_ivan", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L85", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_peter", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L107", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_ivan", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L111", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_externalfn", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L133", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_external", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L149", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_external", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L165", "weight": 1.0}, {"source": "06_deps_injection", "target": "06_deps_injection_external", "relation": "contains", "confidence": "EXTRACTED", "source_file": "test/06-deps-injection.js", "source_location": "L181", "weight": 1.0}, {"source": "10_placeholders_test", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/10-placeholders.test.js", "source_location": "L1", "weight": 1.0}, {"source": "10_placeholders_test", "target": "build_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/10-placeholders.test.js", "source_location": "L2", "weight": 1.0}, {"source": "07_errors_test", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/07-errors.test.js", "source_location": "L1", "weight": 1.0}, {"source": "07_errors_test", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/07-errors.test.js", "source_location": "L2", "weight": 1.0}, {"source": "09_debug_test", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/09-debug.test.js", "source_location": "L1", "weight": 1.0}, {"source": "09_debug_test", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/09-debug.test.js", "source_location": "L2", "weight": 1.0}, {"source": "08_set_test", "target": "main_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/08-set.test.js", "source_location": "L1", "weight": 1.0}, {"source": "08_set_test", "target": "chai", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "test/08-set.test.js", "source_location": "L2", "weight": 1.0}, {"source": "block_navigation", "target": "block_navigation_toggleclass", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L24", "weight": 1.0}, {"source": "block_navigation", "target": "block_navigation_makecurrent", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L31", "weight": 1.0}, {"source": "block_navigation", "target": "block_navigation_gotoprevious", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L41", "weight": 1.0}, {"source": "block_navigation", "target": "block_navigation_gotonext", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L52", "weight": 1.0}, {"source": "block_navigation_makecurrent", "target": "block_navigation_toggleclass", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L32", "weight": 1.0}, {"source": "block_navigation_gotoprevious", "target": "block_navigation_makecurrent", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L49", "weight": 1.0}, {"source": "block_navigation_gotonext", "target": "block_navigation_makecurrent", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/block-navigation.js", "source_location": "L62", "weight": 1.0}, {"source": "prettify", "target": "prettify_k", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_a", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_b", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_o", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_g", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_i", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_q", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_d", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_c", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_q", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_d", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_y", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify", "target": "prettify_b", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_g", "target": "prettify_k", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_g", "target": "prettify_b", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_g", "target": "prettify_q", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_i", "target": "prettify_g", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_d", "target": "prettify_a", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_d", "target": "prettify_q", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_y", "target": "prettify_q", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_y", "target": "prettify_d", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "prettify_b", "target": "prettify_y", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/prettify.js", "source_location": "L2", "weight": 1.0}, {"source": "sorter", "target": "sorter_gettable", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L11", "weight": 1.0}, {"source": "sorter", "target": "sorter_gettableheader", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L15", "weight": 1.0}, {"source": "sorter", "target": "sorter_gettablebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L19", "weight": 1.0}, {"source": "sorter", "target": "sorter_getnthcolumn", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L23", "weight": 1.0}, {"source": "sorter", "target": "sorter_onfilterinput", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L27", "weight": 1.0}, {"source": "sorter", "target": "sorter_addsearchbox", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L45", "weight": 1.0}, {"source": "sorter", "target": "sorter_loadcolumns", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L53", "weight": 1.0}, {"source": "sorter", "target": "sorter_loadrowdata", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L78", "weight": 1.0}, {"source": "sorter", "target": "sorter_loaddata", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L97", "weight": 1.0}, {"source": "sorter", "target": "sorter_sortbyindex", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L106", "weight": 1.0}, {"source": "sorter", "target": "sorter_removesortindicators", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L137", "weight": 1.0}, {"source": "sorter", "target": "sorter_addsortindicators", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L145", "weight": 1.0}, {"source": "sorter", "target": "sorter_enableui", "relation": "contains", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L151", "weight": 1.0}, {"source": "sorter_gettableheader", "target": "sorter_gettable", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L16", "weight": 1.0}, {"source": "sorter_gettablebody", "target": "sorter_gettable", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L20", "weight": 1.0}, {"source": "sorter_getnthcolumn", "target": "sorter_gettableheader", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L24", "weight": 1.0}, {"source": "sorter_loadcolumns", "target": "sorter_gettableheader", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L54", "weight": 1.0}, {"source": "sorter_loaddata", "target": "sorter_gettablebody", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L98", "weight": 1.0}, {"source": "sorter_loaddata", "target": "sorter_loadrowdata", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L102", "weight": 1.0}, {"source": "sorter_removesortindicators", "target": "sorter_getnthcolumn", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L138", "weight": 1.0}, {"source": "sorter_addsortindicators", "target": "sorter_getnthcolumn", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L146", "weight": 1.0}, {"source": "sorter_enableui", "target": "sorter_sortbyindex", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L163", "weight": 1.0}, {"source": "sorter_enableui", "target": "sorter_removesortindicators", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L164", "weight": 1.0}, {"source": "sorter_enableui", "target": "sorter_addsortindicators", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L167", "weight": 1.0}, {"source": "sorter_enableui", "target": "sorter_getnthcolumn", "relation": "calls", "confidence": "EXTRACTED", "source_file": "coverage/lcov-report/sorter.js", "source_location": "L174", "weight": 1.0}, {"source": "main", "target": "build_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/main.js", "source_location": "L15", "weight": 1.0}, {"source": "main", "target": "main_get", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/main.js", "source_location": "L44", "weight": 1.0}, {"source": "main", "target": "main_add", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/main.js", "source_location": "L94", "weight": 1.0}, {"source": "main", "target": "main_list", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/main.js", "source_location": "L131", "weight": 1.0}, {"source": "main", "target": "main_clear", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/main.js", "source_location": "L150", "weight": 1.0}, {"source": "main", "target": "main_remove", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/main.js", "source_location": "L179", "weight": 1.0}, {"source": "definedata", "target": "walk", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/_defineData.js", "source_location": "L1", "weight": 1.0}, {"source": "definedata", "target": "definedata_definedata", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/_defineData.js", "source_location": "L28", "weight": 1.0}, {"source": "actionmix", "target": "definetype_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/actionMix.js", "source_location": "L1", "weight": 1.0}, {"source": "actionmix", "target": "walk", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/actionMix.js", "source_location": "L2", "weight": 1.0}, {"source": "actionmix", "target": "actionmix_actionmix", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/actionMix.js", "source_location": "L4", "weight": 1.0}, {"source": "actionsupply", "target": "stack", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/_actionSupply.js", "source_location": "L1", "weight": 1.0}, {"source": "actiondata", "target": "definetype_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/actionData.js", "source_location": "L1", "weight": 1.0}, {"source": "actiondata", "target": "actiondata_actiondata", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/actionData.js", "source_location": "L3", "weight": 1.0}, {"source": "actionrender", "target": "definetype_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/actionRender.js", "source_location": "L1", "weight": 1.0}, {"source": "actionrender", "target": "render_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/actionRender.js", "source_location": "L2", "weight": 1.0}, {"source": "actionrender", "target": "actionrender_actionrender", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/actionRender.js", "source_location": "L4", "weight": 1.0}, {"source": "executeactions", "target": "actionrender_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/executeActions.js", "source_location": "L1", "weight": 1.0}, {"source": "executeactions", "target": "actiondata_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/executeActions.js", "source_location": "L2", "weight": 1.0}, {"source": "executeactions", "target": "actionmix_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/executeActions.js", "source_location": "L3", "weight": 1.0}, {"source": "executeactions", "target": "actionextendedrender_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/executeActions.js", "source_location": "L4", "weight": 1.0}, {"source": "executeactions", "target": "definetype_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/executeActions.js", "source_location": "L5", "weight": 1.0}, {"source": "executeactions", "target": "actionsave_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/executeActions.js", "source_location": "L6", "weight": 1.0}, {"source": "executeactions", "target": "executeactions_executeactions", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/executeActions.js", "source_location": "L10", "weight": 1.0}, {"source": "build", "target": "choptemplates_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/build.js", "source_location": "L1", "weight": 1.0}, {"source": "build", "target": "readtemplate_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/build.js", "source_location": "L2", "weight": 1.0}, {"source": "build", "target": "definetype_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/build.js", "source_location": "L3", "weight": 1.0}, {"source": "build", "target": "walk", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/build.js", "source_location": "L4", "weight": 1.0}, {"source": "build", "target": "processplaceholders_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/build.js", "source_location": "L5", "weight": 1.0}, {"source": "build", "target": "processcommands_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/build.js", "source_location": "L6", "weight": 1.0}, {"source": "build", "target": "build_build", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/build.js", "source_location": "L52", "weight": 1.0}, {"source": "actionextendedrender", "target": "definetype_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/actionExtendedRender.js", "source_location": "L1", "weight": 1.0}, {"source": "actionextendedrender", "target": "actionextendedrender_actionextendedrender", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/actionExtendedRender.js", "source_location": "L3", "weight": 1.0}, {"source": "render", "target": "renderholder_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/render.js", "source_location": "L2", "weight": 1.0}, {"source": "render", "target": "render_render", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/render.js", "source_location": "L18", "weight": 1.0}, {"source": "renderholder", "target": "choptemplates_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/_renderHolder.js", "source_location": "L1", "weight": 1.0}, {"source": "renderholder", "target": "settings_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/_renderHolder.js", "source_location": "L2", "weight": 1.0}, {"source": "renderholder", "target": "renderholder_renderholder", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/_renderHolder.js", "source_location": "L21", "weight": 1.0}, {"source": "setupactions", "target": "setupactions_setupactions", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/_setupActions.js", "source_location": "L18", "weight": 1.0}, {"source": "definetype", "target": "definetype_definedatatype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/_defineType.js", "source_location": "L14", "weight": 1.0}, {"source": "processplaceholders", "target": "definedata_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/processPlaceholders.js", "source_location": "L1", "weight": 1.0}, {"source": "processplaceholders", "target": "definetype_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/processPlaceholders.js", "source_location": "L2", "weight": 1.0}, {"source": "processplaceholders", "target": "actionsupply_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/processPlaceholders.js", "source_location": "L3", "weight": 1.0}, {"source": "processplaceholders", "target": "setupactions_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/processPlaceholders.js", "source_location": "L4", "weight": 1.0}, {"source": "processplaceholders", "target": "executeactions_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/processPlaceholders.js", "source_location": "L5", "weight": 1.0}, {"source": "processplaceholders", "target": "render_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/processPlaceholders.js", "source_location": "L6", "weight": 1.0}, {"source": "processplaceholders", "target": "processplaceholders_processplaceholders", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/processPlaceholders.js", "source_location": "L23", "weight": 1.0}, {"source": "choptemplates", "target": "choptemplates_choptemplate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/_chopTemplates.js", "source_location": "L16", "weight": 1.0}, {"source": "choptemplates", "target": "choptemplates_showerror", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/_chopTemplates.js", "source_location": "L62", "weight": 1.0}, {"source": "choptemplates_choptemplate", "target": "choptemplates_showerror", "relation": "calls", "confidence": "EXTRACTED", "source_file": "src/methods/_chopTemplates.js", "source_location": "L26", "weight": 1.0}, {"source": "readtemplate", "target": "settings_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/_readTemplate.js", "source_location": "L1", "weight": 1.0}, {"source": "readtemplate", "target": "choptemplates_js", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "src/methods/_readTemplate.js", "source_location": "L2", "weight": 1.0}, {"source": "readtemplate", "target": "readtemplate_readdata", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/_readTemplate.js", "source_location": "L12", "weight": 1.0}, {"source": "readtemplate", "target": "readtemplate_readtemplate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/_readTemplate.js", "source_location": "L36", "weight": 1.0}, {"source": "actionsave", "target": "actionsave_actionsave", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/actionSave.js", "source_location": "L1", "weight": 1.0}, {"source": "actionsave", "target": "actionsave_actionoverwrite", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/actionSave.js", "source_location": "L5", "weight": 1.0}, {"source": "processcommands", "target": "processcommands_handledebug", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/processCommands.js", "source_location": "L13", "weight": 1.0}, {"source": "processcommands", "target": "processcommands_handleset", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/processCommands.js", "source_location": "L47", "weight": 1.0}, {"source": "processcommands", "target": "processcommands_handlesnippets", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/methods/processCommands.js", "source_location": "L85", "weight": 1.0}], "hyperedges": []}
@@ -0,0 +1 @@
1
+ {"nodes":[{"id":"morph_library","label":"Morph Template Library","file_type":"document","source_file":"README.md","source_location":null},{"id":"template","label":"Template Entity","file_type":"document","source_file":"README.md","source_location":null},{"id":"placeholder","label":"Placeholder","file_type":"document","source_file":"README.md","source_location":null},{"id":"helper_function","label":"Helper Function","file_type":"document","source_file":"README.md","source_location":null},{"id":"handshake","label":"Handshake (Demo Data)","file_type":"document","source_file":"README.md","source_location":null},{"id":"action_system","label":"Action System","file_type":"document","source_file":"README.md","source_location":null},{"id":"render_action","label":"Render Action","file_type":"document","source_file":"README.md","source_location":null},{"id":"data_action","label":"Data Action","file_type":"document","source_file":"README.md","source_location":null},{"id":"mixing_action","label":"Mixing Action","file_type":"document","source_file":"README.md","source_location":null},{"id":"conditional_action","label":"Conditional Action","file_type":"document","source_file":"README.md","source_location":null},{"id":"extended_render","label":"Extended Render Action","file_type":"document","source_file":"README.md","source_location":null},{"id":"memory_action","label":"Memory Action","file_type":"document","source_file":"README.md","source_location":null},{"id":"overwrite_action","label":"Overwrite Action","file_type":"document","source_file":"README.md","source_location":null},{"id":"storage","label":"Template Storage","file_type":"document","source_file":"README.md","source_location":null},{"id":"set_command","label":"Set Command","file_type":"document","source_file":"README.md","source_location":null},{"id":"curry_command","label":"Curry Command","file_type":"document","source_file":"README.md","source_location":null},{"id":"debug_command","label":"Debug Command","file_type":"document","source_file":"README.md","source_location":null},{"id":"snippets_command","label":"Snippets Command","file_type":"document","source_file":"README.md","source_location":null},{"id":"render_command","label":"Render Command","file_type":"document","source_file":"README.md","source_location":null},{"id":"morph_build","label":"morph.build Method","file_type":"document","source_file":"README.md","source_location":null},{"id":"morph_add","label":"morph.add Method","file_type":"document","source_file":"README.md","source_location":null},{"id":"morph_get","label":"morph.get Method","file_type":"document","source_file":"README.md","source_location":null},{"id":"morph_list","label":"morph.list Method","file_type":"document","source_file":"README.md","source_location":null},{"id":"morph_clear","label":"morph.clear Method","file_type":"document","source_file":"README.md","source_location":null},{"id":"morph_remove","label":"morph.remove Method","file_type":"document","source_file":"README.md","source_location":null},{"id":"useHelper","label":"useHelper Function","file_type":"document","source_file":"README.md","source_location":null},{"id":"morph_file_extension","label":".morph File Extension","file_type":"document","source_file":"README.md","source_location":null},{"id":"vite_plugin","label":"Vite Plugin for Morph","file_type":"document","source_file":"README.md","source_location":null},{"id":"vscode_extension","label":"VSCode Extension","file_type":"document","source_file":"README.md","source_location":null},{"id":"extend_templates_feature","label":"Extend Templates Feature","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"user_story_1","label":"User Story 1: Create Template Variants","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"user_story_2","label":"User Story 2: Add/Overwrite Helpers","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"user_story_3","label":"User Story 3: Alternative Handshake Data","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"user_story_4","label":"User Story 4: Handle Missing Helpers","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"user_story_5","label":"User Story 5: Remove Routing Actions","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"template_extension","label":"Template Extension","file_type":"document","source_file":"specs/001-extend-templates/quickstart.md","source_location":null},{"id":"placeholder_replacement","label":"Placeholder Replacement","file_type":"document","source_file":"specs/001-extend-templates/data-model.md","source_location":null},{"id":"helper_merging","label":"Helper Merging","file_type":"document","source_file":"specs/001-extend-templates/data-model.md","source_location":null},{"id":"handshake_merging","label":"Handshake Merging","file_type":"document","source_file":"specs/001-extend-templates/data-model.md","source_location":null},{"id":"missing_helper_error","label":"Missing Helper Error Message","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"routing_actions","label":"Routing Actions","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"empty_placeholder","label":"Empty Placeholder","file_type":"document","source_file":"specs/001-extend-templates/spec.md","source_location":null},{"id":"migration_3x","label":"Migration Guide 2.x to 3.x","file_type":"document","source_file":"Migration.guide.md","source_location":null},{"id":"migration_2x","label":"Migration Guide 1.x to 2.x","file_type":"document","source_file":"Migration.guide.md","source_location":null},{"id":"migration_1x","label":"Migration Guide 0.x to 1.x","file_type":"document","source_file":"Migration.guide.md","source_location":null},{"id":"architecture_diagram","label":"Morph Architecture Diagram","file_type":"image","source_file":"build.architecture.png","source_location":null},{"id":"morph_logo","label":"Morph Logo/Banner","file_type":"image","source_file":"morph.png","source_location":null}],"edges":[{"source":"morph_library","target":"template","relation":"conceptually_related_to","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"template","target":"placeholder","relation":"contains","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"template","target":"helper_function","relation":"contains","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"template","target":"handshake","relation":"contains","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"placeholder","target":"action_system","relation":"references","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"action_system","target":"render_action","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"action_system","target":"data_action","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"action_system","target":"mixing_action","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"action_system","target":"conditional_action","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"action_system","target":"extended_render","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"action_system","target":"memory_action","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"action_system","target":"overwrite_action","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"morph_library","target":"storage","relation":"provides","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"storage","target":"morph_add","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"storage","target":"morph_get","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"storage","target":"morph_list","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"storage","target":"morph_clear","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"storage","target":"morph_remove","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"morph_library","target":"morph_build","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"template","target":"set_command","relation":"references","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"set_command","target":"template_extension","relation":"creates","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/quickstart.md","source_location":null,"weight":1.0},{"source":"template_extension","target":"placeholder_replacement","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/data-model.md","source_location":null,"weight":1.0},{"source":"template_extension","target":"helper_merging","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/data-model.md","source_location":null,"weight":1.0},{"source":"template_extension","target":"handshake_merging","relation":"includes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/data-model.md","source_location":null,"weight":1.0},{"source":"extend_templates_feature","target":"user_story_1","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"extend_templates_feature","target":"user_story_2","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"extend_templates_feature","target":"user_story_3","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"extend_templates_feature","target":"user_story_4","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"extend_templates_feature","target":"user_story_5","relation":"implements","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"user_story_4","target":"missing_helper_error","relation":"rationale_for","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"user_story_5","target":"routing_actions","relation":"removes","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"extend_templates_feature","target":"empty_placeholder","relation":"rationale_for","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"morph_library","target":"morph_file_extension","relation":"supports","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"morph_file_extension","target":"vite_plugin","relation":"requires","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"morph_library","target":"vscode_extension","relation":"references","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"morph_library","target":"curry_command","relation":"provides","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"morph_library","target":"debug_command","relation":"provides","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"morph_library","target":"snippets_command","relation":"provides","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"morph_library","target":"render_command","relation":"provides","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"helper_function","target":"useHelper","relation":"references","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md","source_location":null,"weight":1.0},{"source":"migration_3x","target":"morph_library","relation":"updates","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"Migration.guide.md","source_location":null,"weight":1.0},{"source":"migration_2x","target":"morph_library","relation":"updates","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"Migration.guide.md","source_location":null,"weight":1.0},{"source":"migration_1x","target":"morph_library","relation":"updates","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"Migration.guide.md","source_location":null,"weight":1.0},{"source":"placeholder","target":"empty_placeholder","relation":"type_of","confidence":"INFERRED","confidence_score":0.85,"source_file":"specs/001-extend-templates/spec.md","source_location":null,"weight":1.0},{"source":"set_command","target":"curry_command","relation":"semantically_similar_to","confidence":"INFERRED","confidence_score":0.7,"source_file":"README.md","source_location":null,"weight":1.0}],"hyperedges":[{"id":"template_components","label":"Template Components","nodes":["template","placeholder","helper_function","handshake"],"relation":"form","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md"},{"id":"action_types","label":"Action System Types","nodes":["render_action","data_action","mixing_action","conditional_action","extended_render","memory_action","overwrite_action"],"relation":"participate_in","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md"},{"id":"storage_methods","label":"Storage Methods","nodes":["morph_add","morph_get","morph_list","morph_clear","morph_remove"],"relation":"implement","confidence":"EXTRACTED","confidence_score":1.0,"source_file":"README.md"}],"input_tokens":0,"output_tokens":0}
@@ -0,0 +1,14 @@
1
+ Changelog.md
2
+ Migration.guide.md
3
+ README.md
4
+ specs/001-extend-templates/quickstart.md
5
+ specs/001-extend-templates/tasks.md
6
+ specs/001-extend-templates/research.md
7
+ specs/001-extend-templates/data-model.md
8
+ specs/001-extend-templates/plan.md
9
+ specs/001-extend-templates/spec.md
10
+ specs/001-extend-templates/checklists/requirements.md
11
+ build.architecture.png
12
+ morph.png
13
+ coverage/lcov-report/favicon.png
14
+ coverage/lcov-report/sort-arrow-sprite.png
@@ -0,0 +1,115 @@
1
+ {
2
+ "name": ".opencode",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "dependencies": {
8
+ "@opencode-ai/plugin": "1.4.1"
9
+ }
10
+ },
11
+ "node_modules/@opencode-ai/plugin": {
12
+ "version": "1.4.1",
13
+ "resolved": "https://registry.npmjs.org/@opencode-ai/plugin/-/plugin-1.4.1.tgz",
14
+ "integrity": "sha512-5PqQGUAVeNPNM6PyQATSe5q7ICwFSIFYEMFHzD6Efw2fSd1ij5vskgtxEZFl/oiXkPx/w8/DPR9EZS9bkoHYnA==",
15
+ "license": "MIT",
16
+ "dependencies": {
17
+ "@opencode-ai/sdk": "1.4.1",
18
+ "zod": "4.1.8"
19
+ },
20
+ "peerDependencies": {
21
+ "@opentui/core": ">=0.1.97",
22
+ "@opentui/solid": ">=0.1.97"
23
+ },
24
+ "peerDependenciesMeta": {
25
+ "@opentui/core": {
26
+ "optional": true
27
+ },
28
+ "@opentui/solid": {
29
+ "optional": true
30
+ }
31
+ }
32
+ },
33
+ "node_modules/@opencode-ai/sdk": {
34
+ "version": "1.4.1",
35
+ "resolved": "https://registry.npmjs.org/@opencode-ai/sdk/-/sdk-1.4.1.tgz",
36
+ "integrity": "sha512-7wWHs8Og5W5+fuJmHDi7oy1yK6c9mmVfK1Ll9hPHZZ5xj357fVl+oI4i0jeUdjonEoXb3Svq/U5blraSArX5OQ==",
37
+ "license": "MIT",
38
+ "dependencies": {
39
+ "cross-spawn": "7.0.6"
40
+ }
41
+ },
42
+ "node_modules/cross-spawn": {
43
+ "version": "7.0.6",
44
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
45
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
46
+ "license": "MIT",
47
+ "dependencies": {
48
+ "path-key": "^3.1.0",
49
+ "shebang-command": "^2.0.0",
50
+ "which": "^2.0.1"
51
+ },
52
+ "engines": {
53
+ "node": ">= 8"
54
+ }
55
+ },
56
+ "node_modules/isexe": {
57
+ "version": "2.0.0",
58
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
59
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
60
+ "license": "ISC"
61
+ },
62
+ "node_modules/path-key": {
63
+ "version": "3.1.1",
64
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
65
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
66
+ "license": "MIT",
67
+ "engines": {
68
+ "node": ">=8"
69
+ }
70
+ },
71
+ "node_modules/shebang-command": {
72
+ "version": "2.0.0",
73
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
74
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
75
+ "license": "MIT",
76
+ "dependencies": {
77
+ "shebang-regex": "^3.0.0"
78
+ },
79
+ "engines": {
80
+ "node": ">=8"
81
+ }
82
+ },
83
+ "node_modules/shebang-regex": {
84
+ "version": "3.0.0",
85
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
86
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
87
+ "license": "MIT",
88
+ "engines": {
89
+ "node": ">=8"
90
+ }
91
+ },
92
+ "node_modules/which": {
93
+ "version": "2.0.2",
94
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
95
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
96
+ "license": "ISC",
97
+ "dependencies": {
98
+ "isexe": "^2.0.0"
99
+ },
100
+ "bin": {
101
+ "node-which": "bin/node-which"
102
+ },
103
+ "engines": {
104
+ "node": ">= 8"
105
+ }
106
+ },
107
+ "node_modules/zod": {
108
+ "version": "4.1.8",
109
+ "license": "MIT",
110
+ "funding": {
111
+ "url": "https://github.com/sponsors/colinhacks"
112
+ }
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,22 @@
1
+ // graphify OpenCode plugin
2
+ // Injects a knowledge graph reminder before bash tool calls when the graph exists.
3
+ import { existsSync } from "fs";
4
+ import { join } from "path";
5
+
6
+ export const GraphifyPlugin = async ({ directory }) => {
7
+ let reminded = false;
8
+
9
+ return {
10
+ "tool.execute.before": async (input, output) => {
11
+ if (reminded) return;
12
+ if (!existsSync(join(directory, "graphify-out", "graph.json"))) return;
13
+
14
+ if (input.tool === "bash") {
15
+ output.args.command =
16
+ 'echo "[graphify] Knowledge graph available. Read graphify-out/GRAPH_REPORT.md for god nodes and architecture context before searching files." && ' +
17
+ output.args.command;
18
+ reminded = true;
19
+ }
20
+ },
21
+ };
22
+ };
package/AGENTS.md ADDED
@@ -0,0 +1,8 @@
1
+ ## graphify
2
+
3
+ This project has a graphify knowledge graph at graphify-out/.
4
+
5
+ Rules:
6
+ - Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
7
+ - If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
8
+ - After modifying code files in this session, run `python3 -c "from graphify.watch import _rebuild_code; from pathlib import Path; _rebuild_code(Path('.'))"` to keep the graph current
package/Changelog.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
 
4
4
 
5
+ ### 3.3.3 (2026-07-06)
6
+ - [x] Fix: Parse error was not reported when the broken placeholder comes after a valid one. The error text was leaking into the render result and the text between the placeholders was lost;
7
+ - [x] Fix: Crash when a breadcrumb path meets 'null' in the middle. The placeholder stays untouched now, like with a missing key;
8
+ - [x] Fix: Crash when a data element is 'null';
9
+ - [x] Fix: Crash on command 'set' with a placeholder name or index that does not exist. Returns an error message now;
10
+ - [x] Fix: Anonymous mix action was rendering 'null' as text when the first element of the array is null;
11
+ - [x] Refactoring: Dead code removed and readability improved across all methods. No API changes;
12
+
13
+
14
+
15
+ ### 3.3.2 (2026-03-24)
16
+ - [x] Dev deps update. TypeScript - v.6.0.2;
17
+ - [x] Update types according typescript v.6.0.2;
18
+
19
+
20
+
5
21
  ### 3.3.0 (2025-12-13)
6
22
  - [x] Use other helper from inside of helper functionsHelper functions attribute - useHelper;
7
23
 
package/dist/morph.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("@peter.naydenov/walk"),t=require("@peter.naydenov/stack");function r(e){return function t(r){const{TG_PRX:a,TG_SFX:o,TG_SIZE_P:s,TG_SIZE_S:l}=e;let i,c,u,d=[];if("string"!=typeof r)return n("notAString");if(0==r.length)return[];if(i=r.indexOf(a),0<i&&d.push(r.slice(0,i)),-1==i)return d.push(r),d;{if(u=r.indexOf(a,i+s),c=r.indexOf(o),-1==c)return n("missingClosing");if(c<i)return n("closedBeforeOpened");if(c+=l,-1!=u&&u<c)return n("newBeforeClosed");d.push(r.slice(i,c));let e=t(r.slice(c));return d.concat(e)}}}function n(e){switch(e){case"notAString":return"Error: Template is not a string.";case"missingClosing":return"Error: Placeholder with missing closing tag.";case"closedBeforeOpened":return"Error: Placeholder closing tag without starting one.";case"newBeforeClosed":return"Error: Nested placeholders. Close placeholder before open new one.";default:return"Error: Unknown template error."}}var a={TG_PRX:"{{",TG_SFX:"}}",TG_SIZE_P:2,TG_SIZE_S:2};function o(e){return null==e?"null":"string"==typeof e||"number"==typeof e||"boolean"==typeof e?"primitive":"function"==typeof e?"function":e instanceof Array?"array":e instanceof Object?"object":void 0}function s(e,t,n,o,s,...l){if(e instanceof Object&&Object.entries(e).forEach((([t,r])=>{r instanceof Object&&(e[t]=r.text),r instanceof Array&&(e[t]=r[0])})),!n[t])return`{{ Error: Helper '${t}' is not available}}`;const i="function"==typeof n[t];return e=function(e={}){return"string"==typeof e?{text:e}:e}(e),i?n[t]({theData:e,dependencies:s,full:o},...l):function(e,t){if(null==t)return null;const n=r(a)(e),o=a;return n.forEach(((e,r)=>{if(e.includes(o.TG_PRX)){const a=e.replace(o.TG_PRX,"").replace(o.TG_SFX,"").trim();t.hasOwnProperty(a)&&null!=t[a]&&(n[r]=t[a])}})),n.join("")}(n[t],e)}function l(n,i=!1,c={}){let{hasError:u,placeholders:d,chop:f,helpers:p,handshake:h,snippets:m}=function(e){const{template:t,helpers:n={},handshake:o}=e,{TG_PRX:s,TG_SFX:l}=a,i=[],c={},u="string"==typeof t?t.replace(/<!--[\s\S]*?-->/g,"").replace(/\s{2,}/g," "):t;let d=null;const f=r(a)(u);return"string"==typeof f?d=f:f.forEach(((e,t)=>{const r=RegExp(s+"\\s*(.*?)\\s*(?::\\s*(.*?)\\s*)?(?::\\s*(.*?)\\s*)?"+l,"g");if(e.includes(s)){const a=r.exec(e);if(!a)return;let o={index:t,data:(n=a[1],n||null),action:a[2]?a[2].split(",").map((e=>e.trim())):null,name:a[3]?a[3].trim():null};i.push(o),c[i.length-1]=o,o.name&&(c[o.name]=o)}var n})),{hasError:d,placeholders:i,chop:f,helpers:n,handshake:o,snippets:c}}(n);if(u){function b(){return u}return i?[!1,b]:b}{const y=structuredClone(d);function g(r="render",n={},a={},...i){const u=structuredClone(f);let b=!1;if("string"!=typeof r)return`Error: Wrong command "${r}". Available commands: render, debug, snippets, set, curry.`;if(!["render","debug","snippets","set","curry"].includes(r)&&!r.startsWith("snippets"))return`Error: Wrong command "${r}". Available commands: render, debug, snippets, set, curry.`;if(r.startsWith("snippets")&&r.includes(":")){b=!0;let e=r.split(":").slice(1)[0].trim().split(",").map((e=>e.trim()));d=e.map((e=>m[e]))}else if("snippets"===r)b=!0;else{if("set"===r){if("object"!=typeof n||!n)return"Error: 'set' command requires an object with placeholders, helpers, handshake.";const e={...p,...n.helpers||{}},t=h?{...h,...n.handshake||{}}:n.handshake||{},r=[...f];n.placeholders&&Object.entries(n.placeholders).forEach((([e,t])=>{if(isNaN(e)){let n=d.find((t=>t.name===e));r[n.index]=t}else{let n=d[e].index;r[n]=t}}));const a=l({template:r.join(""),helpers:e,handshake:t},!1,c);return"function"==typeof a?a:()=>a}if("curry"===r){return l({template:g("render",n,a,...i),helpers:p,handshake:h},!1,c)}d=structuredClone(y)}if("string"==typeof n)switch(n){case"raw":return u.join("");case"demo":if(!h)return"Error: No handshake data.";n=h;break;case"handshake":return h?structuredClone(h):"Error: No handshake data.";case"helpers":return Object.keys(p).join(", ");case"placeholders":return d.map((e=>u[e.index])).join(", ");case"count":return d.length;default:return`Error: Wrong instruction "${n}". Available instructions: raw, demo, handshake, helpers, placeholders, count.`}const v=[],E={};let k=o(n),j={...c,...a};n=e({data:n});let x=e({data:n});return"null"===k?u.join(""):("array"!==k&&(n=[n]),"null"===k?u.join(""):(n.forEach((r=>{d.forEach((a=>{const{index:l,data:i,action:c}=a,d=!c&&i,f=structuredClone(E),h={dependencies:j,memory:f};let m=r;if(i&&i.includes("/")?m.hasOwnProperty(i)?m=m[i]:i.split("/").forEach((e=>{m=m.hasOwnProperty(e)?m[e]:[]})):"@all"===i||null===i||"@root"===i?m=r:i&&(m=m[i]),d){switch(o(m)){case"function":return void(u[l]=m());case"primitive":return void(u[l]=m);case"array":return void("primitive"===o(m[0])&&(u[l]=m[0]));case"object":return void(m.text&&(u[l]=m.text))}}else{let{dataDeepLevel:a,nestedData:i}=function(t,r){const n=[];let a=0;if(t instanceof Function)return{dataDeepLevel:0,nestedData:[[t()]]};if(null==t)return{dataDeepLevel:0,nestedData:[null]};if("string"==typeof t)return{dataDeepLevel:0,nestedData:[[t]]};const o=structuredClone(t);return r.includes("#")?(e({data:o,objectCallback:function({key:e,value:t,breadcrumbs:r}){return e===r?(n[0]=[t],t):(a=r.split("/").length-1,n[a]||(n[a]=[]),n[a].push(t),t)}}),{dataDeepLevel:a,nestedData:n}):(n.push([o]),{dataDeepLevel:0,nestedData:n})}(m,c),d=function*(e,r){let n=t({type:"LIFO"});for(let t=0;t<=r;t++)n.push(e[t]);for(;n&&!n.isEmpty();){let e=yield n.pull();e&&n.push(e)}}(function(e,t=10){let r={},n=[...e],a=0,o=0,s=0;n.forEach((e=>{"#"===e&&s++})),s<t&&console.error(`Error: Not enough level markers (#) for data with depth level ${t}. Found ${s} level markers in actions: ${e.join(", ")}`);do{r[o]=[],o++}while(o<=t);return n.every((e=>"#"===e?(a++,!(a>t)):e.startsWith("^")&&"^^"!==e?(r[a].push({type:"save",name:e.replace("^",""),level:a}),!0):"^^"===e?(r[a].push({type:"overwrite",name:"none",level:a}),!0):e.startsWith("+")?(r[a].push({type:"extendedRender",name:e.replace("+",""),level:a}),!0):e.startsWith("[]")?(r[a].push({type:"mix",name:e.replace("[]",""),level:a}),!0):e.startsWith(">")?(r[a].push({type:"data",name:e.replace(">",""),level:a}),!0):(""===e||r[a].push({type:"render",name:e,level:a}),!0))),r}(c,a),a);for(let t of d){let{type:a,name:l,level:c}=t;(i[c]||[]).forEach(((t,u)=>{let d=o(t);switch(a){case"route":switch(d){case"array":t.forEach(((e,r)=>{if(null==e)return;const n=o(e),a=p[l]({data:e,...h,full:e});null!=a&&("object"===n?t[r].text=s(e,a,p,x,j):t[r]=s(e,a,p,x,j))}));break;case"object":t.text=s(t,l,p,x,j)}break;case"save":E[l]=structuredClone(t);break;case"overwrite":r=structuredClone(t);break;case"data":switch(d){case"array":t.forEach(((e,r)=>t[r]=e instanceof Function?p[l]({data:e(),...h,full:e}):p[l]({data:e,...h,full:e})));break;case"object":i[c]=[p[l]({data:t,...h,full:n})];break;case"function":i[c]=[p[l]({data:t(),...h,full:n})];break;case"primitive":i[c]=p[l]({data:t,...h,full:n})}break;case"render":const f="function"==typeof p[l];switch(d){case"array":f?t.forEach(((e,r)=>{if(null==e)return;const n=o(e),a=p[l]({data:e,...h,full:x});null==a&&(t[r]=null),"object"===n?e.text=a:t[r]=a})):t.forEach(((e,r)=>{if(null==e)return;const n=o(e),a=s(e,l,p,x,j);null==a?t[r]=null:"object"===n?e.text=a:t[r]=a}));break;case"function":i[c]=p[l]({data:t(),...h,full:n});break;case"primitive":i[c]=f?p[l]({data:t,...h,full:n}):s(t,l,p,x,j);break;case"object":f?i[c][u].text=p[l]({data:t,...h,full:n}):t.text=s(t,l,p,x,j)}break;case"extendedRender":"function"==typeof p[l]&&i[0].forEach(((e,t)=>i[0][t]=p[l]({data:e,...h,full:e})));break;case"mix":if(""===l)switch(d){case"object":Object.keys(t).find((e=>e.includes("/")))?Object.entries(t).forEach((([e,t])=>i[c][e]=t.text)):i[c]=t.text;for(let b=c-1;b>=0;b--)i[b]=e({data:i[b],objectCallback:m});function m({value:e,breadcrumbs:t}){return i[c][t]?i[c][t]:e}break;case"array":t.forEach(((e,r)=>{if(r>0){let n=o(e);if(null==e)return;t[0]+="object"===n?`${e.text}`:`${e}`,t.toSpliced(r,1)}else{let r=o(e);if(t[0]="",null===r)return;t[0]="object"===r?`${e.text}`:`${e}`}})),t.length=1}else{let y=p[l]({data:t,...h,full:n}),g=o(y);switch(t.forEach(((e,r)=>t.splice(r,1))),t.length=0,g){case"primitive":t[0]=y;break;case"array":t.push(...y)}}}}))}if(i instanceof Array&&1===i.length&&i[0]instanceof Array&&(i=i[0]),null==i[0])return;let f=o(i[0]),b=i[0];switch(f){case"primitive":if(null==b)return;u[l]=b;break;case"object":if(null==b.text)return;u[l]=b.text;break;case"array":const e=o(b[0]);u[l]="object"===e?b.map((e=>e.text)).join(""):b.join("")}}})),b?v.push(d.map((e=>u[e.index])).join("<~>")):v.push(u.join(""))})),"array"===k?v:i?i.reduce(((e,t)=>"function"!=typeof t?e:t(e,j)),v.join("")):v.join("")))}return i?[!0,g]:g}}const i={default:{}};const c={build:l,get:function(e){if(!(e instanceof Array))return function(){return'Error: Argument "location" is a string. Should be an array. E.g. ["templateName", "storageName"].'};const[t,r="default"]=e;return i[r]?i[r][t]?i[r][t]:function(){return`Error: Template "${t}" does not exist in storage "${r}".`}:function(){return`Error: Storage "${r}" does not exist.`}},add:function(e,t,...r){const[n,a="default"]=e;if(null==t)return void console.warn(`Warning: Template ${a}/${n} is not added to storage. The template is null.`);let o=t,s=!0;if(i[a]||(i[a]={}),"function"!=typeof t){let e=l(t,!0,...r);s=e[0],o=e[1]}s?i[a][n]=o:console.error(`Error: Template "${n}" looks broken and is not added to storage.`)},list:function(e=["default"]){return e.map((e=>i[e]?Object.keys(i[e]):[])).flat()},clear:function(){Object.keys(i).forEach((e=>{"default"!=e?delete i[e]:i.default={}}))},remove:function(e){const[t,r="default"]=e;return i[r]?i[r][t]?void delete i[r][t]:`Error: Template "${t}" does not exist in storage "${r}".`:`Error: Storage "${r}" does not exist.`}};module.exports=c;
1
+ "use strict";var e=require("@peter.naydenov/walk"),t=require("@peter.naydenov/stack");function r(e){return function t(r){const{TG_PRX:a,TG_SFX:s,TG_SIZE_P:l,TG_SIZE_S:o}=e;let i,c,u,d=[];if("string"!=typeof r)return n("notAString");if(0==r.length)return[];if(i=r.indexOf(a),0<i&&d.push(r.slice(0,i)),-1==i)return d.push(r),d;{if(u=r.indexOf(a,i+l),c=r.indexOf(s),-1==c)return n("missingClosing");if(c<i)return n("closedBeforeOpened");if(c+=o,-1!=u&&u<c)return n("newBeforeClosed");d.push(r.slice(i,c));let e=t(r.slice(c));return d.concat(e)}}}function n(e){switch(e){case"notAString":return"Error: Template is not a string.";case"missingClosing":return"Error: Placeholder with missing closing tag.";case"closedBeforeOpened":return"Error: Placeholder closing tag without starting one.";case"newBeforeClosed":return"Error: Nested placeholders. Close placeholder before open new one.";default:return"Error: Unknown template error."}}var a={TG_PRX:"{{",TG_SFX:"}}",TG_SIZE_P:2,TG_SIZE_S:2};function s(e){return null==e?"null":"string"==typeof e||"number"==typeof e||"boolean"==typeof e?"primitive":"function"==typeof e?"function":e instanceof Array?"array":e instanceof Object?"object":void 0}function l(e,t,n,s,o,...i){if(!n[t])return`( Error: Helper '${t}' is not available )`;if("function"==typeof n[t])return n[t]({data:e,dependencies:o,full:s,useHelper:(t,r)=>l(r||e,t,n,s,o,...i)},...i);{let s=e;return"object"==typeof e&&null!==e||(s={text:e}),function(e,t){if(null==t)return null;const n=r(a)(e),s=a;return"string"==typeof n?n:(n.forEach(((e,r)=>{if(e.includes(s.TG_PRX)){const a=e.replace(s.TG_PRX,"").replace(s.TG_SFX,"").trim();if(t.hasOwnProperty(a)&&null!=t[a]){let e=t[a];"object"==typeof e&&e.text&&(e=e.text),n[r]=e}}})),n.join(""))}(n[t],s)}}function o({name:e},t,{helpers:r,original:n,dependencies:a,useHelper:o,extendArguments:i,nestedData:c,level:u,iData:d}){const p=t;let f=s(p);const h="function"==typeof r[e];switch(f){case"array":h?p.forEach(((t,a)=>{if(null==t)return;const l=s(t),c=o(t),u=r[e]({data:t,...i,full:n,useHelper:c});null==u&&(p[a]=null),"object"===l?t.text=u:p[a]=u})):p.forEach(((t,o)=>{if(null==t)return;const i=s(t),c=l(t,e,r,n,a);null==c?p[o]=null:"object"===i?t.text=c:p[o]=c}));break;case"function":const t=p(),f=o(t);c[u]=r[e]({data:t,...i,full:p,useHelper:f});break;case"primitive":if(h){const t=o(p);c[u]=r[e]({data:p,...i,full:p,useHelper:t})}else c[u]=l(p,e,r,n,a);break;case"object":if(h){const t=o(p);c[u][d].text=r[e]({data:p,...i,full:p,useHelper:t})}else p.text=l(p,e,r,n,a)}}function i({name:e},t,{helpers:r,extendArguments:n,nestedData:a,level:l,useHelper:o}){const i=t;switch(s(i)){case"array":i.forEach(((t,a)=>{const s=o(t);i[a]=t instanceof Function?r[e]({data:t(),...n,full:t,useHelper:s}):r[e]({data:t,...n,full:t,useHelper:s})}));break;case"object":const t=o(i);a[l]=[r[e]({data:i,...n,full:i,useHelper:t})];break;case"function":const s=i(),c=o(s);a[l]=[r[e]({data:s,...n,full:i,useHelper:c})];break;case"primitive":const u=o(i);a[l]=r[e]({data:i,...n,full:i,useHelper:u})}}function c({name:t},r,{helpers:n,extendArguments:a,nestedData:l,level:o,useHelper:i}){const c=r;let u=s(c);if(""===t)switch(u){case"object":Object.keys(c).find((e=>e.includes("/")))?Object.entries(c).forEach((([e,t])=>l[o][e]=t.text)):l[o]=c.text;for(let p=o-1;p>=0;p--)l[p]=e({data:l[p],objectCallback:d});function d({value:e,breadcrumbs:t}){return l[o][t]?l[o][t]:e}break;case"array":c.forEach(((e,t)=>{if(t>0){let r=s(e);if(null==e)return;c[0]+="object"===r?`${e.text}`:`${e}`,c.toSpliced(t,1)}else{let t=s(e);if(c[0]="",null===t)return;c[0]="object"===t?`${e.text}`:`${e}`}})),c.length=1}else{const f=i(c);let h=n[t]({data:c,...a,full:c,useHelper:f}),m=s(h);switch(c.forEach(((e,t)=>c.splice(t,1))),c.length=0,m){case"primitive":c[0]=h;break;case"array":c.push(...h)}}}function u({name:e},t,{helpers:r,extendArguments:n,nestedData:a,level:s,useHelper:l}){"function"==typeof r[e]&&a[0]&&Array.isArray(a[0])&&a[0].forEach(((t,s)=>{const o=l(t);a[0][s]=r[e]({data:t,...n,full:t,useHelper:o})}))}function d({name:e},t,{memory:r}){r[e]=structuredClone(t)}function p({name:e},t){return structuredClone(t)}function f({d:r,chop:n,placeholders:a,original:f,helpers:h,dependencies:m,memory:y,args:b,onlySnippets:g}){const k=[],v=e=>(t,r)=>{let n=h[t],a=n&&"function"==typeof n&&n.length>=2;if(!n)return`( Error: Helper '${t}' is not available )`;if(a)try{return n("render",r||e,m)}catch(n){return l(r||e,t,h,f,m,...b)}return l(r||e,t,h,f,m,...b)};return r.forEach((r=>{let l=structuredClone(n),b=r;a.forEach((r=>{const{index:n,data:a,action:g}=r,k=!g;structuredClone(y);let E=b;if(a&&a.includes("/")?E.hasOwnProperty(a)?E=E[a]:a.split("/").forEach((e=>{E=E.hasOwnProperty(e)?E[e]:[]})):"@all"===a||null===a||"@root"===a?E=b:a&&(E=E[a]),k){switch(s(E)){case"function":l[n]=E();break;case"primitive":l[n]=E;break;case"array":"primitive"===s(E[0])&&(l[n]=E[0]);break;case"object":E.text&&(l[n]=E.text)}}else{let{dataDeepLevel:r,nestedData:a}=function(t,r){const n=[];let a=0;if(t instanceof Function)return{dataDeepLevel:0,nestedData:[[t()]]};if(null==t)return{dataDeepLevel:0,nestedData:[null]};if("string"==typeof t)return{dataDeepLevel:0,nestedData:[[t]]};const s=structuredClone(t);return r.includes("#")?(e({data:s,objectCallback:function({key:e,value:t,breadcrumbs:r}){return e===r?(n[0]=[t],t):(a=r.split("/").length-1,n[a]||(n[a]=[]),n[a].push(t),t)}}),{dataDeepLevel:a,nestedData:n}):(n.push([s]),{dataDeepLevel:0,nestedData:n})}(E,g),k=function*(e,r){let n=t({type:"LIFO"});for(let t=0;t<=r;t++)n.push(e[t]);for(;n&&!n.isEmpty();){let e=yield n.pull();e&&n.push(e)}}(function(e,t=10){let r={},n=[...e],a=0,s=0,l=0;n.forEach((e=>{"#"===e&&l++})),l<t&&console.error(`Error: Not enough level markers (#) for data with depth level ${t}. Found ${l} level markers in actions: ${e.join(", ")}`);do{r[s]=[],s++}while(s<=t);return n.every((e=>"#"===e?(a++,!(a>t)):e.startsWith("^")&&"^^"!==e?(r[a].push({type:"save",name:e.replace("^",""),level:a}),!0):"^^"===e?(r[a].push({type:"overwrite",name:"none",level:a}),!0):e.startsWith("+")?(r[a].push({type:"extendedRender",name:e.replace("+",""),level:a}),!0):e.startsWith("[]")?(r[a].push({type:"mix",name:e.replace("[]",""),level:a}),!0):e.startsWith(">")?(r[a].push({type:"data",name:e.replace(">",""),level:a}),!0):(""===e||r[a].push({type:"render",name:e,level:a}),!0))),r}(g,r),r);if(b=function({nestedData:e,actSetup:t,helpers:r,original:n,dependencies:a,memory:s,dElement:l,createUseHelper:f}){let h=l;for(let l of t){let{type:t,name:m,level:y}=l;(e[y]||[]).forEach(((m,b)=>{const g={helpers:r,original:n,dependencies:a,memory:s,useHelper:f,nestedData:e,level:y,iData:b,extendArguments:{dependencies:a,memory:s}};switch(t){case"render":o(l,m,g);break;case"data":i(l,m,g);break;case"mix":c(l,m,g);break;case"save":d(l,m,g);break;case"overwrite":h=p(l,m);break;case"route":break;case"extendedRender":u(l,0,g)}}))}return h}({nestedData:a,actSetup:k,helpers:h,original:f,dependencies:m,memory:y,dElement:b,createUseHelper:v}),a instanceof Array&&1===a.length&&a[0]instanceof Array&&(a=a[0]),null==a[0])return;let x=s(a[0]),j=a[0];switch(x){case"primitive":if(null==j)return;l[n]=j;break;case"object":if(null==j.text)return;l[n]=j.text;break;case"array":const e=s(j[0]);l[n]="object"===e?j.map((e=>e.text)).join(""):j.join("")}}})),g?k.push(a.map((e=>l[e.index])).join("<~>")):k.push(l.join(""))})),k}function h(t,n=!1,l={}){let{hasError:o,placeholders:i,chop:c,helpers:u,handshake:d,snippets:p}=function(e){const{template:t,helpers:n={},handshake:s}=e,{TG_PRX:l,TG_SFX:o}=a,i=[],c={},u="string"==typeof t?t.replace(/<!--[\s\S]*?-->/g,"").replace(/\s{2,}/g," "):t;let d=null;const p=r(a)(u);return"string"==typeof p?d=p:p.forEach(((e,t)=>{const r=RegExp(l+"\\s*(.*?)\\s*(?::\\s*(.*?)\\s*)?(?::\\s*(.*?)\\s*)?"+o,"g");if(e.includes(l)){const a=r.exec(e);if(!a)return;let s={index:t,data:(n=a[1],n||null),action:a[2]?a[2].split(",").map((e=>e.trim())):null,name:a[3]?a[3].trim():null};i.push(s),c[i.length-1]=s,s.name&&(c[s.name]=s)}var n})),{hasError:d,placeholders:i,chop:p,helpers:n,handshake:s,snippets:c}}(t);if(o){function m(){return o}return n?[!1,m]:m}{const y=structuredClone(i);function b(t="render",r={},n={},...a){const o=structuredClone(c);let m=!1;if("string"!=typeof t)return`Error: Wrong command "${t}". Available commands: render, debug, snippets, set, curry.`;if(!["render","debug","snippets","set","curry"].includes(t)&&!t.startsWith("snippets"))return`Error: Wrong command "${t}". Available commands: render, debug, snippets, set, curry.`;if(t.startsWith("snippets")){m=!0;const e=function(e,t){if(e.includes(":"))return e.split(":").slice(1)[0].trim().split(",").map((e=>e.trim())).map((e=>t[e]));return null}(t,p);e&&(i=e)}else if("snippets"===t)m=!0;else{if("set"===t)return function(e,{helpers:t,handshake:r,placeholders:n,chop:a,build:s,buildDependencies:l}){if("object"!=typeof e||!e)return"Error: 'set' command requires an object with placeholders, helpers, handshake.";const o={...t,...e.helpers||{}},i=r?{...r,...e.handshake||{}}:e.handshake||{},c=[...a];e.placeholders&&Object.entries(e.placeholders).forEach((([e,t])=>{if(isNaN(e)){let r=n.find((t=>t.name===e));c[r.index]=t}else{let r=n[e].index;c[r]=t}}));const u=s({template:c.join(""),helpers:o,handshake:i},!1,l);return"function"==typeof u?u:()=>u}(r,{helpers:u,handshake:d,placeholders:i,chop:c,build:h,buildDependencies:l});if("curry"===t){return h({template:b("render",r,n,...a),helpers:u,handshake:d},!1,l)}i=structuredClone(y)}if("string"==typeof r){const e=function(e,{handshake:t,helpers:r,placeholders:n,cuts:a}){switch(e){case"raw":return a.join("");case"demo":return t||"Error: No handshake data.";case"handshake":return t?structuredClone(t):"Error: No handshake data.";case"helpers":return Object.keys(r).join(", ");case"placeholders":return n.map((e=>a[e.index])).join(", ");case"count":return n.length;default:return`Error: Wrong instruction "${e}". Available instructions: raw, demo, handshake, helpers, placeholders, count.`}}(r,{handshake:d,helpers:u,placeholders:i,cuts:o});if("demo"!==r||"object"!=typeof e)return e;r=e}let g=s(r),k={...l,...n};r=e({data:r});let v=e({data:r});if("null"===g)return o.join("");if("array"!==g&&(r=[r]),"null"===g)return o.join("");const E=f({d:r,chop:c,placeholders:i,original:v,helpers:u,dependencies:k,memory:{},args:a,onlySnippets:m});return"array"===g?E:a?a.reduce(((e,t)=>"function"!=typeof t?e:t(e,k)),E.join("")):E.join("")}return n?[!0,b]:b}}const m={default:{}};const y={build:h,get:function(e){if(!(e instanceof Array))return function(){return'Error: Argument "location" is a string. Should be an array. E.g. ["templateName", "storageName"].'};const[t,r="default"]=e;return m[r]?m[r][t]?m[r][t]:function(){return`Error: Template "${t}" does not exist in storage "${r}".`}:function(){return`Error: Storage "${r}" does not exist.`}},add:function(e,t,...r){const[n,a="default"]=e;if(null==t)return void console.warn(`Warning: Template ${a}/${n} is not added to storage. The template is null.`);let s=t,l=!0;if(m[a]||(m[a]={}),"function"!=typeof t){let e=h(t,!0,...r);l=e[0],s=e[1]}l?m[a][n]=s:console.error(`Error: Template "${n}" looks broken and is not added to storage.`)},list:function(e=["default"]){return e.map((e=>m[e]?Object.keys(m[e]):[])).flat()},clear:function(){Object.keys(m).forEach((e=>{"default"!=e?delete m[e]:m.default={}}))},remove:function(e){const[t,r="default"]=e;return m[r]?m[r][t]?void delete m[r][t]:`Error: Template "${t}" does not exist in storage "${r}".`:`Error: Storage "${r}" does not exist.`}};module.exports=y;
@@ -1 +1 @@
1
- import e from"@peter.naydenov/walk";import t from"@peter.naydenov/stack";function r(e){return function t(r){const{TG_PRX:a,TG_SFX:o,TG_SIZE_P:s,TG_SIZE_S:l}=e;let i,c,u,d=[];if("string"!=typeof r)return n("notAString");if(0==r.length)return[];if(i=r.indexOf(a),0<i&&d.push(r.slice(0,i)),-1==i)return d.push(r),d;{if(u=r.indexOf(a,i+s),c=r.indexOf(o),-1==c)return n("missingClosing");if(c<i)return n("closedBeforeOpened");if(c+=l,-1!=u&&u<c)return n("newBeforeClosed");d.push(r.slice(i,c));let e=t(r.slice(c));return d.concat(e)}}}function n(e){switch(e){case"notAString":return"Error: Template is not a string.";case"missingClosing":return"Error: Placeholder with missing closing tag.";case"closedBeforeOpened":return"Error: Placeholder closing tag without starting one.";case"newBeforeClosed":return"Error: Nested placeholders. Close placeholder before open new one.";default:return"Error: Unknown template error."}}var a={TG_PRX:"{{",TG_SFX:"}}",TG_SIZE_P:2,TG_SIZE_S:2};function o(e){return null==e?"null":"string"==typeof e||"number"==typeof e||"boolean"==typeof e?"primitive":"function"==typeof e?"function":e instanceof Array?"array":e instanceof Object?"object":void 0}function s(e,t,n,o,s,...l){if(e instanceof Object&&Object.entries(e).forEach((([t,r])=>{r instanceof Object&&(e[t]=r.text),r instanceof Array&&(e[t]=r[0])})),!n[t])return`{{ Error: Helper '${t}' is not available}}`;const i="function"==typeof n[t];return e=function(e={}){return"string"==typeof e?{text:e}:e}(e),i?n[t]({theData:e,dependencies:s,full:o},...l):function(e,t){if(null==t)return null;const n=r(a)(e),o=a;return n.forEach(((e,r)=>{if(e.includes(o.TG_PRX)){const a=e.replace(o.TG_PRX,"").replace(o.TG_SFX,"").trim();t.hasOwnProperty(a)&&null!=t[a]&&(n[r]=t[a])}})),n.join("")}(n[t],e)}function l(n,i=!1,c={}){let{hasError:u,placeholders:d,chop:f,helpers:p,handshake:h,snippets:m}=function(e){const{template:t,helpers:n={},handshake:o}=e,{TG_PRX:s,TG_SFX:l}=a,i=[],c={},u="string"==typeof t?t.replace(/<!--[\s\S]*?-->/g,"").replace(/\s{2,}/g," "):t;let d=null;const f=r(a)(u);return"string"==typeof f?d=f:f.forEach(((e,t)=>{const r=RegExp(s+"\\s*(.*?)\\s*(?::\\s*(.*?)\\s*)?(?::\\s*(.*?)\\s*)?"+l,"g");if(e.includes(s)){const a=r.exec(e);if(!a)return;let o={index:t,data:(n=a[1],n||null),action:a[2]?a[2].split(",").map((e=>e.trim())):null,name:a[3]?a[3].trim():null};i.push(o),c[i.length-1]=o,o.name&&(c[o.name]=o)}var n})),{hasError:d,placeholders:i,chop:f,helpers:n,handshake:o,snippets:c}}(n);if(u){function b(){return u}return i?[!1,b]:b}{const y=structuredClone(d);function g(r="render",n={},a={},...i){const u=structuredClone(f);let b=!1;if("string"!=typeof r)return`Error: Wrong command "${r}". Available commands: render, debug, snippets, set, curry.`;if(!["render","debug","snippets","set","curry"].includes(r)&&!r.startsWith("snippets"))return`Error: Wrong command "${r}". Available commands: render, debug, snippets, set, curry.`;if(r.startsWith("snippets")&&r.includes(":")){b=!0;let e=r.split(":").slice(1)[0].trim().split(",").map((e=>e.trim()));d=e.map((e=>m[e]))}else if("snippets"===r)b=!0;else{if("set"===r){if("object"!=typeof n||!n)return"Error: 'set' command requires an object with placeholders, helpers, handshake.";const e={...p,...n.helpers||{}},t=h?{...h,...n.handshake||{}}:n.handshake||{},r=[...f];n.placeholders&&Object.entries(n.placeholders).forEach((([e,t])=>{if(isNaN(e)){let n=d.find((t=>t.name===e));r[n.index]=t}else{let n=d[e].index;r[n]=t}}));const a=l({template:r.join(""),helpers:e,handshake:t},!1,c);return"function"==typeof a?a:()=>a}if("curry"===r){return l({template:g("render",n,a,...i),helpers:p,handshake:h},!1,c)}d=structuredClone(y)}if("string"==typeof n)switch(n){case"raw":return u.join("");case"demo":if(!h)return"Error: No handshake data.";n=h;break;case"handshake":return h?structuredClone(h):"Error: No handshake data.";case"helpers":return Object.keys(p).join(", ");case"placeholders":return d.map((e=>u[e.index])).join(", ");case"count":return d.length;default:return`Error: Wrong instruction "${n}". Available instructions: raw, demo, handshake, helpers, placeholders, count.`}const v=[],E={};let k=o(n),j={...c,...a};n=e({data:n});let x=e({data:n});return"null"===k?u.join(""):("array"!==k&&(n=[n]),"null"===k?u.join(""):(n.forEach((r=>{d.forEach((a=>{const{index:l,data:i,action:c}=a,d=!c&&i,f=structuredClone(E),h={dependencies:j,memory:f};let m=r;if(i&&i.includes("/")?m.hasOwnProperty(i)?m=m[i]:i.split("/").forEach((e=>{m=m.hasOwnProperty(e)?m[e]:[]})):"@all"===i||null===i||"@root"===i?m=r:i&&(m=m[i]),d){switch(o(m)){case"function":return void(u[l]=m());case"primitive":return void(u[l]=m);case"array":return void("primitive"===o(m[0])&&(u[l]=m[0]));case"object":return void(m.text&&(u[l]=m.text))}}else{let{dataDeepLevel:a,nestedData:i}=function(t,r){const n=[];let a=0;if(t instanceof Function)return{dataDeepLevel:0,nestedData:[[t()]]};if(null==t)return{dataDeepLevel:0,nestedData:[null]};if("string"==typeof t)return{dataDeepLevel:0,nestedData:[[t]]};const o=structuredClone(t);return r.includes("#")?(e({data:o,objectCallback:function({key:e,value:t,breadcrumbs:r}){return e===r?(n[0]=[t],t):(a=r.split("/").length-1,n[a]||(n[a]=[]),n[a].push(t),t)}}),{dataDeepLevel:a,nestedData:n}):(n.push([o]),{dataDeepLevel:0,nestedData:n})}(m,c),d=function*(e,r){let n=t({type:"LIFO"});for(let t=0;t<=r;t++)n.push(e[t]);for(;n&&!n.isEmpty();){let e=yield n.pull();e&&n.push(e)}}(function(e,t=10){let r={},n=[...e],a=0,o=0,s=0;n.forEach((e=>{"#"===e&&s++})),s<t&&console.error(`Error: Not enough level markers (#) for data with depth level ${t}. Found ${s} level markers in actions: ${e.join(", ")}`);do{r[o]=[],o++}while(o<=t);return n.every((e=>"#"===e?(a++,!(a>t)):e.startsWith("^")&&"^^"!==e?(r[a].push({type:"save",name:e.replace("^",""),level:a}),!0):"^^"===e?(r[a].push({type:"overwrite",name:"none",level:a}),!0):e.startsWith("+")?(r[a].push({type:"extendedRender",name:e.replace("+",""),level:a}),!0):e.startsWith("[]")?(r[a].push({type:"mix",name:e.replace("[]",""),level:a}),!0):e.startsWith(">")?(r[a].push({type:"data",name:e.replace(">",""),level:a}),!0):(""===e||r[a].push({type:"render",name:e,level:a}),!0))),r}(c,a),a);for(let t of d){let{type:a,name:l,level:c}=t;(i[c]||[]).forEach(((t,u)=>{let d=o(t);switch(a){case"route":switch(d){case"array":t.forEach(((e,r)=>{if(null==e)return;const n=o(e),a=p[l]({data:e,...h,full:e});null!=a&&("object"===n?t[r].text=s(e,a,p,x,j):t[r]=s(e,a,p,x,j))}));break;case"object":t.text=s(t,l,p,x,j)}break;case"save":E[l]=structuredClone(t);break;case"overwrite":r=structuredClone(t);break;case"data":switch(d){case"array":t.forEach(((e,r)=>t[r]=e instanceof Function?p[l]({data:e(),...h,full:e}):p[l]({data:e,...h,full:e})));break;case"object":i[c]=[p[l]({data:t,...h,full:n})];break;case"function":i[c]=[p[l]({data:t(),...h,full:n})];break;case"primitive":i[c]=p[l]({data:t,...h,full:n})}break;case"render":const f="function"==typeof p[l];switch(d){case"array":f?t.forEach(((e,r)=>{if(null==e)return;const n=o(e),a=p[l]({data:e,...h,full:x});null==a&&(t[r]=null),"object"===n?e.text=a:t[r]=a})):t.forEach(((e,r)=>{if(null==e)return;const n=o(e),a=s(e,l,p,x,j);null==a?t[r]=null:"object"===n?e.text=a:t[r]=a}));break;case"function":i[c]=p[l]({data:t(),...h,full:n});break;case"primitive":i[c]=f?p[l]({data:t,...h,full:n}):s(t,l,p,x,j);break;case"object":f?i[c][u].text=p[l]({data:t,...h,full:n}):t.text=s(t,l,p,x,j)}break;case"extendedRender":"function"==typeof p[l]&&i[0].forEach(((e,t)=>i[0][t]=p[l]({data:e,...h,full:e})));break;case"mix":if(""===l)switch(d){case"object":Object.keys(t).find((e=>e.includes("/")))?Object.entries(t).forEach((([e,t])=>i[c][e]=t.text)):i[c]=t.text;for(let b=c-1;b>=0;b--)i[b]=e({data:i[b],objectCallback:m});function m({value:e,breadcrumbs:t}){return i[c][t]?i[c][t]:e}break;case"array":t.forEach(((e,r)=>{if(r>0){let n=o(e);if(null==e)return;t[0]+="object"===n?`${e.text}`:`${e}`,t.toSpliced(r,1)}else{let r=o(e);if(t[0]="",null===r)return;t[0]="object"===r?`${e.text}`:`${e}`}})),t.length=1}else{let y=p[l]({data:t,...h,full:n}),g=o(y);switch(t.forEach(((e,r)=>t.splice(r,1))),t.length=0,g){case"primitive":t[0]=y;break;case"array":t.push(...y)}}}}))}if(i instanceof Array&&1===i.length&&i[0]instanceof Array&&(i=i[0]),null==i[0])return;let f=o(i[0]),b=i[0];switch(f){case"primitive":if(null==b)return;u[l]=b;break;case"object":if(null==b.text)return;u[l]=b.text;break;case"array":const e=o(b[0]);u[l]="object"===e?b.map((e=>e.text)).join(""):b.join("")}}})),b?v.push(d.map((e=>u[e.index])).join("<~>")):v.push(u.join(""))})),"array"===k?v:i?i.reduce(((e,t)=>"function"!=typeof t?e:t(e,j)),v.join("")):v.join("")))}return i?[!0,g]:g}}const i={default:{}};const c={build:l,get:function(e){if(!(e instanceof Array))return function(){return'Error: Argument "location" is a string. Should be an array. E.g. ["templateName", "storageName"].'};const[t,r="default"]=e;return i[r]?i[r][t]?i[r][t]:function(){return`Error: Template "${t}" does not exist in storage "${r}".`}:function(){return`Error: Storage "${r}" does not exist.`}},add:function(e,t,...r){const[n,a="default"]=e;if(null==t)return void console.warn(`Warning: Template ${a}/${n} is not added to storage. The template is null.`);let o=t,s=!0;if(i[a]||(i[a]={}),"function"!=typeof t){let e=l(t,!0,...r);s=e[0],o=e[1]}s?i[a][n]=o:console.error(`Error: Template "${n}" looks broken and is not added to storage.`)},list:function(e=["default"]){return e.map((e=>i[e]?Object.keys(i[e]):[])).flat()},clear:function(){Object.keys(i).forEach((e=>{"default"!=e?delete i[e]:i.default={}}))},remove:function(e){const[t,r="default"]=e;return i[r]?i[r][t]?void delete i[r][t]:`Error: Template "${t}" does not exist in storage "${r}".`:`Error: Storage "${r}" does not exist.`}};export{c as default};
1
+ import e from"@peter.naydenov/walk";import t from"@peter.naydenov/stack";function r(e){return function t(r){const{TG_PRX:a,TG_SFX:s,TG_SIZE_P:l,TG_SIZE_S:o}=e;let i,c,u,d=[];if("string"!=typeof r)return n("notAString");if(0==r.length)return[];if(i=r.indexOf(a),0<i&&d.push(r.slice(0,i)),-1==i)return d.push(r),d;{if(u=r.indexOf(a,i+l),c=r.indexOf(s),-1==c)return n("missingClosing");if(c<i)return n("closedBeforeOpened");if(c+=o,-1!=u&&u<c)return n("newBeforeClosed");d.push(r.slice(i,c));let e=t(r.slice(c));return d.concat(e)}}}function n(e){switch(e){case"notAString":return"Error: Template is not a string.";case"missingClosing":return"Error: Placeholder with missing closing tag.";case"closedBeforeOpened":return"Error: Placeholder closing tag without starting one.";case"newBeforeClosed":return"Error: Nested placeholders. Close placeholder before open new one.";default:return"Error: Unknown template error."}}var a={TG_PRX:"{{",TG_SFX:"}}",TG_SIZE_P:2,TG_SIZE_S:2};function s(e){return null==e?"null":"string"==typeof e||"number"==typeof e||"boolean"==typeof e?"primitive":"function"==typeof e?"function":e instanceof Array?"array":e instanceof Object?"object":void 0}function l(e,t,n,s,o,...i){if(!n[t])return`( Error: Helper '${t}' is not available )`;if("function"==typeof n[t])return n[t]({data:e,dependencies:o,full:s,useHelper:(t,r)=>l(r||e,t,n,s,o,...i)},...i);{let s=e;return"object"==typeof e&&null!==e||(s={text:e}),function(e,t){if(null==t)return null;const n=r(a)(e),s=a;return"string"==typeof n?n:(n.forEach(((e,r)=>{if(e.includes(s.TG_PRX)){const a=e.replace(s.TG_PRX,"").replace(s.TG_SFX,"").trim();if(t.hasOwnProperty(a)&&null!=t[a]){let e=t[a];"object"==typeof e&&e.text&&(e=e.text),n[r]=e}}})),n.join(""))}(n[t],s)}}function o({name:e},t,{helpers:r,original:n,dependencies:a,useHelper:o,extendArguments:i,nestedData:c,level:u,iData:d}){const p=t;let f=s(p);const h="function"==typeof r[e];switch(f){case"array":h?p.forEach(((t,a)=>{if(null==t)return;const l=s(t),c=o(t),u=r[e]({data:t,...i,full:n,useHelper:c});null==u&&(p[a]=null),"object"===l?t.text=u:p[a]=u})):p.forEach(((t,o)=>{if(null==t)return;const i=s(t),c=l(t,e,r,n,a);null==c?p[o]=null:"object"===i?t.text=c:p[o]=c}));break;case"function":const t=p(),f=o(t);c[u]=r[e]({data:t,...i,full:p,useHelper:f});break;case"primitive":if(h){const t=o(p);c[u]=r[e]({data:p,...i,full:p,useHelper:t})}else c[u]=l(p,e,r,n,a);break;case"object":if(h){const t=o(p);c[u][d].text=r[e]({data:p,...i,full:p,useHelper:t})}else p.text=l(p,e,r,n,a)}}function i({name:e},t,{helpers:r,extendArguments:n,nestedData:a,level:l,useHelper:o}){const i=t;switch(s(i)){case"array":i.forEach(((t,a)=>{const s=o(t);i[a]=t instanceof Function?r[e]({data:t(),...n,full:t,useHelper:s}):r[e]({data:t,...n,full:t,useHelper:s})}));break;case"object":const t=o(i);a[l]=[r[e]({data:i,...n,full:i,useHelper:t})];break;case"function":const s=i(),c=o(s);a[l]=[r[e]({data:s,...n,full:i,useHelper:c})];break;case"primitive":const u=o(i);a[l]=r[e]({data:i,...n,full:i,useHelper:u})}}function c({name:t},r,{helpers:n,extendArguments:a,nestedData:l,level:o,useHelper:i}){const c=r;let u=s(c);if(""===t)switch(u){case"object":Object.keys(c).find((e=>e.includes("/")))?Object.entries(c).forEach((([e,t])=>l[o][e]=t.text)):l[o]=c.text;for(let p=o-1;p>=0;p--)l[p]=e({data:l[p],objectCallback:d});function d({value:e,breadcrumbs:t}){return l[o][t]?l[o][t]:e}break;case"array":c.forEach(((e,t)=>{if(t>0){let r=s(e);if(null==e)return;c[0]+="object"===r?`${e.text}`:`${e}`,c.toSpliced(t,1)}else{let t=s(e);if(c[0]="",null===t)return;c[0]="object"===t?`${e.text}`:`${e}`}})),c.length=1}else{const f=i(c);let h=n[t]({data:c,...a,full:c,useHelper:f}),m=s(h);switch(c.forEach(((e,t)=>c.splice(t,1))),c.length=0,m){case"primitive":c[0]=h;break;case"array":c.push(...h)}}}function u({name:e},t,{helpers:r,extendArguments:n,nestedData:a,level:s,useHelper:l}){"function"==typeof r[e]&&a[0]&&Array.isArray(a[0])&&a[0].forEach(((t,s)=>{const o=l(t);a[0][s]=r[e]({data:t,...n,full:t,useHelper:o})}))}function d({name:e},t,{memory:r}){r[e]=structuredClone(t)}function p({name:e},t){return structuredClone(t)}function f({d:r,chop:n,placeholders:a,original:f,helpers:h,dependencies:m,memory:y,args:b,onlySnippets:g}){const k=[],v=e=>(t,r)=>{let n=h[t],a=n&&"function"==typeof n&&n.length>=2;if(!n)return`( Error: Helper '${t}' is not available )`;if(a)try{return n("render",r||e,m)}catch(n){return l(r||e,t,h,f,m,...b)}return l(r||e,t,h,f,m,...b)};return r.forEach((r=>{let l=structuredClone(n),b=r;a.forEach((r=>{const{index:n,data:a,action:g}=r,k=!g;structuredClone(y);let E=b;if(a&&a.includes("/")?E.hasOwnProperty(a)?E=E[a]:a.split("/").forEach((e=>{E=E.hasOwnProperty(e)?E[e]:[]})):"@all"===a||null===a||"@root"===a?E=b:a&&(E=E[a]),k){switch(s(E)){case"function":l[n]=E();break;case"primitive":l[n]=E;break;case"array":"primitive"===s(E[0])&&(l[n]=E[0]);break;case"object":E.text&&(l[n]=E.text)}}else{let{dataDeepLevel:r,nestedData:a}=function(t,r){const n=[];let a=0;if(t instanceof Function)return{dataDeepLevel:0,nestedData:[[t()]]};if(null==t)return{dataDeepLevel:0,nestedData:[null]};if("string"==typeof t)return{dataDeepLevel:0,nestedData:[[t]]};const s=structuredClone(t);return r.includes("#")?(e({data:s,objectCallback:function({key:e,value:t,breadcrumbs:r}){return e===r?(n[0]=[t],t):(a=r.split("/").length-1,n[a]||(n[a]=[]),n[a].push(t),t)}}),{dataDeepLevel:a,nestedData:n}):(n.push([s]),{dataDeepLevel:0,nestedData:n})}(E,g),k=function*(e,r){let n=t({type:"LIFO"});for(let t=0;t<=r;t++)n.push(e[t]);for(;n&&!n.isEmpty();){let e=yield n.pull();e&&n.push(e)}}(function(e,t=10){let r={},n=[...e],a=0,s=0,l=0;n.forEach((e=>{"#"===e&&l++})),l<t&&console.error(`Error: Not enough level markers (#) for data with depth level ${t}. Found ${l} level markers in actions: ${e.join(", ")}`);do{r[s]=[],s++}while(s<=t);return n.every((e=>"#"===e?(a++,!(a>t)):e.startsWith("^")&&"^^"!==e?(r[a].push({type:"save",name:e.replace("^",""),level:a}),!0):"^^"===e?(r[a].push({type:"overwrite",name:"none",level:a}),!0):e.startsWith("+")?(r[a].push({type:"extendedRender",name:e.replace("+",""),level:a}),!0):e.startsWith("[]")?(r[a].push({type:"mix",name:e.replace("[]",""),level:a}),!0):e.startsWith(">")?(r[a].push({type:"data",name:e.replace(">",""),level:a}),!0):(""===e||r[a].push({type:"render",name:e,level:a}),!0))),r}(g,r),r);if(b=function({nestedData:e,actSetup:t,helpers:r,original:n,dependencies:a,memory:s,dElement:l,createUseHelper:f}){let h=l;for(let l of t){let{type:t,name:m,level:y}=l;(e[y]||[]).forEach(((m,b)=>{const g={helpers:r,original:n,dependencies:a,memory:s,useHelper:f,nestedData:e,level:y,iData:b,extendArguments:{dependencies:a,memory:s}};switch(t){case"render":o(l,m,g);break;case"data":i(l,m,g);break;case"mix":c(l,m,g);break;case"save":d(l,m,g);break;case"overwrite":h=p(l,m);break;case"route":break;case"extendedRender":u(l,0,g)}}))}return h}({nestedData:a,actSetup:k,helpers:h,original:f,dependencies:m,memory:y,dElement:b,createUseHelper:v}),a instanceof Array&&1===a.length&&a[0]instanceof Array&&(a=a[0]),null==a[0])return;let x=s(a[0]),j=a[0];switch(x){case"primitive":if(null==j)return;l[n]=j;break;case"object":if(null==j.text)return;l[n]=j.text;break;case"array":const e=s(j[0]);l[n]="object"===e?j.map((e=>e.text)).join(""):j.join("")}}})),g?k.push(a.map((e=>l[e.index])).join("<~>")):k.push(l.join(""))})),k}function h(t,n=!1,l={}){let{hasError:o,placeholders:i,chop:c,helpers:u,handshake:d,snippets:p}=function(e){const{template:t,helpers:n={},handshake:s}=e,{TG_PRX:l,TG_SFX:o}=a,i=[],c={},u="string"==typeof t?t.replace(/<!--[\s\S]*?-->/g,"").replace(/\s{2,}/g," "):t;let d=null;const p=r(a)(u);return"string"==typeof p?d=p:p.forEach(((e,t)=>{const r=RegExp(l+"\\s*(.*?)\\s*(?::\\s*(.*?)\\s*)?(?::\\s*(.*?)\\s*)?"+o,"g");if(e.includes(l)){const a=r.exec(e);if(!a)return;let s={index:t,data:(n=a[1],n||null),action:a[2]?a[2].split(",").map((e=>e.trim())):null,name:a[3]?a[3].trim():null};i.push(s),c[i.length-1]=s,s.name&&(c[s.name]=s)}var n})),{hasError:d,placeholders:i,chop:p,helpers:n,handshake:s,snippets:c}}(t);if(o){function m(){return o}return n?[!1,m]:m}{const y=structuredClone(i);function b(t="render",r={},n={},...a){const o=structuredClone(c);let m=!1;if("string"!=typeof t)return`Error: Wrong command "${t}". Available commands: render, debug, snippets, set, curry.`;if(!["render","debug","snippets","set","curry"].includes(t)&&!t.startsWith("snippets"))return`Error: Wrong command "${t}". Available commands: render, debug, snippets, set, curry.`;if(t.startsWith("snippets")){m=!0;const e=function(e,t){if(e.includes(":"))return e.split(":").slice(1)[0].trim().split(",").map((e=>e.trim())).map((e=>t[e]));return null}(t,p);e&&(i=e)}else if("snippets"===t)m=!0;else{if("set"===t)return function(e,{helpers:t,handshake:r,placeholders:n,chop:a,build:s,buildDependencies:l}){if("object"!=typeof e||!e)return"Error: 'set' command requires an object with placeholders, helpers, handshake.";const o={...t,...e.helpers||{}},i=r?{...r,...e.handshake||{}}:e.handshake||{},c=[...a];e.placeholders&&Object.entries(e.placeholders).forEach((([e,t])=>{if(isNaN(e)){let r=n.find((t=>t.name===e));c[r.index]=t}else{let r=n[e].index;c[r]=t}}));const u=s({template:c.join(""),helpers:o,handshake:i},!1,l);return"function"==typeof u?u:()=>u}(r,{helpers:u,handshake:d,placeholders:i,chop:c,build:h,buildDependencies:l});if("curry"===t){return h({template:b("render",r,n,...a),helpers:u,handshake:d},!1,l)}i=structuredClone(y)}if("string"==typeof r){const e=function(e,{handshake:t,helpers:r,placeholders:n,cuts:a}){switch(e){case"raw":return a.join("");case"demo":return t||"Error: No handshake data.";case"handshake":return t?structuredClone(t):"Error: No handshake data.";case"helpers":return Object.keys(r).join(", ");case"placeholders":return n.map((e=>a[e.index])).join(", ");case"count":return n.length;default:return`Error: Wrong instruction "${e}". Available instructions: raw, demo, handshake, helpers, placeholders, count.`}}(r,{handshake:d,helpers:u,placeholders:i,cuts:o});if("demo"!==r||"object"!=typeof e)return e;r=e}let g=s(r),k={...l,...n};r=e({data:r});let v=e({data:r});if("null"===g)return o.join("");if("array"!==g&&(r=[r]),"null"===g)return o.join("");const E=f({d:r,chop:c,placeholders:i,original:v,helpers:u,dependencies:k,memory:{},args:a,onlySnippets:m});return"array"===g?E:a?a.reduce(((e,t)=>"function"!=typeof t?e:t(e,k)),E.join("")):E.join("")}return n?[!0,b]:b}}const m={default:{}};const y={build:h,get:function(e){if(!(e instanceof Array))return function(){return'Error: Argument "location" is a string. Should be an array. E.g. ["templateName", "storageName"].'};const[t,r="default"]=e;return m[r]?m[r][t]?m[r][t]:function(){return`Error: Template "${t}" does not exist in storage "${r}".`}:function(){return`Error: Storage "${r}" does not exist.`}},add:function(e,t,...r){const[n,a="default"]=e;if(null==t)return void console.warn(`Warning: Template ${a}/${n} is not added to storage. The template is null.`);let s=t,l=!0;if(m[a]||(m[a]={}),"function"!=typeof t){let e=h(t,!0,...r);l=e[0],s=e[1]}l?m[a][n]=s:console.error(`Error: Template "${n}" looks broken and is not added to storage.`)},list:function(e=["default"]){return e.map((e=>m[e]?Object.keys(m[e]):[])).flat()},clear:function(){Object.keys(m).forEach((e=>{"default"!=e?delete m[e]:m.default={}}))},remove:function(e){const[t,r="default"]=e;return m[r]?m[r][t]?void delete m[r][t]:`Error: Template "${t}" does not exist in storage "${r}".`:`Error: Storage "${r}" does not exist.`}};export{y as default};