@hexclave/shared 1.0.2 → 1.0.5

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 (353) hide show
  1. package/dist/ai/unified-prompts/reminders.js +4 -3
  2. package/dist/ai/unified-prompts/reminders.js.map +1 -1
  3. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +3 -1
  4. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
  5. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +217 -30
  6. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
  7. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
  8. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +1 -0
  9. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
  10. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +18 -6
  11. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +23 -8
  12. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
  13. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +1 -1
  14. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
  15. package/dist/config/schema.d.ts +63 -63
  16. package/dist/config/schema.d.ts.map +1 -1
  17. package/dist/config/schema.js +5 -5
  18. package/dist/config/schema.js.map +1 -1
  19. package/dist/config-authoring.d.ts +4 -4
  20. package/dist/config-authoring.d.ts.map +1 -1
  21. package/dist/config-authoring.js +2 -2
  22. package/dist/config-authoring.js.map +1 -1
  23. package/dist/config-rendering.d.ts +4 -4
  24. package/dist/config-rendering.d.ts.map +1 -1
  25. package/dist/config-rendering.js +19 -18
  26. package/dist/config-rendering.js.map +1 -1
  27. package/dist/esm/ai/unified-prompts/reminders.js +4 -3
  28. package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
  29. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +3 -1
  30. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
  31. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +216 -31
  32. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
  33. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
  34. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +1 -0
  35. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
  36. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +18 -6
  37. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +23 -8
  38. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
  39. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +1 -1
  40. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
  41. package/dist/esm/config/schema.d.ts +63 -63
  42. package/dist/esm/config/schema.d.ts.map +1 -1
  43. package/dist/esm/config/schema.js +5 -5
  44. package/dist/esm/config/schema.js.map +1 -1
  45. package/dist/esm/config-authoring.d.ts +4 -4
  46. package/dist/esm/config-authoring.d.ts.map +1 -1
  47. package/dist/esm/config-authoring.js +2 -2
  48. package/dist/esm/config-authoring.js.map +1 -1
  49. package/dist/esm/config-rendering.d.ts +4 -4
  50. package/dist/esm/config-rendering.d.ts.map +1 -1
  51. package/dist/esm/config-rendering.js +15 -14
  52. package/dist/esm/config-rendering.js.map +1 -1
  53. package/dist/esm/helpers/vault/client-side.d.ts.map +1 -1
  54. package/dist/esm/helpers/vault/client-side.js.map +1 -1
  55. package/dist/esm/helpers/vault/server-side.d.ts.map +1 -1
  56. package/dist/esm/helpers/vault/server-side.js.map +1 -1
  57. package/dist/esm/hexclave-config-file.d.ts +15 -0
  58. package/dist/esm/hexclave-config-file.d.ts.map +1 -0
  59. package/dist/esm/{stack-config-file.js → hexclave-config-file.js} +7 -7
  60. package/dist/esm/hexclave-config-file.js.map +1 -0
  61. package/dist/esm/hooks/use-async-callback.js +1 -1
  62. package/dist/esm/hooks/use-async-external-store.js +1 -1
  63. package/dist/esm/hooks/use-strict-memo.js +1 -1
  64. package/dist/esm/interface/admin-metrics.d.ts +8 -8
  65. package/dist/esm/interface/admin-metrics.js.map +1 -1
  66. package/dist/esm/interface/client-interface.js +2 -2
  67. package/dist/esm/interface/client-interface.js.map +1 -1
  68. package/dist/esm/interface/conversations.d.ts +32 -32
  69. package/dist/esm/interface/crud/current-user.d.ts +9 -9
  70. package/dist/esm/interface/crud/email-outbox.d.ts +200 -200
  71. package/dist/esm/interface/crud/products.d.ts +13 -13
  72. package/dist/esm/interface/crud/products.d.ts.map +1 -1
  73. package/dist/esm/interface/crud/project-api-keys.d.ts +4 -4
  74. package/dist/esm/interface/crud/project-permissions.js +5 -5
  75. package/dist/esm/interface/crud/project-permissions.js.map +1 -1
  76. package/dist/esm/interface/crud/projects.d.ts +36 -36
  77. package/dist/esm/interface/crud/team-member-profiles.d.ts +18 -18
  78. package/dist/esm/interface/crud/team-permissions.js +5 -5
  79. package/dist/esm/interface/crud/team-permissions.js.map +1 -1
  80. package/dist/esm/interface/crud/transactions.d.ts +6 -6
  81. package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
  82. package/dist/esm/interface/crud/users.d.ts +12 -12
  83. package/dist/esm/interface/page-component-versions.js +107 -107
  84. package/dist/esm/interface/page-component-versions.js.map +1 -1
  85. package/dist/esm/interface/webhooks.d.ts +2 -2
  86. package/dist/esm/known-errors.d.ts +2 -2
  87. package/dist/esm/known-errors.js +4 -4
  88. package/dist/esm/known-errors.js.map +1 -1
  89. package/dist/esm/schema-fields.d.ts +17 -7
  90. package/dist/esm/schema-fields.d.ts.map +1 -1
  91. package/dist/esm/schema-fields.js +26 -16
  92. package/dist/esm/schema-fields.js.map +1 -1
  93. package/dist/esm/sessions.d.ts +7 -7
  94. package/dist/esm/utils/crypto.d.ts.map +1 -1
  95. package/dist/esm/utils/crypto.js.map +1 -1
  96. package/dist/esm/utils/currency-constants.d.ts +6 -0
  97. package/dist/esm/utils/currency-constants.d.ts.map +1 -1
  98. package/dist/esm/utils/currency-constants.js.map +1 -1
  99. package/dist/esm/utils/dev-env-state-path.d.ts +3 -3
  100. package/dist/esm/utils/dev-env-state-path.d.ts.map +1 -1
  101. package/dist/esm/utils/dev-env-state-path.js +4 -4
  102. package/dist/esm/utils/dev-env-state-path.js.map +1 -1
  103. package/dist/esm/utils/errors.js +2 -2
  104. package/dist/esm/utils/errors.js.map +1 -1
  105. package/dist/esm/utils/esbuild.d.ts.map +1 -1
  106. package/dist/esm/utils/esbuild.js +0 -1
  107. package/dist/esm/utils/esbuild.js.map +1 -1
  108. package/dist/esm/utils/featurebase.d.ts +3 -3
  109. package/dist/esm/utils/featurebase.d.ts.map +1 -1
  110. package/dist/esm/utils/featurebase.js +15 -15
  111. package/dist/esm/utils/featurebase.js.map +1 -1
  112. package/dist/esm/utils/fs.js +6 -6
  113. package/dist/esm/utils/fs.js.map +1 -1
  114. package/dist/esm/utils/globals.d.ts.map +1 -1
  115. package/dist/esm/utils/globals.js +10 -10
  116. package/dist/esm/utils/globals.js.map +1 -1
  117. package/dist/esm/utils/jwt.d.ts.map +1 -1
  118. package/dist/esm/utils/jwt.js +3 -3
  119. package/dist/esm/utils/jwt.js.map +1 -1
  120. package/dist/esm/utils/redirect-urls.d.ts +3 -3
  121. package/dist/esm/utils/redirect-urls.d.ts.map +1 -1
  122. package/dist/esm/utils/redirect-urls.js +5 -5
  123. package/dist/esm/utils/redirect-urls.js.map +1 -1
  124. package/dist/esm/utils/urls.js.map +1 -1
  125. package/dist/helpers/vault/client-side.d.ts.map +1 -1
  126. package/dist/helpers/vault/client-side.js.map +1 -1
  127. package/dist/helpers/vault/server-side.d.ts.map +1 -1
  128. package/dist/helpers/vault/server-side.js.map +1 -1
  129. package/dist/hexclave-config-file.d.ts +15 -0
  130. package/dist/hexclave-config-file.d.ts.map +1 -0
  131. package/dist/{stack-config-file.js → hexclave-config-file.js} +8 -8
  132. package/dist/hexclave-config-file.js.map +1 -0
  133. package/dist/hooks/use-async-callback.js +1 -1
  134. package/dist/hooks/use-async-external-store.js +1 -1
  135. package/dist/hooks/use-strict-memo.js +1 -1
  136. package/dist/interface/admin-metrics.d.ts +8 -8
  137. package/dist/interface/admin-metrics.js.map +1 -1
  138. package/dist/interface/client-interface.js +2 -2
  139. package/dist/interface/client-interface.js.map +1 -1
  140. package/dist/interface/conversations.d.ts +32 -32
  141. package/dist/interface/crud/current-user.d.ts +9 -9
  142. package/dist/interface/crud/email-outbox.d.ts +200 -200
  143. package/dist/interface/crud/products.d.ts +13 -13
  144. package/dist/interface/crud/products.d.ts.map +1 -1
  145. package/dist/interface/crud/project-api-keys.d.ts +4 -4
  146. package/dist/interface/crud/project-permissions.js +5 -5
  147. package/dist/interface/crud/project-permissions.js.map +1 -1
  148. package/dist/interface/crud/projects.d.ts +36 -36
  149. package/dist/interface/crud/team-member-profiles.d.ts +18 -18
  150. package/dist/interface/crud/team-permissions.js +5 -5
  151. package/dist/interface/crud/team-permissions.js.map +1 -1
  152. package/dist/interface/crud/transactions.d.ts +6 -6
  153. package/dist/interface/crud/transactions.d.ts.map +1 -1
  154. package/dist/interface/crud/users.d.ts +12 -12
  155. package/dist/interface/page-component-versions.js +107 -107
  156. package/dist/interface/page-component-versions.js.map +1 -1
  157. package/dist/interface/webhooks.d.ts +2 -2
  158. package/dist/known-errors.d.ts +2 -2
  159. package/dist/known-errors.js +4 -4
  160. package/dist/known-errors.js.map +1 -1
  161. package/dist/schema-fields.d.ts +17 -7
  162. package/dist/schema-fields.d.ts.map +1 -1
  163. package/dist/schema-fields.js +26 -16
  164. package/dist/schema-fields.js.map +1 -1
  165. package/dist/sessions.d.ts +7 -7
  166. package/dist/utils/crypto.d.ts.map +1 -1
  167. package/dist/utils/crypto.js.map +1 -1
  168. package/dist/utils/currency-constants.d.ts +6 -0
  169. package/dist/utils/currency-constants.d.ts.map +1 -1
  170. package/dist/utils/currency-constants.js.map +1 -1
  171. package/dist/utils/dev-env-state-path.d.ts +3 -3
  172. package/dist/utils/dev-env-state-path.d.ts.map +1 -1
  173. package/dist/utils/dev-env-state-path.js +5 -5
  174. package/dist/utils/dev-env-state-path.js.map +1 -1
  175. package/dist/utils/errors.js +2 -2
  176. package/dist/utils/errors.js.map +1 -1
  177. package/dist/utils/esbuild.d.ts.map +1 -1
  178. package/dist/utils/esbuild.js +0 -1
  179. package/dist/utils/esbuild.js.map +1 -1
  180. package/dist/utils/featurebase.d.ts +3 -3
  181. package/dist/utils/featurebase.d.ts.map +1 -1
  182. package/dist/utils/featurebase.js +15 -15
  183. package/dist/utils/featurebase.js.map +1 -1
  184. package/dist/utils/fs.js.map +1 -1
  185. package/dist/utils/globals.d.ts.map +1 -1
  186. package/dist/utils/globals.js +10 -10
  187. package/dist/utils/globals.js.map +1 -1
  188. package/dist/utils/jwt.d.ts.map +1 -1
  189. package/dist/utils/jwt.js +3 -3
  190. package/dist/utils/jwt.js.map +1 -1
  191. package/dist/utils/redirect-urls.d.ts +3 -3
  192. package/dist/utils/redirect-urls.d.ts.map +1 -1
  193. package/dist/utils/redirect-urls.js +5 -5
  194. package/dist/utils/redirect-urls.js.map +1 -1
  195. package/dist/utils/urls.js.map +1 -1
  196. package/package.json +2 -1
  197. package/src/ai/image-limits.ts +62 -0
  198. package/src/ai/llms/llms.ts +36 -0
  199. package/src/ai/unified-prompts/reminders.ts +27 -0
  200. package/src/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.ts +1047 -0
  201. package/src/ai/unified-prompts/skill-site-prompt-parts/brain.ts +5 -0
  202. package/src/ai/unified-prompts/skill-site-prompt-parts/cli-help.ts +5 -0
  203. package/src/ai/unified-prompts/skill-site-prompt-parts/config-docs.ts +5 -0
  204. package/src/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.ts +5 -0
  205. package/src/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.ts +5 -0
  206. package/src/ai/unified-prompts/skill-site-prompt-parts/docs-index.ts +80 -0
  207. package/src/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.ts +322 -0
  208. package/src/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.ts +5 -0
  209. package/src/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.ts +5 -0
  210. package/src/ai/unified-prompts/skill-site-prompt.ts +72 -0
  211. package/src/apps/apps-config.ts +177 -0
  212. package/src/apps/apps-ui.tsx +112 -0
  213. package/src/config/README.md +154 -0
  214. package/src/config/db-sync-mappings.ts +2293 -0
  215. package/src/config/format.ts +388 -0
  216. package/src/config/migrate-catalogs-to-product-lines.ts +475 -0
  217. package/src/config/schema-fuzzer.test.ts +377 -0
  218. package/src/config/schema.ts +1507 -0
  219. package/src/config-authoring.test.ts +52 -0
  220. package/src/config-authoring.ts +37 -0
  221. package/src/config-rendering.ts +142 -0
  222. package/src/crud.tsx +275 -0
  223. package/src/global.d.ts +1 -0
  224. package/src/helpers/emails.ts +250 -0
  225. package/src/helpers/init-prompt.ts +39 -0
  226. package/src/helpers/password.ts +16 -0
  227. package/src/helpers/production-mode.ts +58 -0
  228. package/src/helpers/support-sla.test.ts +124 -0
  229. package/src/helpers/support-sla.ts +93 -0
  230. package/src/helpers/vault/client-side.ts +92 -0
  231. package/src/helpers/vault/server-side.ts +153 -0
  232. package/src/hexclave-config-file.ts +120 -0
  233. package/src/hooks/use-async-callback.tsx +43 -0
  234. package/src/hooks/use-async-external-store.tsx +24 -0
  235. package/src/hooks/use-hash.tsx +14 -0
  236. package/src/hooks/use-hover.tsx +88 -0
  237. package/src/hooks/use-strict-memo.tsx +157 -0
  238. package/src/index.ts +17 -0
  239. package/src/interface/admin-interface.ts +1043 -0
  240. package/src/interface/admin-metrics.ts +214 -0
  241. package/src/interface/client-interface.test.ts +765 -0
  242. package/src/interface/client-interface.ts +2586 -0
  243. package/src/interface/conversations.ts +109 -0
  244. package/src/interface/crud/analytics.ts +11 -0
  245. package/src/interface/crud/connected-accounts.ts +52 -0
  246. package/src/interface/crud/contact-channels.ts +74 -0
  247. package/src/interface/crud/current-user.ts +72 -0
  248. package/src/interface/crud/email-outbox.ts +263 -0
  249. package/src/interface/crud/email-templates.ts +50 -0
  250. package/src/interface/crud/emails.ts +22 -0
  251. package/src/interface/crud/internal-api-keys.ts +69 -0
  252. package/src/interface/crud/invoices.ts +36 -0
  253. package/src/interface/crud/items.ts +24 -0
  254. package/src/interface/crud/notification-preferences.ts +33 -0
  255. package/src/interface/crud/oauth-providers.ts +91 -0
  256. package/src/interface/crud/products.ts +42 -0
  257. package/src/interface/crud/project-api-keys.ts +100 -0
  258. package/src/interface/crud/project-permissions.ts +118 -0
  259. package/src/interface/crud/projects.ts +229 -0
  260. package/src/interface/crud/session-replays.ts +85 -0
  261. package/src/interface/crud/sessions.ts +66 -0
  262. package/src/interface/crud/sign-up-rules.ts +12 -0
  263. package/src/interface/crud/svix-token.ts +20 -0
  264. package/src/interface/crud/team-invitation-details.ts +22 -0
  265. package/src/interface/crud/team-invitation.ts +35 -0
  266. package/src/interface/crud/team-member-profiles.ts +61 -0
  267. package/src/interface/crud/team-memberships.ts +56 -0
  268. package/src/interface/crud/team-permissions.ts +119 -0
  269. package/src/interface/crud/teams.ts +142 -0
  270. package/src/interface/crud/transactions.ts +131 -0
  271. package/src/interface/crud/users.ts +185 -0
  272. package/src/interface/handler-urls.ts +74 -0
  273. package/src/interface/page-component-versions.ts +1702 -0
  274. package/src/interface/server-interface.ts +1146 -0
  275. package/src/interface/webhooks.ts +28 -0
  276. package/src/known-errors.tsx +2031 -0
  277. package/src/local-emulator.ts +5 -0
  278. package/src/payments/payment-methods.ts +167 -0
  279. package/src/payments/stripe-limits.ts +18 -0
  280. package/src/plans.ts +107 -0
  281. package/src/schema-fields.ts +944 -0
  282. package/src/sessions.ts +310 -0
  283. package/src/utils/api-keys.tsx +122 -0
  284. package/src/utils/arrays.tsx +248 -0
  285. package/src/utils/auth-methods.ts +8 -0
  286. package/src/utils/base64.tsx +24 -0
  287. package/src/utils/booleans.tsx +34 -0
  288. package/src/utils/browser-compat.tsx +17 -0
  289. package/src/utils/bytes.tsx +280 -0
  290. package/src/utils/caches.tsx +280 -0
  291. package/src/utils/cel-fields.ts +92 -0
  292. package/src/utils/cloud-hosts.tsx +92 -0
  293. package/src/utils/compile-time.tsx +11 -0
  294. package/src/utils/country-codes.ts +39 -0
  295. package/src/utils/crypto.tsx +174 -0
  296. package/src/utils/currencies.tsx +53 -0
  297. package/src/utils/currency-constants.tsx +51 -0
  298. package/src/utils/dates.tsx +246 -0
  299. package/src/utils/dev-env-state-path.ts +14 -0
  300. package/src/utils/dom.tsx +7 -0
  301. package/src/utils/env.tsx +117 -0
  302. package/src/utils/errors.tsx +284 -0
  303. package/src/utils/esbuild.tsx +235 -0
  304. package/src/utils/featurebase.tsx +247 -0
  305. package/src/utils/fs.tsx +33 -0
  306. package/src/utils/functions.tsx +22 -0
  307. package/src/utils/geo.tsx +16 -0
  308. package/src/utils/globals.tsx +48 -0
  309. package/src/utils/hashes.tsx +52 -0
  310. package/src/utils/html.tsx +60 -0
  311. package/src/utils/http.tsx +91 -0
  312. package/src/utils/ips.tsx +47 -0
  313. package/src/utils/json.tsx +200 -0
  314. package/src/utils/jsx-editable-transpiler.test.ts +156 -0
  315. package/src/utils/jsx-editable-transpiler.tsx +401 -0
  316. package/src/utils/jwt.tsx +170 -0
  317. package/src/utils/locks.tsx +71 -0
  318. package/src/utils/maps.tsx +407 -0
  319. package/src/utils/math.tsx +18 -0
  320. package/src/utils/monkey-patch.tsx +29 -0
  321. package/src/utils/node-http.tsx +47 -0
  322. package/src/utils/numbers.tsx +82 -0
  323. package/src/utils/oauth.tsx +9 -0
  324. package/src/utils/objects.tsx +581 -0
  325. package/src/utils/paginated-lists.test.ts +1039 -0
  326. package/src/utils/paginated-lists.tsx +479 -0
  327. package/src/utils/passkey.tsx +1 -0
  328. package/src/utils/promises.tsx +540 -0
  329. package/src/utils/proxies.tsx +212 -0
  330. package/src/utils/react.tsx +308 -0
  331. package/src/utils/redirect-urls.tsx +299 -0
  332. package/src/utils/regex.tsx +10 -0
  333. package/src/utils/results.tsx +411 -0
  334. package/src/utils/sentry.tsx +20 -0
  335. package/src/utils/stores.tsx +238 -0
  336. package/src/utils/strings.nicify.test.ts +253 -0
  337. package/src/utils/strings.tsx +723 -0
  338. package/src/utils/telemetry.tsx +37 -0
  339. package/src/utils/turnstile-browser.ts +106 -0
  340. package/src/utils/turnstile-flow.test.ts +101 -0
  341. package/src/utils/turnstile-flow.ts +266 -0
  342. package/src/utils/turnstile.ts +34 -0
  343. package/src/utils/typed-arrays.tsx +17 -0
  344. package/src/utils/types.tsx +208 -0
  345. package/src/utils/unicode.tsx +24 -0
  346. package/src/utils/urls.tsx +411 -0
  347. package/src/utils/uuids.tsx +47 -0
  348. package/dist/esm/stack-config-file.d.ts +0 -15
  349. package/dist/esm/stack-config-file.d.ts.map +0 -1
  350. package/dist/esm/stack-config-file.js.map +0 -1
  351. package/dist/stack-config-file.d.ts +0 -15
  352. package/dist/stack-config-file.d.ts.map +0 -1
  353. package/dist/stack-config-file.js.map +0 -1
