@powerhousedao/builder-profile 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/document-models/builder-profile/actions.d.ts +22 -0
  2. package/dist/document-models/builder-profile/actions.d.ts.map +1 -0
  3. package/dist/document-models/builder-profile/actions.js +4 -0
  4. package/dist/document-models/builder-profile/gen/actions.d.ts +3 -3
  5. package/dist/document-models/builder-profile/gen/actions.d.ts.map +1 -1
  6. package/dist/document-models/builder-profile/gen/actions.js +1 -1
  7. package/dist/document-models/builder-profile/gen/builders/actions.d.ts +44 -0
  8. package/dist/document-models/builder-profile/gen/builders/actions.d.ts.map +1 -0
  9. package/dist/document-models/builder-profile/gen/builders/actions.js +1 -0
  10. package/dist/document-models/builder-profile/gen/builders/creators.d.ts +13 -0
  11. package/dist/document-models/builder-profile/gen/builders/creators.d.ts.map +1 -0
  12. package/dist/document-models/builder-profile/gen/builders/creators.js +12 -0
  13. package/dist/document-models/builder-profile/gen/builders/error.d.ts.map +1 -0
  14. package/dist/document-models/builder-profile/gen/builders/operations.d.ts +16 -0
  15. package/dist/document-models/builder-profile/gen/builders/operations.d.ts.map +1 -0
  16. package/dist/document-models/builder-profile/gen/builders/operations.js +3 -0
  17. package/dist/document-models/builder-profile/gen/creators.d.ts +2 -1
  18. package/dist/document-models/builder-profile/gen/creators.d.ts.map +1 -1
  19. package/dist/document-models/builder-profile/gen/creators.js +2 -1
  20. package/dist/document-models/builder-profile/gen/document-model.d.ts +2 -2
  21. package/dist/document-models/builder-profile/gen/document-model.d.ts.map +1 -1
  22. package/dist/document-models/builder-profile/gen/document-model.js +107 -8
  23. package/dist/document-models/builder-profile/gen/document-schema.d.ts +370 -0
  24. package/dist/document-models/builder-profile/gen/document-schema.d.ts.map +1 -0
  25. package/dist/document-models/builder-profile/gen/document-schema.js +33 -0
  26. package/dist/document-models/builder-profile/gen/document-type.d.ts +2 -0
  27. package/dist/document-models/builder-profile/gen/document-type.d.ts.map +1 -0
  28. package/dist/document-models/builder-profile/gen/document-type.js +1 -0
  29. package/dist/document-models/builder-profile/gen/index.d.ts +7 -3
  30. package/dist/document-models/builder-profile/gen/index.d.ts.map +1 -1
  31. package/dist/document-models/builder-profile/gen/index.js +7 -2
  32. package/dist/document-models/builder-profile/gen/ph-factories.d.ts +6 -10
  33. package/dist/document-models/builder-profile/gen/ph-factories.d.ts.map +1 -1
  34. package/dist/document-models/builder-profile/gen/ph-factories.js +9 -4
  35. package/dist/document-models/builder-profile/gen/reducer.d.ts +1 -3
  36. package/dist/document-models/builder-profile/gen/reducer.d.ts.map +1 -1
  37. package/dist/document-models/builder-profile/gen/reducer.js +42 -9
  38. package/dist/document-models/builder-profile/gen/schema/index.d.ts +1 -1
  39. package/dist/document-models/builder-profile/gen/schema/index.d.ts.map +1 -1
  40. package/dist/document-models/builder-profile/gen/schema/index.js +1 -1
  41. package/dist/document-models/builder-profile/gen/schema/types.d.ts +55 -0
  42. package/dist/document-models/builder-profile/gen/schema/types.d.ts.map +1 -1
  43. package/dist/document-models/builder-profile/gen/schema/zod.d.ts +19 -1
  44. package/dist/document-models/builder-profile/gen/schema/zod.d.ts.map +1 -1
  45. package/dist/document-models/builder-profile/gen/schema/zod.js +126 -0
  46. package/dist/document-models/builder-profile/gen/types.d.ts +9 -7
  47. package/dist/document-models/builder-profile/gen/types.d.ts.map +1 -1
  48. package/dist/document-models/builder-profile/gen/types.js +1 -1
  49. package/dist/document-models/builder-profile/gen/utils.d.ts +13 -20
  50. package/dist/document-models/builder-profile/gen/utils.d.ts.map +1 -1
  51. package/dist/document-models/builder-profile/gen/utils.js +54 -37
  52. package/dist/document-models/builder-profile/hooks.d.ts +11 -0
  53. package/dist/document-models/builder-profile/hooks.d.ts.map +1 -0
  54. package/dist/document-models/builder-profile/hooks.js +26 -0
  55. package/dist/document-models/builder-profile/index.d.ts +5 -20
  56. package/dist/document-models/builder-profile/index.d.ts.map +1 -1
  57. package/dist/document-models/builder-profile/index.js +5 -17
  58. package/dist/document-models/builder-profile/module.d.ts +5 -0
  59. package/dist/document-models/builder-profile/module.d.ts.map +1 -0
  60. package/dist/document-models/builder-profile/module.js +10 -0
  61. package/dist/document-models/builder-profile/src/index.d.ts +2 -0
  62. package/dist/document-models/builder-profile/src/index.d.ts.map +1 -0
  63. package/dist/document-models/builder-profile/src/index.js +1 -0
  64. package/dist/document-models/builder-profile/src/reducers/builders.d.ts +3 -0
  65. package/dist/document-models/builder-profile/src/reducers/builders.d.ts.map +1 -0
  66. package/dist/document-models/builder-profile/src/reducers/builders.js +108 -0
  67. package/dist/document-models/builder-profile/src/tests/builders.test.d.ts +6 -0
  68. package/dist/document-models/builder-profile/src/tests/builders.test.d.ts.map +1 -0
  69. package/dist/document-models/builder-profile/src/tests/builders.test.js +19 -0
  70. package/dist/document-models/builder-profile/src/tests/document-model.test.d.ts +4 -0
  71. package/dist/document-models/builder-profile/src/tests/document-model.test.d.ts.map +1 -1
  72. package/dist/document-models/builder-profile/src/tests/document-model.test.js +91 -5
  73. package/dist/document-models/builder-profile/utils.d.ts +14 -0
  74. package/dist/document-models/builder-profile/utils.d.ts.map +1 -0
  75. package/dist/document-models/builder-profile/utils.js +7 -0
  76. package/dist/document-models/document-models.d.ts +3 -0
  77. package/dist/document-models/document-models.d.ts.map +1 -0
  78. package/dist/document-models/document-models.js +4 -0
  79. package/dist/document-models/index.d.ts +1 -2
  80. package/dist/document-models/index.d.ts.map +1 -1
  81. package/dist/document-models/index.js +1 -1
  82. package/dist/editors/builder-profile/components/ContributorsSection.d.ts +8 -0
  83. package/dist/editors/builder-profile/components/ContributorsSection.d.ts.map +1 -0
  84. package/dist/editors/builder-profile/components/ContributorsSection.js +177 -0
  85. package/dist/editors/builder-profile/components/ImageUrlInput.d.ts +9 -0
  86. package/dist/editors/builder-profile/components/ImageUrlInput.d.ts.map +1 -0
  87. package/dist/editors/builder-profile/components/ImageUrlInput.js +57 -0
  88. package/dist/editors/builder-profile/components/LinksSection.d.ts +18 -0
  89. package/dist/editors/builder-profile/components/LinksSection.d.ts.map +1 -0
  90. package/dist/editors/builder-profile/components/LinksSection.js +74 -0
  91. package/dist/editors/builder-profile/components/ProfilePreview.d.ts +7 -0
  92. package/dist/editors/builder-profile/components/ProfilePreview.d.ts.map +1 -0
  93. package/dist/editors/builder-profile/components/ProfilePreview.js +55 -0
  94. package/dist/editors/builder-profile/components/ScopesSection.d.ts +9 -0
  95. package/dist/editors/builder-profile/components/ScopesSection.d.ts.map +1 -0
  96. package/dist/editors/builder-profile/components/ScopesSection.js +58 -0
  97. package/dist/editors/builder-profile/components/SkillsSection.d.ts +9 -0
  98. package/dist/editors/builder-profile/components/SkillsSection.d.ts.map +1 -0
  99. package/dist/editors/builder-profile/components/SkillsSection.js +66 -0
  100. package/dist/editors/builder-profile/editor.d.ts +0 -2
  101. package/dist/editors/builder-profile/editor.d.ts.map +1 -1
  102. package/dist/editors/builder-profile/editor.js +216 -97
  103. package/dist/editors/builder-profile/module.d.ts +4 -0
  104. package/dist/editors/builder-profile/module.d.ts.map +1 -0
  105. package/dist/editors/builder-profile/module.js +10 -0
  106. package/dist/editors/editors.d.ts +3 -0
  107. package/dist/editors/editors.d.ts.map +1 -0
  108. package/dist/editors/editors.js +2 -0
  109. package/dist/editors/index.d.ts +1 -2
  110. package/dist/editors/index.d.ts.map +1 -1
  111. package/dist/editors/index.js +1 -1
  112. package/dist/index.d.ts +2 -2
  113. package/dist/index.d.ts.map +1 -1
  114. package/dist/index.js +2 -2
  115. package/dist/powerhouse.manifest.json +5 -13
  116. package/dist/processors/index.d.ts.map +1 -1
  117. package/dist/style.css +642 -4847
  118. package/dist/subgraphs/builder-profile/index.d.ts +2 -2
  119. package/dist/subgraphs/builder-profile/index.d.ts.map +1 -1
  120. package/dist/subgraphs/builder-profile/index.js +2 -2
  121. package/dist/subgraphs/builder-profile/resolvers.d.ts +2 -2
  122. package/dist/subgraphs/builder-profile/resolvers.d.ts.map +1 -1
  123. package/dist/subgraphs/builder-profile/resolvers.js +112 -4
  124. package/dist/subgraphs/builder-profile/schema.d.ts.map +1 -1
  125. package/dist/subgraphs/builder-profile/schema.js +119 -13
  126. package/dist/subgraphs/index.d.ts +0 -1
  127. package/dist/subgraphs/index.d.ts.map +1 -1
  128. package/dist/vite.config.d.ts +3 -0
  129. package/dist/vite.config.d.ts.map +1 -0
  130. package/dist/vite.config.js +13 -0
  131. package/package.json +56 -42
  132. package/dist/document-models/builder-profile/gen/builder/actions.d.ts +0 -8
  133. package/dist/document-models/builder-profile/gen/builder/actions.d.ts.map +0 -1
  134. package/dist/document-models/builder-profile/gen/builder/actions.js +0 -1
  135. package/dist/document-models/builder-profile/gen/builder/creators.d.ts +0 -4
  136. package/dist/document-models/builder-profile/gen/builder/creators.d.ts.map +0 -1
  137. package/dist/document-models/builder-profile/gen/builder/creators.js +0 -3
  138. package/dist/document-models/builder-profile/gen/builder/error.d.ts.map +0 -1
  139. package/dist/document-models/builder-profile/gen/builder/object.d.ts +0 -7
  140. package/dist/document-models/builder-profile/gen/builder/object.d.ts.map +0 -1
  141. package/dist/document-models/builder-profile/gen/builder/object.js +0 -7
  142. package/dist/document-models/builder-profile/gen/builder/operations.d.ts +0 -7
  143. package/dist/document-models/builder-profile/gen/builder/operations.d.ts.map +0 -1
  144. package/dist/document-models/builder-profile/gen/builder/operations.js +0 -1
  145. package/dist/document-models/builder-profile/gen/object.d.ts +0 -15
  146. package/dist/document-models/builder-profile/gen/object.d.ts.map +0 -1
  147. package/dist/document-models/builder-profile/gen/object.js +0 -25
  148. package/dist/document-models/builder-profile/src/reducers/builder.d.ts +0 -3
  149. package/dist/document-models/builder-profile/src/reducers/builder.d.ts.map +0 -1
  150. package/dist/document-models/builder-profile/src/reducers/builder.js +0 -9
  151. package/dist/document-models/builder-profile/src/tests/builder.test.d.ts +0 -2
  152. package/dist/document-models/builder-profile/src/tests/builder.test.d.ts.map +0 -1
  153. package/dist/document-models/builder-profile/src/tests/builder.test.js +0 -116
  154. package/dist/editors/builder-profile/index.d.ts +0 -3
  155. package/dist/editors/builder-profile/index.d.ts.map +0 -1
  156. package/dist/editors/builder-profile/index.js +0 -11
  157. package/dist/editors/hooks/useBuilderProfileDocument.d.ts +0 -4
  158. package/dist/editors/hooks/useBuilderProfileDocument.d.ts.map +0 -1
  159. package/dist/editors/hooks/useBuilderProfileDocument.js +0 -8
  160. /package/dist/document-models/builder-profile/gen/{builder → builders}/error.d.ts +0 -0
  161. /package/dist/document-models/builder-profile/gen/{builder → builders}/error.js +0 -0
