@ibgib/core-gib 0.0.4

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 (330) hide show
  1. package/.vscode/core-gib-snippets.code-snippets +189 -0
  2. package/.vscode/launch.json +24 -0
  3. package/.vscode/settings.json +56 -0
  4. package/.vscode/tasks.json +37 -0
  5. package/CHANGELOG.md +11 -0
  6. package/README.md +215 -0
  7. package/dist/common/aws-constants.d.mts +7 -0
  8. package/dist/common/aws-constants.d.mts.map +1 -0
  9. package/dist/common/aws-constants.mjs +7 -0
  10. package/dist/common/aws-constants.mjs.map +1 -0
  11. package/dist/common/bin/bin-types.d.mts +17 -0
  12. package/dist/common/bin/bin-types.d.mts.map +1 -0
  13. package/dist/common/bin/bin-types.mjs +3 -0
  14. package/dist/common/bin/bin-types.mjs.map +1 -0
  15. package/dist/common/cache/cache-types.d.mts +57 -0
  16. package/dist/common/cache/cache-types.d.mts.map +1 -0
  17. package/dist/common/cache/cache-types.mjs +2 -0
  18. package/dist/common/cache/cache-types.mjs.map +1 -0
  19. package/dist/common/comment/comment-constants.d.mts +11 -0
  20. package/dist/common/comment/comment-constants.d.mts.map +1 -0
  21. package/dist/common/comment/comment-constants.mjs +11 -0
  22. package/dist/common/comment/comment-constants.mjs.map +1 -0
  23. package/dist/common/comment/comment-helper.d.mts +59 -0
  24. package/dist/common/comment/comment-helper.d.mts.map +1 -0
  25. package/dist/common/comment/comment-helper.mjs +173 -0
  26. package/dist/common/comment/comment-helper.mjs.map +1 -0
  27. package/dist/common/comment/comment-types.d.mts +16 -0
  28. package/dist/common/comment/comment-types.d.mts.map +1 -0
  29. package/dist/common/comment/comment-types.mjs +2 -0
  30. package/dist/common/comment/comment-types.mjs.map +1 -0
  31. package/dist/common/display/display-helper.d.mts +19 -0
  32. package/dist/common/display/display-helper.d.mts.map +1 -0
  33. package/dist/common/display/display-helper.mjs +68 -0
  34. package/dist/common/display/display-helper.mjs.map +1 -0
  35. package/dist/common/display/display-types.d.mts +97 -0
  36. package/dist/common/display/display-types.d.mts.map +1 -0
  37. package/dist/common/display/display-types.mjs +37 -0
  38. package/dist/common/display/display-types.mjs.map +1 -0
  39. package/dist/common/encrypt/encrypt-constants.d.mts +27 -0
  40. package/dist/common/encrypt/encrypt-constants.d.mts.map +1 -0
  41. package/dist/common/encrypt/encrypt-constants.mjs +27 -0
  42. package/dist/common/encrypt/encrypt-constants.mjs.map +1 -0
  43. package/dist/common/encrypt/encrypt-types.d.mts +116 -0
  44. package/dist/common/encrypt/encrypt-types.d.mts.map +1 -0
  45. package/dist/common/encrypt/encrypt-types.mjs +9 -0
  46. package/dist/common/encrypt/encrypt-types.mjs.map +1 -0
  47. package/dist/common/error/error-constants.d.mts +9 -0
  48. package/dist/common/error/error-constants.d.mts.map +1 -0
  49. package/dist/common/error/error-constants.mjs +9 -0
  50. package/dist/common/error/error-constants.mjs.map +1 -0
  51. package/dist/common/error/error-helper.d.mts +43 -0
  52. package/dist/common/error/error-helper.d.mts.map +1 -0
  53. package/dist/common/error/error-helper.mjs +167 -0
  54. package/dist/common/error/error-helper.mjs.map +1 -0
  55. package/dist/common/error/error-types.d.mts +58 -0
  56. package/dist/common/error/error-types.d.mts.map +1 -0
  57. package/dist/common/error/error-types.mjs +2 -0
  58. package/dist/common/error/error-types.mjs.map +1 -0
  59. package/dist/common/form/form-helper.d.mts +97 -0
  60. package/dist/common/form/form-helper.d.mts.map +1 -0
  61. package/dist/common/form/form-helper.mjs +185 -0
  62. package/dist/common/form/form-helper.mjs.map +1 -0
  63. package/dist/common/form/form-items.d.mts +229 -0
  64. package/dist/common/form/form-items.d.mts.map +1 -0
  65. package/dist/common/form/form-items.mjs +63 -0
  66. package/dist/common/form/form-items.mjs.map +1 -0
  67. package/dist/common/import-export/import-export-types.d.mts +18 -0
  68. package/dist/common/import-export/import-export-types.d.mts.map +1 -0
  69. package/dist/common/import-export/import-export-types.mjs +2 -0
  70. package/dist/common/import-export/import-export-types.mjs.map +1 -0
  71. package/dist/common/legacy/legacy-types.d.mts +2 -0
  72. package/dist/common/legacy/legacy-types.d.mts.map +1 -0
  73. package/dist/common/legacy/legacy-types.mjs +2 -0
  74. package/dist/common/legacy/legacy-types.mjs.map +1 -0
  75. package/dist/common/link/link-constants.d.mts +2 -0
  76. package/dist/common/link/link-constants.d.mts.map +1 -0
  77. package/dist/common/link/link-constants.mjs +2 -0
  78. package/dist/common/link/link-constants.mjs.map +1 -0
  79. package/dist/common/link/link-helper.d.mts +37 -0
  80. package/dist/common/link/link-helper.d.mts.map +1 -0
  81. package/dist/common/link/link-helper.mjs +143 -0
  82. package/dist/common/link/link-helper.mjs.map +1 -0
  83. package/dist/common/link/link-types.d.mts +14 -0
  84. package/dist/common/link/link-types.d.mts.map +1 -0
  85. package/dist/common/link/link-types.mjs +2 -0
  86. package/dist/common/link/link-types.mjs.map +1 -0
  87. package/dist/common/other/graph-helper.d.mts +166 -0
  88. package/dist/common/other/graph-helper.d.mts.map +1 -0
  89. package/dist/common/other/graph-helper.mjs +710 -0
  90. package/dist/common/other/graph-helper.mjs.map +1 -0
  91. package/dist/common/other/ibgib-helper.d.mts +245 -0
  92. package/dist/common/other/ibgib-helper.d.mts.map +1 -0
  93. package/dist/common/other/ibgib-helper.mjs +641 -0
  94. package/dist/common/other/ibgib-helper.mjs.map +1 -0
  95. package/dist/common/other/other-constants.d.mts +53 -0
  96. package/dist/common/other/other-constants.d.mts.map +1 -0
  97. package/dist/common/other/other-constants.mjs +67 -0
  98. package/dist/common/other/other-constants.mjs.map +1 -0
  99. package/dist/common/other/other-types.d.mts +166 -0
  100. package/dist/common/other/other-types.d.mts.map +1 -0
  101. package/dist/common/other/other-types.mjs +30 -0
  102. package/dist/common/other/other-types.mjs.map +1 -0
  103. package/dist/common/other/svg-constants.d.mts +2 -0
  104. package/dist/common/other/svg-constants.d.mts.map +1 -0
  105. package/dist/common/other/svg-constants.mjs +2 -0
  106. package/dist/common/other/svg-constants.mjs.map +1 -0
  107. package/dist/common/other/svg-helper.d.mts +54 -0
  108. package/dist/common/other/svg-helper.d.mts.map +1 -0
  109. package/dist/common/other/svg-helper.mjs +170 -0
  110. package/dist/common/other/svg-helper.mjs.map +1 -0
  111. package/dist/common/pic/pic-constants.d.mts +13 -0
  112. package/dist/common/pic/pic-constants.d.mts.map +1 -0
  113. package/dist/common/pic/pic-constants.mjs +13 -0
  114. package/dist/common/pic/pic-constants.mjs.map +1 -0
  115. package/dist/common/pic/pic-helper.d.mts +70 -0
  116. package/dist/common/pic/pic-helper.d.mts.map +1 -0
  117. package/dist/common/pic/pic-helper.mjs +235 -0
  118. package/dist/common/pic/pic-helper.mjs.map +1 -0
  119. package/dist/common/pic/pic-types.d.mts +23 -0
  120. package/dist/common/pic/pic-types.d.mts.map +1 -0
  121. package/dist/common/pic/pic-types.mjs +2 -0
  122. package/dist/common/pic/pic-types.mjs.map +1 -0
  123. package/dist/common/root/root-constants.d.mts +40 -0
  124. package/dist/common/root/root-constants.d.mts.map +1 -0
  125. package/dist/common/root/root-constants.mjs +40 -0
  126. package/dist/common/root/root-constants.mjs.map +1 -0
  127. package/dist/common/root/root-types.d.mts +9 -0
  128. package/dist/common/root/root-types.d.mts.map +1 -0
  129. package/dist/common/root/root-types.mjs +2 -0
  130. package/dist/common/root/root-types.mjs.map +1 -0
  131. package/dist/common/tag/tag-constants.d.mts +21 -0
  132. package/dist/common/tag/tag-constants.d.mts.map +1 -0
  133. package/dist/common/tag/tag-constants.mjs +28 -0
  134. package/dist/common/tag/tag-constants.mjs.map +1 -0
  135. package/dist/common/tag/tag-types.d.mts +14 -0
  136. package/dist/common/tag/tag-types.d.mts.map +1 -0
  137. package/dist/common/tag/tag-types.mjs +2 -0
  138. package/dist/common/tag/tag-types.mjs.map +1 -0
  139. package/dist/core-constants.d.mts +89 -0
  140. package/dist/core-constants.d.mts.map +1 -0
  141. package/dist/core-constants.mjs +484 -0
  142. package/dist/core-constants.mjs.map +1 -0
  143. package/dist/core-helper.d.mts +6 -0
  144. package/dist/core-helper.d.mts.map +1 -0
  145. package/dist/core-helper.mjs +28 -0
  146. package/dist/core-helper.mjs.map +1 -0
  147. package/dist/core-types.d.mts +520 -0
  148. package/dist/core-types.d.mts.map +1 -0
  149. package/dist/core-types.mjs +2 -0
  150. package/dist/core-types.mjs.map +1 -0
  151. package/dist/index.d.mts +2 -0
  152. package/dist/index.d.mts.map +1 -0
  153. package/dist/index.mjs +3 -0
  154. package/dist/index.mjs.map +1 -0
  155. package/dist/witness/app/app-base-v1.d.mts +130 -0
  156. package/dist/witness/app/app-base-v1.d.mts.map +1 -0
  157. package/dist/witness/app/app-base-v1.mjs +462 -0
  158. package/dist/witness/app/app-base-v1.mjs.map +1 -0
  159. package/dist/witness/app/app-constants.d.mts +10 -0
  160. package/dist/witness/app/app-constants.d.mts.map +1 -0
  161. package/dist/witness/app/app-constants.mjs +13 -0
  162. package/dist/witness/app/app-constants.mjs.map +1 -0
  163. package/dist/witness/app/app-helper.d.mts +85 -0
  164. package/dist/witness/app/app-helper.d.mts.map +1 -0
  165. package/dist/witness/app/app-helper.mjs +258 -0
  166. package/dist/witness/app/app-helper.mjs.map +1 -0
  167. package/dist/witness/app/app-types.d.mts +211 -0
  168. package/dist/witness/app/app-types.d.mts.map +1 -0
  169. package/dist/witness/app/app-types.mjs +49 -0
  170. package/dist/witness/app/app-types.mjs.map +1 -0
  171. package/dist/witness/app/chat-app/chat-app-types.d.mts +18 -0
  172. package/dist/witness/app/chat-app/chat-app-types.d.mts.map +1 -0
  173. package/dist/witness/app/chat-app/chat-app-types.mjs +25 -0
  174. package/dist/witness/app/chat-app/chat-app-types.mjs.map +1 -0
  175. package/dist/witness/app/flash-app/flash-app-types.d.mts +16 -0
  176. package/dist/witness/app/flash-app/flash-app-types.d.mts.map +1 -0
  177. package/dist/witness/app/flash-app/flash-app-types.mjs +23 -0
  178. package/dist/witness/app/flash-app/flash-app-types.mjs.map +1 -0
  179. package/dist/witness/app/raw-app/raw-app-types.d.mts +18 -0
  180. package/dist/witness/app/raw-app/raw-app-types.d.mts.map +1 -0
  181. package/dist/witness/app/raw-app/raw-app-types.mjs +25 -0
  182. package/dist/witness/app/raw-app/raw-app-types.mjs.map +1 -0
  183. package/dist/witness/app/todo-app/todo-app-types.d.ts +33 -0
  184. package/dist/witness/app/todo-app/todo-app-types.d.ts.map +1 -0
  185. package/dist/witness/app/todo-app/todo-app-types.js +31 -0
  186. package/dist/witness/app/todo-app/todo-app-types.js.map +1 -0
  187. package/dist/witness/robbot/robbot-base-v1.d.ts +432 -0
  188. package/dist/witness/robbot/robbot-base-v1.d.ts.map +1 -0
  189. package/dist/witness/robbot/robbot-base-v1.js +1407 -0
  190. package/dist/witness/robbot/robbot-base-v1.js.map +1 -0
  191. package/dist/witness/robbot/robbot-constants.d.mts +24 -0
  192. package/dist/witness/robbot/robbot-constants.d.mts.map +1 -0
  193. package/dist/witness/robbot/robbot-constants.mjs +24 -0
  194. package/dist/witness/robbot/robbot-constants.mjs.map +1 -0
  195. package/dist/witness/robbot/robbot-helper.d.mts +152 -0
  196. package/dist/witness/robbot/robbot-helper.d.mts.map +1 -0
  197. package/dist/witness/robbot/robbot-helper.mjs +609 -0
  198. package/dist/witness/robbot/robbot-helper.mjs.map +1 -0
  199. package/dist/witness/robbot/robbot-types.d.mts +539 -0
  200. package/dist/witness/robbot/robbot-types.d.mts.map +1 -0
  201. package/dist/witness/robbot/robbot-types.mjs +294 -0
  202. package/dist/witness/robbot/robbot-types.mjs.map +1 -0
  203. package/dist/witness/space/bootstrap/bootstrap-constants.d.mts +14 -0
  204. package/dist/witness/space/bootstrap/bootstrap-constants.d.mts.map +1 -0
  205. package/dist/witness/space/bootstrap/bootstrap-constants.mjs +15 -0
  206. package/dist/witness/space/bootstrap/bootstrap-constants.mjs.map +1 -0
  207. package/dist/witness/space/inner-space-v1.d.ts +63 -0
  208. package/dist/witness/space/inner-space-v1.d.ts.map +1 -0
  209. package/dist/witness/space/inner-space-v1.js +356 -0
  210. package/dist/witness/space/inner-space-v1.js.map +1 -0
  211. package/dist/witness/space/outer-space/outer-space-constants.d.mts +2 -0
  212. package/dist/witness/space/outer-space/outer-space-constants.d.mts.map +1 -0
  213. package/dist/witness/space/outer-space/outer-space-constants.mjs +2 -0
  214. package/dist/witness/space/outer-space/outer-space-constants.mjs.map +1 -0
  215. package/dist/witness/space/outer-space/outer-space-helper.d.mts +28 -0
  216. package/dist/witness/space/outer-space/outer-space-helper.d.mts.map +1 -0
  217. package/dist/witness/space/outer-space/outer-space-helper.mjs +87 -0
  218. package/dist/witness/space/outer-space/outer-space-helper.mjs.map +1 -0
  219. package/dist/witness/space/outer-space/outer-space-types.d.mts +548 -0
  220. package/dist/witness/space/outer-space/outer-space-types.d.mts.map +1 -0
  221. package/dist/witness/space/outer-space/outer-space-types.mjs +118 -0
  222. package/dist/witness/space/outer-space/outer-space-types.mjs.map +1 -0
  223. package/dist/witness/space/space-base-v1.d.mts +147 -0
  224. package/dist/witness/space/space-base-v1.d.mts.map +1 -0
  225. package/dist/witness/space/space-base-v1.mjs +350 -0
  226. package/dist/witness/space/space-base-v1.mjs.map +1 -0
  227. package/dist/witness/space/space-constants.d.mts +181 -0
  228. package/dist/witness/space/space-constants.d.mts.map +1 -0
  229. package/dist/witness/space/space-constants.mjs +192 -0
  230. package/dist/witness/space/space-constants.mjs.map +1 -0
  231. package/dist/witness/space/space-helper.d.mts +666 -0
  232. package/dist/witness/space/space-helper.d.mts.map +1 -0
  233. package/dist/witness/space/space-helper.mjs +2830 -0
  234. package/dist/witness/space/space-helper.mjs.map +1 -0
  235. package/dist/witness/space/space-types.d.mts +422 -0
  236. package/dist/witness/space/space-types.d.mts.map +1 -0
  237. package/dist/witness/space/space-types.mjs +52 -0
  238. package/dist/witness/space/space-types.mjs.map +1 -0
  239. package/dist/witness/witness-base-v1.d.ts +144 -0
  240. package/dist/witness/witness-base-v1.d.ts.map +1 -0
  241. package/dist/witness/witness-base-v1.js +300 -0
  242. package/dist/witness/witness-base-v1.js.map +1 -0
  243. package/dist/witness/witness-constants.d.mts +3 -0
  244. package/dist/witness/witness-constants.d.mts.map +1 -0
  245. package/dist/witness/witness-constants.mjs +3 -0
  246. package/dist/witness/witness-constants.mjs.map +1 -0
  247. package/dist/witness/witness-form-builder.d.mts +45 -0
  248. package/dist/witness/witness-form-builder.d.mts.map +1 -0
  249. package/dist/witness/witness-form-builder.mjs +95 -0
  250. package/dist/witness/witness-form-builder.mjs.map +1 -0
  251. package/dist/witness/witness-helper.d.mts +89 -0
  252. package/dist/witness/witness-helper.d.mts.map +1 -0
  253. package/dist/witness/witness-helper.mjs +229 -0
  254. package/dist/witness/witness-helper.mjs.map +1 -0
  255. package/dist/witness/witness-types.d.mts +211 -0
  256. package/dist/witness/witness-types.d.mts.map +1 -0
  257. package/dist/witness/witness-types.mjs +2 -0
  258. package/dist/witness/witness-types.mjs.map +1 -0
  259. package/jasmine-browser.json +18 -0
  260. package/jasmine.json +6 -0
  261. package/package.json +67 -0
  262. package/src/assumptions.spec.mts +45 -0
  263. package/src/common/aws-constants.mts +5 -0
  264. package/src/common/bin/bin-types.mts +17 -0
  265. package/src/common/cache/cache-types.mts +53 -0
  266. package/src/common/comment/comment-constants.mts +10 -0
  267. package/src/common/comment/comment-helper.mts +211 -0
  268. package/src/common/comment/comment-types.mts +19 -0
  269. package/src/common/display/display-helper.mts +88 -0
  270. package/src/common/display/display-types.mts +108 -0
  271. package/src/common/encrypt/encrypt-constants.mts +28 -0
  272. package/src/common/encrypt/encrypt-types.mts +130 -0
  273. package/src/common/error/error-constants.mts +8 -0
  274. package/src/common/error/error-helper.mts +155 -0
  275. package/src/common/error/error-types.mts +62 -0
  276. package/src/common/form/form-helper.mts +253 -0
  277. package/src/common/form/form-items.mts +236 -0
  278. package/src/common/import-export/import-export-types.mts +18 -0
  279. package/src/common/legacy/about-legacy.md +0 -0
  280. package/src/common/legacy/legacy-types.mts +0 -0
  281. package/src/common/link/link-constants.mts +1 -0
  282. package/src/common/link/link-helper.mts +155 -0
  283. package/src/common/link/link-types.mts +16 -0
  284. package/src/common/other/graph-helper.mts +853 -0
  285. package/src/common/other/ibgib-helper.mts +671 -0
  286. package/src/common/other/other-constants.mts +76 -0
  287. package/src/common/other/other-types.mts +186 -0
  288. package/src/common/other/svg-constants.mts +1 -0
  289. package/src/common/other/svg-helper.mts +238 -0
  290. package/src/common/pic/pic-constants.mts +13 -0
  291. package/src/common/pic/pic-helper.mts +295 -0
  292. package/src/common/pic/pic-types.mts +29 -0
  293. package/src/common/root/root-constants.mts +41 -0
  294. package/src/common/root/root-types.mts +8 -0
  295. package/src/common/tag/tag-constants.mts +34 -0
  296. package/src/common/tag/tag-types.mts +19 -0
  297. package/src/core-constants.mts +506 -0
  298. package/src/core-helper.mts +33 -0
  299. package/src/core-types.mts +519 -0
  300. package/src/helper.spec.mts +64 -0
  301. package/src/index.mts +1 -0
  302. package/src/witness/app/app-base-v1.mts +584 -0
  303. package/src/witness/app/app-constants.mts +16 -0
  304. package/src/witness/app/app-helper.mts +322 -0
  305. package/src/witness/app/app-types.mts +252 -0
  306. package/src/witness/app/chat-app/chat-app-types.mts +40 -0
  307. package/src/witness/app/flash-app/flash-app-types.mts +38 -0
  308. package/src/witness/app/raw-app/raw-app-types.mts +40 -0
  309. package/src/witness/app/todo-app/todo-app-types.ts +59 -0
  310. package/src/witness/robbot/robbot-base-v1.ts +1531 -0
  311. package/src/witness/robbot/robbot-constants.mts +25 -0
  312. package/src/witness/robbot/robbot-helper.mts +676 -0
  313. package/src/witness/robbot/robbot-helper.spec.mts +135 -0
  314. package/src/witness/robbot/robbot-types.mts +797 -0
  315. package/src/witness/space/bootstrap/bootstrap-constants.mts +15 -0
  316. package/src/witness/space/inner-space-v1.ts +372 -0
  317. package/src/witness/space/outer-space/outer-space-constants.mts +1 -0
  318. package/src/witness/space/outer-space/outer-space-helper.mts +91 -0
  319. package/src/witness/space/outer-space/outer-space-types.mts +627 -0
  320. package/src/witness/space/space-base-v1.mts +414 -0
  321. package/src/witness/space/space-constants.mts +208 -0
  322. package/src/witness/space/space-helper.mts +3242 -0
  323. package/src/witness/space/space-types.mts +476 -0
  324. package/src/witness/witness-base-v1.ts +325 -0
  325. package/src/witness/witness-constants.mts +2 -0
  326. package/src/witness/witness-form-builder.mts +128 -0
  327. package/src/witness/witness-helper.mts +256 -0
  328. package/src/witness/witness-types.mts +249 -0
  329. package/tsconfig.json +15 -0
  330. package/tsconfig.test.json +10 -0
