@hexclave/shared 1.0.13 → 1.0.15

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 (108) hide show
  1. package/dist/ai/unified-prompts/reminders.js +1 -1
  2. package/dist/apps/apps-config.d.ts +6 -0
  3. package/dist/apps/apps-config.js +6 -0
  4. package/dist/apps/apps-config.js.map +1 -1
  5. package/dist/config/schema.d.ts +170 -170
  6. package/dist/config-authoring.d.ts.map +1 -1
  7. package/dist/config-authoring.js.map +1 -1
  8. package/dist/config-authoring.test.js +1 -1
  9. package/dist/config-authoring.test.js.map +1 -1
  10. package/dist/config-rendering.d.ts +2 -2
  11. package/dist/config-rendering.js +16 -0
  12. package/dist/config-rendering.js.map +1 -1
  13. package/dist/esm/ai/unified-prompts/reminders.js +1 -1
  14. package/dist/esm/apps/apps-config.d.ts +6 -0
  15. package/dist/esm/apps/apps-config.js +6 -0
  16. package/dist/esm/apps/apps-config.js.map +1 -1
  17. package/dist/esm/config/schema.d.ts +170 -170
  18. package/dist/esm/config-authoring.d.ts.map +1 -1
  19. package/dist/esm/config-authoring.js.map +1 -1
  20. package/dist/esm/config-authoring.test.js +1 -1
  21. package/dist/esm/config-authoring.test.js.map +1 -1
  22. package/dist/esm/config-rendering.d.ts +2 -2
  23. package/dist/esm/config-rendering.js +16 -2
  24. package/dist/esm/config-rendering.js.map +1 -1
  25. package/dist/esm/hexclave-config-file.d.ts +24 -1
  26. package/dist/esm/hexclave-config-file.d.ts.map +1 -1
  27. package/dist/esm/hexclave-config-file.js +69 -2
  28. package/dist/esm/hexclave-config-file.js.map +1 -1
  29. package/dist/esm/interface/admin-interface.d.ts +19 -1
  30. package/dist/esm/interface/admin-interface.d.ts.map +1 -1
  31. package/dist/esm/interface/admin-interface.js +14 -0
  32. package/dist/esm/interface/admin-interface.js.map +1 -1
  33. package/dist/esm/interface/admin-metrics.d.ts +99 -5
  34. package/dist/esm/interface/admin-metrics.d.ts.map +1 -1
  35. package/dist/esm/interface/admin-metrics.js +61 -1
  36. package/dist/esm/interface/admin-metrics.js.map +1 -1
  37. package/dist/esm/interface/conversations.d.ts +35 -35
  38. package/dist/esm/interface/crud/current-user.d.ts +2 -2
  39. package/dist/esm/interface/crud/email-outbox.d.ts +66 -66
  40. package/dist/esm/interface/crud/invoices.d.ts +2 -2
  41. package/dist/esm/interface/crud/projects.d.ts +35 -35
  42. package/dist/esm/interface/crud/team-member-profiles.d.ts +10 -10
  43. package/dist/esm/interface/crud/users.d.ts +10 -10
  44. package/dist/esm/interface/webhooks.d.ts +2 -2
  45. package/dist/esm/utils/analytics-clickmap-overlay.d.ts +18 -0
  46. package/dist/esm/utils/analytics-clickmap-overlay.d.ts.map +1 -0
  47. package/dist/esm/utils/analytics-clickmap-overlay.js +19 -0
  48. package/dist/esm/utils/analytics-clickmap-overlay.js.map +1 -0
  49. package/dist/esm/utils/dev-tool.d.ts +31 -0
  50. package/dist/esm/utils/dev-tool.d.ts.map +1 -0
  51. package/dist/esm/utils/dev-tool.js +32 -0
  52. package/dist/esm/utils/dev-tool.js.map +1 -0
  53. package/dist/esm/utils/dom.d.ts +7 -1
  54. package/dist/esm/utils/dom.d.ts.map +1 -1
  55. package/dist/esm/utils/dom.js +20 -1
  56. package/dist/esm/utils/dom.js.map +1 -1
  57. package/dist/esm/utils/elements-chain.d.ts +38 -0
  58. package/dist/esm/utils/elements-chain.d.ts.map +1 -0
  59. package/dist/esm/utils/elements-chain.js +297 -0
  60. package/dist/esm/utils/elements-chain.js.map +1 -0
  61. package/dist/hexclave-config-file.d.ts +24 -1
  62. package/dist/hexclave-config-file.d.ts.map +1 -1
  63. package/dist/hexclave-config-file.js +71 -1
  64. package/dist/hexclave-config-file.js.map +1 -1
  65. package/dist/interface/admin-interface.d.ts +19 -1
  66. package/dist/interface/admin-interface.d.ts.map +1 -1
  67. package/dist/interface/admin-interface.js +14 -0
  68. package/dist/interface/admin-interface.js.map +1 -1
  69. package/dist/interface/admin-metrics.d.ts +99 -5
  70. package/dist/interface/admin-metrics.d.ts.map +1 -1
  71. package/dist/interface/admin-metrics.js +65 -0
  72. package/dist/interface/admin-metrics.js.map +1 -1
  73. package/dist/interface/conversations.d.ts +35 -35
  74. package/dist/interface/crud/current-user.d.ts +2 -2
  75. package/dist/interface/crud/email-outbox.d.ts +66 -66
  76. package/dist/interface/crud/invoices.d.ts +2 -2
  77. package/dist/interface/crud/projects.d.ts +35 -35
  78. package/dist/interface/crud/team-member-profiles.d.ts +10 -10
  79. package/dist/interface/crud/users.d.ts +10 -10
  80. package/dist/interface/webhooks.d.ts +2 -2
  81. package/dist/utils/analytics-clickmap-overlay.d.ts +18 -0
  82. package/dist/utils/analytics-clickmap-overlay.d.ts.map +1 -0
  83. package/dist/utils/analytics-clickmap-overlay.js +23 -0
  84. package/dist/utils/analytics-clickmap-overlay.js.map +1 -0
  85. package/dist/utils/dev-tool.d.ts +31 -0
  86. package/dist/utils/dev-tool.d.ts.map +1 -0
  87. package/dist/utils/dev-tool.js +37 -0
  88. package/dist/utils/dev-tool.js.map +1 -0
  89. package/dist/utils/dom.d.ts +7 -1
  90. package/dist/utils/dom.d.ts.map +1 -1
  91. package/dist/utils/dom.js +20 -0
  92. package/dist/utils/dom.js.map +1 -1
  93. package/dist/utils/elements-chain.d.ts +38 -0
  94. package/dist/utils/elements-chain.d.ts.map +1 -0
  95. package/dist/utils/elements-chain.js +304 -0
  96. package/dist/utils/elements-chain.js.map +1 -0
  97. package/package.json +1 -1
  98. package/src/apps/apps-config.ts +6 -0
  99. package/src/config-authoring.test.ts +1 -1
  100. package/src/config-authoring.ts +6 -6
  101. package/src/config-rendering.ts +24 -2
  102. package/src/hexclave-config-file.ts +90 -1
  103. package/src/interface/admin-interface.ts +43 -1
  104. package/src/interface/admin-metrics.ts +92 -4
  105. package/src/utils/analytics-clickmap-overlay.tsx +15 -0
  106. package/src/utils/dev-tool.tsx +30 -0
  107. package/src/utils/dom.tsx +42 -0
  108. package/src/utils/elements-chain.tsx +349 -0
