@powerhousedao/builder-profile 0.0.1 → 0.0.3
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.
- package/dist/document-models/builder-profile/actions.d.ts +13 -0
- package/dist/document-models/builder-profile/actions.d.ts.map +1 -0
- package/dist/document-models/builder-profile/actions.js +4 -0
- package/dist/document-models/builder-profile/gen/builder/actions.js +1 -1
- package/dist/document-models/builder-profile/gen/builder/creators.d.ts +2 -2
- package/dist/document-models/builder-profile/gen/builder/creators.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/builder/creators.js +3 -3
- package/dist/document-models/builder-profile/gen/builder/operations.js +3 -1
- package/dist/document-models/builder-profile/gen/creators.d.ts +1 -0
- package/dist/document-models/builder-profile/gen/creators.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/creators.js +1 -0
- package/dist/document-models/builder-profile/gen/document-model.d.ts +2 -2
- package/dist/document-models/builder-profile/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/document-model.js +23 -23
- package/dist/document-models/builder-profile/gen/document-schema.d.ts +218 -0
- package/dist/document-models/builder-profile/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/document-schema.js +33 -0
- package/dist/document-models/builder-profile/gen/document-type.d.ts +2 -0
- package/dist/document-models/builder-profile/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/document-type.js +1 -0
- package/dist/document-models/builder-profile/gen/index.d.ts +7 -3
- package/dist/document-models/builder-profile/gen/index.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/index.js +7 -2
- package/dist/document-models/builder-profile/gen/ph-factories.d.ts +6 -10
- package/dist/document-models/builder-profile/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/ph-factories.js +1 -4
- package/dist/document-models/builder-profile/gen/reducer.d.ts +1 -3
- package/dist/document-models/builder-profile/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/reducer.js +6 -9
- package/dist/document-models/builder-profile/gen/schema/index.d.ts +1 -1
- package/dist/document-models/builder-profile/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/schema/index.js +1 -1
- package/dist/document-models/builder-profile/gen/types.d.ts +9 -7
- package/dist/document-models/builder-profile/gen/types.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/types.js +1 -1
- package/dist/document-models/builder-profile/gen/utils.d.ts +13 -20
- package/dist/document-models/builder-profile/gen/utils.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/utils.js +45 -36
- package/dist/document-models/builder-profile/hooks.d.ts +11 -0
- package/dist/document-models/builder-profile/hooks.d.ts.map +1 -0
- package/dist/document-models/builder-profile/hooks.js +26 -0
- package/dist/document-models/builder-profile/index.d.ts +5 -20
- package/dist/document-models/builder-profile/index.d.ts.map +1 -1
- package/dist/document-models/builder-profile/index.js +5 -17
- package/dist/document-models/builder-profile/module.d.ts +5 -0
- package/dist/document-models/builder-profile/module.d.ts.map +1 -0
- package/dist/document-models/builder-profile/module.js +10 -0
- package/dist/document-models/builder-profile/src/index.d.ts +2 -0
- package/dist/document-models/builder-profile/src/index.d.ts.map +1 -0
- package/dist/document-models/builder-profile/src/index.js +1 -0
- package/dist/document-models/builder-profile/src/reducers/builder.d.ts +2 -2
- package/dist/document-models/builder-profile/src/reducers/builder.d.ts.map +1 -1
- package/dist/document-models/builder-profile/src/reducers/builder.js +2 -2
- package/dist/document-models/builder-profile/src/tests/builder.test.d.ts +4 -0
- package/dist/document-models/builder-profile/src/tests/builder.test.d.ts.map +1 -1
- package/dist/document-models/builder-profile/src/tests/builder.test.js +14 -111
- package/dist/document-models/builder-profile/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/builder-profile/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/builder-profile/src/tests/document-model.test.js +91 -5
- package/dist/document-models/builder-profile/utils.d.ts +14 -0
- package/dist/document-models/builder-profile/utils.d.ts.map +1 -0
- package/dist/document-models/builder-profile/utils.js +7 -0
- package/dist/document-models/document-models.d.ts +3 -0
- package/dist/document-models/document-models.d.ts.map +1 -0
- package/dist/document-models/document-models.js +2 -0
- package/dist/document-models/index.d.ts +5 -2
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +5 -1
- package/dist/editors/builder-profile/editor.d.ts +0 -2
- package/dist/editors/builder-profile/editor.d.ts.map +1 -1
- package/dist/editors/builder-profile/editor.js +26 -19
- package/dist/editors/builder-profile/module.d.ts +4 -0
- package/dist/editors/builder-profile/module.d.ts.map +1 -0
- package/dist/editors/builder-profile/module.js +10 -0
- package/dist/editors/editors.d.ts +3 -0
- package/dist/editors/editors.d.ts.map +1 -0
- package/dist/editors/editors.js +2 -0
- package/dist/editors/index.d.ts +5 -2
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +5 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/powerhouse.manifest.json +7 -20
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/style.css +108 -5029
- package/dist/subgraphs/builder-profile/index.d.ts +2 -2
- package/dist/subgraphs/builder-profile/index.d.ts.map +1 -1
- package/dist/subgraphs/builder-profile/index.js +2 -2
- package/dist/subgraphs/builder-profile/resolvers.d.ts +2 -2
- package/dist/subgraphs/builder-profile/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/builder-profile/resolvers.js +4 -4
- package/dist/subgraphs/builder-profile/schema.d.ts.map +1 -1
- package/dist/subgraphs/builder-profile/schema.js +1 -12
- package/dist/subgraphs/index.d.ts +0 -1
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/vite.config.js +13 -0
- package/package.json +55 -45
- package/dist/document-models/builder-profile/gen/builder/object.d.ts +0 -7
- package/dist/document-models/builder-profile/gen/builder/object.d.ts.map +0 -1
- package/dist/document-models/builder-profile/gen/builder/object.js +0 -7
- package/dist/document-models/builder-profile/gen/object.d.ts +0 -15
- package/dist/document-models/builder-profile/gen/object.d.ts.map +0 -1
- package/dist/document-models/builder-profile/gen/object.js +0 -25
- package/dist/editors/builder-profile/index.d.ts +0 -3
- package/dist/editors/builder-profile/index.d.ts.map +0 -1
- package/dist/editors/builder-profile/index.js +0 -11
- package/dist/editors/hooks/useBuilderProfileDocument.d.ts +0 -4
- package/dist/editors/hooks/useBuilderProfileDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useBuilderProfileDocument.js +0 -8
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Actions for the BuilderProfile document model */
|
|
2
|
+
export declare const actions: {
|
|
3
|
+
updateProfile: (input: import("./index.js").UpdateProfileInput) => import("./index.js").UpdateProfileAction;
|
|
4
|
+
setName: (name: string) => import("document-model").SetNameAction;
|
|
5
|
+
undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
|
|
6
|
+
redo: (count?: number, scope?: string) => import("document-model").RedoAction;
|
|
7
|
+
prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
|
|
8
|
+
loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
|
|
9
|
+
name: string;
|
|
10
|
+
}, operations: number) => import("document-model").LoadStateAction;
|
|
11
|
+
noop: (scope?: string) => import("document-model").NOOPAction;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/builder-profile/actions.ts"],"names":[],"mappings":"AAGA,oDAAoD;AACpD,eAAO,MAAM,OAAO;oBACsB,8CAAyB;;eAAs2N,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADz1O,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import {} from "document-model";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { UpdateProfileInput } from "../types.js";
|
|
2
|
+
import type { UpdateProfileAction } from "./actions.js";
|
|
3
3
|
export declare const updateProfile: (input: UpdateProfileInput) => UpdateProfileAction;
|
|
4
4
|
//# sourceMappingURL=creators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/creators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/builder/creators.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,wBAOpD,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { createAction } from "document-model";
|
|
2
|
-
import {
|
|
3
|
-
export const updateProfile = (input) => createAction("UPDATE_PROFILE", { ...input }, undefined,
|
|
1
|
+
import { createAction } from "document-model/core";
|
|
2
|
+
import { UpdateProfileInputSchema } from "../schema/zod.js";
|
|
3
|
+
export const updateProfile = (input) => createAction("UPDATE_PROFILE", { ...input }, undefined, UpdateProfileInputSchema, "global");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const documentModel:
|
|
1
|
+
import type { DocumentModelGlobalState } from "document-model";
|
|
2
|
+
export declare const documentModel: DocumentModelGlobalState;
|
|
3
3
|
//# sourceMappingURL=document-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,wBAkD3B,CAAC"}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
export const documentModel = {
|
|
2
|
+
id: "powerhouse/builder-profile",
|
|
3
|
+
name: "Builder Profile",
|
|
4
|
+
extension: ".phdm",
|
|
5
|
+
description: "A builder profile document",
|
|
2
6
|
author: {
|
|
3
7
|
name: "Powerhouse",
|
|
4
8
|
website: "https://powerhouse.inc/",
|
|
5
9
|
},
|
|
6
|
-
description: "A builder profile document",
|
|
7
|
-
extension: ".phdm",
|
|
8
|
-
id: "powerhouse/builder-profile",
|
|
9
|
-
name: "Builder Profile",
|
|
10
10
|
specifications: [
|
|
11
11
|
{
|
|
12
|
+
version: 1,
|
|
12
13
|
changeLog: [],
|
|
14
|
+
state: {
|
|
15
|
+
global: {
|
|
16
|
+
schema: "type BuilderProfileState {\n id: PHID\n slug: String\n name: String\n icon: URL\n description: String\n}",
|
|
17
|
+
initialValue: '"{\\n \\"id\\": null,\\n \\"slug\\": null,\\n \\"name\\": null,\\n \\"icon\\": null,\\n \\"description\\": null\\n}"',
|
|
18
|
+
examples: [],
|
|
19
|
+
},
|
|
20
|
+
local: {
|
|
21
|
+
schema: "",
|
|
22
|
+
initialValue: '""',
|
|
23
|
+
examples: [],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
13
26
|
modules: [
|
|
14
27
|
{
|
|
15
|
-
description: "",
|
|
16
28
|
id: "09f6c21b-cd1a-4218-8f2f-448c947c79bd",
|
|
17
29
|
name: "builder",
|
|
30
|
+
description: "",
|
|
18
31
|
operations: [
|
|
19
32
|
{
|
|
20
|
-
description: "",
|
|
21
|
-
errors: [],
|
|
22
|
-
examples: [],
|
|
23
33
|
id: "ee51a588-dd04-4819-beeb-a0cbdd598c81",
|
|
24
34
|
name: "UPDATE_PROFILE",
|
|
25
|
-
|
|
35
|
+
description: "",
|
|
26
36
|
schema: "input UpdateProfileInput {\n id: PHID\n slug: String\n name: String\n icon: URL\n description: String\n}",
|
|
27
|
-
scope: "global",
|
|
28
37
|
template: "",
|
|
38
|
+
reducer: "",
|
|
39
|
+
errors: [],
|
|
40
|
+
examples: [],
|
|
41
|
+
scope: "global",
|
|
29
42
|
},
|
|
30
43
|
],
|
|
31
44
|
},
|
|
32
45
|
],
|
|
33
|
-
state: {
|
|
34
|
-
global: {
|
|
35
|
-
examples: [],
|
|
36
|
-
initialValue: '"{\\n \\"id\\": null,\\n \\"slug\\": null,\\n \\"name\\": null,\\n \\"icon\\": null,\\n \\"description\\": null\\n}"',
|
|
37
|
-
schema: "type BuilderProfileState {\n id: PHID\n slug: String\n name: String\n icon: URL\n description: String\n}",
|
|
38
|
-
},
|
|
39
|
-
local: {
|
|
40
|
-
examples: [],
|
|
41
|
-
initialValue: '""',
|
|
42
|
-
schema: "",
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
version: 1,
|
|
46
46
|
},
|
|
47
47
|
],
|
|
48
48
|
};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { BuilderProfileDocument, BuilderProfilePHState } from "./types.js";
|
|
3
|
+
/** Schema for validating the header object of a BuilderProfile document */
|
|
4
|
+
export declare const BuilderProfileDocumentHeaderSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
createdAtUtcIso: z.ZodString;
|
|
8
|
+
lastModifiedAtUtcIso: z.ZodString;
|
|
9
|
+
} & {
|
|
10
|
+
documentType: z.ZodLiteral<"powerhouse/builder-profile">;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
documentType: "powerhouse/builder-profile";
|
|
15
|
+
createdAtUtcIso: string;
|
|
16
|
+
lastModifiedAtUtcIso: string;
|
|
17
|
+
}, {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
documentType: "powerhouse/builder-profile";
|
|
21
|
+
createdAtUtcIso: string;
|
|
22
|
+
lastModifiedAtUtcIso: string;
|
|
23
|
+
}>;
|
|
24
|
+
/** Schema for validating the state object of a BuilderProfile document */
|
|
25
|
+
export declare const BuilderProfilePHStateSchema: z.ZodObject<{} & {
|
|
26
|
+
global: z.ZodObject<Required<{
|
|
27
|
+
description: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
28
|
+
icon: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
29
|
+
id: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
30
|
+
name: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
31
|
+
slug: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
32
|
+
}>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
33
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
34
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
35
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
36
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
37
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
38
|
+
}, {
|
|
39
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
40
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
41
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
42
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
43
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
44
|
+
}>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
global: {
|
|
47
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
48
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
49
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
50
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
51
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
global: {
|
|
55
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
56
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
57
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
58
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
59
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
export declare const BuilderProfileDocumentSchema: z.ZodObject<{
|
|
63
|
+
header: z.ZodObject<{
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
createdAtUtcIso: z.ZodString;
|
|
67
|
+
lastModifiedAtUtcIso: z.ZodString;
|
|
68
|
+
} & {
|
|
69
|
+
documentType: z.ZodLiteral<"powerhouse/builder-profile">;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
documentType: "powerhouse/builder-profile";
|
|
74
|
+
createdAtUtcIso: string;
|
|
75
|
+
lastModifiedAtUtcIso: string;
|
|
76
|
+
}, {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
documentType: "powerhouse/builder-profile";
|
|
80
|
+
createdAtUtcIso: string;
|
|
81
|
+
lastModifiedAtUtcIso: string;
|
|
82
|
+
}>;
|
|
83
|
+
state: z.ZodObject<{} & {
|
|
84
|
+
global: z.ZodObject<Required<{
|
|
85
|
+
description: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
86
|
+
icon: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
87
|
+
id: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
88
|
+
name: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
89
|
+
slug: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
90
|
+
}>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
91
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
92
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
93
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
94
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
95
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
96
|
+
}, {
|
|
97
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
98
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
99
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
100
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
101
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
102
|
+
}>;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
global: {
|
|
105
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
106
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
107
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
108
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
109
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
110
|
+
};
|
|
111
|
+
}, {
|
|
112
|
+
global: {
|
|
113
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
114
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
115
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
116
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
117
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
118
|
+
};
|
|
119
|
+
}>;
|
|
120
|
+
initialState: z.ZodObject<{} & {
|
|
121
|
+
global: z.ZodObject<Required<{
|
|
122
|
+
description: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
123
|
+
icon: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
124
|
+
id: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
125
|
+
name: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
126
|
+
slug: z.ZodType<import("./types.js").Maybe<string>, any, import("./types.js").Maybe<string>>;
|
|
127
|
+
}>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
128
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
129
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
130
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
131
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
132
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
133
|
+
}, {
|
|
134
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
135
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
136
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
137
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
138
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
139
|
+
}>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
global: {
|
|
142
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
143
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
144
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
145
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
146
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
147
|
+
};
|
|
148
|
+
}, {
|
|
149
|
+
global: {
|
|
150
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
151
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
152
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
153
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
154
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
155
|
+
};
|
|
156
|
+
}>;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
header: {
|
|
159
|
+
id: string;
|
|
160
|
+
name: string;
|
|
161
|
+
documentType: "powerhouse/builder-profile";
|
|
162
|
+
createdAtUtcIso: string;
|
|
163
|
+
lastModifiedAtUtcIso: string;
|
|
164
|
+
};
|
|
165
|
+
state: {
|
|
166
|
+
global: {
|
|
167
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
168
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
169
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
170
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
171
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
initialState: {
|
|
175
|
+
global: {
|
|
176
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
177
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
178
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
179
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
180
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
}, {
|
|
184
|
+
header: {
|
|
185
|
+
id: string;
|
|
186
|
+
name: string;
|
|
187
|
+
documentType: "powerhouse/builder-profile";
|
|
188
|
+
createdAtUtcIso: string;
|
|
189
|
+
lastModifiedAtUtcIso: string;
|
|
190
|
+
};
|
|
191
|
+
state: {
|
|
192
|
+
global: {
|
|
193
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
194
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
195
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
196
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
197
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
initialState: {
|
|
201
|
+
global: {
|
|
202
|
+
description: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
203
|
+
icon: import("./types.js").Maybe<import("./types.js").Scalars["URL"]["output"]>;
|
|
204
|
+
id: import("./types.js").Maybe<import("./types.js").Scalars["PHID"]["output"]>;
|
|
205
|
+
name: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
206
|
+
slug: import("./types.js").Maybe<import("./types.js").Scalars["String"]["output"]>;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
}>;
|
|
210
|
+
/** Simple helper function to check if a state object is a BuilderProfile document state object */
|
|
211
|
+
export declare function isBuilderProfileState(state: unknown): state is BuilderProfilePHState;
|
|
212
|
+
/** Simple helper function to assert that a document state object is a BuilderProfile document state object */
|
|
213
|
+
export declare function assertIsBuilderProfileState(state: unknown): asserts state is BuilderProfilePHState;
|
|
214
|
+
/** Simple helper function to check if a document is a BuilderProfile document */
|
|
215
|
+
export declare function isBuilderProfileDocument(document: unknown): document is BuilderProfileDocument;
|
|
216
|
+
/** Simple helper function to assert that a document is a BuilderProfile document */
|
|
217
|
+
export declare function assertIsBuilderProfileDocument(document: unknown): asserts document is BuilderProfileDocument;
|
|
218
|
+
//# sourceMappingURL=document-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-schema.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/document-schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEhF,2EAA2E;AAC3E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;EAG3C,CAAC;AAEL,0EAA0E;AAC1E,eAAO,MAAM,2BAA2B;;;;;;;;gDAqC+C,sCAAiB;yCAA2B,mCAAc;uCAAyB,oCAAe;yCAA2B,sCAAiB;yCAA2B,sCAAiB;;gDAA1L,sCAAiB;yCAA2B,mCAAc;uCAAyB,oCAAe;yCAA2B,sCAAiB;yCAA2B,sCAAiB;;;;gDAA1L,sCAAiB;yCAA2B,mCAAc;uCAAyB,oCAAe;yCAA2B,sCAAiB;yCAA2B,sCAAiB;;;;gDAA1L,sCAAiB;yCAA2B,mCAAc;uCAAyB,oCAAe;yCAA2B,sCAAiB;yCAA2B,sCAAiB;;EAnC/Q,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAiC8C,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;;;;;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;;;;;;;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;;;;;;;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;;;oDAA1L,sCAAiB;6CAA2B,mCAAc;2CAAyB,oCAAe;6CAA2B,sCAAiB;6CAA2B,sCAAiB;;;EA7B/Q,CAAC;AAEH,kGAAkG;AAClG,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,qBAAqB,CAEhC;AAED,8GAA8G;AAC9G,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,qBAAqB,CAExC;AAED,iFAAiF;AACjF,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,sBAAsB,CAEpC;AAED,oFAAoF;AACpF,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,sBAAsB,CAE5C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, } from "document-model";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { builderProfileDocumentType } from "./document-type.js";
|
|
4
|
+
import { BuilderProfileStateSchema } from "./schema/zod.js";
|
|
5
|
+
/** Schema for validating the header object of a BuilderProfile document */
|
|
6
|
+
export const BuilderProfileDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({
|
|
7
|
+
documentType: z.literal(builderProfileDocumentType),
|
|
8
|
+
});
|
|
9
|
+
/** Schema for validating the state object of a BuilderProfile document */
|
|
10
|
+
export const BuilderProfilePHStateSchema = BaseDocumentStateSchema.extend({
|
|
11
|
+
global: BuilderProfileStateSchema(),
|
|
12
|
+
});
|
|
13
|
+
export const BuilderProfileDocumentSchema = z.object({
|
|
14
|
+
header: BuilderProfileDocumentHeaderSchema,
|
|
15
|
+
state: BuilderProfilePHStateSchema,
|
|
16
|
+
initialState: BuilderProfilePHStateSchema,
|
|
17
|
+
});
|
|
18
|
+
/** Simple helper function to check if a state object is a BuilderProfile document state object */
|
|
19
|
+
export function isBuilderProfileState(state) {
|
|
20
|
+
return BuilderProfilePHStateSchema.safeParse(state).success;
|
|
21
|
+
}
|
|
22
|
+
/** Simple helper function to assert that a document state object is a BuilderProfile document state object */
|
|
23
|
+
export function assertIsBuilderProfileState(state) {
|
|
24
|
+
BuilderProfilePHStateSchema.parse(state);
|
|
25
|
+
}
|
|
26
|
+
/** Simple helper function to check if a document is a BuilderProfile document */
|
|
27
|
+
export function isBuilderProfileDocument(document) {
|
|
28
|
+
return BuilderProfileDocumentSchema.safeParse(document).success;
|
|
29
|
+
}
|
|
30
|
+
/** Simple helper function to assert that a document is a BuilderProfile document */
|
|
31
|
+
export function assertIsBuilderProfileDocument(document) {
|
|
32
|
+
BuilderProfileDocumentSchema.parse(document);
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-type.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/document-type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const builderProfileDocumentType = "powerhouse/builder-profile";
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export * from "./actions.js";
|
|
2
2
|
export * from "./document-model.js";
|
|
3
|
-
export * from "./object.js";
|
|
4
3
|
export * from "./types.js";
|
|
5
|
-
export *
|
|
6
|
-
export type { BuilderProfilePHState } from "./ph-factories.js";
|
|
4
|
+
export * from "./creators.js";
|
|
7
5
|
export { createBuilderProfileDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
6
|
+
export * from "./utils.js";
|
|
7
|
+
export * from "./reducer.js";
|
|
8
|
+
export * from "./schema/index.js";
|
|
9
|
+
export * from "./document-type.js";
|
|
10
|
+
export * from "./document-schema.js";
|
|
11
|
+
export * from "./builder/operations.js";
|
|
8
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,4BAA4B,EAC5B,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export * from "./actions.js";
|
|
2
2
|
export * from "./document-model.js";
|
|
3
|
-
export * from "./object.js";
|
|
4
3
|
export * from "./types.js";
|
|
5
|
-
export *
|
|
4
|
+
export * from "./creators.js";
|
|
6
5
|
export { createBuilderProfileDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
6
|
+
export * from "./utils.js";
|
|
7
|
+
export * from "./reducer.js";
|
|
8
|
+
export * from "./schema/index.js";
|
|
9
|
+
export * from "./document-type.js";
|
|
10
|
+
export * from "./document-schema.js";
|
|
11
|
+
export * from "./builder/operations.js";
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Factory methods for creating BuilderProfileDocument instances
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import type { BuilderProfileDocument, BuilderProfileLocalState,
|
|
6
|
-
export
|
|
7
|
-
global: BuilderProfileState;
|
|
8
|
-
local: BuilderProfileLocalState;
|
|
9
|
-
};
|
|
10
|
-
export declare function defaultGlobalState(): BuilderProfileState;
|
|
4
|
+
import type { PHAuthState, PHDocumentState, PHBaseState } from "document-model";
|
|
5
|
+
import type { BuilderProfileDocument, BuilderProfileLocalState, BuilderProfileGlobalState, BuilderProfilePHState } from "./types.js";
|
|
6
|
+
export declare function defaultGlobalState(): BuilderProfileGlobalState;
|
|
11
7
|
export declare function defaultLocalState(): BuilderProfileLocalState;
|
|
12
8
|
export declare function defaultPHState(): BuilderProfilePHState;
|
|
13
|
-
export declare function createGlobalState(state?: Partial<
|
|
9
|
+
export declare function createGlobalState(state?: Partial<BuilderProfileGlobalState>): BuilderProfileGlobalState;
|
|
14
10
|
export declare function createLocalState(state?: Partial<BuilderProfileLocalState>): BuilderProfileLocalState;
|
|
15
|
-
export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<
|
|
11
|
+
export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<BuilderProfileGlobalState>, localState?: Partial<BuilderProfileLocalState>): BuilderProfilePHState;
|
|
16
12
|
/**
|
|
17
13
|
* Creates a BuilderProfileDocument with custom global and local state
|
|
18
14
|
* This properly handles the PHBaseState requirements while allowing
|
|
@@ -21,7 +17,7 @@ export declare function createState(baseState?: Partial<PHBaseState>, globalStat
|
|
|
21
17
|
export declare function createBuilderProfileDocument(state?: Partial<{
|
|
22
18
|
auth?: Partial<PHAuthState>;
|
|
23
19
|
document?: Partial<PHDocumentState>;
|
|
24
|
-
global?: Partial<
|
|
20
|
+
global?: Partial<BuilderProfileGlobalState>;
|
|
25
21
|
local?: Partial<BuilderProfileLocalState>;
|
|
26
22
|
}>): BuilderProfileDocument;
|
|
27
23
|
//# sourceMappingURL=ph-factories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ph-factories.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/ph-factories.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"ph-factories.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/ph-factories.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhF,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAGpB,wBAAgB,kBAAkB,IAAI,yBAAyB,CAQ9D;AAED,wBAAgB,iBAAiB,IAAI,wBAAwB,CAE5D;AAED,wBAAgB,cAAc,IAAI,qBAAqB,CAMtD;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,GACzC,yBAAyB,CAK3B;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GACxC,wBAAwB,CAK1B;AAED,wBAAgB,WAAW,CACzB,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,EAChC,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,EAChD,UAAU,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAC7C,qBAAqB,CAMvB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC5C,KAAK,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC3C,CAAC,GACD,sBAAsB,CAYxB"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Factory methods for creating BuilderProfileDocument instances
|
|
3
|
-
*/
|
|
4
|
-
import { createBaseState, defaultBaseState, } from "document-model";
|
|
1
|
+
import { createBaseState, defaultBaseState } from "document-model/core";
|
|
5
2
|
import { createDocument } from "./utils.js";
|
|
6
3
|
export function defaultGlobalState() {
|
|
7
4
|
return {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BuilderProfilePHState } from "./ph-factories.js";
|
|
3
|
-
export declare const stateReducer: StateReducer<BuilderProfilePHState>;
|
|
1
|
+
import type { BuilderProfilePHState } from "@powerhousedao/builder-profile/document-models/builder-profile";
|
|
4
2
|
export declare const reducer: import("document-model").Reducer<BuilderProfilePHState>;
|
|
5
3
|
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/reducer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/reducer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AA8B5G,eAAO,MAAM,OAAO,yDAAqD,CAAC"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { z } from "./types.js";
|
|
6
|
-
import { reducer as BuilderReducer } from "../src/reducers/builder.js";
|
|
7
|
-
export const stateReducer = (state, action, dispatch) => {
|
|
1
|
+
import { isDocumentAction, createReducer } from "document-model/core";
|
|
2
|
+
import { builderProfileBuilderOperations } from "../src/reducers/builder.js";
|
|
3
|
+
import { UpdateProfileInputSchema } from "./schema/zod.js";
|
|
4
|
+
const stateReducer = (state, action, dispatch) => {
|
|
8
5
|
if (isDocumentAction(action)) {
|
|
9
6
|
return state;
|
|
10
7
|
}
|
|
11
8
|
switch (action.type) {
|
|
12
9
|
case "UPDATE_PROFILE":
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
UpdateProfileInputSchema().parse(action.input);
|
|
11
|
+
builderProfileBuilderOperations.updateProfileOperation(state[action.scope], action, dispatch);
|
|
15
12
|
break;
|
|
16
13
|
default:
|
|
17
14
|
return state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../document-models/builder-profile/gen/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./types.js";
|
|
2
|
-
export *
|
|
2
|
+
export * from "./zod.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { PHDocument } from "document-model";
|
|
1
|
+
import type { PHDocument, PHBaseState } from "document-model";
|
|
2
2
|
import type { BuilderProfileAction } from "./actions.js";
|
|
3
|
-
import type {
|
|
4
|
-
import type { BuilderProfileState } from "./schema/types.js";
|
|
5
|
-
export { z } from "./schema/index.js";
|
|
6
|
-
export type * from "./schema/types.js";
|
|
3
|
+
import type { BuilderProfileState as BuilderProfileGlobalState } from "./schema/types.js";
|
|
7
4
|
type BuilderProfileLocalState = Record<PropertyKey, never>;
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
type BuilderProfilePHState = PHBaseState & {
|
|
6
|
+
global: BuilderProfileGlobalState;
|
|
7
|
+
local: BuilderProfileLocalState;
|
|
8
|
+
};
|
|
9
|
+
type BuilderProfileDocument = PHDocument<BuilderProfilePHState>;
|
|
10
|
+
export * from "./schema/types.js";
|
|
11
|
+
export type { BuilderProfileGlobalState, BuilderProfileLocalState, BuilderProfilePHState, BuilderProfileAction, BuilderProfileDocument, };
|
|
10
12
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../document-models/builder-profile/gen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,IAAI,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE1F,KAAK,wBAAwB,GAAG,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAC3D,KAAK,qBAAqB,GAAG,WAAW,GAAG;IACzC,MAAM,EAAE,yBAAyB,CAAC;IAClC,KAAK,EAAE,wBAAwB,CAAC;CACjC,CAAC;AACF,KAAK,sBAAsB,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAEhE,cAAc,mBAAmB,CAAC;AAElC,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./schema/types.js";
|