@@ -0,0 +1,177 @@
1
+ type AppTag = {
2
+ displayName: string,
3
+ };
4
+
5
+ export const ALL_APP_TAGS = {
6
+ "expert": {
7
+ displayName: "Expert",
8
+ },
9
+ "integration": {
10
+ displayName: "Integrations",
11
+ },
12
+ "auth": {
13
+ displayName: "Authentication",
14
+ },
15
+ "developers": {
16
+ displayName: "For Developers",
17
+ },
18
+ "security": {
19
+ displayName: "Security",
20
+ },
21
+ "operations": {
22
+ displayName: "For Operations",
23
+ },
24
+ "gtm": {
25
+ displayName: "Go-to-market",
26
+ },
27
+ "comms": {
28
+ displayName: "Communications",
29
+ },
30
+ "automation": {
31
+ displayName: "Automation",
32
+ },
33
+ "storage": {
34
+ displayName: "Storage & Databases",
35
+ },
36
+ "various": {
37
+ displayName: "Various",
38
+ },
39
+ } as const satisfies Record<string, AppTag>;
40
+
41
+ type App = {
42
+ displayName: string,
43
+ subtitle: string,
44
+ tags: (keyof typeof ALL_APP_TAGS)[],
45
+ stage: "alpha" | "beta" | "stable",
46
+ };
47
+
48
+ export type AppId = keyof typeof ALL_APPS;
49
+
50
+ export const ALL_APPS = {
51
+ "authentication": {
52
+ displayName: "Authentication",
53
+ subtitle: "User sign-in and account management",
54
+ tags: ["auth", "security"],
55
+ stage: "stable",
56
+ },
57
+ "fraud-protection": {
58
+ displayName: "Fraud Protection",
59
+ subtitle: "Protect your project from fraud and abuse",
60
+ tags: ["auth", "security"],
61
+ stage: "stable",
62
+ },
63
+ "onboarding": {
64
+ displayName: "Onboarding",
65
+ subtitle: "Configure user onboarding requirements",
66
+ tags: ["auth"],
67
+ stage: "alpha",
68
+ },
69
+ "teams": {
70
+ displayName: "Teams",
71
+ subtitle: "Team collaboration and management",
72
+ tags: ["auth", "security"],
73
+ stage: "stable",
74
+ },
75
+ "rbac": {
76
+ displayName: "RBAC",
77
+ subtitle: "Role-based access control and permissions",
78
+ tags: ["auth", "security"],
79
+ stage: "stable",
80
+ },
81
+ "api-keys": {
82
+ displayName: "API Keys",
83
+ subtitle: "API key generation and management",
84
+ tags: ["auth", "security", "developers"],
85
+ stage: "stable",
86
+ },
87
+ "payments": {
88
+ displayName: "Payments",
89
+ subtitle: "Payment processing and subscription management",
90
+ tags: ["operations", "gtm"],
91
+ stage: "beta",
92
+ },
93
+ "emails": {
94
+ displayName: "Emails",
95
+ subtitle: "Email template configuration and management",
96
+ tags: ["comms"],
97
+ stage: "stable",
98
+ },
99
+ "support": {
100
+ displayName: "Support",
101
+ subtitle: "Customer conversations, team replies, and internal notes",
102
+ tags: ["comms", "operations"],
103
+ stage: "alpha",
104
+ },
105
+ "email-api": {
106
+ displayName: "Email API",
107
+ subtitle: "Programmatic email sending and delivery",
108
+ tags: ["comms", "developers", "expert"],
109
+ stage: "alpha",
110
+ },
111
+ "data-vault": {
112
+ displayName: "Data Vault",
113
+ subtitle: "Secure storage for sensitive user data",
114
+ tags: ["security", "storage"],
115
+ stage: "beta",
116
+ },
117
+ "webhooks": {
118
+ displayName: "Webhooks",
119
+ subtitle: "Real-time event notifications and integrations",
120
+ tags: ["developers"],
121
+ stage: "stable",
122
+ },
123
+ "tv-mode": {
124
+ displayName: "TV mode",
125
+ subtitle: "Dashboard display for large screens",
126
+ tags: ["various"],
127
+ stage: "alpha",
128
+ },
129
+ "launch-checklist": {
130
+ displayName: "Launch Checklist",
131
+ subtitle: "Pre-launch verification and readiness checks",
132
+ tags: ["various"],
133
+ stage: "stable",
134
+ },
135
+ "catalyst": {
136
+ displayName: "Catalyst",
137
+ subtitle: "Project scaffolding and rapid development",
138
+ tags: ["various"],
139
+ stage: "alpha",
140
+ },
141
+ "neon": {
142
+ displayName: "Neon Integration",
143
+ subtitle: "Serverless Postgres database integration",
144
+ tags: ["integration", "storage"],
145
+ stage: "alpha",
146
+ },
147
+ "convex": {
148
+ displayName: "Convex Integration",
149
+ subtitle: "Real-time backend platform integration",
150
+ tags: ["integration", "storage"],
151
+ stage: "alpha",
152
+ },
153
+ "vercel": {
154
+ displayName: "Vercel Integration",
155
+ subtitle: "Deploy your Hexclave project to Vercel",
156
+ tags: ["integration", "developers"],
157
+ stage: "stable",
158
+ },
159
+ "tanstack-start": {
160
+ displayName: "TanStack Start",
161
+ subtitle: "Use Hexclave in TanStack Start apps",
162
+ tags: ["integration", "developers"],
163
+ stage: "alpha",
164
+ },
165
+ "analytics": {
166
+ displayName: "Analytics",
167
+ subtitle: "View and explore analytics data",
168
+ tags: ["developers", "operations"],
169
+ stage: "stable",
170
+ },
171
+ "session-replays": {
172
+ displayName: "Session Replays",
173
+ subtitle: "Watch real user sessions to understand how people use your app",
174
+ tags: ["developers", "operations"],
175
+ stage: "stable",
176
+ },
177
+ } as const satisfies Record<string, App>;
@@ -0,0 +1,112 @@
1
+ import React from "react";
2
+ import { AppId } from "./apps-config";
3
+
4
+ export const appSquareWidthExpression = "max(min(11vw,180px),80px)";
5
+ export const appSquarePaddingExpression = "max(min(1vw,1.5rem),0.25rem)";
6
+
7
+ export type AppIconProps = {
8
+ appId: AppId,
9
+ /**
10
+ * Icon component from the app frontend config
11
+ */
12
+ IconComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>,
13
+ /**
14
+ * Optional logo component from the app frontend config
15
+ */
16
+ LogoComponent?: React.FunctionComponent<{}>,
17
+ className?: string,
18
+ /**
19
+ * Whether this app is enabled/installed (shows green icon)
20
+ */
21
+ enabled?: boolean,
22
+ /**
23
+ * Whether this app is disabled (shows dashed border)
24
+ */
25
+ disabled?: boolean,
26
+ style?: React.CSSProperties,
27
+ /**
28
+ * cn utility function for className merging (e.g., from stack-ui or tailwind-merge)
29
+ */
30
+ cn: (...inputs: any[]) => string,
31
+ };
32
+
33
+ export function AppIcon({
34
+ appId,
35
+ IconComponent,
36
+ LogoComponent,
37
+ className,
38
+ enabled = false,
39
+ disabled,
40
+ style,
41
+ cn,
42
+ }: AppIconProps) {
43
+
44
+ const filterId = "glow-fx";
45
+
46
+ return (
47
+ <>
48
+ {/* theoretically, this only needs to be in the dom once: */}
49
+ <svg height="0" width="0" style={{ position: "absolute", marginLeft: "-100%" }}>
50
+ <defs>
51
+ <filter id={filterId} colorInterpolationFilters="sRGB" x="-50%" y="-50%" width="200%" height="200%">
52
+ {/* drop shadow */}
53
+ <feOffset dx="0" dy="2" in="SourceAlpha" result="dropOffset" />
54
+ <feGaussianBlur stdDeviation="8" in="dropOffset" result="dropBlur" />
55
+ <feFlood floodColor="#4271FF" floodOpacity="0.8" result="dropFlood" />
56
+ <feComposite operator="in" in="dropFlood" in2="dropBlur" result="dropShadow" />
57
+ {/* outer shadow */}
58
+ <feOffset dx="0" dy="0" in="SourceAlpha" result="outerOffset" />
59
+ <feGaussianBlur stdDeviation="4" in="outerOffset" result="outerBlur" />
60
+ <feFlood floodColor="#00BBFF" floodOpacity="0.3" result="outerFlood" />
61
+ <feComposite operator="in" in="outerFlood" in2="outerBlur" result="outerShadow" />
62
+ {/* Combine: drop shadow behind, then outer shadow, then source graphic on top */}
63
+ <feComposite operator="over" in="outerShadow" in2="dropShadow" result="combinedShadows" />
64
+ <feComposite operator="over" in="SourceGraphic" in2="combinedShadows" />
65
+ </filter>
66
+ </defs>
67
+ </svg>
68
+ <div
69
+ style={style}
70
+ className={cn(
71
+ "relative w-[72px] h-[72px] overflow-hidden select-none",
72
+ "rounded-[20%] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]", // https://x.com/konstiwohlwend/status/1991221528206405685
73
+ "shadow-[0_4px_12px_0_rgba(0,0,0,0.08)] dark:!shadow-[0_10px_24px_0_rgba(10,69,151,0.28)]",
74
+ "before:absolute before:inset-0 before:bg-gradient-to-br before:from-slate-300 before:via-slate-400 before:to-slate-300 dark:before:from-[#4E7598] dark:before:via-[#0D233D] dark:before:to-[#4E7598] before:rounded-[inherit] before:supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] before:supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]",
75
+ // !disabled && "bg-gray-300 dark:bg-gray-900",
76
+ // disabled && 'bg-gray-300 dark:bg-gray-900',
77
+ className,
78
+ )}
79
+ >
80
+ <div className={cn("absolute inset-[1px] isolate flex items-center justify-center rounded-[inherit] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]", !disabled && "bg-gradient-to-br from-slate-100 to-slate-200 dark:from-[#163050] dark:to-[#090C11]", disabled && "bg-gray-300 dark:bg-gray-900")}>
81
+ {LogoComponent ? (
82
+ <div
83
+ className={cn(
84
+ "w-[42%] h-[42%] flex items-center justify-center",
85
+ "[&_svg]:overflow-visible",
86
+ !enabled && "grayscale opacity-60"
87
+ )}
88
+ style={{ filter: `url(#${filterId})` }}
89
+ >
90
+ <LogoComponent />
91
+ </div>
92
+ ) : (
93
+ <IconComponent
94
+ className={cn(
95
+ "w-[42%] h-[42%]",
96
+ enabled
97
+ ? "stroke-emerald-600 dark:stroke-emerald-400"
98
+ : "stroke-slate-500 dark:stroke-gray-500"
99
+ )}
100
+ style={{
101
+ opacity: disabled ? 0.5 : 1,
102
+ filter: `url(#${filterId})`,
103
+ }}
104
+ overflow="visible"
105
+ />
106
+ )}
107
+ </div>
108
+ </div>
109
+ </>
110
+ );
111
+ }
112
+
@@ -0,0 +1,154 @@
1
+ # Some notes on configs
2
+
3
+ The language in this file is very technical, if you're struggling, put it into ChatGPT and see if it can help you (with the usual hallucination disclaimer).
4
+
5
+ ## Generic format vs. Hexclave
6
+
7
+ The config format is generally usable and not specific to Hexclave.
8
+
9
+ All the logic required for generic usage of the config format are in `format/`. The other files in this folder are specific to Hexclave's usage of it.
10
+
11
+ ## Terminology
12
+
13
+ **Generic config format**:
14
+ - Config: Any config, as described in stack-info
15
+ - Normalized config: A config without `null` fields and dot notation
16
+
17
+ **Hexclave**: There are four levels, project, branch, environment, organization.
18
+ - Base config: The defaults that come with Hexclave
19
+ - `$Level` config override: Overrides that are applied to the base config (in the following order: project -> branch -> environment -> organization)
20
+ - `$Level` incomplete config: The base config after some overrides have been applied
21
+ - `$Level` rendered config: An incomplete config with those fields removed that can be overridden by a future override, deeply merged into the defaults and sanitized (using `apply{$Level}DefaultsAndSanitize`), and then normalized
22
+ - Complete config: The organization rendered config.
23
+ - `$Level` config override override: An override that overrides the `$Level` config override. This is most often used eg. in the REST API to let users make changes to the branch-level config, without overwriting the entire branch-level config override. *<sup>Note that, since config overrides (unlike configs) distinguish between `null` and a property missing (`undefined`), it is currently not possible to say "this property in the config override should be unset" (setting a property to `null` in the override override will simply also set it to `null` in the override). In the future, we'll have to think about how we handle this, probably with a sentinel value.</sup>*
24
+ - `$Level` config: Could refer to any of the above, depending on the context; if it's not clear, specify it.
25
+
26
+ <details>
27
+ <summary>Examples</summary>
28
+
29
+ Base config:
30
+ ```js
31
+ {
32
+ organizations: {},
33
+ createTeamOnSignUp: false,
34
+ sourceOfTruthConnectionString: null
35
+ }
36
+ ```
37
+
38
+ ---
39
+
40
+ Project config override:
41
+ ```js
42
+ {
43
+ sourceOfTruthConnectionString: 'postgresql://...',
44
+ }
45
+ ```
46
+
47
+ Project incomplete config:
48
+ ```js
49
+ // note: `organizations` and `createTeamOnSignUp` may be overridden by branch, environment, or organization configs! They are not final
50
+ {
51
+ organizations: {},
52
+ createTeamOnSignUp: false,
53
+ sourceOfTruthConnectionString: 'postgresql://...',
54
+ }
55
+ ```
56
+
57
+ Project rendered config:
58
+ ```js
59
+ // since `organizations` and `createTeamOnSignUp` may change later, they are not included in the rendered config
60
+ {
61
+ sourceOfTruthConnectionString: 'postgresql://...',
62
+ }
63
+ ```
64
+
65
+ ---
66
+
67
+ Branch config override:
68
+ ```js
69
+ {
70
+ organizations: {
71
+ 'my-org': {
72
+ name: 'My Org',
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+
79
+ Branch incomplete config:
80
+ ```js
81
+ {
82
+ organizations: {
83
+ 'my-org': {
84
+ name: 'My Org',
85
+ }
86
+ },
87
+ createTeamOnSignUp: true,
88
+ sourceOfTruthConnectionString: 'postgresql://...',
89
+ }
90
+ ```
91
+
92
+ Branch rendered config:
93
+ ```js
94
+ // as above, `organizations` and `createTeamOnSignUp` are not included in the rendered config, as they may change later
95
+ {
96
+ sourceOfTruthConnectionString: 'postgresql://...',
97
+ }
98
+ ```
99
+
100
+ ---
101
+
102
+ Environment config override:
103
+ ```js
104
+ // no change from branch config
105
+ {}
106
+ ```
107
+
108
+ Environment incomplete config:
109
+ ```js
110
+ // no change from branch config
111
+ {
112
+ organizations: {
113
+ 'my-org': {
114
+ name: 'My Org',
115
+ }
116
+ },
117
+ createTeamOnSignUp: true,
118
+ sourceOfTruthConnectionString: 'postgresql://...',
119
+ }
120
+ ```
121
+
122
+ Environment rendered config:
123
+ ```js
124
+ // organizations can no longer change after this point, so they are included in the rendered config
125
+ {
126
+ organizations: {
127
+ 'my-org': {
128
+ name: 'My Org',
129
+ }
130
+ },
131
+ createTeamOnSignUp: true,
132
+ sourceOfTruthConnectionString: 'postgresql://...',
133
+ }
134
+ ```
135
+
136
+ ---
137
+
138
+ Organization config override:
139
+ ```js
140
+ {
141
+ createTeamOnSignUp: true,
142
+ }
143
+ ```
144
+
145
+ Organization incomplete config = organization rendered config = complete config:
146
+ ```js
147
+ {
148
+ createTeamOnSignUp: true,
149
+ sourceOfTruthConnectionString: 'postgresql://...',
150
+ }
151
+ ```
152
+
153
+
154
+ </details>