@@ -1 +1 @@
1
- {"version":3,"file":"config-authoring.d.ts","names":[],"sources":["../src/config-authoring.ts"],"mappings":";;;KAEK,iBAAA,GAAoB,8BAAA;AAAA,cACZ,iCAAA;AAHyD;AAAA,KAK1D,WAAA,GAAc,iBAAA,UAA2B,iCAAA;AAAA,KAGzC,cAAA,GAAiB,iBAAA,UAA2B,iCAAA;AAAA,KAEnD,iBAAA,qBACH,QAAA,8BACI,MAAA,4CACgB,MAAA,GAAS,CAAA,eAAgB,QAAA,GAAW,iBAAA,CAAkB,MAAA,CAAO,CAAA,GAAI,QAAA,CAAS,CAAA,eACxF,MAAA,GACF,QAAA,kBACE,MAAA,kBACE,OAAA,OAAc,MAAA,QAAc,QAAA,gCACZ,MAAA,GAAS,CAAA,eAAgB,QAAA,GAAW,iBAAA,CAAkB,MAAA,CAAO,CAAA,GAAI,QAAA,CAAS,CAAA,uBAE1F,MAAA,GACF,MAAA;AAAA,KAEH,iBAAA,WAA4B,WAAA,IAC/B,CAAA,SAAU,iBAAA,GACN,CAAA,GAAI,iBAAA,CAAkB,CAAA,EAAG,iBAAA,IACzB,CAAA;;iBAGU,iBAAA,iBAAkC,WAAA,CAAA,CAAa,MAAA,EAAQ,iBAAA,CAAkB,CAAA,IAAK,CAAA;AAAA,iBAK9E,oBAAA,iBAAqC,cAAA,CAAA,CAAgB,MAAA,EAAQ,iBAAA,CAAkB,CAAA,IAAK,CAAA"}
1
+ {"version":3,"file":"config-authoring.d.ts","names":[],"sources":["../src/config-authoring.ts"],"mappings":";;;KAEK,iBAAA,GAAoB,8BAAA;AAAA,cACZ,iCAAA;AAHyD;AAAA,KAK1D,WAAA,GAAc,iBAAA,UAA2B,iCAAA;AAAA,KAGzC,cAAA,GAAiB,iBAAA,UAA2B,iCAAA;AAAA,KAEnD,iBAAA,qBACH,QAAA,8BACM,MAAA,4CACc,MAAA,GAAS,CAAA,eAAgB,QAAA,GAAW,iBAAA,CAAkB,MAAA,CAAO,CAAA,GAAI,QAAA,CAAS,CAAA,eACtF,MAAA,GACJ,QAAA,kBACI,MAAA,kBACA,OAAA,OAAc,MAAA,QAAc,QAAA,gCACZ,MAAA,GAAS,CAAA,eAAgB,QAAA,GAAW,iBAAA,CAAkB,MAAA,CAAO,CAAA,GAAI,QAAA,CAAS,CAAA,uBAExF,MAAA,GACF,MAAA;AAAA,KAEL,iBAAA,WAA4B,WAAA,IAC/B,CAAA,SAAU,iBAAA,GACN,CAAA,GAAI,iBAAA,CAAkB,CAAA,EAAG,iBAAA,IACzB,CAAA;;iBAGU,iBAAA,iBAAkC,WAAA,CAAA,CAAa,MAAA,EAAQ,iBAAA,CAAkB,CAAA,IAAK,CAAA;AAAA,iBAK9E,oBAAA,iBAAqC,cAAA,CAAA,CAAgB,MAAA,EAAQ,iBAAA,CAAkB,CAAA,IAAK,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"config-authoring.js","names":[],"sources":["../src/config-authoring.ts"],"sourcesContent":["import type { BranchConfigNormalizedOverride } from \"./config/schema\";\n\ntype StackConfigObject = BranchConfigNormalizedOverride;\nexport const showOnboardingHexclaveConfigValue = \"show-onboarding\";\n/** @deprecated Use `HexclaveConfig` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackConfig = StackConfigObject | typeof showOnboardingHexclaveConfigValue;\n\n// Hexclave alias — same shape, declared separately so it doesn't inherit the deprecation tag.\nexport type HexclaveConfig = StackConfigObject | typeof showOnboardingHexclaveConfigValue;\n\ntype StrictConfigShape<Actual, Expected> =\n Expected extends readonly unknown[]\n ? Actual extends readonly unknown[]\n ? { [K in keyof Actual]: K extends keyof Expected ? StrictConfigShape<Actual[K], Expected[K]> : never }\n : Actual\n : Expected extends object\n ? Actual extends object\n ? Exclude<keyof Actual, keyof Expected> extends never\n ? { [K in keyof Actual]: K extends keyof Expected ? StrictConfigShape<Actual[K], Expected[K]> : never }\n : never\n : Actual\n : Actual;\n\ntype StrictStackConfig<T extends StackConfig> =\n T extends StackConfigObject\n ? T & StrictConfigShape<T, StackConfigObject>\n : T;\n\n/** @deprecated Use `defineHexclaveConfig` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport function defineStackConfig<const T extends StackConfig>(config: StrictStackConfig<T>): T {\n return config;\n}\n\n// Hexclave alias — separate function so it does not inherit the deprecation tag.\nexport function defineHexclaveConfig<const T extends HexclaveConfig>(config: StrictStackConfig<T>): T {\n return config;\n}\n"],"mappings":";;;AAGA,MAAa,oCAAoC;;AA0BjD,SAAgB,kBAA+C,QAAiC;AAC9F,QAAO;;AAIT,SAAgB,qBAAqD,QAAiC;AACpG,QAAO"}
1
+ {"version":3,"file":"config-authoring.js","names":[],"sources":["../src/config-authoring.ts"],"sourcesContent":["import type { BranchConfigNormalizedOverride } from \"./config/schema\";\n\ntype StackConfigObject = BranchConfigNormalizedOverride;\nexport const showOnboardingHexclaveConfigValue = \"show-onboarding\";\n/** @deprecated Use `HexclaveConfig` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackConfig = StackConfigObject | typeof showOnboardingHexclaveConfigValue;\n\n// Hexclave alias — same shape, declared separately so it doesn't inherit the deprecation tag.\nexport type HexclaveConfig = StackConfigObject | typeof showOnboardingHexclaveConfigValue;\n\ntype StrictConfigShape<Actual, Expected> =\n Expected extends readonly unknown[]\n ? Actual extends readonly unknown[]\n ? { [K in keyof Actual]: K extends keyof Expected ? StrictConfigShape<Actual[K], Expected[K]> : never }\n : Actual\n : Expected extends object\n ? Actual extends object\n ? Exclude<keyof Actual, keyof Expected> extends never\n ? { [K in keyof Actual]: K extends keyof Expected ? StrictConfigShape<Actual[K], Expected[K]> : never }\n : never\n : Actual\n : Actual;\n\ntype StrictStackConfig<T extends StackConfig> =\n T extends StackConfigObject\n ? T & StrictConfigShape<T, StackConfigObject>\n : T;\n\n/** @deprecated Use `defineHexclaveConfig` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport function defineStackConfig<const T extends StackConfig>(config: StrictStackConfig<T>): T {\n return config;\n}\n\n// Hexclave alias — separate function so it does not inherit the deprecation tag.\nexport function defineHexclaveConfig<const T extends HexclaveConfig>(config: StrictStackConfig<T>): T {\n return config;\n}\n"],"mappings":";;;AAGA,MAAa,oCAAoC;;AA0BjD,SAAgB,kBAA+C,QAAiC;AAC9F,QAAO;;AAIT,SAAgB,qBAAqD,QAAiC;AACpG,QAAO"}
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./chunk-BE-pF4vm.js');
2
2
  let vitest = require("vitest");
