@powerhousedao/vetra-builder-package 0.0.17 → 0.0.19

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 (190) hide show
  1. package/dist/document-models/builder-account/gen/document-model.js +1 -1
  2. package/dist/document-models/builder-account/gen/profile/actions.d.ts +5 -5
  3. package/dist/document-models/builder-account/gen/profile/creators.d.ts +3 -3
  4. package/dist/document-models/builder-account/gen/profile/creators.js +1 -1
  5. package/dist/document-models/builder-account/gen/profile/object.d.ts +2 -2
  6. package/dist/document-models/builder-account/gen/profile/object.js +3 -3
  7. package/dist/document-models/builder-account/gen/profile/operations.d.ts +2 -2
  8. package/dist/document-models/builder-account/gen/reducer.js +3 -3
  9. package/dist/document-models/builder-account/gen/schema/types.d.ts +1 -1
  10. package/dist/document-models/builder-account/gen/schema/zod.js +1 -1
  11. package/dist/document-models/builder-account/index.d.ts +1 -1
  12. package/dist/document-models/builder-account/src/reducers/profile.js +4 -0
  13. package/dist/document-models/builder-team/gen/actions.d.ts +9 -0
  14. package/dist/document-models/builder-team/gen/actions.js +4 -0
  15. package/dist/document-models/builder-team/gen/creators.d.ts +4 -0
  16. package/dist/document-models/builder-team/gen/creators.js +4 -0
  17. package/dist/document-models/builder-team/gen/document-model.d.ts +2 -0
  18. package/dist/document-models/builder-team/gen/document-model.js +212 -0
  19. package/dist/document-models/builder-team/gen/index.d.ts +7 -0
  20. package/dist/document-models/builder-team/gen/index.js +6 -0
  21. package/dist/document-models/builder-team/gen/member/actions.d.ts +15 -0
  22. package/dist/document-models/builder-team/gen/member/actions.js +1 -0
  23. package/dist/document-models/builder-team/gen/member/creators.d.ts +5 -0
  24. package/dist/document-models/builder-team/gen/member/creators.js +5 -0
  25. package/dist/document-models/builder-team/gen/member/error.d.ts +1 -0
  26. package/dist/document-models/builder-team/gen/member/error.js +1 -0
  27. package/dist/document-models/builder-team/gen/member/object.d.ts +8 -0
  28. package/dist/document-models/builder-team/gen/member/object.js +13 -0
  29. package/dist/document-models/builder-team/gen/member/operations.d.ts +8 -0
  30. package/dist/document-models/builder-team/gen/member/operations.js +1 -0
  31. package/dist/document-models/builder-team/gen/object.d.ts +20 -0
  32. package/dist/document-models/builder-team/gen/object.js +36 -0
  33. package/dist/document-models/builder-team/gen/packages/actions.d.ts +15 -0
  34. package/dist/document-models/builder-team/gen/packages/actions.js +1 -0
  35. package/dist/document-models/builder-team/gen/packages/creators.d.ts +5 -0
  36. package/dist/document-models/builder-team/gen/packages/creators.js +5 -0
  37. package/dist/document-models/builder-team/gen/packages/error.d.ts +1 -0
  38. package/dist/document-models/builder-team/gen/packages/error.js +1 -0
  39. package/dist/document-models/builder-team/gen/packages/object.d.ts +8 -0
  40. package/dist/document-models/builder-team/gen/packages/object.js +13 -0
  41. package/dist/document-models/builder-team/gen/packages/operations.d.ts +8 -0
  42. package/dist/document-models/builder-team/gen/packages/operations.js +1 -0
  43. package/dist/document-models/builder-team/gen/ph-factories.d.ts +26 -0
  44. package/dist/document-models/builder-team/gen/ph-factories.js +62 -0
  45. package/dist/document-models/builder-team/gen/profile/actions.d.ts +23 -0
  46. package/dist/document-models/builder-team/gen/profile/actions.js +1 -0
  47. package/dist/document-models/builder-team/gen/profile/creators.d.ts +7 -0
  48. package/dist/document-models/builder-team/gen/profile/creators.js +7 -0
  49. package/dist/document-models/builder-team/gen/profile/error.d.ts +1 -0
  50. package/dist/document-models/builder-team/gen/profile/error.js +1 -0
  51. package/dist/document-models/builder-team/gen/profile/object.d.ts +10 -0
  52. package/dist/document-models/builder-team/gen/profile/object.js +19 -0
  53. package/dist/document-models/builder-team/gen/profile/operations.d.ts +10 -0
  54. package/dist/document-models/builder-team/gen/profile/operations.js +1 -0
  55. package/dist/document-models/builder-team/gen/reducer.d.ts +4 -0
  56. package/dist/document-models/builder-team/gen/reducer.js +75 -0
  57. package/dist/document-models/builder-team/gen/schema/index.d.ts +2 -0
  58. package/dist/document-models/builder-team/gen/schema/index.js +2 -0
  59. package/dist/document-models/builder-team/gen/schema/types.d.ts +247 -0
  60. package/dist/document-models/builder-team/gen/schema/types.js +1 -0
  61. package/dist/document-models/builder-team/gen/schema/zod.d.ts +29 -0
  62. package/dist/document-models/builder-team/gen/schema/zod.js +148 -0
  63. package/dist/document-models/builder-team/gen/spaces/actions.d.ts +15 -0
  64. package/dist/document-models/builder-team/gen/spaces/actions.js +1 -0
  65. package/dist/document-models/builder-team/gen/spaces/creators.d.ts +5 -0
  66. package/dist/document-models/builder-team/gen/spaces/creators.js +5 -0
  67. package/dist/document-models/builder-team/gen/spaces/error.d.ts +1 -0
  68. package/dist/document-models/builder-team/gen/spaces/error.js +1 -0
  69. package/dist/document-models/builder-team/gen/spaces/object.d.ts +8 -0
  70. package/dist/document-models/builder-team/gen/spaces/object.js +13 -0
  71. package/dist/document-models/builder-team/gen/spaces/operations.d.ts +8 -0
  72. package/dist/document-models/builder-team/gen/spaces/operations.js +1 -0
  73. package/dist/document-models/builder-team/gen/types.d.ts +9 -0
  74. package/dist/document-models/builder-team/gen/types.js +1 -0
  75. package/dist/document-models/builder-team/gen/utils.d.ts +21 -0
  76. package/dist/document-models/builder-team/gen/utils.js +54 -0
  77. package/dist/document-models/builder-team/index.d.ts +37 -0
  78. package/dist/document-models/builder-team/index.js +21 -0
  79. package/dist/document-models/builder-team/src/reducers/member.d.ts +2 -0
  80. package/dist/document-models/builder-team/src/reducers/member.js +30 -0
  81. package/dist/document-models/builder-team/src/reducers/packages.d.ts +2 -0
  82. package/dist/document-models/builder-team/src/reducers/packages.js +40 -0
  83. package/dist/document-models/builder-team/src/reducers/profile.d.ts +2 -0
  84. package/dist/document-models/builder-team/src/reducers/profile.js +26 -0
  85. package/dist/document-models/builder-team/src/reducers/spaces.d.ts +2 -0
  86. package/dist/document-models/builder-team/src/reducers/spaces.js +34 -0
  87. package/dist/document-models/builder-team/src/tests/document-model.test.d.ts +5 -0
  88. package/dist/document-models/builder-team/src/tests/document-model.test.js +18 -0
  89. package/dist/document-models/builder-team/src/tests/member.test.d.ts +5 -0
  90. package/dist/document-models/builder-team/src/tests/member.test.js +40 -0
  91. package/dist/document-models/builder-team/src/tests/packages.test.d.ts +5 -0
  92. package/dist/document-models/builder-team/src/tests/packages.test.js +40 -0
  93. package/dist/document-models/builder-team/src/tests/profile.test.d.ts +5 -0
  94. package/dist/document-models/builder-team/src/tests/profile.test.js +56 -0
  95. package/dist/document-models/builder-team/src/tests/spaces.test.d.ts +5 -0
  96. package/dist/document-models/builder-team/src/tests/spaces.test.js +40 -0
  97. package/dist/document-models/builder-team/src/utils.d.ts +1 -0
  98. package/dist/document-models/builder-team/src/utils.js +1 -0
  99. package/dist/document-models/index.d.ts +1 -1
  100. package/dist/document-models/index.js +1 -1
  101. package/dist/editors/builder-team-editor/components/Header.d.ts +8 -0
  102. package/dist/editors/builder-team-editor/components/Header.js +5 -0
  103. package/dist/editors/builder-team-editor/components/MembersSection.d.ts +14 -0
  104. package/dist/editors/builder-team-editor/components/MembersSection.js +152 -0
  105. package/dist/editors/builder-team-editor/components/PackageForm.d.ts +8 -0
  106. package/dist/editors/builder-team-editor/components/PackageForm.js +92 -0
  107. package/dist/editors/builder-team-editor/components/PackageItem.d.ts +11 -0
  108. package/dist/editors/builder-team-editor/components/PackageItem.js +99 -0
  109. package/dist/editors/builder-team-editor/components/ProfileSection.d.ts +17 -0
  110. package/dist/editors/builder-team-editor/components/ProfileSection.js +5 -0
  111. package/dist/editors/builder-team-editor/components/QuickStats.d.ts +7 -0
  112. package/dist/editors/builder-team-editor/components/QuickStats.js +5 -0
  113. package/dist/editors/builder-team-editor/components/SpaceForm.d.ts +9 -0
  114. package/dist/editors/builder-team-editor/components/SpaceForm.js +11 -0
  115. package/dist/editors/builder-team-editor/components/SpaceItem.d.ts +21 -0
  116. package/dist/editors/builder-team-editor/components/SpaceItem.js +12 -0
  117. package/dist/editors/builder-team-editor/components/SpacesSection.d.ts +22 -0
  118. package/dist/editors/builder-team-editor/components/SpacesSection.js +14 -0
  119. package/dist/editors/builder-team-editor/config.d.ts +6 -0
  120. package/dist/editors/builder-team-editor/config.js +11 -0
  121. package/dist/editors/builder-team-editor/editor.d.ts +3 -0
  122. package/dist/editors/builder-team-editor/editor.js +73 -0
  123. package/dist/editors/builder-team-editor/hooks/useMemberHandlers.d.ts +12 -0
  124. package/dist/editors/builder-team-editor/hooks/useMemberHandlers.js +27 -0
  125. package/dist/editors/builder-team-editor/hooks/usePackageHandlers.d.ts +11 -0
  126. package/dist/editors/builder-team-editor/hooks/usePackageHandlers.js +49 -0
  127. package/dist/editors/builder-team-editor/hooks/useProfileHandlers.d.ts +14 -0
  128. package/dist/editors/builder-team-editor/hooks/useProfileHandlers.js +38 -0
  129. package/dist/editors/builder-team-editor/hooks/useSpaceHandlers.d.ts +15 -0
  130. package/dist/editors/builder-team-editor/hooks/useSpaceHandlers.js +82 -0
  131. package/dist/editors/builder-team-editor/index.d.ts +2 -0
  132. package/dist/editors/builder-team-editor/index.js +11 -0
  133. package/dist/editors/hooks/useBuilderTeamDocument.d.ts +3 -0
  134. package/dist/editors/hooks/useBuilderTeamDocument.js +8 -0
  135. package/dist/editors/index.d.ts +1 -1
  136. package/dist/editors/index.js +1 -1
  137. package/dist/index.d.ts +1 -1
  138. package/dist/powerhouse.manifest.json +21 -6
  139. package/dist/processors/factory.d.ts +0 -4
  140. package/dist/processors/factory.js +3 -3
  141. package/dist/processors/index.d.ts +2 -2
  142. package/dist/processors/index.js +2 -2
  143. package/dist/processors/old_vetra-builder-relational-db-processor/factory.d.ts +3 -0
  144. package/dist/processors/old_vetra-builder-relational-db-processor/factory.js +22 -0
  145. package/dist/processors/old_vetra-builder-relational-db-processor/index.d.ts +9 -0
  146. package/dist/processors/old_vetra-builder-relational-db-processor/index.js +32 -0
  147. package/dist/processors/old_vetra-builder-relational-db-processor/migrations.d.ts +3 -0
  148. package/dist/processors/old_vetra-builder-relational-db-processor/migrations.js +14 -0
  149. package/dist/processors/old_vetra-builder-relational-db-processor/schema.d.ts +7 -0
  150. package/dist/processors/old_vetra-builder-relational-db-processor/schema.js +1 -0
  151. package/dist/processors/vetra-builder-relational-db-processor/builder-team-handlers.d.ts +22 -0
  152. package/dist/processors/vetra-builder-relational-db-processor/builder-team-handlers.js +261 -0
  153. package/dist/processors/vetra-builder-relational-db-processor/database-helpers.d.ts +39 -0
  154. package/dist/processors/vetra-builder-relational-db-processor/database-helpers.js +144 -0
  155. package/dist/processors/vetra-builder-relational-db-processor/factory.d.ts +3 -0
  156. package/dist/processors/vetra-builder-relational-db-processor/factory.js +23 -0
  157. package/dist/processors/vetra-builder-relational-db-processor/index.d.ts +13 -0
  158. package/dist/processors/vetra-builder-relational-db-processor/index.js +53 -0
  159. package/dist/processors/vetra-builder-relational-db-processor/migrations.d.ts +3 -0
  160. package/dist/processors/vetra-builder-relational-db-processor/migrations.js +155 -0
  161. package/dist/processors/vetra-builder-relational-db-processor/schema.d.ts +66 -0
  162. package/dist/processors/vetra-builder-relational-db-processor/schema.js +1 -0
  163. package/dist/processors/vetra-builder-relational-db-processor/types.d.ts +32 -0
  164. package/dist/processors/vetra-builder-relational-db-processor/types.js +1 -0
  165. package/dist/style.css +36 -28
  166. package/dist/subgraphs/builder-account/resolvers.js +3 -3
  167. package/dist/subgraphs/builder-account/schema.js +4 -4
  168. package/dist/subgraphs/builder-team/index.d.ts +10 -0
  169. package/dist/subgraphs/builder-team/index.js +11 -0
  170. package/dist/subgraphs/builder-team/resolvers.d.ts +2 -0
  171. package/dist/subgraphs/builder-team/resolvers.js +240 -0
  172. package/dist/subgraphs/builder-team/schema.d.ts +2 -0
  173. package/dist/subgraphs/builder-team/schema.js +228 -0
  174. package/dist/subgraphs/index.d.ts +2 -2
  175. package/dist/subgraphs/index.js +3 -2
  176. package/dist/subgraphs/vetra-builders/index.d.ts +10 -0
  177. package/dist/subgraphs/vetra-builders/index.js +11 -0
  178. package/dist/subgraphs/vetra-builders/resolvers.d.ts +2 -0
  179. package/dist/subgraphs/vetra-builders/resolvers.js +144 -0
  180. package/dist/subgraphs/vetra-builders/schema.d.ts +2 -0
  181. package/dist/subgraphs/vetra-builders/schema.js +79 -0
  182. package/dist/subgraphs/vetra-builders-bkp/index.d.ts +10 -0
  183. package/dist/subgraphs/vetra-builders-bkp/index.js +11 -0
  184. package/dist/subgraphs/vetra-builders-bkp/resolvers.d.ts +2 -0
  185. package/dist/subgraphs/vetra-builders-bkp/resolvers.js +10 -0
  186. package/dist/subgraphs/vetra-builders-bkp/schema.d.ts +2 -0
  187. package/dist/subgraphs/vetra-builders-bkp/schema.js +9 -0
  188. package/dist/utils/nano-id.d.ts +1 -0
  189. package/dist/utils/nano-id.js +4 -0
  190. package/package.json +4 -2
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This is a scaffold file meant for customization:
3
+ * - change it by adding new tests or modifying the existing ones
4
+ */
5
+ export {};
@@ -0,0 +1,56 @@
1
+ /**
2
+ * This is a scaffold file meant for customization:
3
+ * - change it by adding new tests or modifying the existing ones
4
+ */
5
+ import { describe, it, expect, beforeEach } from "vitest";
6
+ import { generateMock } from "@powerhousedao/codegen";
7
+ import utils from "../../gen/utils.js";
8
+ import { z, } from "../../gen/schema/index.js";
9
+ import { reducer } from "../../gen/reducer.js";
10
+ import * as creators from "../../gen/profile/creators.js";
11
+ describe("Profile Operations", () => {
12
+ let document;
13
+ beforeEach(() => {
14
+ document = utils.createDocument();
15
+ });
16
+ it("should handle setLogo operation", () => {
17
+ const input = generateMock(z.SetLogoInputSchema());
18
+ const updatedDocument = reducer(document, creators.setLogo(input));
19
+ expect(updatedDocument.operations.global).toHaveLength(1);
20
+ expect(updatedDocument.operations.global[0].action.type).toBe("SET_LOGO");
21
+ expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
22
+ expect(updatedDocument.operations.global[0].index).toEqual(0);
23
+ });
24
+ it("should handle setTeamName operation", () => {
25
+ const input = generateMock(z.SetTeamNameInputSchema());
26
+ const updatedDocument = reducer(document, creators.setTeamName(input));
27
+ expect(updatedDocument.operations.global).toHaveLength(1);
28
+ expect(updatedDocument.operations.global[0].action.type).toBe("SET_TEAM_NAME");
29
+ expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
30
+ expect(updatedDocument.operations.global[0].index).toEqual(0);
31
+ });
32
+ it("should handle setSlug operation", () => {
33
+ const input = generateMock(z.SetSlugInputSchema());
34
+ const updatedDocument = reducer(document, creators.setSlug(input));
35
+ expect(updatedDocument.operations.global).toHaveLength(1);
36
+ expect(updatedDocument.operations.global[0].action.type).toBe("SET_SLUG");
37
+ expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
38
+ expect(updatedDocument.operations.global[0].index).toEqual(0);
39
+ });
40
+ it("should handle setDescription operation", () => {
41
+ const input = generateMock(z.SetDescriptionInputSchema());
42
+ const updatedDocument = reducer(document, creators.setDescription(input));
43
+ expect(updatedDocument.operations.global).toHaveLength(1);
44
+ expect(updatedDocument.operations.global[0].action.type).toBe("SET_DESCRIPTION");
45
+ expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
46
+ expect(updatedDocument.operations.global[0].index).toEqual(0);
47
+ });
48
+ it("should handle setSocials operation", () => {
49
+ const input = generateMock(z.SetSocialsInputSchema());
50
+ const updatedDocument = reducer(document, creators.setSocials(input));
51
+ expect(updatedDocument.operations.global).toHaveLength(1);
52
+ expect(updatedDocument.operations.global[0].action.type).toBe("SET_SOCIALS");
53
+ expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
54
+ expect(updatedDocument.operations.global[0].index).toEqual(0);
55
+ });
56
+ });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This is a scaffold file meant for customization:
3
+ * - change it by adding new tests or modifying the existing ones
4
+ */
5
+ export {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * This is a scaffold file meant for customization:
3
+ * - change it by adding new tests or modifying the existing ones
4
+ */
5
+ import { describe, it, expect, beforeEach } from "vitest";
6
+ import { generateMock } from "@powerhousedao/codegen";
7
+ import utils from "../../gen/utils.js";
8
+ import { z, } from "../../gen/schema/index.js";
9
+ import { reducer } from "../../gen/reducer.js";
10
+ import * as creators from "../../gen/spaces/creators.js";
11
+ describe("Spaces Operations", () => {
12
+ let document;
13
+ beforeEach(() => {
14
+ document = utils.createDocument();
15
+ });
16
+ it("should handle addSpace operation", () => {
17
+ const input = generateMock(z.AddSpaceInputSchema());
18
+ const updatedDocument = reducer(document, creators.addSpace(input));
19
+ expect(updatedDocument.operations.global).toHaveLength(1);
20
+ expect(updatedDocument.operations.global[0].action.type).toBe("ADD_SPACE");
21
+ expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
22
+ expect(updatedDocument.operations.global[0].index).toEqual(0);
23
+ });
24
+ it("should handle updateSpaceInfo operation", () => {
25
+ const input = generateMock(z.UpdateSpaceInfoInputSchema());
26
+ const updatedDocument = reducer(document, creators.updateSpaceInfo(input));
27
+ expect(updatedDocument.operations.global).toHaveLength(1);
28
+ expect(updatedDocument.operations.global[0].action.type).toBe("UPDATE_SPACE_INFO");
29
+ expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
30
+ expect(updatedDocument.operations.global[0].index).toEqual(0);
31
+ });
32
+ it("should handle removeSpace operation", () => {
33
+ const input = generateMock(z.RemoveSpaceInputSchema());
34
+ const updatedDocument = reducer(document, creators.removeSpace(input));
35
+ expect(updatedDocument.operations.global).toHaveLength(1);
36
+ expect(updatedDocument.operations.global[0].action.type).toBe("REMOVE_SPACE");
37
+ expect(updatedDocument.operations.global[0].action.input).toStrictEqual(input);
38
+ expect(updatedDocument.operations.global[0].index).toEqual(0);
39
+ });
40
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,2 @@
1
1
  export {};
2
- export { module as BuilderAccount } from "./builder-account/index.js";
2
+ export { module as BuilderTeam } from "./builder-team/index.js";
@@ -1 +1 @@
1
- export { module as BuilderAccount } from "./builder-account/index.js";
1
+ export { module as BuilderTeam } from "./builder-team/index.js";
@@ -0,0 +1,8 @@
1
+ import type { BuilderTeamDocument } from "../../../document-models/builder-team/index.js";
2
+ interface HeaderProps {
3
+ profile: BuilderTeamDocument['state']['global']['profile'];
4
+ isEditingProfile: boolean;
5
+ onToggleEdit: () => void;
6
+ }
7
+ export declare function Header({ profile, isEditingProfile, onToggleEdit }: HeaderProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from "@powerhousedao/document-engineering";
3
+ export function Header({ profile, isEditingProfile, onToggleEdit }) {
4
+ return (_jsx("div", { className: "bg-white shadow-sm border-b", children: _jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: _jsx("div", { className: "py-6", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center space-x-4", children: [_jsx("div", { className: "flex-shrink-0", children: profile.logo ? (_jsx("img", { className: "w-12 h-12 rounded-lg object-cover", src: profile.logo, alt: "Logo" })) : (_jsx("div", { className: "w-12 h-12 bg-blue-600 rounded-lg flex items-center justify-center", children: _jsx("svg", { className: "w-6 h-6 text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" }) }) })) }), _jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold text-gray-900", children: profile.name || "Builder Account" }), _jsx("p", { className: "text-sm text-gray-500", children: profile.slug ? `@${profile.slug}` : "Manage your builder profile and packages" })] })] }), _jsx("div", { className: "flex items-center space-x-3", children: _jsx(Button, { color: "light", onClick: onToggleEdit, children: isEditingProfile ? "Cancel" : "Edit Profile" }) })] }) }) }) }));
5
+ }
@@ -0,0 +1,14 @@
1
+ import type { BuilderTeamDocument } from "../../../document-models/builder-team/index.js";
2
+ interface MemberProfileData {
3
+ phid: string;
4
+ ethAddress: string;
5
+ name: string;
6
+ profileImage?: string;
7
+ }
8
+ interface MembersSectionProps {
9
+ members: BuilderTeamDocument["state"]["global"]["members"];
10
+ onAddMember: (profileData: MemberProfileData) => boolean;
11
+ onRemoveMember: (id: string) => void;
12
+ }
13
+ export declare function MembersSection({ members, onAddMember, onRemoveMember, }: MembersSectionProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,152 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Form, PHIDField } from "@powerhousedao/document-engineering";
3
+ import { useState } from "react";
4
+ import { GraphQLClient } from "graphql-request";
5
+ import { config } from "../config.js";
6
+ const graphqlClient = new GraphQLClient(config.renownGraphqlEndpoint);
7
+ const SEARCH_PROFILES_QUERY = `
8
+ query ($input: GetProfilesInput!) {
9
+ getProfiles(input: $input) {
10
+ documentId
11
+ ethAddress
12
+ updatedAt
13
+ userImage
14
+ username
15
+ }
16
+ }
17
+ `;
18
+ export function MembersSection({ members, onAddMember, onRemoveMember, }) {
19
+ const [selectedProfile, setSelectedProfile] = useState(null);
20
+ // Cache of profiles from the last search to avoid refetching on select
21
+ const [profilesCache, setProfilesCache] = useState(new Map());
22
+ const handleAddMember = () => {
23
+ if (selectedProfile) {
24
+ const success = onAddMember({
25
+ phid: selectedProfile.documentId,
26
+ ethAddress: selectedProfile.ethAddress,
27
+ name: selectedProfile.username,
28
+ profileImage: selectedProfile.userImage,
29
+ });
30
+ if (success) {
31
+ setSelectedProfile(null);
32
+ }
33
+ }
34
+ };
35
+ return (_jsxs("div", { className: "bg-white rounded-lg shadow-sm border", children: [_jsxs("div", { className: "px-6 py-4 border-b border-gray-200", children: [_jsx("h3", { className: "text-lg font-semibold text-gray-900", children: "Team Members" }), _jsx("p", { className: "text-sm text-gray-500", children: "Manage team access" })] }), _jsx("div", { className: "p-6", children: _jsxs("div", { className: "space-y-4", children: [_jsx(Form, { onSubmit: (e) => e.preventDefault(), children: _jsxs("div", { className: "space-y-3", children: [_jsx(PHIDField, { name: "memberProfile", label: "Search for team member", value: selectedProfile?.documentId ?? undefined, initialOptions: selectedProfile
36
+ ? [
37
+ {
38
+ value: selectedProfile.documentId,
39
+ title: selectedProfile.username,
40
+ description: selectedProfile.ethAddress,
41
+ path: {
42
+ text: `${config.renownProfileBasePath}/${selectedProfile.username}`,
43
+ url: `${config.renownProfileBasePath}/${selectedProfile.username}`,
44
+ },
45
+ },
46
+ ]
47
+ : [], allowUris: false, autoComplete: true, fetchOptionsCallback: async (userInput) => {
48
+ const data = await graphqlClient.request(SEARCH_PROFILES_QUERY, {
49
+ input: {
50
+ driveId: "renown-profiles",
51
+ searchString: userInput,
52
+ },
53
+ });
54
+ // Update the cache with the search results
55
+ const newCache = new Map(profilesCache);
56
+ data.getProfiles.forEach((profile) => {
57
+ newCache.set(profile.documentId, {
58
+ documentId: profile.documentId,
59
+ ethAddress: profile.ethAddress,
60
+ username: profile.username,
61
+ userImage: profile.userImage,
62
+ });
63
+ });
64
+ setProfilesCache(newCache);
65
+ return data.getProfiles.map((profile) => ({
66
+ id: profile.documentId,
67
+ title: profile.username,
68
+ value: profile.documentId,
69
+ description: profile.ethAddress,
70
+ path: {
71
+ text: `${config.renownProfileBasePath}/${profile.username}`,
72
+ url: `${config.renownProfileBasePath}/${profile.username}`,
73
+ },
74
+ }));
75
+ }, fetchSelectedOptionCallback: async (value) => {
76
+ // First check cache
77
+ const cachedProfile = profilesCache.get(value);
78
+ if (cachedProfile) {
79
+ setSelectedProfile(cachedProfile);
80
+ return {
81
+ title: cachedProfile.username,
82
+ value: cachedProfile.documentId,
83
+ description: cachedProfile.ethAddress,
84
+ path: {
85
+ text: `${config.renownProfileBasePath}/${cachedProfile.username}`,
86
+ url: `${config.renownProfileBasePath}/${cachedProfile.username}`,
87
+ },
88
+ };
89
+ }
90
+ // If not in cache, fetch by searching for the documentId
91
+ // Note: This is a fallback that may not work perfectly
92
+ // Ideally the API would support querying by documentId directly
93
+ const data = await graphqlClient.request(SEARCH_PROFILES_QUERY, {
94
+ input: {
95
+ driveId: "renown-profiles",
96
+ searchString: value,
97
+ },
98
+ });
99
+ const profile = data.getProfiles.find((p) => p.documentId === value) ||
100
+ data.getProfiles[0];
101
+ if (!profile) {
102
+ return;
103
+ }
104
+ const profileData = {
105
+ documentId: profile.documentId,
106
+ ethAddress: profile.ethAddress,
107
+ username: profile.username,
108
+ userImage: profile.userImage,
109
+ };
110
+ setSelectedProfile(profileData);
111
+ // Update cache
112
+ const newCache = new Map(profilesCache);
113
+ newCache.set(profile.documentId, profileData);
114
+ setProfilesCache(newCache);
115
+ return {
116
+ title: profile.username,
117
+ value: profile.documentId,
118
+ description: profile.ethAddress,
119
+ path: {
120
+ text: `${config.renownProfileBasePath}/${profile.username}`,
121
+ url: `${config.renownProfileBasePath}/${profile.username}`,
122
+ },
123
+ };
124
+ }, onChange: (value) => {
125
+ if (!value) {
126
+ setSelectedProfile(null);
127
+ return;
128
+ }
129
+ // Use cached profile data if available
130
+ const profile = profilesCache.get(value);
131
+ if (profile) {
132
+ setSelectedProfile(profile);
133
+ }
134
+ }, variant: "withValueTitleAndDescription", required: false, viewMode: "edition", placeholder: "Enter username or ENS name" }), _jsx("div", { className: "flex justify-end", children: _jsx(Button, { onClick: handleAddMember, disabled: !selectedProfile, children: "Add Member" }) })] }) }), _jsx("div", { className: "space-y-2", children: members.length > 0 ? (members.map((member) => (_jsxs("div", { className: "flex items-center justify-between p-2 bg-gray-50 rounded border hover:bg-gray-100 transition-colors cursor-pointer", onClick: () => {
135
+ if (member.phid) {
136
+ const profile = {
137
+ documentId: member.phid,
138
+ ethAddress: member.ethAddress || "",
139
+ username: member.name || member.ethAddress || "",
140
+ userImage: member.profileImage ?? undefined,
141
+ };
142
+ setSelectedProfile(profile);
143
+ // Update cache
144
+ const newCache = new Map(profilesCache);
145
+ newCache.set(member.phid, profile);
146
+ setProfilesCache(newCache);
147
+ }
148
+ }, children: [_jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [member.profileImage ? (_jsx("img", { src: member.profileImage, alt: member.name || "Profile", className: "w-10 h-10 rounded-full object-cover flex-shrink-0" })) : (_jsx("div", { className: "w-10 h-10 rounded-full bg-gray-300 flex items-center justify-center flex-shrink-0", children: _jsx("span", { className: "text-gray-600 text-sm font-medium", children: (member.name || member.ethAddress || "?")[0].toUpperCase() }) })), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("div", { className: "text-sm font-medium text-gray-900", children: member.name || "Unknown" }), _jsx("div", { className: "text-xs font-mono text-gray-500 truncate", children: member.ethAddress }), member.phid && member.name && (_jsxs("a", { href: `${config.renownProfileBasePath}/${member.name}`, className: "text-xs text-blue-600 hover:text-blue-800 hover:underline", onClick: (e) => e.stopPropagation(), children: [config.renownProfileBasePath, "/", member.name] }))] })] }), _jsx(Button, { color: "red", size: "sm", onClick: (e) => {
149
+ e.stopPropagation();
150
+ onRemoveMember(member.id);
151
+ }, children: "Remove" })] }, member.id)))) : (_jsx("p", { className: "text-sm text-gray-500", children: "No team members added yet" })) })] }) })] }));
152
+ }
@@ -0,0 +1,8 @@
1
+ import type { VetraPackageInfo } from "../../../document-models/builder-team/index.js";
2
+ interface PackageFormProps {
3
+ spaceId: string;
4
+ onSave: (spaceId: string, packageInfo: VetraPackageInfo | null) => boolean;
5
+ onCancel: () => void;
6
+ }
7
+ export declare function PackageForm({ spaceId, onSave, onCancel }: PackageFormProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,92 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Form, PHIDField, } from "@powerhousedao/document-engineering";
3
+ import { GraphQLClient } from "graphql-request";
4
+ import { useState } from "react";
5
+ import { config } from "../config.js";
6
+ const graphqlClient = new GraphQLClient(config.vetraGraphqlEndpoint);
7
+ const SEARCH_PACKAGES_QUERY = `
8
+ query SearchPackages($search: String!) {
9
+ vetraPackages(search: $search) {
10
+ authorName
11
+ name
12
+ githubUrl
13
+ documentId
14
+ description
15
+ }
16
+ }
17
+ `;
18
+ const SEARCH_PACKAGES_BY_DOCUMENT_ID_QUERY = `
19
+ query SearchPackagesByDocumentId($documentIds: [PHID!]) {
20
+ vetraPackages(documentId_in: $documentIds) {
21
+ authorName
22
+ name
23
+ githubUrl
24
+ documentId
25
+ description
26
+ }
27
+ }
28
+ `;
29
+ export function PackageForm({ spaceId, onSave, onCancel }) {
30
+ const [selectedPhid, setSelectedPhid] = useState("");
31
+ const [packageInfo, setPackageInfo] = useState(null);
32
+ const handleSave = () => {
33
+ if (onSave(spaceId, packageInfo)) {
34
+ setSelectedPhid("");
35
+ setPackageInfo(null);
36
+ }
37
+ };
38
+ return (_jsxs("div", { className: "bg-white rounded-lg shadow-sm border", children: [_jsx("div", { className: "px-6 py-4 border-b border-gray-200", children: _jsx("h2", { className: "text-lg font-semibold text-gray-900", children: "Add Package" }) }), _jsx("div", { className: "p-6", children: _jsx(Form, { onSubmit: (e) => e.preventDefault(), children: _jsxs("div", { className: "space-y-4", children: [_jsx(PHIDField, { name: "packageId", label: "Package Name", value: selectedPhid, onChange: (phid) => {
39
+ setSelectedPhid(phid);
40
+ // Fetch the full package info when a selection is made
41
+ if (phid) {
42
+ graphqlClient
43
+ .request(SEARCH_PACKAGES_BY_DOCUMENT_ID_QUERY, {
44
+ documentIds: [phid],
45
+ })
46
+ .then((data) => {
47
+ if (data.vetraPackages.length > 0) {
48
+ const pkg = data.vetraPackages[0];
49
+ setPackageInfo({
50
+ id: "", // Will be set by handleAddPackage
51
+ phid: pkg.documentId,
52
+ title: pkg.name,
53
+ description: pkg.description,
54
+ github: pkg.githubUrl || null,
55
+ npm: null,
56
+ vetraDriveUrl: null,
57
+ });
58
+ }
59
+ });
60
+ }
61
+ }, allowUris: true, autoComplete: true, initialOptions: [], fetchOptionsCallback: async (userInput) => {
62
+ const data = await graphqlClient.request(SEARCH_PACKAGES_QUERY, { search: userInput });
63
+ const options = data.vetraPackages.map((pkg) => ({
64
+ id: pkg.documentId,
65
+ title: pkg.name,
66
+ value: pkg.documentId,
67
+ description: pkg.description,
68
+ path: {
69
+ text: `${config.vetraPackageBasePath}/${pkg.name}`,
70
+ url: `${config.vetraPackageBasePath}/${pkg.name}`,
71
+ },
72
+ }));
73
+ console.log(options);
74
+ return options;
75
+ }, fetchSelectedOptionCallback: async (value) => {
76
+ const data = await graphqlClient.request(SEARCH_PACKAGES_BY_DOCUMENT_ID_QUERY, {
77
+ documentIds: [value],
78
+ });
79
+ const options = data.vetraPackages.map((pkg) => ({
80
+ id: pkg.documentId,
81
+ title: pkg.name,
82
+ value: pkg.documentId,
83
+ description: pkg.description,
84
+ path: {
85
+ text: `${config.vetraPackageBasePath}/${pkg.name}`,
86
+ url: `${config.vetraPackageBasePath}/${pkg.name}`,
87
+ },
88
+ }));
89
+ const entry = options[0];
90
+ return entry;
91
+ }, variant: "withValueTitleAndDescription", required: true, viewMode: "edition", placeholder: "Enter package name" }), _jsxs("div", { className: "flex justify-end space-x-3", children: [_jsx(Button, { color: "light", onClick: onCancel, children: "Cancel" }), _jsx(Button, { onClick: handleSave, disabled: !selectedPhid || !spaceId, children: "Add Package" })] })] }) }) })] }));
92
+ }
@@ -0,0 +1,11 @@
1
+ import { type VetraPackageInfo } from "document-models/builder-team";
2
+ interface PackageItemProps {
3
+ pkg: VetraPackageInfo;
4
+ isEditing: boolean;
5
+ onEdit: () => void;
6
+ onDelete: () => void;
7
+ onSave: (selectedPackage: VetraPackageInfo) => void;
8
+ onCancel: () => void;
9
+ }
10
+ export declare function PackageItem({ pkg, isEditing, onEdit, onDelete, onSave, onCancel, }: PackageItemProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,99 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Form, PHIDField, } from "@powerhousedao/document-engineering";
3
+ import { GraphQLClient } from "graphql-request";
4
+ import { useState } from "react";
5
+ import { config } from "../config.js";
6
+ const graphqlClient = new GraphQLClient(config.vetraGraphqlEndpoint);
7
+ const SEARCH_PACKAGES_QUERY = `
8
+ query SearchPackages($search: String!) {
9
+ vetraPackages(search: $search) {
10
+ authorName
11
+ name
12
+ githubUrl
13
+ documentId
14
+ npmUrl
15
+ documentId
16
+ description
17
+ }
18
+ }
19
+ `;
20
+ const SEARCH_PACKAGES_BY_DOCUMENT_ID_QUERY = `
21
+ query SearchPackagesByDocumentId($documentIds: [PHID!]) {
22
+ vetraPackages(documentId_in: $documentIds) {
23
+ authorName
24
+ name
25
+ githubUrl
26
+ documentId
27
+ npmUrl
28
+ documentId
29
+ description
30
+ }
31
+ }
32
+ `;
33
+ export function PackageItem({ pkg, isEditing, onEdit, onDelete, onSave, onCancel, }) {
34
+ const [packages, setPackages] = useState([]);
35
+ const [displayedPkg, setDisplayedPkg] = useState(pkg);
36
+ const [selectedPackage, setSelectedPackage] = useState(pkg);
37
+ const handleSave = () => {
38
+ onSave(selectedPackage);
39
+ };
40
+ if (isEditing) {
41
+ return (_jsx("div", { className: "p-3 bg-gray-50 rounded border", children: _jsx(Form, { onSubmit: (e) => e.preventDefault(), children: _jsxs("div", { className: "space-y-3", children: [_jsx(PHIDField, { name: "packageName", label: "Package Name", initialOptions: [displayedPkg].map((p) => ({
42
+ value: displayedPkg.phid ?? "",
43
+ description: displayedPkg.description ?? "",
44
+ path: {
45
+ text: `${config.vetraPackageBasePath}/${displayedPkg.title}`,
46
+ url: `${config.vetraPackageBasePath}/${displayedPkg.title}`,
47
+ },
48
+ title: displayedPkg.title ?? "",
49
+ })), value: displayedPkg.phid ?? undefined, allowUris: true, autoComplete: true, fetchOptionsCallback: async (userInput) => {
50
+ const data = await graphqlClient.request(SEARCH_PACKAGES_QUERY, { search: userInput });
51
+ const options = data.vetraPackages.map((pkg) => ({
52
+ id: pkg.documentId,
53
+ title: pkg.name,
54
+ value: pkg.documentId,
55
+ description: pkg.description,
56
+ path: {
57
+ text: `${config.vetraPackageBasePath}/${pkg.name}`,
58
+ url: `${config.vetraPackageBasePath}/${pkg.name}`,
59
+ },
60
+ }));
61
+ console.log(options);
62
+ return options;
63
+ }, fetchSelectedOptionCallback: async (value) => {
64
+ const data = await graphqlClient.request(SEARCH_PACKAGES_BY_DOCUMENT_ID_QUERY, {
65
+ documentIds: [value],
66
+ });
67
+ const pkg = data.vetraPackages[0];
68
+ if (!pkg) {
69
+ return;
70
+ }
71
+ const newSelectedPackage = {
72
+ ...pkg,
73
+ github: pkg.githubUrl,
74
+ npm: pkg.npmUrl,
75
+ phid: pkg.documentId,
76
+ vetraDriveUrl: pkg.vetraDriveUrl,
77
+ title: pkg.name,
78
+ id: selectedPackage.id,
79
+ description: pkg.description,
80
+ };
81
+ setSelectedPackage(newSelectedPackage);
82
+ setDisplayedPkg(newSelectedPackage);
83
+ // Update the entry immediately when refresh is clicked
84
+ // onSave(newSelectedPackage);
85
+ return {
86
+ title: pkg.name,
87
+ value: pkg.documentId,
88
+ description: pkg.description,
89
+ path: {
90
+ text: `${config.vetraPackageBasePath}/${pkg.name}`,
91
+ url: `${config.vetraPackageBasePath}/${pkg.name}`,
92
+ },
93
+ };
94
+ }, onSelect: (e) => {
95
+ console.log(e.target);
96
+ }, variant: "withValueTitleAndDescription", required: true, viewMode: "edition", placeholder: "Enter package name" }), _jsxs("div", { className: "flex justify-end space-x-3", children: [_jsx(Button, { color: "light", onClick: onCancel, children: "Cancel" }), _jsx(Button, { onClick: handleSave, disabled: !selectedPackage, children: "Save Changes" })] })] }) }) }));
97
+ }
98
+ return (_jsx("div", { className: "p-3 bg-gray-50 rounded border", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("span", { className: "font-medium text-gray-900", children: displayedPkg.title }), displayedPkg.description && (_jsx("p", { className: "text-sm text-gray-500", children: displayedPkg.description })), displayedPkg.phid && displayedPkg.title && (_jsxs("a", { href: `${config.vetraPackageBasePath}/${displayedPkg.title}`, className: "text-xs text-blue-600 hover:text-blue-800 hover:underline block mt-1", children: [config.vetraPackageBasePath, "/", displayedPkg.title] }))] }), _jsxs("div", { className: "flex space-x-2", children: [_jsx(Button, { color: "light", size: "sm", onClick: onEdit, children: "Edit" }), _jsx(Button, { color: "red", size: "sm", onClick: onDelete, children: "Remove" })] })] }) }));
99
+ }
@@ -0,0 +1,17 @@
1
+ import type { BuilderTeamDocument } from "../../../document-models/builder-team/index.js";
2
+ interface ProfileSectionProps {
3
+ profile: BuilderTeamDocument['state']['global']['profile'];
4
+ isEditing: boolean;
5
+ onSetProfileName: (name: string) => void;
6
+ onSetSlug: (slug: string) => void;
7
+ onSetDescription: (description: string) => void;
8
+ onSetLogo: (logoUrl: string) => void;
9
+ onUpdateSocials: (socials: {
10
+ github?: string | null;
11
+ website?: string | null;
12
+ x?: string | null;
13
+ }) => void;
14
+ onClose: () => void;
15
+ }
16
+ export declare function ProfileSection({ profile, isEditing, onSetProfileName, onSetSlug, onSetDescription, onSetLogo, onUpdateSocials, onClose, }: ProfileSectionProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Form, StringField, UrlField } from "@powerhousedao/document-engineering";
3
+ export function ProfileSection({ profile, isEditing, onSetProfileName, onSetSlug, onSetDescription, onSetLogo, onUpdateSocials, onClose, }) {
4
+ return (_jsxs("div", { className: "bg-white rounded-lg shadow-sm border", children: [_jsxs("div", { className: "px-6 py-4 border-b border-gray-200", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900", children: "Profile Information" }), _jsx("p", { className: "text-sm text-gray-500", children: "Manage your builder profile details" })] }), _jsx("div", { className: "p-6", children: isEditing ? (_jsx(Form, { onSubmit: (e) => e.preventDefault(), children: _jsxs("div", { className: "space-y-6", children: [_jsx(StringField, { name: "profileName", label: "Profile Name", value: profile.name, onChange: (e) => onSetProfileName(e.target.value), placeholder: "Enter your profile name", description: "Your public display name" }), _jsx(StringField, { name: "slug", label: "Slug", value: profile.slug, onChange: (e) => onSetSlug(e.target.value), placeholder: "your-slug", description: "Unique identifier for your profile (used in URLs)" }), _jsx(StringField, { name: "description", label: "Description", value: profile.description || "", onChange: (e) => onSetDescription(e.target.value), placeholder: "Tell us about yourself and your work", description: "Brief description of your work and interests" }), _jsx(UrlField, { name: "logo", label: "Logo URL", value: profile.logo || "", onChange: (e) => onSetLogo(e.target.value), placeholder: "https://example.com/logo.png", description: "URL to your profile logo image" }), _jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-md font-medium text-gray-900", children: "Social Links" }), _jsx(UrlField, { name: "github", label: "GitHub", value: profile.socials.github || "", onChange: (e) => onUpdateSocials({ ...profile.socials, github: e.target.value }), placeholder: "https://github.com/username" }), _jsx(UrlField, { name: "website", label: "Website", value: profile.socials.website || "", onChange: (e) => onUpdateSocials({ ...profile.socials, website: e.target.value }), placeholder: "https://your-website.com" }), _jsx(UrlField, { name: "x", label: "X (Twitter)", value: profile.socials.xProfile || "", onChange: (e) => onUpdateSocials({ ...profile.socials, x: e.target.value }), placeholder: "https://x.com/username" })] }), _jsxs("div", { className: "flex justify-end space-x-3", children: [_jsx(Button, { color: "light", onClick: onClose, children: "Cancel" }), _jsx(Button, { onClick: onClose, children: "Save Changes" })] })] }) })) : (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700", children: "Name" }), _jsx("p", { className: "mt-1 text-sm text-gray-900", children: profile.name || "Not set" })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700", children: "Slug" }), _jsx("p", { className: "mt-1 text-sm text-gray-900", children: profile.slug ? `@${profile.slug}` : "Not set" })] })] }), profile.description && (_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700", children: "Description" }), _jsx("p", { className: "mt-1 text-sm text-gray-900", children: profile.description })] })), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700", children: "Social Links" }), _jsxs("div", { className: "mt-2 flex space-x-4", children: [profile.socials.github && (_jsx("a", { href: profile.socials.github, target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:text-blue-800", children: "GitHub" })), profile.socials.website && (_jsx("a", { href: profile.socials.website, target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:text-blue-800", children: "Website" })), profile.socials.xProfile && (_jsx("a", { href: profile.socials.xProfile, target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:text-blue-800", children: "X (Twitter)" })), !profile.socials.github && !profile.socials.website && !profile.socials.xProfile && (_jsx("span", { className: "text-gray-500 text-sm", children: "No social links added" }))] })] })] })) })] }));
5
+ }
@@ -0,0 +1,7 @@
1
+ import type { BuilderTeamDocument } from "../../../document-models/builder-team/index.js";
2
+ interface QuickStatsProps {
3
+ spaces: BuilderTeamDocument['state']['global']['spaces'];
4
+ members: BuilderTeamDocument['state']['global']['members'];
5
+ }
6
+ export declare function QuickStats({ spaces, members }: QuickStatsProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function QuickStats({ spaces, members }) {
3
+ const totalPackages = spaces.reduce((total, space) => total + space.packages.length, 0);
4
+ return (_jsxs("div", { className: "bg-white rounded-lg shadow-sm border", children: [_jsx("div", { className: "px-6 py-4 border-b border-gray-200", children: _jsx("h3", { className: "text-lg font-semibold text-gray-900", children: "Quick Stats" }) }), _jsx("div", { className: "p-6", children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("span", { className: "text-sm text-gray-500", children: "Spaces" }), _jsx("span", { className: "text-sm font-medium text-gray-900", children: spaces.length })] }), _jsxs("div", { className: "flex justify-between items-center", children: [_jsx("span", { className: "text-sm text-gray-500", children: "Total Packages" }), _jsx("span", { className: "text-sm font-medium text-gray-900", children: totalPackages })] }), _jsxs("div", { className: "flex justify-between items-center", children: [_jsx("span", { className: "text-sm text-gray-500", children: "Team Members" }), _jsx("span", { className: "text-sm font-medium text-gray-900", children: members.length })] })] }) })] }));
5
+ }
@@ -0,0 +1,9 @@
1
+ interface SpaceFormProps {
2
+ initialTitle?: string;
3
+ initialDescription?: string;
4
+ onSave: (title: string, description: string) => void;
5
+ onCancel: () => void;
6
+ saveButtonText?: string;
7
+ }
8
+ export declare function SpaceForm({ initialTitle, initialDescription, onSave, onCancel, saveButtonText, }: SpaceFormProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Form, StringField } from "@powerhousedao/document-engineering";
3
+ import { useState } from "react";
4
+ export function SpaceForm({ initialTitle = "", initialDescription = "", onSave, onCancel, saveButtonText = "Add Space", }) {
5
+ const [title, setTitle] = useState(initialTitle);
6
+ const [description, setDescription] = useState(initialDescription);
7
+ const handleSave = () => {
8
+ onSave(title, description);
9
+ };
10
+ return (_jsx("div", { className: "p-4 bg-gray-50 rounded-lg", children: _jsx(Form, { onSubmit: (e) => e.preventDefault(), children: _jsxs("div", { className: "space-y-4", children: [_jsx(StringField, { name: "spaceTitle", label: "Space Title", value: title, onChange: (e) => setTitle(e.target.value), placeholder: "Enter space title" }), _jsx(StringField, { name: "spaceDescription", label: "Description (optional)", value: description, onChange: (e) => setDescription(e.target.value), placeholder: "Enter space description" }), _jsxs("div", { className: "flex justify-end space-x-3", children: [_jsx(Button, { color: "light", onClick: onCancel, children: "Cancel" }), _jsx(Button, { onClick: handleSave, disabled: !title.trim(), children: saveButtonText })] })] }) }) }));
11
+ }