@@ -0,0 +1,70 @@
1
+ import { TransformResult } from '@ibgib/ts-gib';
2
+ import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/index.mjs';
3
+ import { PicIbGib_V1 } from './pic-types.mjs';
4
+ import { IbGibSpaceAny } from '../../witness/space/space-base-v1.mjs';
5
+ import { BinIbGib_V1 } from '../bin/bin-types.mjs';
6
+ export interface PicDependencyGraph {
7
+ picIbGib: PicIbGib_V1;
8
+ binIbGib: BinIbGib_V1;
9
+ dependencies: IbGib_V1[];
10
+ }
11
+ export declare function createBinIbGib({ base64Data, binHash, ext, saveInSpace, space, }: {
12
+ /**
13
+ * base64-encoded binary data
14
+ */
15
+ base64Data: string;
16
+ /**
17
+ * Hash of data
18
+ */
19
+ binHash: string;
20
+ /**
21
+ * extension of the binary
22
+ *
23
+ * this will be included in the ib
24
+ */
25
+ ext?: string;
26
+ /**
27
+ * If true, will save the ibgibs created in the given `space`.
28
+
29
+ * @see {@link space}
30
+ */
31
+ saveInSpace?: boolean;
32
+ /**
33
+ * space to save the ibgib(s) if `saveInSpace` is truthy.
34
+ *
35
+ * @see {@link saveInSpace}
36
+ */
37
+ space?: IbGibSpaceAny;
38
+ }): Promise<TransformResult<BinIbGib_V1>>;
39
+ /**
40
+ * shared pic code between camera and loading image via picking a file.
41
+ */
42
+ export declare function createPicAndBinIbGibs({ imageBase64, binHash, filename, ext, saveInSpace, space, }: {
43
+ imageBase64: string;
44
+ binHash: string;
45
+ filename?: string;
46
+ ext?: string;
47
+ /**
48
+ * If true, will save the ibgibs created in the given `space`.
49
+ */
50
+ saveInSpace?: boolean;
51
+ /**
52
+ * If `saveInSpace`, all ibgibs created in this function will be stored in
53
+ * this space.
54
+ */
55
+ space?: IbGibSpaceAny;
56
+ }): Promise<[TransformResult<PicIbGib_V1>, TransformResult<BinIbGib_V1>]>;
57
+ export declare function createPicAndBinIbGibsFromInputFilePickedEvent({ event, saveInSpace, space, }: {
58
+ event: any;
59
+ /**
60
+ * If true, will save the ibgibs created in the given `space`.
61
+
62
+ * @see {@link space}
63
+ */
64
+ saveInSpace?: boolean;
65
+ space: IbGibSpaceAny;
66
+ }): Promise<[TransformResult<PicIbGib_V1>, TransformResult<BinIbGib_V1>][]>;
67
+ export declare function isPic({ ibGib, }: {
68
+ ibGib: IbGib_V1;
69
+ }): boolean;
70
+ //# sourceMappingURL=pic-helper.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pic-helper.d.mts","sourceRoot":"","sources":["../../../src/common/pic/pic-helper.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAgB,MAAM,eAAe,CAAC;AAC9D,OAAO,EAA0D,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAMnH,OAAO,EAAc,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAQnD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,QAAQ,EAAE,CAAC;CAC1B;AAED,wBAAsB,cAAc,CAAC,EACnC,UAAU,EACV,OAAO,EACP,GAAG,EACH,WAAW,EACX,KAAK,GACN,EAAE;IACD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,GAAG,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAmCxC;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,WAAW,EACX,OAAO,EACP,QAAQ,EACR,GAAG,EACH,WAAW,EACX,KAAK,GACN,EAAE;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,GAAG,OAAO,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAsDxE;AAED,wBAAsB,6CAA6C,CAAC,EAClE,KAAK,EACL,WAAW,EACX,KAAK,GACN,EAAE;IACD,KAAK,EAAE,GAAG,CAAC;IACX;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;CACtB,GAAG,OAAO,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CA+D1E;AAED,wBAAgB,KAAK,CAAC,EACpB,KAAK,GACN,EAAE;IACD,KAAK,EAAE,QAAQ,CAAC;CACjB,GAAG,OAAO,CAuCV"}
@@ -0,0 +1,235 @@
1
+ import { getIbGibAddr } from '@ibgib/ts-gib';
2
+ import { Factory_V1 as factory, IBGIB_DELIMITER } from '@ibgib/ts-gib/dist/V1/index.mjs';
3
+ import { getGib } from '@ibgib/ts-gib/dist/V1/transforms/transform-helper.mjs';
4
+ // import { hash, getIbGibAddr, getTimestamp, pretty } from '@ibgib/ts-gib/dist/helper.mjs';
5
+ import { GLOBAL_LOG_A_LOT } from '../../core-constants.mjs';
6
+ import { persistTransformResult, putInSpace } from '../../witness/space/space-helper.mjs';
7
+ import { getBinIb } from '../other/ibgib-helper.mjs';
8
+ import { delay, getFileReaderHack, hash } from '@ibgib/helper-gib';
9
+ import { BINARY_REL8N_NAME } from './pic-constants.mjs';
10
+ const logalot = GLOBAL_LOG_A_LOT || false;
11
+ export async function createBinIbGib({ base64Data, binHash, ext, saveInSpace, space, }) {
12
+ const lc = `[${createBinIbGib.name}]`;
13
+ try {
14
+ if (logalot) {
15
+ console.log(`${lc} starting...`);
16
+ }
17
+ if (!binHash) {
18
+ throw new Error(`binHash required (E: 09da0190a9353089a9ed8a641fe0bc22)`);
19
+ }
20
+ const binIb = getBinIb({ binHash, binExt: ext });
21
+ const binIbGib = { ib: binIb, data: base64Data };
22
+ const binGib = await getGib({ ibGib: binIbGib, hasTjp: false });
23
+ binIbGib.gib = binGib;
24
+ if (saveInSpace) {
25
+ // prepare
26
+ if (!space) {
27
+ throw new Error(`space required if saveInSpace is truthy. (E: b8a5ebbac47d757afce940d2f0af3122)`);
28
+ }
29
+ if (logalot) {
30
+ console.log(`${lc} saving binary ibgib in space... (I: 8235addb1b3e4e638ef568da5f219d29)`);
31
+ }
32
+ // execute put
33
+ const resSaveBin = await putInSpace({ ibGib: binIbGib, space });
34
+ // if errored, throw
35
+ if (!resSaveBin.success) {
36
+ throw new Error(resSaveBin.errorMsg || 'error saving pic (E: cf892bc62ab44ec58534d9881c9c4332)');
37
+ }
38
+ // cleanup
39
+ if (logalot) {
40
+ console.log(`${lc} saving binary ibgib in space complete. (I: 4aa8d03088ad477dbee089394b3b9902)`);
41
+ }
42
+ }
43
+ return { newIbGib: binIbGib };
44
+ }
45
+ catch (error) {
46
+ console.error(`${lc} ${error.message}`);
47
+ throw error;
48
+ }
49
+ finally {
50
+ if (logalot) {
51
+ console.log(`${lc} complete.`);
52
+ }
53
+ }
54
+ }
55
+ /**
56
+ * shared pic code between camera and loading image via picking a file.
57
+ */
58
+ export async function createPicAndBinIbGibs({ imageBase64, binHash, filename, ext, saveInSpace, space, }) {
59
+ const lc = `[${createPicAndBinIbGibs.name}]`;
60
+ if (logalot) {
61
+ console.log(`${lc} starting...`);
62
+ }
63
+ try {
64
+ const resCreateBin = await createBinIbGib({ base64Data: imageBase64, binHash, ext, saveInSpace, space });
65
+ const { newIbGib: binIbGib } = resCreateBin;
66
+ const binAddr = getIbGibAddr({ ibGib: binIbGib });
67
+ // todo: do thumbnail also
68
+ // NOTE: This is not the same filename that is saved in the bin folder!
69
+ // This is for when the picture is downloaded outside of the ibGib system
70
+ // or for display purposes.
71
+ const timestamp = (new Date).toUTCString();
72
+ filename = filename || timestamp
73
+ .replace(':', '-')
74
+ .replace(':', '-')
75
+ .replace(',', ''); // temporary eek.
76
+ if (logalot) {
77
+ console.log(`${lc} binHash: ${binHash}`);
78
+ }
79
+ if (logalot) {
80
+ console.log(`${lc} ext: ${ext}`);
81
+ }
82
+ const data = ext ?
83
+ { binHash, ext, filename, timestamp } :
84
+ { binHash, filename, timestamp };
85
+ const rel8ns = {
86
+ // 'pic on': [addr], // makes it more difficult to share/sync ibgibs
87
+ [BINARY_REL8N_NAME]: [binAddr],
88
+ };
89
+ // create an ibgib with the filename and ext
90
+ const resPicIbGib = await factory.firstGen({
91
+ parentIbGib: factory.primitive({ ib: 'pic' }),
92
+ ib: `pic ${binHash}`,
93
+ data,
94
+ rel8ns,
95
+ dna: true,
96
+ tjp: { uuid: true, timestamp: true },
97
+ nCounter: true,
98
+ });
99
+ if (saveInSpace) {
100
+ if (!space) {
101
+ throw new Error(`space required if saveInSpace is truthy (E: 966901041c9e166c0f5ed23114003722)`);
102
+ }
103
+ await persistTransformResult({ resTransform: resPicIbGib, space });
104
+ }
105
+ return [resPicIbGib, resCreateBin];
106
+ }
107
+ catch (error) {
108
+ console.error(`${lc} ${error.message}`);
109
+ throw error;
110
+ }
111
+ }
112
+ export async function createPicAndBinIbGibsFromInputFilePickedEvent({ event, saveInSpace, space, }) {
113
+ const lc = `[${createPicAndBinIbGibsFromInputFilePickedEvent.name}]`;
114
+ try {
115
+ // validate incoming input picker result
116
+ // thanks https://edupala.com/capacitor-camera-example/
117
+ const target = event.target;
118
+ if (!target) {
119
+ throw new Error(`event.target required (E: a9ade57d4359d3b0bbc75c3fea093a22)`);
120
+ }
121
+ if ((target.files ?? []).length === 0) {
122
+ throw new Error(`target.files is falsy/empty (E: f2932f1012c9e04a5f06a521a381ff22)`);
123
+ }
124
+ const result = [];
125
+ // going to execute serially to maintain order of incoming target files
126
+ // IOW not going to do a Promise.all equivalent
127
+ for (let i = 0; i < target.files.length; i++) {
128
+ const file = target.files[i];
129
+ if (!file) {
130
+ throw new Error(`file required. (E: 24a8bf4cdf17dcae04b15438bc0a4522)`);
131
+ }
132
+ const pattern = /image-*/;
133
+ if (!file.type.match(pattern)) {
134
+ throw new Error(`File format not supported. file: ${file} (E: dca558def013c1c85c83f0ac088b2122)`);
135
+ }
136
+ // wrap reader in promise for use with async/await
137
+ const resSingleCreate = await new Promise((resolve, reject) => {
138
+ // const reader = new FileReader();
139
+ const reader = getFileReaderHack();
140
+ reader.onload = async (_) => {
141
+ const lc2 = `${lc}[reader.onload]`;
142
+ try {
143
+ if (logalot) {
144
+ console.log(`${lc2} starting... (I: 1e948476ca86b328a12700dc57be0a22)`);
145
+ }
146
+ if (!reader.result) {
147
+ throw new Error(`(UNEXPECTED) reader.result falsy but onload fired? (E: fdac6638fe6e2db3de1ac277bc29dc23)`);
148
+ }
149
+ let imageBase64 = reader.result.toString().split('base64,')[1];
150
+ let binHash = await hash({ s: imageBase64 });
151
+ const filenameWithExt = file.name;
152
+ const filenamePieces = filenameWithExt.split('.');
153
+ const filename = filenamePieces.slice(0, filenamePieces.length - 1).join('.');
154
+ const ext = filenamePieces.slice(filenamePieces.length - 1)[0];
155
+ if (ext.includes(IBGIB_DELIMITER)) {
156
+ throw new Error(`file extension cannot contain the character ${IBGIB_DELIMITER} (E: f5bc9ef79f7efe01cd53abd49d9f6122)`);
157
+ }
158
+ await delay(32); // slight doProcesses UI thread hack - not sure how much it helps (if any)
159
+ const resCreate = await createPicAndBinIbGibs({
160
+ imageBase64, binHash, filename, ext, saveInSpace, space,
161
+ });
162
+ resolve(resCreate);
163
+ }
164
+ catch (error) {
165
+ console.error(`${lc2} ${error.message}`);
166
+ reject(error);
167
+ }
168
+ finally {
169
+ if (logalot) {
170
+ console.log(`${lc2} complete. (I: d88dcaeb874c4f049d51d58655dc2b62)`);
171
+ }
172
+ }
173
+ };
174
+ reader.readAsDataURL(file);
175
+ });
176
+ result.push(resSingleCreate);
177
+ }
178
+ return result;
179
+ }
180
+ catch (error) {
181
+ console.error(`${lc} ${error.message}`);
182
+ throw error;
183
+ }
184
+ }
185
+ export function isPic({ ibGib, }) {
186
+ const lc = `[${isPic.name}]`;
187
+ try {
188
+ if (logalot) {
189
+ console.log(`${lc} starting...`);
190
+ }
191
+ if (!ibGib) {
192
+ throw new Error(`ibGib required (E: 1237b2d4602a3d526f6b159cb6ad0922)`);
193
+ }
194
+ const { ib, data, rel8ns } = ibGib;
195
+ // try rel8ns first
196
+ if (!rel8ns) {
197
+ if (logalot) {
198
+ console.log(`${lc} rel8ns falsy, not a pic (I: 563a3e779b85b070550581e652e0ca22)`);
199
+ }
200
+ return false;
201
+ }
202
+ // descends from pic^gib
203
+ const ancestors = rel8ns.ancestor || [];
204
+ if (ancestors && ancestors.includes('pic^gib')) {
205
+ return true;
206
+ }
207
+ // has binary qualities and ib contains 'pic'
208
+ if (!data) {
209
+ if (logalot) {
210
+ console.log(`${lc} data falsy, not a pic (I: 6c05c03cdfca4085aef8f2a19df91690)`);
211
+ }
212
+ return false;
213
+ }
214
+ if (data.binHash && data.ext && data.filename && ib?.includes('pic')) {
215
+ if (logalot) {
216
+ console.log(`${lc} has binHash, ext, filename and ib has pic (I: f754b6b023d5379ee770038617edc722)`);
217
+ }
218
+ return true;
219
+ }
220
+ if (logalot) {
221
+ console.log(`${lc} reached end, doesn't have pic qualities. not a pic. (I: 298c5e9a2916445df1cdd22a96f57522)`);
222
+ }
223
+ return false;
224
+ }
225
+ catch (error) {
226
+ console.error(`${lc} ${error.message}`);
227
+ throw error;
228
+ }
229
+ finally {
230
+ if (logalot) {
231
+ console.log(`${lc} complete.`);
232
+ }
233
+ }
234
+ }
235
+ //# sourceMappingURL=pic-helper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pic-helper.mjs","sourceRoot":"","sources":["../../../src/common/pic/pic-helper.mts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,UAAU,IAAI,OAAO,EAAkB,eAAe,EAAY,MAAM,iCAAiC,CAAC;AACnH,OAAO,EAAE,MAAM,EAAE,MAAM,uDAAuD,CAAC;AAC/E,4FAA4F;AAG5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,OAAO,GAAG,gBAAgB,IAAI,KAAK,CAAC;AAQ1C,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EACnC,UAAU,EACV,OAAO,EACP,GAAG,EACH,WAAW,EACX,KAAK,GA4BN;IACC,MAAM,EAAE,GAAG,IAAI,cAAc,CAAC,IAAI,GAAG,CAAC;IACtC,IAAI;QACF,IAAI,OAAO,EAAE;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;SAAE;QAElD,IAAI,CAAC,OAAO,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,wDAAwD,CA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C,GAAG,EAAE,kFAAkF,CAAC,CAAC;aAAE;YACtH,OAAO,IAAI,CAAC;SACb;QAED,IAAI,OAAO,EAAE;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,4FAA4F,CAAC,CAAC;SAAE;QAChI,OAAO,KAAK,CAAC;KACd;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACxC,MAAM,KAAK,CAAC;KACb;YAAS;QACR,IAAI,OAAO,EAAE;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;SAAE;KACjD;AACH,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { IbGibAddr, TransformResult } from '@ibgib/ts-gib';
2
+ import { IbGibRel8ns_V1, IbGib_V1 } from '@ibgib/ts-gib/dist/V1/index.mjs';
3
+ import { BinIbGib_V1 } from '../bin/bin-types.mjs';
4
+ import { BINARY_REL8N_NAME } from './pic-constants.mjs';
5
+ /**
6
+ * Data for a pic ibGib
7
+ *
8
+ * @see {@link BinIbGib_V1}
9
+ */
10
+ export interface PicData_V1 {
11
+ binHash: string;
12
+ binHashThumb?: string;
13
+ ext?: string;
14
+ filename: string;
15
+ timestamp: string;
16
+ }
17
+ export interface PicRel8ns_V1 extends IbGibRel8ns_V1 {
18
+ [BINARY_REL8N_NAME]: IbGibAddr[];
19
+ }
20
+ export interface PicIbGib_V1 extends IbGib_V1<PicData_V1, PicRel8ns_V1> {
21
+ }
22
+ export type UpdatePicPromptResult = [TransformResult<PicIbGib_V1>, TransformResult<BinIbGib_V1>];
23
+ //# sourceMappingURL=pic-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pic-types.d.mts","sourceRoot":"","sources":["../../../src/common/pic/pic-types.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAa,SAAQ,cAAc;IAChD,CAAC,iBAAiB,CAAC,EAAE,SAAS,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,WAAY,SAAQ,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC;CAEtE;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { BINARY_REL8N_NAME } from './pic-constants.mjs';
2
+ //# sourceMappingURL=pic-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pic-types.mjs","sourceRoot":"","sources":["../../../src/common/pic/pic-types.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The main roots^gib ibgib uses this rel8n name to keep track of roots.
3
+ *
4
+ * NOTE: This is different than the rel8nName that a root ibgib uses to link to its ibgibs!
5
+ * {@link DEFAULT_ROOT_REL8N_NAME}
6
+ */
7
+ export declare const ROOT_REL8N_NAME = "root";
8
+ /**
9
+ * rel8n name used inside the root to those ibgib it contains. (root.rel8ns.x = [pic1^gib, comment2^gib, ...])
10
+ *
11
+ *
12
+ * NOTE: This is different than the rel8nName 'root' that the roots^gib uses. (roots.rel8ns.root = [root1^gib, root2^gib, ...])
13
+ * {@link ROOT_REL8N_NAME}
14
+ *
15
+ * @example
16
+ * ```json
17
+ * {
18
+ * ib: root,
19
+ * gib: ABC123,
20
+ * data: {...},
21
+ * rel8ns: {
22
+ * [rel8nName]: ["a^1", "b^2"]
23
+ * }
24
+ * }
25
+ * ```
26
+ */
27
+ export declare const DEFAULT_ROOT_REL8N_NAME = "x";
28
+ /**
29
+ *
30
+ */
31
+ export declare const DEFAULT_ROOT_TEXT = "root";
32
+ /**
33
+ * Default icon specifically for roots.
34
+ */
35
+ export declare const DEFAULT_ROOT_ICON = "analytics-outline";
36
+ /**
37
+ * Default description specifically for roots.
38
+ */
39
+ export declare const DEFAULT_ROOT_DESCRIPTION = "This is a root ibgib, which is basically like a root folder that is primarily responsible for \"containing\" other ibgibs.";
40
+ //# sourceMappingURL=root-constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-constants.d.mts","sourceRoot":"","sources":["../../../src/common/root/root-constants.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,iBAAiB,SAAS,CAAC;AACxC;;GAEG;AACH,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD;;GAEG;AACH,eAAO,MAAM,wBAAwB,+HAA6H,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The main roots^gib ibgib uses this rel8n name to keep track of roots.
3
+ *
4
+ * NOTE: This is different than the rel8nName that a root ibgib uses to link to its ibgibs!
5
+ * {@link DEFAULT_ROOT_REL8N_NAME}
6
+ */
7
+ export const ROOT_REL8N_NAME = 'root';
8
+ /**
9
+ * rel8n name used inside the root to those ibgib it contains. (root.rel8ns.x = [pic1^gib, comment2^gib, ...])
10
+ *
11
+ *
12
+ * NOTE: This is different than the rel8nName 'root' that the roots^gib uses. (roots.rel8ns.root = [root1^gib, root2^gib, ...])
13
+ * {@link ROOT_REL8N_NAME}
14
+ *
15
+ * @example
16
+ * ```json
17
+ * {
18
+ * ib: root,
19
+ * gib: ABC123,
20
+ * data: {...},
21
+ * rel8ns: {
22
+ * [rel8nName]: ["a^1", "b^2"]
23
+ * }
24
+ * }
25
+ * ```
26
+ */
27
+ export const DEFAULT_ROOT_REL8N_NAME = 'x';
28
+ /**
29
+ *
30
+ */
31
+ export const DEFAULT_ROOT_TEXT = 'root';
32
+ /**
33
+ * Default icon specifically for roots.
34
+ */
35
+ export const DEFAULT_ROOT_ICON = 'analytics-outline';
36
+ /**
37
+ * Default description specifically for roots.
38
+ */
39
+ export const DEFAULT_ROOT_DESCRIPTION = 'This is a root ibgib, which is basically like a root folder that is primarily responsible for "containing" other ibgibs.';
40
+ //# sourceMappingURL=root-constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-constants.mjs","sourceRoot":"","sources":["../../../src/common/root/root-constants.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAEtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACxC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AACrD;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,0HAA0H,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Should be refactored to be V1 as other data types.
3
+ */
4
+ export interface RootData {
5
+ text: string;
6
+ icon?: string;
7
+ description?: string;
8
+ }
9
+ //# sourceMappingURL=root-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-types.d.mts","sourceRoot":"","sources":["../../../src/common/root/root-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=root-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-types.mjs","sourceRoot":"","sources":["../../../src/common/root/root-types.mts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The main tags^gib ibgib uses this rel8n name to keep track of tags.
3
+ */
4
+ export declare const TAG_REL8N_NAME = "tag";
5
+ /**
6
+ * A tag ibGib uses this rel8n name for the ibgibs that it targets.
7
+ */
8
+ export declare const TAGGED_REL8N_NAME = "target";
9
+ export declare const ILLEGAL_TAG_TEXT_CHARS: string[];
10
+ export declare const ILLEGAL_TAG_DESC_CHARS: string[];
11
+ /**
12
+ * Default icon when creating a tag.
13
+ */
14
+ export declare const DEFAULT_TAG_ICON = "pricetag-outline";
15
+ /**
16
+ * Default description when creating a tag.
17
+ */
18
+ export declare const DEFAULT_TAG_DESCRIPTION = "This is a tag used for organizing data.";
19
+ export declare const TAG_TEXT_REGEXP: RegExp;
20
+ export declare const TAG_TEXT_REGEXP_DESCRIPTION = "tag text must start and end with an alphanumeric, and can contain a hyphen, question mark, dot or space.";
21
+ //# sourceMappingURL=tag-constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-constants.d.mts","sourceRoot":"","sources":["../../../src/common/tag/tag-constants.mts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,cAAc,QAAQ,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAG1C,eAAO,MAAM,sBAAsB,UAElC,CAAC;AAEF,eAAO,MAAM,sBAAsB,UAElC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD;;GAEG;AACH,eAAO,MAAM,uBAAuB,4CAA4C,CAAC;AAEjF,eAAO,MAAM,eAAe,QAAgC,CAAC;AAC7D,eAAO,MAAM,2BAA2B,6GAA6G,CAAC"}
@@ -0,0 +1,28 @@
1
+ // export const TAGS_IB = 'tags';
2
+ // export const TAGS_IBGIB_ADDR = `${TAGS_IB}^${GIB}`;
3
+ // export const TAGS_IBGIB_ADDR_KEY = `key ${TAGS_IBGIB_ADDR}`;
4
+ /**
5
+ * The main tags^gib ibgib uses this rel8n name to keep track of tags.
6
+ */
7
+ export const TAG_REL8N_NAME = 'tag';
8
+ /**
9
+ * A tag ibGib uses this rel8n name for the ibgibs that it targets.
10
+ */
11
+ export const TAGGED_REL8N_NAME = 'target';
12
+ export const ILLEGAL_TAG_TEXT_CHARS = [
13
+ '^', '?', '/', '\\', `|`,
14
+ ];
15
+ export const ILLEGAL_TAG_DESC_CHARS = [
16
+ '^',
17
+ ];
18
+ /**
19
+ * Default icon when creating a tag.
20
+ */
21
+ export const DEFAULT_TAG_ICON = 'pricetag-outline';
22
+ /**
23
+ * Default description when creating a tag.
24
+ */
25
+ export const DEFAULT_TAG_DESCRIPTION = 'This is a tag used for organizing data.';
26
+ export const TAG_TEXT_REGEXP = /^\w[\w .\-?!]{1,30}[\w.?!]$/;
27
+ export const TAG_TEXT_REGEXP_DESCRIPTION = `tag text must start and end with an alphanumeric, and can contain a hyphen, question mark, dot or space.`;
28
+ //# sourceMappingURL=tag-constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-constants.mjs","sourceRoot":"","sources":["../../../src/common/tag/tag-constants.mts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,sDAAsD;AACtD,+DAA+D;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAG1C,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,GAAG;CACN,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,yCAAyC,CAAC;AAEjF,MAAM,CAAC,MAAM,eAAe,GAAG,6BAA6B,CAAC;AAC7D,MAAM,CAAC,MAAM,2BAA2B,GAAG,0GAA0G,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { IbGibAddr } from '@ibgib/ts-gib';
2
+ import { IbGibRel8ns_V1, IbGib_V1 } from '@ibgib/ts-gib/dist/V1/index.mjs';
3
+ import { TAG_REL8N_NAME } from './tag-constants.mjs';
4
+ export interface TagData_V1 {
5
+ text: string;
6
+ icon?: string;
7
+ description?: string;
8
+ }
9
+ export interface TagRel8ns_V1 extends IbGibRel8ns_V1 {
10
+ [TAG_REL8N_NAME]?: IbGibAddr[];
11
+ }
12
+ export interface TagIbGib_V1 extends IbGib_V1<TagData_V1, TagRel8ns_V1> {
13
+ }
14
+ //# sourceMappingURL=tag-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-types.d.mts","sourceRoot":"","sources":["../../../src/common/tag/tag-types.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIrD,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAa,SAAQ,cAAc;IAChD,CAAC,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,WAAY,SAAQ,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC;CAEtE"}
@@ -0,0 +1,2 @@
1
+ import { TAG_REL8N_NAME } from './tag-constants.mjs';
2
+ //# sourceMappingURL=tag-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-types.mjs","sourceRoot":"","sources":["../../../src/common/tag/tag-types.mts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @module core-constants
3
+ *
4
+ * # IMPORTANT!
5
+ *
6
+ * In order to be able to actually use this in an ionic-gib-like clone front end,
7
+ * I want to be sure to include all of these. So I can't remove/comment it out here
8
+ * without putting it _somewhere_. For example, the very first import atow is a
9
+ * reference to @capacitor/filesystem. This should not go in this package (core-gib)
10
+ * so I'm going to create another lib specific to ionic/capacitor and put it there
11
+ * **before** removing it from/commenting it out in this file.
12
+ *
13
+ * # about this file
14
+ *
15
+ * I'm copying this lump sum from ionic-gib and am breaking it out slowly into
16
+ * other more specific constant files. When a constant is moved into one of
17
+ * those sub files, then I will remove it from this file.
18
+ *
19
+ * Ultimately, this should only contain global constants like the logalot
20
+ * and timer settings.
21
+ */
22
+ /**
23
+ * Naive selective logging/tracing mechanism.
24
+ *
25
+ * I manually switch this in individual files as needed while
26
+ * developing/troubleshooting. I can change it here to turn on extremely verbose
27
+ * logging application wide (and turn off individual files).
28
+ */
29
+ export declare const GLOBAL_LOG_A_LOT: boolean | number;
30
+ /**
31
+ * Used in console.timeLog() calls.
32
+ */
33
+ export declare const GLOBAL_TIMER_NAME = "[core^gib timer]";
34
+ /**
35
+ * regular expression for a classname.
36
+ *
37
+ * Used in witnesses atm.
38
+ */
39
+ export declare const CLASSNAME_REGEXP: RegExp;
40
+ /**
41
+ * Much restricted list of chars in english.
42
+ *
43
+ * ## intent
44
+ *
45
+ * When sanitizing input.
46
+ */
47
+ export declare const SAFE_SPECIAL_CHARS = ".'\",!?-";
48
+ export declare const IB_MAX_LENGTH_DEFAULT = 155;
49
+ /**
50
+ * Defaults to word characters, space, tab, hyphen, and other
51
+ * non-slash (path navigating) chars.
52
+ *
53
+ * Does not allow new lines or other whitespace, only tabs and spaces.
54
+ *
55
+ * ## atow
56
+ *
57
+ * `^[\\w\\t\\-|=+.&%\$#@!~\` \\[\\]\\(\\)\\{\\}]{1,${IB_MAX_LENGTH_DEFAULT}}$`
58
+ */
59
+ export declare const IB_REGEXP_DEFAULT: RegExp;
60
+ /**
61
+ * Ionicons const "enum"
62
+ */
63
+ export declare const IONICONS: string[];
64
+ /**
65
+ * Robbot.data.name regexp
66
+ */
67
+ export declare const ROBBOT_NAME_REGEXP: RegExp;
68
+ export declare const ROBBOT_PREFIX_SUFFIX_REGEXP: RegExp;
69
+ export declare const ROBBOT_PREFIX_SUFFIX_REGEXP_DESC = "0 to 64 alphanumerics, spaces, select special characters and emojis.";
70
+ export declare const GESTURE_DOUBLE_CLICK_THRESHOLD_MS = 500;
71
+ /**
72
+ * If a gesture's move threshold is less than this, then it can still be
73
+ * considered a single punctiliar click. Otherwise, it's a move event.
74
+ *
75
+ * IOW, a click gesture only is considered a "click" if the onMove is triggered
76
+ * less than this many times. If onMove is detected more than this many times,
77
+ * then a move gesture will be triggered.
78
+ */
79
+ export declare const GESTURE_CLICK_TOLERANCE_ONMOVE_THRESHOLD_COUNT = 5;
80
+ export declare const SIMPLE_CONFIG_KEY_APP_VISIBLE = "appBarVisible";
81
+ export declare const SIMPLE_CONFIG_KEY_APP_SELECTED = "appBarSelectedApp";
82
+ export declare const SIMPLE_CONFIG_KEY_ROBBOT_VISIBLE = "robbotBarVisible";
83
+ export declare const SIMPLE_CONFIG_KEY_ROBBOT_SELECTED_ADDR = "robbotBarSelectedAddr";
84
+ export declare const APP_NAME_REGEXP: RegExp;
85
+ export declare const APP_REL8N_NAME = "app";
86
+ export declare const DEFAULT_APP_ICON = "apps-outline";
87
+ export declare const YOUTUBE_LINK_REG_EXP: RegExp;
88
+ export declare const WEB_1_PATHS: string[];
89
+ //# sourceMappingURL=core-constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-constants.d.mts","sourceRoot":"","sources":["../src/core-constants.mts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,GAAG,MAAc,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAKpD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAA0B,CAAC;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,aAAY,CAAC;AAE5C,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,QAA2F,CAAC;AAE1H;;GAEG;AACH,eAAO,MAAM,QAAQ,UAoYpB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAA6B,CAAC;AAC7D,eAAO,MAAM,2BAA2B,QAAqC,CAAC;AAC9E,eAAO,MAAM,gCAAgC,yEAC6B,CAAC;AAM3E,eAAO,MAAM,iCAAiC,MAAM,CAAC;AACrD;;;;;;;GAOG;AACH,eAAO,MAAM,8CAA8C,IAAI,CAAC;AAIhE,eAAO,MAAM,6BAA6B,kBAAkB,CAAC;AAC7D,eAAO,MAAM,8BAA8B,sBAAsB,CAAC;AAClE,eAAO,MAAM,gCAAgC,qBAAqB,CAAC;AACnE,eAAO,MAAM,sCAAsC,0BAA0B,CAAC;AAI9E,eAAO,MAAM,eAAe,QAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAI/C,eAAO,MAAM,oBAAoB,QAA+B,CAAC;AAEjE,eAAO,MAAM,WAAW,UAAuC,CAAC"}