@@ -1,6 +1,6 @@
1
- import { Subgraph } from "@powerhousedao/reactor-api";
1
+ import { BaseSubgraph } from "@powerhousedao/reactor-api";
2
2
  import type { DocumentNode } from "graphql";
3
- export declare class BuilderProfileSubgraph extends Subgraph {
3
+ export declare class BuilderProfileSubgraph extends BaseSubgraph {
4
4
  name: string;
5
5
  typeDefs: DocumentNode;
6
6
  resolvers: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../subgraphs/builder-profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,qBAAa,sBAAuB,SAAQ,QAAQ;IAClD,IAAI,SAAqB;IACzB,QAAQ,EAAE,YAAY,CAAU;IAChC,SAAS,0BAAsB;IAC/B,uBAAuB,KAAM;IACvB,OAAO;IACP,YAAY;CACnB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../subgraphs/builder-profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,qBAAa,sBAAuB,SAAQ,YAAY;IACtD,IAAI,SAAqB;IACzB,QAAQ,EAAE,YAAY,CAAU;IAChC,SAAS,0BAAsB;IAC/B,uBAAuB,KAAM;IACvB,OAAO;IACP,YAAY;CACnB"}
@@ -1,7 +1,7 @@
1
- import { Subgraph } from "@powerhousedao/reactor-api";
1
+ import { BaseSubgraph } from "@powerhousedao/reactor-api";
2
2
  import { schema } from "./schema.js";
3
3
  import { getResolvers } from "./resolvers.js";
4
- export class BuilderProfileSubgraph extends Subgraph {
4
+ export class BuilderProfileSubgraph extends BaseSubgraph {
5
5
  name = "builder-profile";
6
6
  typeDefs = schema;
7
7
  resolvers = getResolvers(this);
@@ -1,3 +1,3 @@
1
- import { type Subgraph } from "@powerhousedao/reactor-api";
2
- export declare const getResolvers: (subgraph: Subgraph) => Record<string, unknown>;
1
+ import type { BaseSubgraph } from "@powerhousedao/reactor-api";
2
+ export declare const getResolvers: (subgraph: BaseSubgraph) => Record<string, unknown>;
3
3
  //# sourceMappingURL=resolvers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/builder-profile/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAS3D,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAkHvE,CAAC"}
1
+ {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../subgraphs/builder-profile/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAsB/D,eAAO,MAAM,YAAY,GACvB,UAAU,YAAY,KACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CA4SxB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { addFile } from "document-drive";
2
- import { actions, } from "../../document-models/builder-profile/index.js";
3
2
  import { setName } from "document-model";
3
+ import { actions, builderProfileDocumentType, } from "@powerhousedao/builder-profile/document-models/builder-profile";
4
4
  export const getResolvers = (subgraph) => {
5
5
  const reactor = subgraph.reactor;
6
6
  return {
@@ -46,7 +46,7 @@ export const getResolvers = (subgraph) => {
46
46
  revision: doc.header?.revision?.global ?? 0,
47
47
  };
48
48
  }));
49
- return docs.filter((doc) => doc.header.documentType === "powerhouse/builder-profile");
49
+ return docs.filter((doc) => doc.header.documentType === builderProfileDocumentType);
50
50
  },
51
51
  };
52
52
  },
@@ -54,12 +54,12 @@ export const getResolvers = (subgraph) => {
54
54
  Mutation: {
55
55
  BuilderProfile_createDocument: async (_, args) => {
56
56
  const { driveId, name } = args;
57
- const document = await reactor.addDocument("powerhouse/builder-profile");
57
+ const document = await reactor.addDocument(builderProfileDocumentType);
58
58
  if (driveId) {
59
59
  await reactor.addAction(driveId, addFile({
60
60
  name,
61
61
  id: document.header.id,
62
- documentType: "powerhouse/builder-profile",
62
+ documentType: builderProfileDocumentType,
63
63
  }));
64
64
  }
65
65
  if (name) {
@@ -79,6 +79,114 @@ export const getResolvers = (subgraph) => {
79
79
  }
80
80
  return true;
81
81
  },
82
+ BuilderProfile_addSkill: async (_, args) => {
83
+ const { docId, input } = args;
84
+ const doc = await reactor.getDocument(docId);
85
+ if (!doc) {
86
+ throw new Error("Document not found");
87
+ }
88
+ const result = await reactor.addAction(docId, actions.addSkill(input));
89
+ if (result.status !== "SUCCESS") {
90
+ throw new Error(result.error?.message ?? "Failed to addSkill");
91
+ }
92
+ return true;
93
+ },
94
+ BuilderProfile_removeSkill: async (_, args) => {
95
+ const { docId, input } = args;
96
+ const doc = await reactor.getDocument(docId);
97
+ if (!doc) {
98
+ throw new Error("Document not found");
99
+ }
100
+ const result = await reactor.addAction(docId, actions.removeSkill(input));
101
+ if (result.status !== "SUCCESS") {
102
+ throw new Error(result.error?.message ?? "Failed to removeSkill");
103
+ }
104
+ return true;
105
+ },
106
+ BuilderProfile_addScope: async (_, args) => {
107
+ const { docId, input } = args;
108
+ const doc = await reactor.getDocument(docId);
109
+ if (!doc) {
110
+ throw new Error("Document not found");
111
+ }
112
+ const result = await reactor.addAction(docId, actions.addScope(input));
113
+ if (result.status !== "SUCCESS") {
114
+ throw new Error(result.error?.message ?? "Failed to addScope");
115
+ }
116
+ return true;
117
+ },
118
+ BuilderProfile_removeScope: async (_, args) => {
119
+ const { docId, input } = args;
120
+ const doc = await reactor.getDocument(docId);
121
+ if (!doc) {
122
+ throw new Error("Document not found");
123
+ }
124
+ const result = await reactor.addAction(docId, actions.removeScope(input));
125
+ if (result.status !== "SUCCESS") {
126
+ throw new Error(result.error?.message ?? "Failed to removeScope");
127
+ }
128
+ return true;
129
+ },
130
+ BuilderProfile_addLink: async (_, args) => {
131
+ const { docId, input } = args;
132
+ const doc = await reactor.getDocument(docId);
133
+ if (!doc) {
134
+ throw new Error("Document not found");
135
+ }
136
+ const result = await reactor.addAction(docId, actions.addLink(input));
137
+ if (result.status !== "SUCCESS") {
138
+ throw new Error(result.error?.message ?? "Failed to addLink");
139
+ }
140
+ return true;
141
+ },
142
+ BuilderProfile_editLink: async (_, args) => {
143
+ const { docId, input } = args;
144
+ const doc = await reactor.getDocument(docId);
145
+ if (!doc) {
146
+ throw new Error("Document not found");
147
+ }
148
+ const result = await reactor.addAction(docId, actions.editLink(input));
149
+ if (result.status !== "SUCCESS") {
150
+ throw new Error(result.error?.message ?? "Failed to editLink");
151
+ }
152
+ return true;
153
+ },
154
+ BuilderProfile_removeLink: async (_, args) => {
155
+ const { docId, input } = args;
156
+ const doc = await reactor.getDocument(docId);
157
+ if (!doc) {
158
+ throw new Error("Document not found");
159
+ }
160
+ const result = await reactor.addAction(docId, actions.removeLink(input));
161
+ if (result.status !== "SUCCESS") {
162
+ throw new Error(result.error?.message ?? "Failed to removeLink");
163
+ }
164
+ return true;
165
+ },
166
+ BuilderProfile_addContributor: async (_, args) => {
167
+ const { docId, input } = args;
168
+ const doc = await reactor.getDocument(docId);
169
+ if (!doc) {
170
+ throw new Error("Document not found");
171
+ }
172
+ const result = await reactor.addAction(docId, actions.addContributor(input));
173
+ if (result.status !== "SUCCESS") {
174
+ throw new Error(result.error?.message ?? "Failed to addContributor");
175
+ }
176
+ return true;
177
+ },
178
+ BuilderProfile_removeContributor: async (_, args) => {
179
+ const { docId, input } = args;
180
+ const doc = await reactor.getDocument(docId);
181
+ if (!doc) {
182
+ throw new Error("Document not found");
183
+ }
184
+ const result = await reactor.addAction(docId, actions.removeContributor(input));
185
+ if (result.status !== "SUCCESS") {
186
+ throw new Error(result.error?.message ?? "Failed to removeContributor");
187
+ }
188
+ return true;
189
+ },
82
190
  },
83
191
  };
84
192
  };
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/builder-profile/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,YA+CpB,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../subgraphs/builder-profile/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,YAyJpB,CAAC"}
@@ -1,18 +1,7 @@
1
1
  import { gql } from "graphql-tag";
2
2
  export const schema = gql `
3
3
  """
4
- Subgraph definition for BuilderProfile (powerhouse/builder-profile)
5
- """
6
- type BuilderProfileState {
7
- id: PHID
8
- slug: String
9
- name: String
10
- icon: URL
11
- description: String
12
- }
13
-
14
- """
15
- Queries: BuilderProfile
4
+ Queries: BuilderProfile Document
16
5
  """
17
6
  type BuilderProfileQueries {
18
7
  getDocument(docId: PHID!, driveId: PHID): BuilderProfile
@@ -34,16 +23,133 @@ export const schema = gql `
34
23
  docId: PHID
35
24
  input: BuilderProfile_UpdateProfileInput
36
25
  ): Int
