@powerhousedao/builder-profile 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-models/builder-profile/actions.d.ts +9 -0
- package/dist/document-models/builder-profile/actions.d.ts.map +1 -1
- package/dist/document-models/builder-profile/actions.js +2 -2
- package/dist/document-models/builder-profile/gen/actions.d.ts +3 -3
- package/dist/document-models/builder-profile/gen/actions.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/actions.js +1 -1
- package/dist/document-models/builder-profile/gen/builders/actions.d.ts +44 -0
- package/dist/document-models/builder-profile/gen/builders/actions.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/builders/creators.d.ts +13 -0
- package/dist/document-models/builder-profile/gen/builders/creators.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/builders/creators.js +12 -0
- package/dist/document-models/builder-profile/gen/builders/error.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/builders/operations.d.ts +16 -0
- package/dist/document-models/builder-profile/gen/builders/operations.d.ts.map +1 -0
- package/dist/document-models/builder-profile/gen/creators.d.ts +2 -2
- package/dist/document-models/builder-profile/gen/creators.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/creators.js +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 +121 -22
- package/dist/document-models/builder-profile/gen/document-schema.d.ts +168 -16
- package/dist/document-models/builder-profile/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/index.d.ts +1 -1
- package/dist/document-models/builder-profile/gen/index.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/index.js +1 -1
- package/dist/document-models/builder-profile/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/ph-factories.js +8 -0
- package/dist/document-models/builder-profile/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/reducer.js +39 -3
- package/dist/document-models/builder-profile/gen/schema/types.d.ts +55 -0
- package/dist/document-models/builder-profile/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/schema/zod.d.ts +19 -1
- package/dist/document-models/builder-profile/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/schema/zod.js +126 -0
- package/dist/document-models/builder-profile/gen/utils.d.ts.map +1 -1
- package/dist/document-models/builder-profile/gen/utils.js +9 -1
- package/dist/document-models/builder-profile/src/reducers/builders.d.ts +3 -0
- package/dist/document-models/builder-profile/src/reducers/builders.d.ts.map +1 -0
- package/dist/document-models/builder-profile/src/reducers/builders.js +108 -0
- package/dist/document-models/builder-profile/src/tests/{builder.test.d.ts → builders.test.d.ts} +1 -1
- package/dist/document-models/builder-profile/src/tests/builders.test.d.ts.map +1 -0
- package/dist/document-models/builder-profile/src/tests/{builder.test.js → builders.test.js} +1 -1
- package/dist/document-models/document-models.d.ts.map +1 -1
- package/dist/document-models/document-models.js +3 -1
- package/dist/document-models/index.d.ts +0 -4
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +0 -4
- package/dist/editors/builder-profile/components/ContributorsSection.d.ts +8 -0
- package/dist/editors/builder-profile/components/ContributorsSection.d.ts.map +1 -0
- package/dist/editors/builder-profile/components/ContributorsSection.js +177 -0
- package/dist/editors/builder-profile/components/ImageUrlInput.d.ts +9 -0
- package/dist/editors/builder-profile/components/ImageUrlInput.d.ts.map +1 -0
- package/dist/editors/builder-profile/components/ImageUrlInput.js +57 -0
- package/dist/editors/builder-profile/components/LinksSection.d.ts +18 -0
- package/dist/editors/builder-profile/components/LinksSection.d.ts.map +1 -0
- package/dist/editors/builder-profile/components/LinksSection.js +74 -0
- package/dist/editors/builder-profile/components/ProfilePreview.d.ts +7 -0
- package/dist/editors/builder-profile/components/ProfilePreview.d.ts.map +1 -0
- package/dist/editors/builder-profile/components/ProfilePreview.js +55 -0
- package/dist/editors/builder-profile/components/ScopesSection.d.ts +9 -0
- package/dist/editors/builder-profile/components/ScopesSection.d.ts.map +1 -0
- package/dist/editors/builder-profile/components/ScopesSection.js +58 -0
- package/dist/editors/builder-profile/components/SkillsSection.d.ts +9 -0
- package/dist/editors/builder-profile/components/SkillsSection.d.ts.map +1 -0
- package/dist/editors/builder-profile/components/SkillsSection.js +66 -0
- package/dist/editors/builder-profile/editor.d.ts.map +1 -1
- package/dist/editors/builder-profile/editor.js +213 -101
- package/dist/editors/builder-profile/module.js +1 -1
- package/dist/editors/index.d.ts +0 -4
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +0 -4
- package/dist/index.js +2 -2
- package/dist/powerhouse.manifest.json +9 -4
- package/dist/style.css +745 -29
- package/dist/subgraphs/builder-profile/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/builder-profile/resolvers.js +108 -0
- package/dist/subgraphs/builder-profile/schema.d.ts.map +1 -1
- package/dist/subgraphs/builder-profile/schema.js +118 -1
- package/package.json +24 -20
- package/dist/document-models/builder-profile/gen/builder/actions.d.ts +0 -8
- package/dist/document-models/builder-profile/gen/builder/actions.d.ts.map +0 -1
- package/dist/document-models/builder-profile/gen/builder/creators.d.ts +0 -4
- package/dist/document-models/builder-profile/gen/builder/creators.d.ts.map +0 -1
- package/dist/document-models/builder-profile/gen/builder/creators.js +0 -3
- package/dist/document-models/builder-profile/gen/builder/error.d.ts.map +0 -1
- package/dist/document-models/builder-profile/gen/builder/operations.d.ts +0 -7
- package/dist/document-models/builder-profile/gen/builder/operations.d.ts.map +0 -1
- package/dist/document-models/builder-profile/src/reducers/builder.d.ts +0 -3
- package/dist/document-models/builder-profile/src/reducers/builder.d.ts.map +0 -1
- package/dist/document-models/builder-profile/src/reducers/builder.js +0 -9
- package/dist/document-models/builder-profile/src/tests/builder.test.d.ts.map +0 -1
- /package/dist/document-models/builder-profile/gen/{builder → builders}/actions.js +0 -0
- /package/dist/document-models/builder-profile/gen/{builder → builders}/error.d.ts +0 -0
- /package/dist/document-models/builder-profile/gen/{builder → builders}/error.js +0 -0
- /package/dist/document-models/builder-profile/gen/{builder → builders}/operations.js +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { TextInput } from "@powerhousedao/document-engineering";
|
|
4
|
+
import { Link2, Plus, Check, X, Pencil, Trash2 } from "lucide-react";
|
|
5
|
+
import { generateId } from "document-model/core";
|
|
6
|
+
// Helper to get favicon URL
|
|
7
|
+
const getFaviconUrl = (url) => {
|
|
8
|
+
try {
|
|
9
|
+
const hostname = new URL(url).hostname;
|
|
10
|
+
return `https://www.google.com/s2/favicons?domain=${hostname}&sz=32`;
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export function LinksSection({ links, onAddLink, onEditLink, onRemoveLink, }) {
|
|
17
|
+
const [newUrl, setNewUrl] = useState("");
|
|
18
|
+
const [newLabel, setNewLabel] = useState("");
|
|
19
|
+
const [editingId, setEditingId] = useState(null);
|
|
20
|
+
const [editUrl, setEditUrl] = useState("");
|
|
21
|
+
const [editLabel, setEditLabel] = useState("");
|
|
22
|
+
const handleAddLink = () => {
|
|
23
|
+
if (newUrl.trim()) {
|
|
24
|
+
onAddLink({
|
|
25
|
+
id: generateId(),
|
|
26
|
+
url: newUrl.trim(),
|
|
27
|
+
label: newLabel.trim() || undefined,
|
|
28
|
+
});
|
|
29
|
+
setNewUrl("");
|
|
30
|
+
setNewLabel("");
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const handleStartEdit = (link) => {
|
|
34
|
+
setEditingId(link.id);
|
|
35
|
+
setEditUrl(link.url);
|
|
36
|
+
setEditLabel(link.label || "");
|
|
37
|
+
};
|
|
38
|
+
const handleSaveEdit = () => {
|
|
39
|
+
if (editingId && editUrl.trim()) {
|
|
40
|
+
onEditLink({
|
|
41
|
+
id: editingId,
|
|
42
|
+
url: editUrl.trim(),
|
|
43
|
+
label: editLabel.trim() || undefined,
|
|
44
|
+
});
|
|
45
|
+
setEditingId(null);
|
|
46
|
+
setEditUrl("");
|
|
47
|
+
setEditLabel("");
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const handleCancelEdit = () => {
|
|
51
|
+
setEditingId(null);
|
|
52
|
+
setEditUrl("");
|
|
53
|
+
setEditLabel("");
|
|
54
|
+
};
|
|
55
|
+
return (_jsxs("div", { className: "bg-white border border-slate-200/60 rounded-2xl shadow-sm p-6", children: [_jsxs("h3", { className: "text-lg font-semibold text-slate-900 mb-2 flex items-center gap-2", children: [_jsx("span", { className: "w-8 h-8 rounded-lg bg-violet-50 flex items-center justify-center", children: _jsx(Link2, { size: 18, className: "text-violet-600" }) }), "Links"] }), _jsx("p", { className: "text-sm text-slate-500 mb-5", children: "Add links to your portfolio, social profiles, or other relevant pages" }), links.length > 0 && (_jsx("div", { className: "space-y-2 mb-5", children: links.map((link) => (_jsx("div", { className: `group flex items-center gap-3 p-3 rounded-xl border transition-all ${editingId === link.id
|
|
56
|
+
? "bg-slate-50 border-slate-300"
|
|
57
|
+
: "bg-white border-slate-200 hover:border-slate-300 hover:shadow-sm"}`, children: editingId === link.id ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex-1 space-y-2", children: [_jsx(TextInput, { className: "w-full", value: editUrl, onChange: (e) => setEditUrl(e.target.value), placeholder: "https://example.com" }), _jsx(TextInput, { className: "w-full", value: editLabel, onChange: (e) => setEditLabel(e.target.value), placeholder: "Display label (optional)" })] }), _jsxs("div", { className: "flex gap-1", children: [_jsx("button", { type: "button", onClick: handleSaveEdit, className: "p-2.5 rounded-xl bg-emerald-100 hover:bg-emerald-200 text-emerald-600 transition-colors", children: _jsx(Check, { size: 16 }) }), _jsx("button", { type: "button", onClick: handleCancelEdit, className: "p-2.5 rounded-xl hover:bg-slate-100 text-slate-500 transition-colors", children: _jsx(X, { size: 16 }) })] })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-8 h-8 rounded-lg bg-slate-100 flex items-center justify-center flex-shrink-0 overflow-hidden", children: getFaviconUrl(link.url) ? (_jsx("img", { src: getFaviconUrl(link.url) || "", alt: "", className: "w-4 h-4", onError: (e) => {
|
|
58
|
+
e.currentTarget.style.display = "none";
|
|
59
|
+
} })) : (_jsx(Link2, { size: 14, className: "text-slate-400" })) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: "font-medium text-slate-800 truncate text-sm", children: link.label ||
|
|
60
|
+
(() => {
|
|
61
|
+
try {
|
|
62
|
+
return new URL(link.url).hostname;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return link.url;
|
|
66
|
+
}
|
|
67
|
+
})() }), _jsx("a", { href: link.url, target: "_blank", rel: "noopener noreferrer", className: "text-xs text-slate-500 hover:text-indigo-600 truncate block transition-colors", children: link.url })] }), _jsxs("div", { className: "flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity", children: [_jsx("button", { type: "button", onClick: () => handleStartEdit(link), className: "p-2 rounded-lg hover:bg-slate-100 text-slate-400 hover:text-slate-600 transition-colors", title: "Edit link", children: _jsx(Pencil, { size: 14 }) }), _jsx("button", { type: "button", onClick: () => onRemoveLink(link.id), className: "p-2 rounded-lg hover:bg-red-50 text-slate-400 hover:text-red-600 transition-colors", title: "Remove link", children: _jsx(Trash2, { size: 14 }) })] })] })) }, link.id))) })), links.length === 0 && (_jsxs("div", { className: "text-center py-8 mb-5 rounded-xl bg-slate-50 border-2 border-dashed border-slate-200", children: [_jsx(Link2, { size: 32, className: "text-slate-300 mx-auto mb-2" }), _jsx("p", { className: "text-slate-500 text-sm", children: "No links added yet" }), _jsx("p", { className: "text-slate-400 text-xs mt-1", children: "Add links to your portfolio, GitHub, or social profiles" })] })), _jsxs("div", { className: "bg-slate-50 rounded-xl p-4 border border-slate-200", children: [_jsxs("p", { className: "text-sm font-medium text-slate-700 mb-3 flex items-center gap-2", children: [_jsx(Plus, { size: 14, className: "text-slate-500" }), "Add New Link"] }), _jsxs("div", { className: "space-y-3", children: [_jsx(TextInput, { className: "w-full", value: newUrl, onChange: (e) => setNewUrl(e.target.value), placeholder: "https://github.com/username", onKeyDown: (e) => {
|
|
68
|
+
if (e.key === "Enter" && newUrl.trim())
|
|
69
|
+
handleAddLink();
|
|
70
|
+
} }), _jsxs("div", { className: "flex gap-2", children: [_jsx(TextInput, { className: "flex-1", value: newLabel, onChange: (e) => setNewLabel(e.target.value), placeholder: "Display label (optional)", onKeyDown: (e) => {
|
|
71
|
+
if (e.key === "Enter" && newUrl.trim())
|
|
72
|
+
handleAddLink();
|
|
73
|
+
} }), _jsxs("button", { type: "button", onClick: handleAddLink, disabled: !newUrl.trim(), className: "px-5 py-2.5 bg-indigo-600 text-white text-sm font-medium rounded-xl hover:bg-indigo-700 disabled:bg-slate-300 disabled:cursor-not-allowed transition-colors flex items-center gap-2", children: [_jsx(Plus, { size: 14 }), "Add"] })] })] })] })] }));
|
|
74
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BuilderProfileState } from "../../../document-models/builder-profile/gen/types.js";
|
|
2
|
+
interface ProfilePreviewProps {
|
|
3
|
+
state: BuilderProfileState;
|
|
4
|
+
}
|
|
5
|
+
export declare function ProfilePreview({ state }: ProfilePreviewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=ProfilePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfilePreview.d.ts","sourceRoot":"","sources":["../../../../editors/builder-profile/components/ProfilePreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,uDAAuD,CAAC;AAkD/D,UAAU,mBAAmB;IAC3B,KAAK,EAAE,mBAAmB,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,kDAsI5D"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Users, Link2 } from "lucide-react";
|
|
3
|
+
const SKILL_LABELS = {
|
|
4
|
+
FRONTEND_DEVELOPMENT: "Frontend",
|
|
5
|
+
BACKEND_DEVELOPMENT: "Backend",
|
|
6
|
+
FULL_STACK_DEVELOPMENT: "Full Stack",
|
|
7
|
+
DEVOPS_ENGINEERING: "DevOps",
|
|
8
|
+
SMART_CONTRACT_DEVELOPMENT: "Smart Contracts",
|
|
9
|
+
UI_UX_DESIGN: "UI/UX",
|
|
10
|
+
TECHNICAL_WRITING: "Tech Writing",
|
|
11
|
+
QA_TESTING: "QA",
|
|
12
|
+
DATA_ENGINEERING: "Data",
|
|
13
|
+
SECURITY_ENGINEERING: "Security",
|
|
14
|
+
};
|
|
15
|
+
const SCOPE_LABELS = {
|
|
16
|
+
ACC: "ACC",
|
|
17
|
+
STA: "STA",
|
|
18
|
+
SUP: "SUP",
|
|
19
|
+
STABILITY_SCOPE: "Stability",
|
|
20
|
+
SUPPORT_SCOPE: "Support",
|
|
21
|
+
PROTOCOL_SCOPE: "Protocol",
|
|
22
|
+
GOVERNANCE_SCOPE: "Governance",
|
|
23
|
+
};
|
|
24
|
+
const STATUS_STYLES = {
|
|
25
|
+
ACTIVE: {
|
|
26
|
+
bg: "bg-emerald-50",
|
|
27
|
+
text: "text-emerald-700",
|
|
28
|
+
dot: "bg-emerald-500",
|
|
29
|
+
},
|
|
30
|
+
INACTIVE: {
|
|
31
|
+
bg: "bg-slate-100",
|
|
32
|
+
text: "text-slate-600",
|
|
33
|
+
dot: "bg-slate-400",
|
|
34
|
+
},
|
|
35
|
+
ON_HOLD: {
|
|
36
|
+
bg: "bg-amber-50",
|
|
37
|
+
text: "text-amber-700",
|
|
38
|
+
dot: "bg-amber-500",
|
|
39
|
+
},
|
|
40
|
+
COMPLETED: { bg: "bg-sky-50", text: "text-sky-700", dot: "bg-sky-500" },
|
|
41
|
+
ARCHIVED: {
|
|
42
|
+
bg: "bg-slate-100",
|
|
43
|
+
text: "text-slate-500",
|
|
44
|
+
dot: "bg-slate-300",
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export function ProfilePreview({ state }) {
|
|
48
|
+
if (!state.name && !state.description) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const statusStyle = state.status
|
|
52
|
+
? STATUS_STYLES[state.status]
|
|
53
|
+
: STATUS_STYLES.INACTIVE;
|
|
54
|
+
return (_jsxs("div", { className: "bg-white border border-slate-200/60 rounded-2xl shadow-sm overflow-hidden", children: [_jsx("div", { className: "h-24 bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500 relative", children: _jsx("div", { className: "absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iMC4xIj48cGF0aCBkPSJNMzYgMzBoLTZWMGg2djMwem0tNiAwSDI0VjBoNnYzMHoiLz48L2c+PC9nPjwvc3ZnPg==')] opacity-30" }) }), _jsxs("div", { className: "px-6 pb-6", children: [_jsxs("div", { className: "-mt-12 mb-4 flex items-end justify-between", children: [_jsxs("div", { className: "relative", children: [state.icon ? (_jsx("img", { src: state.icon, alt: "Profile", className: "w-24 h-24 rounded-2xl object-cover border-4 border-white shadow-lg" })) : (_jsx("div", { className: "w-24 h-24 rounded-2xl bg-gradient-to-br from-slate-700 to-slate-900 border-4 border-white shadow-lg flex items-center justify-center", children: _jsx("span", { className: "text-3xl font-bold text-white", children: state.name?.charAt(0).toUpperCase() || "?" }) })), state.type === "TEAM" && (_jsx("div", { className: "absolute -bottom-1 -right-1 w-7 h-7 bg-purple-500 rounded-lg border-2 border-white flex items-center justify-center", children: _jsx(Users, { size: 14, className: "text-white" }) }))] }), state.status && (_jsxs("div", { className: `flex items-center gap-1.5 px-3 py-1.5 rounded-full ${statusStyle.bg}`, children: [_jsx("span", { className: `w-2 h-2 rounded-full ${statusStyle.dot}` }), _jsx("span", { className: `text-xs font-medium ${statusStyle.text}`, children: state.status.replace("_", " ") })] }))] }), _jsxs("div", { className: "mb-4", children: [_jsx("h4", { className: "text-xl font-semibold text-slate-900 tracking-tight", children: state.name || "Unnamed Builder" }), state.slug && (_jsxs("p", { className: "text-sm text-slate-500 font-medium", children: ["@", state.slug] }))] }), state.description && (_jsx("p", { className: "text-slate-600 text-sm leading-relaxed mb-5", children: state.description })), state.skils && state.skils.length > 0 && (_jsxs("div", { className: "mb-4", children: [_jsx("p", { className: "text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2", children: "Skills" }), _jsx("div", { className: "flex flex-wrap gap-1.5", children: state.skils.map((skill) => (_jsx("span", { className: "px-2.5 py-1 rounded-lg text-xs font-medium bg-indigo-50 text-indigo-700 border border-indigo-100", children: SKILL_LABELS[skill] || skill }, skill))) })] })), state.scopes && state.scopes.length > 0 && (_jsxs("div", { className: "mb-4", children: [_jsx("p", { className: "text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2", children: "Scopes" }), _jsx("div", { className: "flex flex-wrap gap-1.5", children: state.scopes.map((scope) => (_jsx("span", { className: "px-2.5 py-1 rounded-lg text-xs font-medium bg-emerald-50 text-emerald-700 border border-emerald-100", children: SCOPE_LABELS[scope] || scope }, scope))) })] })), state.links && state.links.length > 0 && (_jsx("div", { className: "pt-4 border-t border-slate-100", children: _jsx("div", { className: "flex flex-wrap gap-3", children: state.links.map((link) => (_jsxs("a", { href: link.url, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1.5 text-sm text-slate-600 hover:text-indigo-600 transition-colors group", children: [_jsx(Link2, { size: 14, className: "text-slate-400 group-hover:text-indigo-500 transition-colors" }), _jsx("span", { className: "group-hover:underline underline-offset-2", children: link.label || new URL(link.url).hostname })] }, link.id))) }) }))] })] }));
|
|
55
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BuilderScope } from "../../../document-models/builder-profile/gen/types.js";
|
|
2
|
+
interface ScopesSectionProps {
|
|
3
|
+
scopes: BuilderScope[];
|
|
4
|
+
onAddScope: (scope: BuilderScope) => void;
|
|
5
|
+
onRemoveScope: (scope: BuilderScope) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ScopesSection({ scopes, onAddScope, onRemoveScope, }: ScopesSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ScopesSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScopesSection.d.ts","sourceRoot":"","sources":["../../../../editors/builder-profile/components/ScopesSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uDAAuD,CAAC;AAoD1F,UAAU,kBAAkB;IAC1B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,UAAU,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,UAAU,EACV,aAAa,GACd,EAAE,kBAAkB,2CAuGpB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Target, X, Check } from "lucide-react";
|
|
3
|
+
const SCOPE_OPTIONS = [
|
|
4
|
+
{
|
|
5
|
+
value: "ACC",
|
|
6
|
+
label: "ACC",
|
|
7
|
+
description: "Accessibility",
|
|
8
|
+
color: "bg-cyan-500",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
value: "STA",
|
|
12
|
+
label: "STA",
|
|
13
|
+
description: "Stability",
|
|
14
|
+
color: "bg-blue-500",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
value: "SUP",
|
|
18
|
+
label: "SUP",
|
|
19
|
+
description: "Support",
|
|
20
|
+
color: "bg-violet-500",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: "STABILITY_SCOPE",
|
|
24
|
+
label: "Stability Scope",
|
|
25
|
+
description: "Protocol stability initiatives",
|
|
26
|
+
color: "bg-emerald-500",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: "SUPPORT_SCOPE",
|
|
30
|
+
label: "Support Scope",
|
|
31
|
+
description: "Ecosystem support work",
|
|
32
|
+
color: "bg-amber-500",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: "PROTOCOL_SCOPE",
|
|
36
|
+
label: "Protocol Scope",
|
|
37
|
+
description: "Core protocol development",
|
|
38
|
+
color: "bg-indigo-500",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: "GOVERNANCE_SCOPE",
|
|
42
|
+
label: "Governance Scope",
|
|
43
|
+
description: "Governance processes",
|
|
44
|
+
color: "bg-rose-500",
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
export function ScopesSection({ scopes, onAddScope, onRemoveScope, }) {
|
|
48
|
+
const availableScopes = SCOPE_OPTIONS.filter((option) => !scopes.includes(option.value));
|
|
49
|
+
const selectedScopes = scopes
|
|
50
|
+
.map((scope) => SCOPE_OPTIONS.find((s) => s.value === scope))
|
|
51
|
+
.filter(Boolean);
|
|
52
|
+
return (_jsxs("div", { className: "bg-white border border-slate-200/60 rounded-2xl shadow-sm p-6", children: [_jsxs("h3", { className: "text-lg font-semibold text-slate-900 mb-2 flex items-center gap-2", children: [_jsx("span", { className: "w-8 h-8 rounded-lg bg-emerald-50 flex items-center justify-center", children: _jsx(Target, { size: 18, className: "text-emerald-600" }) }), "Scopes"] }), _jsx("p", { className: "text-sm text-slate-500 mb-5", children: "Define the areas where you contribute to the ecosystem" }), selectedScopes.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-2 mb-5", children: selectedScopes.map((scope) => scope && (_jsxs("div", { className: "group flex items-center gap-2 px-3 py-2 rounded-xl bg-gradient-to-r from-emerald-50 to-teal-50 border border-emerald-200 hover:border-emerald-300 transition-all", children: [_jsx("span", { className: `w-2 h-2 rounded-full ${scope.color}` }), _jsx("span", { className: "text-sm font-medium text-slate-700", children: scope.label }), _jsx("button", { type: "button", onClick: () => onRemoveScope(scope.value), className: "ml-1 p-1 rounded-lg opacity-0 group-hover:opacity-100 hover:bg-red-100 text-slate-400 hover:text-red-600 transition-all", children: _jsx(X, { size: 14 }) })] }, scope.value))) })), scopes.length === 0 && (_jsxs("div", { className: "text-center py-8 mb-5 rounded-xl bg-slate-50 border-2 border-dashed border-slate-200", children: [_jsx(Target, { size: 32, className: "text-slate-300 mx-auto mb-2" }), _jsx("p", { className: "text-slate-500 text-sm", children: "No scopes selected yet" }), _jsx("p", { className: "text-slate-400 text-xs mt-1", children: "Add scopes from the dropdown below" })] })), availableScopes.length > 0 && (_jsxs("div", { className: "relative", children: [_jsxs("select", { className: "w-full px-4 py-3 pr-10 border border-slate-200 rounded-xl text-sm bg-white hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 transition-colors appearance-none cursor-pointer", onChange: (e) => {
|
|
53
|
+
if (e.target.value) {
|
|
54
|
+
onAddScope(e.target.value);
|
|
55
|
+
e.target.value = "";
|
|
56
|
+
}
|
|
57
|
+
}, defaultValue: "", children: [_jsx("option", { value: "", disabled: true, children: "+ Add a scope..." }), availableScopes.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] }), _jsx("svg", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none w-4 h-4", viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { fillRule: "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", clipRule: "evenodd" }) })] })), availableScopes.length === 0 && scopes.length > 0 && (_jsxs("div", { className: "flex items-center gap-2 text-sm text-emerald-600 bg-emerald-50 rounded-xl px-4 py-3", children: [_jsx(Check, { size: 16 }), _jsx("span", { children: "All available scopes have been added" })] }))] }));
|
|
58
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BuilderSkill } from "../../../document-models/builder-profile/gen/types.js";
|
|
2
|
+
interface SkillsSectionProps {
|
|
3
|
+
skills: BuilderSkill[];
|
|
4
|
+
onAddSkill: (skill: BuilderSkill) => void;
|
|
5
|
+
onRemoveSkill: (skill: BuilderSkill) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function SkillsSection({ skills, onAddSkill, onRemoveSkill, }: SkillsSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=SkillsSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkillsSection.d.ts","sourceRoot":"","sources":["../../../../editors/builder-profile/components/SkillsSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uDAAuD,CAAC;AA2D1F,UAAU,kBAAkB;IAC1B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,UAAU,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,UAAU,EACV,aAAa,GACd,EAAE,kBAAkB,2CAuGpB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Sparkles, X, Check } from "lucide-react";
|
|
3
|
+
const SKILL_OPTIONS = [
|
|
4
|
+
{
|
|
5
|
+
value: "FRONTEND_DEVELOPMENT",
|
|
6
|
+
label: "Frontend Development",
|
|
7
|
+
color: "bg-blue-500",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
value: "BACKEND_DEVELOPMENT",
|
|
11
|
+
label: "Backend Development",
|
|
12
|
+
color: "bg-slate-600",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
value: "FULL_STACK_DEVELOPMENT",
|
|
16
|
+
label: "Full Stack Development",
|
|
17
|
+
color: "bg-violet-500",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: "DEVOPS_ENGINEERING",
|
|
21
|
+
label: "DevOps Engineering",
|
|
22
|
+
color: "bg-orange-500",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: "SMART_CONTRACT_DEVELOPMENT",
|
|
26
|
+
label: "Smart Contract Development",
|
|
27
|
+
color: "bg-emerald-500",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
value: "UI_UX_DESIGN",
|
|
31
|
+
label: "UI/UX Design",
|
|
32
|
+
color: "bg-pink-500",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: "TECHNICAL_WRITING",
|
|
36
|
+
label: "Technical Writing",
|
|
37
|
+
color: "bg-amber-500",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
value: "QA_TESTING",
|
|
41
|
+
label: "QA Testing",
|
|
42
|
+
color: "bg-green-500",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
value: "DATA_ENGINEERING",
|
|
46
|
+
label: "Data Engineering",
|
|
47
|
+
color: "bg-indigo-500",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
value: "SECURITY_ENGINEERING",
|
|
51
|
+
label: "Security Engineering",
|
|
52
|
+
color: "bg-red-500",
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
export function SkillsSection({ skills, onAddSkill, onRemoveSkill, }) {
|
|
56
|
+
const availableSkills = SKILL_OPTIONS.filter((option) => !skills.includes(option.value));
|
|
57
|
+
const selectedSkills = skills
|
|
58
|
+
.map((skill) => SKILL_OPTIONS.find((s) => s.value === skill))
|
|
59
|
+
.filter(Boolean);
|
|
60
|
+
return (_jsxs("div", { className: "bg-white border border-slate-200/60 rounded-2xl shadow-sm p-6", children: [_jsxs("h3", { className: "text-lg font-semibold text-slate-900 mb-2 flex items-center gap-2", children: [_jsx("span", { className: "w-8 h-8 rounded-lg bg-blue-50 flex items-center justify-center", children: _jsx(Sparkles, { size: 18, className: "text-blue-600" }) }), "Skills"] }), _jsx("p", { className: "text-sm text-slate-500 mb-5", children: "Select the skills that best represent your expertise" }), selectedSkills.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-2 mb-5", children: selectedSkills.map((skill) => skill && (_jsxs("div", { className: "group flex items-center gap-2 px-3 py-2 rounded-xl bg-gradient-to-r from-slate-50 to-slate-100 border border-slate-200 hover:border-slate-300 transition-all", children: [_jsx("span", { className: `w-2 h-2 rounded-full ${skill.color}` }), _jsx("span", { className: "text-sm font-medium text-slate-700", children: skill.label }), _jsx("button", { type: "button", onClick: () => onRemoveSkill(skill.value), className: "ml-1 p-1 rounded-lg opacity-0 group-hover:opacity-100 hover:bg-red-100 text-slate-400 hover:text-red-600 transition-all", children: _jsx(X, { size: 14 }) })] }, skill.value))) })), skills.length === 0 && (_jsxs("div", { className: "text-center py-8 mb-5 rounded-xl bg-slate-50 border-2 border-dashed border-slate-200", children: [_jsx(Sparkles, { size: 32, className: "text-slate-300 mx-auto mb-2" }), _jsx("p", { className: "text-slate-500 text-sm", children: "No skills selected yet" }), _jsx("p", { className: "text-slate-400 text-xs mt-1", children: "Add skills from the dropdown below" })] })), availableSkills.length > 0 && (_jsxs("div", { className: "relative", children: [_jsxs("select", { className: "w-full px-4 py-3 pr-10 border border-slate-200 rounded-xl text-sm bg-white hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors appearance-none cursor-pointer", onChange: (e) => {
|
|
61
|
+
if (e.target.value) {
|
|
62
|
+
onAddSkill(e.target.value);
|
|
63
|
+
e.target.value = "";
|
|
64
|
+
}
|
|
65
|
+
}, defaultValue: "", children: [_jsx("option", { value: "", disabled: true, children: "+ Add a skill..." }), availableSkills.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] }), _jsx("svg", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none w-4 h-4", viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { fillRule: "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", clipRule: "evenodd" }) })] })), availableSkills.length === 0 && skills.length > 0 && (_jsxs("div", { className: "flex items-center gap-2 text-sm text-emerald-600 bg-emerald-50 rounded-xl px-4 py-3", children: [_jsx(Check, { size: 16 }), _jsx("span", { children: "All available skills have been added" })] }))] }));
|
|
66
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/builder-profile/editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/builder-profile/editor.tsx"],"names":[],"mappings":"AAuCA,MAAM,CAAC,OAAO,UAAU,MAAM,4CAugB7B"}
|