3
- let __utils_types_js = require("./utils/types.js");
4
3
  let __config_authoring_js = require("./config-authoring.js");
4
+ let __utils_types_js = require("./utils/types.js");
5
5
 
6
6
  //#region src/config-authoring.test.ts
7
7
  const validConfig = (0, __config_authoring_js.defineStackConfig)({ payments: { items: { todos: {
@@ -1 +1 @@
1
- {"version":3,"file":"config-authoring.test.js","names":[],"sources":["../src/config-authoring.test.ts"],"sourcesContent":["import { expect, it } from \"vitest\";\nimport { typeAssertExtends } from \"./utils/types\";\nimport { defineStackConfig, type StackConfig } from \"./config-authoring\";\n\nconst validConfig = defineStackConfig({\n payments: {\n items: {\n todos: {\n displayName: \"Todo Slots\",\n customerType: \"user\",\n },\n },\n },\n});\nconst showOnboardingConfig = defineStackConfig(\"show-onboarding\");\n\ntypeAssertExtends<typeof validConfig, StackConfig>()();\ntypeAssertExtends<typeof showOnboardingConfig, StackConfig>()();\n\nit(\"returns its input unchanged\", () => {\n expect(defineStackConfig(validConfig)).toBe(validConfig);\n expect(defineStackConfig(showOnboardingConfig)).toBe(showOnboardingConfig);\n});\n\ndefineStackConfig({\n // @ts-expect-error Top-level dot notation should not be accepted in typed config files.\n \"payments.items\": {\n todos: {\n displayName: \"Todo Slots\",\n customerType: \"user\",\n },\n },\n});\n\ndefineStackConfig({\n payments: {\n // @ts-expect-error Unknown keys should not be accepted in typed config files.\n missingField: true,\n },\n});\n\ndefineStackConfig({\n payments: {\n items: {\n todos: {\n displayName: \"Todo Slots\",\n // @ts-expect-error Invalid enum values should fail type-checking.\n customerType: \"workspace\",\n },\n },\n },\n});\n"],"mappings":";;;;;;AAIA,MAAM,2DAAgC,EACpC,UAAU,EACR,OAAO,EACL,OAAO;CACL,aAAa;CACb,cAAc;CACf,EACF,EACF,EACF,CAAC;AACF,MAAM,oEAAyC,kBAAkB;yCAEb,EAAE;yCACO,EAAE;eAE5D,qCAAqC;AACtC,iEAAyB,YAAY,CAAC,CAAC,KAAK,YAAY;AACxD,iEAAyB,qBAAqB,CAAC,CAAC,KAAK,qBAAqB;EAC1E;6CAEgB,EAEhB,kBAAkB,EAChB,OAAO;CACL,aAAa;CACb,cAAc;CACf,EACF,EACF,CAAC;6CAEgB,EAChB,UAAU,EAER,cAAc,MACf,EACF,CAAC;6CAEgB,EAChB,UAAU,EACR,OAAO,EACL,OAAO;CACL,aAAa;CAEb,cAAc;CACf,EACF,EACF,EACF,CAAC"}
1
+ {"version":3,"file":"config-authoring.test.js","names":[],"sources":["../src/config-authoring.test.ts"],"sourcesContent":["import { expect, it } from \"vitest\";\nimport { defineStackConfig, type StackConfig } from \"./config-authoring\";\nimport { typeAssertExtends } from \"./utils/types\";\n\nconst validConfig = defineStackConfig({\n payments: {\n items: {\n todos: {\n displayName: \"Todo Slots\",\n customerType: \"user\",\n },\n },\n },\n});\nconst showOnboardingConfig = defineStackConfig(\"show-onboarding\");\n\ntypeAssertExtends<typeof validConfig, StackConfig>()();\ntypeAssertExtends<typeof showOnboardingConfig, StackConfig>()();\n\nit(\"returns its input unchanged\", () => {\n expect(defineStackConfig(validConfig)).toBe(validConfig);\n expect(defineStackConfig(showOnboardingConfig)).toBe(showOnboardingConfig);\n});\n\ndefineStackConfig({\n // @ts-expect-error Top-level dot notation should not be accepted in typed config files.\n \"payments.items\": {\n todos: {\n displayName: \"Todo Slots\",\n customerType: \"user\",\n },\n },\n});\n\ndefineStackConfig({\n payments: {\n // @ts-expect-error Unknown keys should not be accepted in typed config files.\n missingField: true,\n },\n});\n\ndefineStackConfig({\n payments: {\n items: {\n todos: {\n displayName: \"Todo Slots\",\n // @ts-expect-error Invalid enum values should fail type-checking.\n customerType: \"workspace\",\n },\n },\n },\n});\n"],"mappings":";;;;;;AAIA,MAAM,2DAAgC,EACpC,UAAU,EACR,OAAO,EACL,OAAO;CACL,aAAa;CACb,cAAc;CACf,EACF,EACF,EACF,CAAC;AACF,MAAM,oEAAyC,kBAAkB;yCAEb,EAAE;yCACO,EAAE;eAE5D,qCAAqC;AACtC,iEAAyB,YAAY,CAAC,CAAC,KAAK,YAAY;AACxD,iEAAyB,qBAAqB,CAAC,CAAC,KAAK,qBAAqB;EAC1E;6CAEgB,EAEhB,kBAAkB,EAChB,OAAO;CACL,aAAa;CACb,cAAc;CACf,EACF,EACF,CAAC;6CAEgB,EAChB,UAAU,EAER,cAAc,MACf,EACF,CAAC;6CAEgB,EAChB,UAAU,EACR,OAAO,EACL,OAAO;CACL,aAAa;CAEb,cAAc;CACf,EACF,EACF,EACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { parseHexclaveConfigFileContent, renderConfigFileContent } from "./hexclave-config-file.js";
1
+ import { hexclaveConfigFileExportsConfig, parseHexclaveConfigFileContent, renderConfigFileContent, tryParseHexclaveConfigFileContent } from "./hexclave-config-file.js";
2
2
 
3
3
  //#region src/config-rendering.d.ts
4
4
  /**
@@ -13,5 +13,5 @@ declare function detectConfigImportPackage(dependencies: string[]): string | und
13
13
  */
14
14
  declare function detectImportPackageFromDir(dir: string): string | undefined;
15
15
  //#endregion
16
- export { detectConfigImportPackage, detectImportPackageFromDir, parseHexclaveConfigFileContent, renderConfigFileContent };
16
+ export { detectConfigImportPackage, detectImportPackageFromDir, hexclaveConfigFileExportsConfig, parseHexclaveConfigFileContent, renderConfigFileContent, tryParseHexclaveConfigFileContent };
17
17
  //# sourceMappingURL=config-rendering.d.ts.map
@@ -90,6 +90,20 @@ function detectImportPackageFromDir(dir) {
90
90
  (void 0)?.test("parseHexclaveConfigFileContent rejects dynamic config exports", ({ expect }) => {
91
91
  expect(() => (0, __hexclave_config_file_js.parseHexclaveConfigFileContent)("export const config = makeConfig();", "stack.config.ts")).toThrow(/Unsupported config expression/);
92
92
  });
93
+ (void 0)?.test("tryParseHexclaveConfigFileContent returns the config for static exports", ({ expect }) => {
94
+ expect((0, __hexclave_config_file_js.tryParseHexclaveConfigFileContent)("export const config = { auth: { allowSignUp: true } };", "stack.config.ts")).toEqual({ auth: { allowSignUp: true } });
95
+ });
96
+ (void 0)?.test("tryParseHexclaveConfigFileContent returns null for non-static exports", ({ expect }) => {
97
+ expect((0, __hexclave_config_file_js.tryParseHexclaveConfigFileContent)("export const config = makeConfig();", "stack.config.ts")).toBeNull();
98
+ expect((0, __hexclave_config_file_js.tryParseHexclaveConfigFileContent)("import x from \"./x.txt\" with { type: \"text\" };\nexport const config = { a: x };", "stack.config.ts")).toBeNull();
99
+ expect((0, __hexclave_config_file_js.tryParseHexclaveConfigFileContent)("export const config = {", "stack.config.ts")).toBeNull();
100
+ });
101
+ (void 0)?.test("hexclaveConfigFileExportsConfig detects a config export", ({ expect }) => {
102
+ expect((0, __hexclave_config_file_js.hexclaveConfigFileExportsConfig)("export const config = { a: 1 };", "stack.config.ts")).toBe(true);
103
+ expect((0, __hexclave_config_file_js.hexclaveConfigFileExportsConfig)("import x from \"./x.txt\" with { type: \"text\" };\nexport const config = { a: x };", "stack.config.ts")).toBe(true);
104
+ expect((0, __hexclave_config_file_js.hexclaveConfigFileExportsConfig)("export const notConfig = { a: 1 };", "stack.config.ts")).toBe(false);
105
+ expect((0, __hexclave_config_file_js.hexclaveConfigFileExportsConfig)("export const config = {", "stack.config.ts")).toBe(false);
106
+ });
93
107
  (void 0)?.test("renderConfigFileContent rejects conflicting dotted keys", ({ expect }) => {
94
108
  expect(() => (0, __hexclave_config_file_js.renderConfigFileContent)({
95
109
  "a.b": 1,
@@ -123,6 +137,8 @@ function detectImportPackageFromDir(dir) {
123
137
  //#endregion
124
138
  exports.detectConfigImportPackage = detectConfigImportPackage;
125
139
  exports.detectImportPackageFromDir = detectImportPackageFromDir;
140
+ exports.hexclaveConfigFileExportsConfig = __hexclave_config_file_js.hexclaveConfigFileExportsConfig;
126
141
  exports.parseHexclaveConfigFileContent = __hexclave_config_file_js.parseHexclaveConfigFileContent;
127
142
  exports.renderConfigFileContent = __hexclave_config_file_js.renderConfigFileContent;
143
+ exports.tryParseHexclaveConfigFileContent = __hexclave_config_file_js.tryParseHexclaveConfigFileContent;
128
144
  //# sourceMappingURL=config-rendering.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-rendering.js","names":[],"sources":["../src/config-rendering.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"fs\";\nimport path from \"path\";\nimport { parseHexclaveConfigFileContent, renderConfigFileContent } from \"./hexclave-config-file\";\nexport { parseHexclaveConfigFileContent, renderConfigFileContent };\n\n/**\n * Packages that export the `HexclaveConfig` type, in priority order.\n * The first match found in a project's dependencies wins. Hexclave-branded\n * packages come first (canonical); the legacy `@stackframe/*` names remain\n * so projects pinned to the last legacy release still render a config file\n * that compiles against their installed SDK.\n */\nconst CONFIG_IMPORT_PACKAGES = [\n \"@hexclave/next\",\n \"@hexclave/react\",\n \"@hexclave/tanstack-start\",\n \"@hexclave/js\",\n \"@hexclave/template\",\n \"@stackframe/stack\",\n \"@stackframe/react\",\n \"@stackframe/js\",\n \"@stackframe/template\",\n] as const;\n\n/**\n * Given a list of dependency names (from package.json), returns the SDK\n * package that should be used for the `HexclaveConfig` import, or `undefined`\n * if none of the known packages are installed.\n */\nexport function detectConfigImportPackage(dependencies: string[]): string | undefined {\n for (const pkg of CONFIG_IMPORT_PACKAGES) {\n if (dependencies.includes(pkg)) {\n return pkg;\n }\n }\n return undefined;\n}\n\n/**\n * Walks up from `dir` to find the nearest `package.json` and returns the\n * best SDK package to use for the `HexclaveConfig` type import.\n */\nexport function detectImportPackageFromDir(dir: string): string | undefined {\n let current = dir;\n while (true) {\n const pkgPath = path.join(current, \"package.json\");\n if (existsSync(pkgPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgPath, \"utf-8\"));\n const deps = [\n ...Object.keys(pkg.dependencies ?? {}),\n ...Object.keys(pkg.devDependencies ?? {}),\n ];\n return detectConfigImportPackage(deps);\n } catch {\n return undefined;\n }\n }\n const parent = path.dirname(current);\n if (parent === current) break;\n current = parent;\n }\n return undefined;\n}\n\nimport.meta.vitest?.test(\"renderConfigFileContent normalizes config exports\", ({ expect }) => {\n expect(renderConfigFileContent({\n \"payments.items.todos.displayName\": \"Todo Slots\",\n \"payments.items.todos.customerType\": \"user\",\n })).toContain(`export const config: HexclaveConfig = {\n \"payments\": {\n \"items\": {\n \"todos\": {\n \"displayName\": \"Todo Slots\",\n \"customerType\": \"user\"\n }\n }\n }\n};`);\n});\n\nimport.meta.vitest?.test(\"parseHexclaveConfigFileContent parses static config exports\", ({ expect }) => {\n expect(parseHexclaveConfigFileContent(`\n import type { StackConfig } from \"@hexclave/js\";\n export const config: StackConfig = {\n auth: { allowSignUp: true },\n payments: { testMode: false },\n };\n `, \"stack.config.ts\")).toMatchInlineSnapshot(`\n {\n \"auth\": {\n \"allowSignUp\": true,\n },\n \"payments\": {\n \"testMode\": false,\n },\n }\n `);\n});\n\nimport.meta.vitest?.test(\"parseHexclaveConfigFileContent parses show-onboarding\", ({ expect }) => {\n expect(parseHexclaveConfigFileContent('export const config = \"show-onboarding\";', \"stack.config.ts\")).toBe(\"show-onboarding\");\n});\n\nimport.meta.vitest?.test(\"parseHexclaveConfigFileContent rejects dynamic config exports\", ({ expect }) => {\n expect(() => parseHexclaveConfigFileContent(\"export const config = makeConfig();\", \"stack.config.ts\")).toThrow(/Unsupported config expression/);\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent rejects conflicting dotted keys\", ({ expect }) => {\n expect(() => renderConfigFileContent({\n \"a.b\": 1,\n \"a.b.c\": 2,\n })).toThrowError(/conflicting keys.*\"a\\.b\\.c\"/);\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent rejects invalid config exports\", ({ expect }) => {\n expect(() => renderConfigFileContent(null)).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid config: expected a plain object.]`,\n );\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent uses custom import package\", ({ expect }) => {\n const content = renderConfigFileContent({}, \"@hexclave/next\");\n expect(content).toContain('import type { HexclaveConfig } from \"@hexclave/next/config\";');\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent defaults to @hexclave/js\", ({ expect }) => {\n const content = renderConfigFileContent({});\n expect(content).toContain('import type { HexclaveConfig } from \"@hexclave/js/config\";');\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent keeps legacy @stackframe packages on their root entrypoint\", ({ expect }) => {\n // The lightweight `/config` subpath only exists on Hexclave-branded packages;\n // already-published @stackframe/* releases predate it.\n const content = renderConfigFileContent({}, \"@stackframe/next\");\n expect(content).toContain('import type { HexclaveConfig } from \"@stackframe/next\";');\n});\n\nimport.meta.vitest?.test(\"detectConfigImportPackage picks first matching package by priority\", ({ expect }) => {\n expect(detectConfigImportPackage([\"@hexclave/next\", \"@hexclave/js\"])).toBe(\"@hexclave/next\");\n expect(detectConfigImportPackage([\"@hexclave/react\", \"@hexclave/js\"])).toBe(\"@hexclave/react\");\n expect(detectConfigImportPackage([\"@hexclave/js\"])).toBe(\"@hexclave/js\");\n expect(detectConfigImportPackage([\"@hexclave/tanstack-start\"])).toBe(\"@hexclave/tanstack-start\");\n // Hexclave names take priority over legacy stackframe names when both appear.\n expect(detectConfigImportPackage([\"@stackframe/stack\", \"@hexclave/next\"])).toBe(\"@hexclave/next\");\n // Legacy fallback still works for projects pinned to the last @stackframe/* release.\n expect(detectConfigImportPackage([\"@stackframe/stack\"])).toBe(\"@stackframe/stack\");\n expect(detectConfigImportPackage([\"@stackframe/template\"])).toBe(\"@stackframe/template\");\n expect(detectConfigImportPackage([\"lodash\", \"express\"])).toBeUndefined();\n expect(detectConfigImportPackage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,KAAC,2DAA6D,EAAA,aAAa;AACpF,qEAAqC,KAAK,CAAC,CAAC,mCAC1C,oDACD;EACD;CAEF,SAAW,KAAC,uDAAyD,EAAA,aAAa;AAEhF,+DADwC,EAAE,EAAE,iBAAiB,CAC9C,CAAC,UAAU,iEAA+D;EACzF;CAEF,SAAW,KAAC,qDAAmD,EAAQ,aAAS;AAE9E,+DADwC,EAAE,CAAC,CAC5B,CAAC,UAAU,+DAA6D;EACvF;CAEF,SAAW,KAAC,uFAAsF,EAAA,aAAgB;AAIhH,+DADwC,EAAE,EAAE,mBAAmB,CAChD,CAAC,UAAU,4DAA0D;EACpF;CAEF,SAAW,KAAC,uEAAwE,EAAA,aAAc;AAChG,QAAO,0BAA0B,CAAC,kBAAkB,eAAe,CAAC,CAAC,CAAC,KAAK,iBAAiB;AAC5F,QAAO,0BAA0B,CAAC,mBAAmB,eAAe,CAAC,CAAC,CAAC,KAAK,kBAAkB;AAC9F,QAAO,0BAA0B,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,eAAe;AACxE,QAAO,0BAA0B,CAAC,2BAA2B,CAAC,CAAC,CAAC,KAAK,2BAA2B;AAEhG,QAAO,0BAA0B,CAAC,qBAAqB,iBAAiB,CAAC,CAAC,CAAC,KAAK,iBAAiB;AAEjG,QAAO,0BAA0B,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,oBAAoB;AAClF,QAAO,0BAA0B,CAAC,uBAAuB,CAAC,CAAC,CAAC,KAAK,uBAAuB;AACxF,QAAO,0BAA0B,CAAC,UAAU,UAAU,CAAC,CAAC,CAAC,eAAe;AACxE,QAAO,0BAA0B,EAAE,CAAC,CAAC,CAAC,eAAe;EACrD"}
1
+ {"version":3,"file":"config-rendering.js","names":[],"sources":["../src/config-rendering.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"fs\";\nimport path from \"path\";\nimport { hexclaveConfigFileExportsConfig, parseHexclaveConfigFileContent, renderConfigFileContent, tryParseHexclaveConfigFileContent } from \"./hexclave-config-file\";\nexport { hexclaveConfigFileExportsConfig, parseHexclaveConfigFileContent, renderConfigFileContent, tryParseHexclaveConfigFileContent };\n\n/**\n * Packages that export the `HexclaveConfig` type, in priority order.\n * The first match found in a project's dependencies wins. Hexclave-branded\n * packages come first (canonical); the legacy `@stackframe/*` names remain\n * so projects pinned to the last legacy release still render a config file\n * that compiles against their installed SDK.\n */\nconst CONFIG_IMPORT_PACKAGES = [\n \"@hexclave/next\",\n \"@hexclave/react\",\n \"@hexclave/tanstack-start\",\n \"@hexclave/js\",\n \"@hexclave/template\",\n \"@stackframe/stack\",\n \"@stackframe/react\",\n \"@stackframe/js\",\n \"@stackframe/template\",\n] as const;\n\n/**\n * Given a list of dependency names (from package.json), returns the SDK\n * package that should be used for the `HexclaveConfig` import, or `undefined`\n * if none of the known packages are installed.\n */\nexport function detectConfigImportPackage(dependencies: string[]): string | undefined {\n for (const pkg of CONFIG_IMPORT_PACKAGES) {\n if (dependencies.includes(pkg)) {\n return pkg;\n }\n }\n return undefined;\n}\n\n/**\n * Walks up from `dir` to find the nearest `package.json` and returns the\n * best SDK package to use for the `HexclaveConfig` type import.\n */\nexport function detectImportPackageFromDir(dir: string): string | undefined {\n let current = dir;\n while (true) {\n const pkgPath = path.join(current, \"package.json\");\n if (existsSync(pkgPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgPath, \"utf-8\"));\n const deps = [\n ...Object.keys(pkg.dependencies ?? {}),\n ...Object.keys(pkg.devDependencies ?? {}),\n ];\n return detectConfigImportPackage(deps);\n } catch {\n return undefined;\n }\n }\n const parent = path.dirname(current);\n if (parent === current) break;\n current = parent;\n }\n return undefined;\n}\n\nimport.meta.vitest?.test(\"renderConfigFileContent normalizes config exports\", ({ expect }) => {\n expect(renderConfigFileContent({\n \"payments.items.todos.displayName\": \"Todo Slots\",\n \"payments.items.todos.customerType\": \"user\",\n })).toContain(`export const config: HexclaveConfig = {\n \"payments\": {\n \"items\": {\n \"todos\": {\n \"displayName\": \"Todo Slots\",\n \"customerType\": \"user\"\n }\n }\n }\n};`);\n});\n\nimport.meta.vitest?.test(\"parseHexclaveConfigFileContent parses static config exports\", ({ expect }) => {\n expect(parseHexclaveConfigFileContent(`\n import type { StackConfig } from \"@hexclave/js\";\n export const config: StackConfig = {\n auth: { allowSignUp: true },\n payments: { testMode: false },\n };\n `, \"stack.config.ts\")).toMatchInlineSnapshot(`\n {\n \"auth\": {\n \"allowSignUp\": true,\n },\n \"payments\": {\n \"testMode\": false,\n },\n }\n `);\n});\n\nimport.meta.vitest?.test(\"parseHexclaveConfigFileContent parses show-onboarding\", ({ expect }) => {\n expect(parseHexclaveConfigFileContent('export const config = \"show-onboarding\";', \"stack.config.ts\")).toBe(\"show-onboarding\");\n});\n\nimport.meta.vitest?.test(\"parseHexclaveConfigFileContent rejects dynamic config exports\", ({ expect }) => {\n expect(() => parseHexclaveConfigFileContent(\"export const config = makeConfig();\", \"stack.config.ts\")).toThrow(/Unsupported config expression/);\n});\n\nimport.meta.vitest?.test(\"tryParseHexclaveConfigFileContent returns the config for static exports\", ({ expect }) => {\n expect(tryParseHexclaveConfigFileContent(\"export const config = { auth: { allowSignUp: true } };\", \"stack.config.ts\")).toEqual({\n auth: { allowSignUp: true },\n });\n});\n\nimport.meta.vitest?.test(\"tryParseHexclaveConfigFileContent returns null for non-static exports\", ({ expect }) => {\n // Wrapped in a helper call (e.g. defineStackConfig) -> not a plain literal.\n expect(tryParseHexclaveConfigFileContent(\"export const config = makeConfig();\", \"stack.config.ts\")).toBeNull();\n // References an imported value -> has structure to preserve.\n expect(tryParseHexclaveConfigFileContent('import x from \"./x.txt\" with { type: \"text\" };\\nexport const config = { a: x };', \"stack.config.ts\")).toBeNull();\n // Syntax error.\n expect(tryParseHexclaveConfigFileContent(\"export const config = {\", \"stack.config.ts\")).toBeNull();\n});\n\nimport.meta.vitest?.test(\"hexclaveConfigFileExportsConfig detects a config export\", ({ expect }) => {\n expect(hexclaveConfigFileExportsConfig(\"export const config = { a: 1 };\", \"stack.config.ts\")).toBe(true);\n expect(hexclaveConfigFileExportsConfig('import x from \"./x.txt\" with { type: \"text\" };\\nexport const config = { a: x };', \"stack.config.ts\")).toBe(true);\n expect(hexclaveConfigFileExportsConfig(\"export const notConfig = { a: 1 };\", \"stack.config.ts\")).toBe(false);\n expect(hexclaveConfigFileExportsConfig(\"export const config = {\", \"stack.config.ts\")).toBe(false);\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent rejects conflicting dotted keys\", ({ expect }) => {\n expect(() => renderConfigFileContent({\n \"a.b\": 1,\n \"a.b.c\": 2,\n })).toThrowError(/conflicting keys.*\"a\\.b\\.c\"/);\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent rejects invalid config exports\", ({ expect }) => {\n expect(() => renderConfigFileContent(null)).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid config: expected a plain object.]`,\n );\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent uses custom import package\", ({ expect }) => {\n const content = renderConfigFileContent({}, \"@hexclave/next\");\n expect(content).toContain('import type { HexclaveConfig } from \"@hexclave/next/config\";');\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent defaults to @hexclave/js\", ({ expect }) => {\n const content = renderConfigFileContent({});\n expect(content).toContain('import type { HexclaveConfig } from \"@hexclave/js/config\";');\n});\n\nimport.meta.vitest?.test(\"renderConfigFileContent keeps legacy @stackframe packages on their root entrypoint\", ({ expect }) => {\n // The lightweight `/config` subpath only exists on Hexclave-branded packages;\n // already-published @stackframe/* releases predate it.\n const content = renderConfigFileContent({}, \"@stackframe/next\");\n expect(content).toContain('import type { HexclaveConfig } from \"@stackframe/next\";');\n});\n\nimport.meta.vitest?.test(\"detectConfigImportPackage picks first matching package by priority\", ({ expect }) => {\n expect(detectConfigImportPackage([\"@hexclave/next\", \"@hexclave/js\"])).toBe(\"@hexclave/next\");\n expect(detectConfigImportPackage([\"@hexclave/react\", \"@hexclave/js\"])).toBe(\"@hexclave/react\");\n expect(detectConfigImportPackage([\"@hexclave/js\"])).toBe(\"@hexclave/js\");\n expect(detectConfigImportPackage([\"@hexclave/tanstack-start\"])).toBe(\"@hexclave/tanstack-start\");\n // Hexclave names take priority over legacy stackframe names when both appear.\n expect(detectConfigImportPackage([\"@stackframe/stack\", \"@hexclave/next\"])).toBe(\"@hexclave/next\");\n // Legacy fallback still works for projects pinned to the last @stackframe/* release.\n expect(detectConfigImportPackage([\"@stackframe/stack\"])).toBe(\"@stackframe/stack\");\n expect(detectConfigImportPackage([\"@stackframe/template\"])).toBe(\"@stackframe/template\");\n expect(detectConfigImportPackage([\"lodash\", \"express\"])).toBeUndefined();\n expect(detectConfigImportPackage([])).toBeUndefined();\n});\n"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,yBAAyB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;;;AAOD,SAAgB,0BAA0B,cAA4C;AACpF,MAAK,MAAM,OAAO,uBAChB,KAAI,aAAa,SAAS,IAAI,CAC5B,QAAO;;;;;;AAUb,SAAgB,2BAA2B,KAAiC;CAC1E,IAAI,UAAU;AACd,QAAO,MAAM;EACX,MAAM,UAAU,aAAK,KAAK,SAAS,eAAe;AAClD,yBAAe,QAAQ,CACrB,KAAI;GACF,MAAM,MAAM,KAAK,2BAAmB,SAAS,QAAQ,CAAC;AAKtD,UAAO,0BAJM,CACX,GAAG,OAAO,KAAK,IAAI,gBAAgB,EAAE,CAAC,EACtC,GAAG,OAAO,KAAK,IAAI,mBAAmB,EAAE,CAAC,CAC1C,CACqC;UAChC;AACN;;EAGJ,MAAM,SAAS,aAAK,QAAQ,QAAQ;AACpC,MAAI,WAAW,QAAS;AACxB,YAAU;;;CAKd,SAAW,KAAC,sDAAwD,EAAA,aAAa;AAC/E,+DAA+B;EAC7B,oCAAoC;EACpC,qCAAqC;EACtC,CAAC,CAAC,CAAC,UAAU;;;;;;;;;IASZ;EACF;CAEF,SAAW,KAAC,gEAAkE,EAAA,aAAa;AACzF,sEAAsC;;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;AAE9E,+DADwC,EAAE,CAAC,CAC5B,CAAC,UAAU,+DAA6D;EACvF;CAEF,SAAW,KAAC,uFAAsF,EAAA,aAAgB;AAIhH,+DADwC,EAAE,EAAE,mBAAmB,CAChD,CAAC,UAAU,4DAA0D;EACpF;CAEF,SAAW,KAAC,uEAAwE,EAAA,aAAc;AAChG,QAAO,0BAA0B,CAAC,kBAAkB,eAAe,CAAC,CAAC,CAAC,KAAK,iBAAiB;AAC5F,QAAO,0BAA0B,CAAC,mBAAmB,eAAe,CAAC,CAAC,CAAC,KAAK,kBAAkB;AAC9F,QAAO,0BAA0B,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,eAAe;AACxE,QAAO,0BAA0B,CAAC,2BAA2B,CAAC,CAAC,CAAC,KAAK,2BAA2B;AAEhG,QAAO,0BAA0B,CAAC,qBAAqB,iBAAiB,CAAC,CAAC,CAAC,KAAK,iBAAiB;AAEjG,QAAO,0BAA0B,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,oBAAoB;AAClF,QAAO,0BAA0B,CAAC,uBAAuB,CAAC,CAAC,CAAC,KAAK,uBAAuB;AACxF,QAAO,0BAA0B,CAAC,UAAU,UAAU,CAAC,CAAC,CAAC,eAAe;AACxE,QAAO,0BAA0B,EAAE,CAAC,CAAC,CAAC,eAAe;EACrD"}
@@ -1,5 +1,5 @@
1
- import { ALL_APPS } from "../../apps/apps-config.js";
2
1
  import { deindent } from "../../utils/strings.js";
2
+ import { ALL_APPS } from "../../apps/apps-config.js";
3
3
 
4
4
  //#region src/ai/unified-prompts/reminders.ts
5
5
  const remindersPrompt = deindent`
@@ -156,6 +156,12 @@ declare const ALL_APPS: {
156
156
  readonly tags: ["developers", "operations"];
157
157
  readonly stage: "stable";
158
158
  };
159
+ readonly clickmaps: {
160
+ readonly displayName: "Clickmaps";
161
+ readonly subtitle: "Visualize where users click across your app";
162
+ readonly tags: ["developers", "operations"];
163
+ readonly stage: "alpha";
164
+ };
159
165
  readonly "session-replays": {
160
166
  readonly displayName: "Session Replays";
161
167
  readonly subtitle: "Watch real user sessions to understand how people use your app";
@@ -141,6 +141,12 @@ const ALL_APPS = {
141
141
  tags: ["developers", "operations"],
142
142
  stage: "stable"
143
143
  },
144
+ "clickmaps": {
145
+ displayName: "Clickmaps",
146
+ subtitle: "Visualize where users click across your app",
147
+ tags: ["developers", "operations"],
148
+ stage: "alpha"
149
+ },
144
150
  "session-replays": {
145
151
  displayName: "Session Replays",
146
152
  subtitle: "Watch real user sessions to understand how people use your app",
@@ -1 +1 @@
1
- {"version":3,"file":"apps-config.js","names":[],"sources":["../../../src/apps/apps-config.ts"],"sourcesContent":["type AppTag = {\n displayName: string,\n};\n\nexport const ALL_APP_TAGS = {\n \"expert\": {\n displayName: \"Expert\",\n },\n \"integration\": {\n displayName: \"Integrations\",\n },\n \"auth\": {\n displayName: \"Authentication\",\n },\n \"developers\": {\n displayName: \"For Developers\",\n },\n \"security\": {\n displayName: \"Security\",\n },\n \"operations\": {\n displayName: \"For Operations\",\n },\n \"gtm\": {\n displayName: \"Go-to-market\",\n },\n \"comms\": {\n displayName: \"Communications\",\n },\n \"automation\": {\n displayName: \"Automation\",\n },\n \"storage\": {\n displayName: \"Storage & Databases\",\n },\n \"various\": {\n displayName: \"Various\",\n },\n} as const satisfies Record<string, AppTag>;\n\ntype App = {\n displayName: string,\n subtitle: string,\n tags: (keyof typeof ALL_APP_TAGS)[],\n stage: \"alpha\" | \"beta\" | \"stable\",\n};\n\nexport type AppId = keyof typeof ALL_APPS;\n\nexport const ALL_APPS = {\n \"authentication\": {\n displayName: \"Authentication\",\n subtitle: \"User sign-in and account management\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"fraud-protection\": {\n displayName: \"Fraud Protection\",\n subtitle: \"Protect your project from fraud and abuse\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"onboarding\": {\n displayName: \"Onboarding\",\n subtitle: \"Configure user onboarding requirements\",\n tags: [\"auth\"],\n stage: \"alpha\",\n },\n \"teams\": {\n displayName: \"Teams\",\n subtitle: \"Team collaboration and management\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"rbac\": {\n displayName: \"RBAC\",\n subtitle: \"Role-based access control and permissions\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"api-keys\": {\n displayName: \"API Keys\",\n subtitle: \"API key generation and management\",\n tags: [\"auth\", \"security\", \"developers\"],\n stage: \"stable\",\n },\n \"payments\": {\n displayName: \"Payments\",\n subtitle: \"Payment processing and subscription management\",\n tags: [\"operations\", \"gtm\"],\n stage: \"beta\",\n },\n \"emails\": {\n displayName: \"Emails\",\n subtitle: \"Email template configuration and management\",\n tags: [\"comms\"],\n stage: \"stable\",\n },\n \"support\": {\n displayName: \"Support\",\n subtitle: \"Customer conversations, team replies, and internal notes\",\n tags: [\"comms\", \"operations\"],\n stage: \"alpha\",\n },\n \"email-api\": {\n displayName: \"Email API\",\n subtitle: \"Programmatic email sending and delivery\",\n tags: [\"comms\", \"developers\", \"expert\"],\n stage: \"alpha\",\n },\n \"data-vault\": {\n displayName: \"Data Vault\",\n subtitle: \"Secure storage for sensitive user data\",\n tags: [\"security\", \"storage\"],\n stage: \"beta\",\n },\n \"webhooks\": {\n displayName: \"Webhooks\",\n subtitle: \"Real-time event notifications and integrations\",\n tags: [\"developers\"],\n stage: \"stable\",\n },\n \"tv-mode\": {\n displayName: \"TV mode\",\n subtitle: \"Dashboard display for large screens\",\n tags: [\"various\"],\n stage: \"alpha\",\n },\n \"launch-checklist\": {\n displayName: \"Launch Checklist\",\n subtitle: \"Pre-launch verification and readiness checks\",\n tags: [\"various\"],\n stage: \"stable\",\n },\n \"catalyst\": {\n displayName: \"Catalyst\",\n subtitle: \"Project scaffolding and rapid development\",\n tags: [\"various\"],\n stage: \"alpha\",\n },\n \"neon\": {\n displayName: \"Neon Integration\",\n subtitle: \"Serverless Postgres database integration\",\n tags: [\"integration\", \"storage\"],\n stage: \"alpha\",\n },\n \"convex\": {\n displayName: \"Convex Integration\",\n subtitle: \"Real-time backend platform integration\",\n tags: [\"integration\", \"storage\"],\n stage: \"alpha\",\n },\n \"vercel\": {\n displayName: \"Vercel Integration\",\n subtitle: \"Deploy your Hexclave project to Vercel\",\n tags: [\"integration\", \"developers\"],\n stage: \"stable\",\n },\n \"tanstack-start\": {\n displayName: \"TanStack Start\",\n subtitle: \"Use Hexclave in TanStack Start apps\",\n tags: [\"integration\", \"developers\"],\n stage: \"alpha\",\n },\n \"analytics\": {\n displayName: \"Analytics\",\n subtitle: \"View and explore analytics data\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n },\n \"session-replays\": {\n displayName: \"Session Replays\",\n subtitle: \"Watch real user sessions to understand how people use your app\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n },\n} as const satisfies Record<string, App>;\n"],"mappings":";AAIA,MAAa,eAAe;CAC1B,UAAU,EACR,aAAa,UACd;CACD,eAAe,EACb,aAAa,gBACd;CACD,QAAQ,EACN,aAAa,kBACd;CACD,cAAc,EACZ,aAAa,kBACd;CACD,YAAY,EACV,aAAa,YACd;CACD,cAAc,EACZ,aAAa,kBACd;CACD,OAAO,EACL,aAAa,gBACd;CACD,SAAS,EACP,aAAa,kBACd;CACD,cAAc,EACZ,aAAa,cACd;CACD,WAAW,EACT,aAAa,uBACd;CACD,WAAW,EACT,aAAa,WACd;CACF;AAWD,MAAa,WAAW;CACtB,kBAAkB;EAChB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,WAAW;EAC1B,OAAO;EACR;CACD,oBAAoB;EAClB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,WAAW;EAC1B,OAAO;EACR;CACD,cAAc;EACZ,aAAa;EACb,UAAU;EACV,MAAM,CAAC,OAAO;EACd,OAAO;EACR;CACD,SAAS;EACP,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,WAAW;EAC1B,OAAO;EACR;CACD,QAAQ;EACN,aAAa;EACb,UA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B;EACjB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,cAAc,aAAa;EAClC,OAAO;EACR;CACF"}
1
+ {"version":3,"file":"apps-config.js","names":[],"sources":["../../../src/apps/apps-config.ts"],"sourcesContent":["type AppTag = {\n displayName: string,\n};\n\nexport const ALL_APP_TAGS = {\n \"expert\": {\n displayName: \"Expert\",\n },\n \"integration\": {\n displayName: \"Integrations\",\n },\n \"auth\": {\n displayName: \"Authentication\",\n },\n \"developers\": {\n displayName: \"For Developers\",\n },\n \"security\": {\n displayName: \"Security\",\n },\n \"operations\": {\n displayName: \"For Operations\",\n },\n \"gtm\": {\n displayName: \"Go-to-market\",\n },\n \"comms\": {\n displayName: \"Communications\",\n },\n \"automation\": {\n displayName: \"Automation\",\n },\n \"storage\": {\n displayName: \"Storage & Databases\",\n },\n \"various\": {\n displayName: \"Various\",\n },\n} as const satisfies Record<string, AppTag>;\n\ntype App = {\n displayName: string,\n subtitle: string,\n tags: (keyof typeof ALL_APP_TAGS)[],\n stage: \"alpha\" | \"beta\" | \"stable\",\n};\n\nexport type AppId = keyof typeof ALL_APPS;\n\nexport const ALL_APPS = {\n \"authentication\": {\n displayName: \"Authentication\",\n subtitle: \"User sign-in and account management\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"fraud-protection\": {\n displayName: \"Fraud Protection\",\n subtitle: \"Protect your project from fraud and abuse\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"onboarding\": {\n displayName: \"Onboarding\",\n subtitle: \"Configure user onboarding requirements\",\n tags: [\"auth\"],\n stage: \"alpha\",\n },\n \"teams\": {\n displayName: \"Teams\",\n subtitle: \"Team collaboration and management\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"rbac\": {\n displayName: \"RBAC\",\n subtitle: \"Role-based access control and permissions\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"api-keys\": {\n displayName: \"API Keys\",\n subtitle: \"API key generation and management\",\n tags: [\"auth\", \"security\", \"developers\"],\n stage: \"stable\",\n },\n \"payments\": {\n displayName: \"Payments\",\n subtitle: \"Payment processing and subscription management\",\n tags: [\"operations\", \"gtm\"],\n stage: \"beta\",\n },\n \"emails\": {\n displayName: \"Emails\",\n subtitle: \"Email template configuration and management\",\n tags: [\"comms\"],\n stage: \"stable\",\n },\n \"support\": {\n displayName: \"Support\",\n subtitle: \"Customer conversations, team replies, and internal notes\",\n tags: [\"comms\", \"operations\"],\n stage: \"alpha\",\n },\n \"email-api\": {\n displayName: \"Email API\",\n subtitle: \"Programmatic email sending and delivery\",\n tags: [\"comms\", \"developers\", \"expert\"],\n stage: \"alpha\",\n },\n \"data-vault\": {\n displayName: \"Data Vault\",\n subtitle: \"Secure storage for sensitive user data\",\n tags: [\"security\", \"storage\"],\n stage: \"beta\",\n },\n \"webhooks\": {\n displayName: \"Webhooks\",\n subtitle: \"Real-time event notifications and integrations\",\n tags: [\"developers\"],\n stage: \"stable\",\n },\n \"tv-mode\": {\n displayName: \"TV mode\",\n subtitle: \"Dashboard display for large screens\",\n tags: [\"various\"],\n stage: \"alpha\",\n },\n \"launch-checklist\": {\n displayName: \"Launch Checklist\",\n subtitle: \"Pre-launch verification and readiness checks\",\n tags: [\"various\"],\n stage: \"stable\",\n },\n \"catalyst\": {\n displayName: \"Catalyst\",\n subtitle: \"Project scaffolding and rapid development\",\n tags: [\"various\"],\n stage: \"alpha\",\n },\n \"neon\": {\n displayName: \"Neon Integration\",\n subtitle: \"Serverless Postgres database integration\",\n tags: [\"integration\", \"storage\"],\n stage: \"alpha\",\n },\n \"convex\": {\n displayName: \"Convex Integration\",\n subtitle: \"Real-time backend platform integration\",\n tags: [\"integration\", \"storage\"],\n stage: \"alpha\",\n },\n \"vercel\": {\n displayName: \"Vercel Integration\",\n subtitle: \"Deploy your Hexclave project to Vercel\",\n tags: [\"integration\", \"developers\"],\n stage: \"stable\",\n },\n \"tanstack-start\": {\n displayName: \"TanStack Start\",\n subtitle: \"Use Hexclave in TanStack Start apps\",\n tags: [\"integration\", \"developers\"],\n stage: \"alpha\",\n },\n \"analytics\": {\n displayName: \"Analytics\",\n subtitle: \"View and explore analytics data\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n },\n \"clickmaps\": {\n displayName: \"Clickmaps\",\n subtitle: \"Visualize where users click across your app\",\n tags: [\"developers\", \"operations\"],\n stage: \"alpha\",\n },\n \"session-replays\": {\n displayName: \"Session Replays\",\n subtitle: \"Watch real user sessions to understand how people use your app\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n },\n} as const satisfies Record<string, App>;\n"],"mappings":";AAIA,MAAa,eAAe;CAC1B,UAAU,EACR,aAAa,UACd;CACD,eAAe,EACb,aAAa,gBACd;CACD,QAAQ,EACN,aAAa,kBACd;CACD,cAAc,EACZ,aAAa,kBACd;CACD,YAAY,EACV,aAAa,YACd;CACD,cAAc,EACZ,aAAa,kBACd;CACD,OAAO,EACL,aAAa,gBACd;CACD,SAAS,EACP,aAAa,kBACd;CACD,cAAc,EACZ,aAAa,cACd;CACD,WAAW,EACT,aAAa,uBACd;CACD,WAAW,EACT,aAAa,WACd;CACF;AAWD,MAAa,WAAW;CACtB,kBAAkB;EAChB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,WAAW;EAC1B,OAAO;EACR;CACD,oBAAoB;EAClB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,WAAW;EAC1B,OAAO;EACR;CACD,cAAc;EACZ,aAAa;EACb,UAAU;EACV,MAAM,CAAC,OAAO;EACd,OAAO;EACR;CACD,SAAS;EACP,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,WAAW;EAC1B,OAAO;EACR;CACD,QAAQ;EACN,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,WAAW;EAC1B,OAAO;EACR;CACD,YAAY;EACV,aAAa;EACb,UAAU;EACV,MAAM;GAAC;GAAQ;GAAY;GAAa;EACxC,OAAO;EACR;CACD,YAAY;EACV,aA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