26
+ BuilderProfile_addSkill(
27
+ driveId: String
28
+ docId: PHID
29
+ input: BuilderProfile_AddSkillInput
30
+ ): Int
31
+ BuilderProfile_removeSkill(
32
+ driveId: String
33
+ docId: PHID
34
+ input: BuilderProfile_RemoveSkillInput
35
+ ): Int
36
+ BuilderProfile_addScope(
37
+ driveId: String
38
+ docId: PHID
39
+ input: BuilderProfile_AddScopeInput
40
+ ): Int
41
+ BuilderProfile_removeScope(
42
+ driveId: String
43
+ docId: PHID
44
+ input: BuilderProfile_RemoveScopeInput
45
+ ): Int
46
+ BuilderProfile_addLink(
47
+ driveId: String
48
+ docId: PHID
49
+ input: BuilderProfile_AddLinkInput
50
+ ): Int
51
+ BuilderProfile_editLink(
52
+ driveId: String
53
+ docId: PHID
54
+ input: BuilderProfile_EditLinkInput
55
+ ): Int
56
+ BuilderProfile_removeLink(
57
+ driveId: String
58
+ docId: PHID
59
+ input: BuilderProfile_RemoveLinkInput
60
+ ): Int
61
+ BuilderProfile_addContributor(
62
+ driveId: String
63
+ docId: PHID
64
+ input: BuilderProfile_AddContributorInput
65
+ ): Int
66
+ BuilderProfile_removeContributor(
67
+ driveId: String
68
+ docId: PHID
69
+ input: BuilderProfile_RemoveContributorInput
70
+ ): Int
37
71
  }
38
72
 
39
73
  """
40
- Module: Builder
74
+ Module: Builders
41
75
  """
42
76
  input BuilderProfile_UpdateProfileInput {
43
77
  id: PHID
78
+ code: String
44
79
  slug: String
45
80
  name: String
46
81
  icon: URL
47
82
  description: String
83
+ status: BuilderProfile_BuilderStatusInput
84
+ type: BuilderProfile_teamTypeInput
85
+ }
86
+
87
+ enum BuilderProfile_teamTypeInput {
88
+ INDIVIDUAL
89
+ TEAM
90
+ }
91
+
92
+ enum BuilderProfile_BuilderStatusInput {
93
+ ACTIVE
94
+ INACTIVE
95
+ ON_HOLD
96
+ COMPLETED
97
+ ARCHIVED
98
+ }
99
+
100
+ input BuilderProfile_AddSkillInput {
101
+ skill: BuilderProfile_BuilderSkillInput
102
+ }
103
+
104
+ enum BuilderProfile_BuilderSkillInput {
105
+ FRONTEND_DEVELOPMENT
106
+ BACKEND_DEVELOPMENT
107
+ FULL_STACK_DEVELOPMENT
108
+ DEVOPS_ENGINEERING
109
+ SMART_CONTRACT_DEVELOPMENT
110
+ UI_UX_DESIGN
111
+ TECHNICAL_WRITING
112
+ QA_TESTING
113
+ DATA_ENGINEERING
114
+ SECURITY_ENGINEERING
115
+ }
116
+ input BuilderProfile_RemoveSkillInput {
117
+ skill: BuilderProfile_BuilderSkillInput
118
+ }
119
+
120
+ input BuilderProfile_AddScopeInput {
121
+ scope: BuilderProfile_BuilderScopeInput
122
+ }
123
+
124
+ enum BuilderProfile_BuilderScopeInput {
125
+ ACC
126
+ STA
127
+ SUP
128
+ STABILITY_SCOPE
129
+ SUPPORT_SCOPE
130
+ PROTOCOL_SCOPE
131
+ GOVERNANCE_SCOPE
132
+ }
133
+ input BuilderProfile_RemoveScopeInput {
134
+ scope: BuilderProfile_BuilderScopeInput
135
+ }
136
+ input BuilderProfile_AddLinkInput {
137
+ id: OID!
138
+ url: URL!
139
+ label: String
140
+ }
141
+ input BuilderProfile_EditLinkInput {
142
+ id: OID!
143
+ url: URL!
144
+ label: String
145
+ }
146
+ input BuilderProfile_RemoveLinkInput {
147
+ id: OID!
148
+ }
149
+ input BuilderProfile_AddContributorInput {
150
+ contributorPHID: PHID!
151
+ }
152
+ input BuilderProfile_RemoveContributorInput {
153
+ contributorPHID: PHID!
48
154
  }
49
155
  `;
@@ -1,3 +1,2 @@
1
- export {};
2
1
  export * as BuilderProfileSubgraph from "./builder-profile/index.js";
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../subgraphs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AACV,OAAO,KAAK,sBAAsB,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../subgraphs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sBAAsB,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vite").UserConfigFnObject;
2
+ export default _default;
3
+ //# sourceMappingURL=vite.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAGA,wBAaG"}
@@ -0,0 +1,13 @@
1
+ import { getConnectBaseViteConfig } from "@powerhousedao/builder-tools";
2
+ import { defineConfig, mergeConfig } from "vite";
3
+ export default defineConfig(({ mode }) => {
4
+ const baseConnectViteConfig = getConnectBaseViteConfig({
5
+ mode,
6
+ dirname: import.meta.dirname,
7
+ });
8
+ const additionalViteConfig = {
9
+ // add your own vite config here
10
+ };
11
+ const config = mergeConfig(baseConnectViteConfig, additionalViteConfig);
12
+ return config;
13
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/builder-profile",
3
3
  "description": "Builder profile document model",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [
@@ -13,90 +13,104 @@
13
13
  "exports": {
14
14
  ".": {
15
15
  "types": "./dist/index.d.ts",
16
- "default": "./dist/index.js"
16
+ "import": "./dist/index.js"
17
17
  },
18
18
  "./document-models": {
19
19
  "types": "./dist/document-models/index.d.ts",
20
- "default": "./dist/document-models/index.js"
20
+ "import": "./dist/document-models/index.js"
21
21
  },
22
22
  "./editors": {
23
23
  "types": "./dist/editors/index.d.ts",
24
- "default": "./dist/editors/index.js"
24
+ "import": "./dist/editors/index.js"
25
+ },
26
+ "./document-models/*": {
27
+ "types": "./dist/document-models/*/index.d.ts",
28
+ "import": "./dist/document-models/*/index.js"
29
+ },
30
+ "./editors/*": {
31
+ "types": "./dist/editors/*/index.d.ts",
32
+ "import": "./dist/editors/*/index.js"
25
33
  },
26
34
  "./subgraphs": {
27
35
  "types": "./dist/subgraphs/index.d.ts",
28
- "default": "./dist/subgraphs/index.js"
36
+ "import": "./dist/subgraphs/index.js"
29
37
  },
30
38
  "./processors": {
31
39
  "types": "./dist/processors/index.d.ts",
32
- "default": "./dist/processors/index.js"
33
- },
34
- "./manifest": {
35
- "types": "./dist/manifest.d.ts",
36
- "default": "./dist/manifest.js"
40
+ "import": "./dist/processors/index.js"
37
41
  },
42
+ "./manifest": "./dist/powerhouse.manifest.json",
38
43
  "./style.css": "./dist/style.css"
39
44
  },
40
45
  "scripts": {
41
- "lint": "eslint .",
42
- "build:tsc": "tsc",
43
- "build:tsc:watch": "tsc --watch",
44
- "build:css": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
45
- "build:css:watch": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css --watch",
46
- "build": "npm run build:tsc && npm run build:css",
46
+ "build": "npm run tsc && npm run tailwind",
47
47
  "test": "vitest run",
48
48
  "test:watch": "vitest",
49
+ "lint": "eslint --config eslint.config.js --cache --cache-strategy content",
50
+ "lint:fix": "npm run lint -- --fix",
51
+ "tsc": "tsc",
52
+ "tsc:watch": "tsc --watch",
53
+ "tailwind": "npx @tailwindcss/cli -i ./style.css -o ./dist/style.css",
49
54
  "prepublishOnly": "npm run build",
55
+ "check-circular-imports": "npx dpdm -T ./index.ts",
50
56
  "generate": "ph-cli generate",
51
57
  "connect": "ph-cli connect",
52
58
  "reactor": "ph-cli reactor",
53
59
  "service": "ph-cli service",
60
+ "vetra": "ph-cli vetra",
54
61
  "service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh",
55
62
  "service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
56
63
  },
57
64
  "dependencies": {
58
- "@powerhousedao/builder-tools": "^5.0.0-staging.30",
59
- "@powerhousedao/common": "^5.0.0-staging.30",
60
- "@powerhousedao/design-system": "^5.0.0-staging.30",
61
- "document-model": "^5.0.0-staging.30",
65
+ "@powerhousedao/builder-tools": "latest",
66
+ "@powerhousedao/common": "latest",
67
+ "@powerhousedao/design-system": "latest",
68
+ "@powerhousedao/document-engineering": "^1.38.0",
69
+ "document-model": "latest",
62
70
  "error": "^10.4.0",
63
71
  "graphql": "^16.10.0",
64
72
  "graphql-tag": "^2.12.6",
73
+ "lucide-react": "^0.556.0",
65
74
  "zod": "^3.24.2"
66
75
  },
67
76
  "devDependencies": {
68
77
  "@electric-sql/pglite": "^0.2.12",
69
- "@eslint/js": "^9.25.0",
78
+ "@eslint/js": "^9.38.0",
70
79
  "@powerhousedao/analytics-engine-core": "^0.5.0",
71
- "@powerhousedao/codegen": "^5.0.0-staging.30",
72
- "@powerhousedao/ph-cli": "^5.0.0-staging.30",
73
- "@powerhousedao/reactor-api": "^5.0.0-staging.30",
74
- "@powerhousedao/reactor-browser": "^5.0.0-staging.30",
75
- "@powerhousedao/reactor-local": "^5.0.0-staging.30",
80
+ "@powerhousedao/codegen": "latest",
81
+ "@powerhousedao/config": "latest",
82
+ "@powerhousedao/connect": "latest",
83
+ "@powerhousedao/ph-cli": "latest",
84
+ "@powerhousedao/reactor-api": "latest",
85
+ "@powerhousedao/reactor-browser": "latest",
86
+ "@powerhousedao/reactor-local": "latest",
76
87
  "@powerhousedao/scalars": "latest",
77
- "@powerhousedao/switchboard": "^5.0.0-staging.30",
88
+ "@powerhousedao/switchboard": "latest",
78
89
  "@tailwindcss/cli": "^4.1.4",
79
90
  "@testing-library/react": "^16.3.0",
80
- "@types/node": "^22.14.1",
81
- "@types/react": "^18.3.20",
82
- "@vitejs/plugin-react": "^4.4.1",
83
- "document-drive": "^5.0.0-staging.30",
84
- "eslint": "^9.25.0",
91
+ "@types/node": "^24.9.2",
92
+ "@types/react": "^19.2.2",
93
+ "@vitejs/plugin-react": "^5.1.0",
94
+ "document-drive": "latest",
95
+ "eslint": "^9.38.0",
96
+ "eslint-config-prettier": "^10.1.8",
97
+ "eslint-plugin-prettier": "^5.5.4",
85
98
  "eslint-plugin-react": "^7.37.5",
86
- "eslint-plugin-react-hooks": "^5.2.0",
87
- "globals": "^16.0.0",
99
+ "eslint-plugin-react-hooks": "^7.0.1",
100
+ "globals": "^16.4.0",
88
101
  "package-manager-detector": "^0.2.8",
89
102
  "pm2": "^5.4.3",
90
- "react": "^18.3.1",
91
- "react-dom": "^18.3.1",
92
- "tailwindcss": "^4.1.4",
93
- "typescript": "^5.8.3",
94
- "typescript-eslint": "^8.30.1",
103
+ "react": "^19.2.0",
104
+ "react-dom": "^19.2.0",
105
+ "tailwindcss": "^4.1.16",
106
+ "typescript": "^5.9.3",
107
+ "typescript-eslint": "^8.46.2",
95
108
  "vite": "^6.2.3",
109
+ "vite-plugin-node-polyfills": "^0.24.0",
96
110
  "vitest": "^3.0.9"
97
111
  },
98
112
  "peerDependencies": {
99
- "react": "^18.3.1",
100
- "react-dom": "^18.3.1"
113
+ "react": "^19.2.0",
114
+ "react-dom": "^19.2.0"
101
115
  }
102
- }
116
+ }
@@ -1,8 +0,0 @@
1
- import { type Action } from "document-model";
2
- import type { UpdateProfileInput } from "../types.js";
3
- export type UpdateProfileAction = Action & {
4
- type: "UPDATE_PROFILE";
5
- input: UpdateProfileInput;
6
- };
7
- export type BuilderProfileBuilderAction = UpdateProfileAction;
8
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IACzC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,kBAAkB,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type UpdateProfileInput } from "../types.js";
2
- import { type UpdateProfileAction } from "./actions.js";
3
- export declare const updateProfile: (input: UpdateProfileInput) => UpdateProfileAction;
4
- //# sourceMappingURL=creators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,wBAOpD,CAAC"}
@@ -1,3 +0,0 @@
1
- import { createAction } from "document-model";
2
- import { z } from "../types.js";
3
- export const updateProfile = (input) => createAction("UPDATE_PROFILE", { ...input }, undefined, z.UpdateProfileInputSchema, "global");
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/error.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,IAAK,CAAC"}
@@ -1,7 +0,0 @@
1
- import { BaseDocumentClass } from "document-model";
2
- import { BuilderProfilePHState } from "../ph-factories.js";
3
- import { type UpdateProfileInput } from "../types.js";
4
- export default class BuilderProfile_Builder extends BaseDocumentClass<BuilderProfilePHState> {
5
- updateProfile(input: UpdateProfileInput): this;
6
- }
7
- //# sourceMappingURL=object.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,iBAAiB,CAAC,qBAAqB,CAAC;IACnF,aAAa,CAAC,KAAK,EAAE,kBAAkB;CAG/C"}
@@ -1,7 +0,0 @@
1
- import { BaseDocumentClass } from "document-model";
2
- import { updateProfile } from "./creators.js";
3
- export default class BuilderProfile_Builder extends BaseDocumentClass {
4
- updateProfile(input) {
5
- return this.dispatch(updateProfile(input));
6
- }
7
- }
@@ -1,7 +0,0 @@
1
- import { type SignalDispatch } from "document-model";
2
- import { type UpdateProfileAction } from "./actions.js";
3
- import { type BuilderProfileState } from "../types.js";
4
- export interface BuilderProfileBuilderOperations {
5
- updateProfileOperation: (state: BuilderProfileState, action: UpdateProfileAction, dispatch?: SignalDispatch) => void;
6
- }
7
- //# sourceMappingURL=operations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,+BAA+B;IAC9C,sBAAsB,EAAE,CACtB,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;CACX"}
@@ -1,15 +0,0 @@
1
- import { BaseDocumentClass, type SignalDispatch } from "document-model";
2
- import { BuilderProfilePHState } from "./ph-factories.js";
3
- import BuilderProfile_Builder from "./builder/object.js";
4
- export * from "./builder/object.js";
5
- interface BuilderProfile extends BuilderProfile_Builder {
6
- }
7
- declare class BuilderProfile extends BaseDocumentClass<BuilderProfilePHState> {
8
- static fileExtension: string;
9
- constructor(initialState?: Partial<BuilderProfilePHState>, dispatch?: SignalDispatch);
10
- saveToFile(path: string, name?: string): Promise<string>;
11
- loadFromFile(path: string): Promise<void>;
12
- static fromFile(path: string): Promise<BuilderProfile>;
13
- }
14
- export { BuilderProfile };
15
- //# sourceMappingURL=object.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/object.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,sBAAsB,MAAM,qBAAqB,CAAC;AAEzD,cAAc,qBAAqB,CAAC;AAGpC,UAAU,cAAe,SAAQ,sBAAsB;CAAG;AAG1D,cAAM,cAAe,SAAQ,iBAAiB,CAAC,qBAAqB,CAAC;IACnE,MAAM,CAAC,aAAa,SAAW;gBAG7B,YAAY,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,EAC7C,QAAQ,CAAC,EAAE,cAAc;IAKpB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAItC,YAAY,CAAC,IAAI,EAAE,MAAM;WAInB,QAAQ,CAAC,IAAI,EAAE,MAAM;CAKnC;AAID,OAAO,EAAE,cAAc,EAAE,CAAC"}