@bevel-software/platform-core-frontend 0.1.0
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/LICENSE +202 -0
- package/package.json +70 -0
- package/src/core/CoreAppShell.tsx +444 -0
- package/src/core/__tests__/ShellRoutes.test.tsx +95 -0
- package/src/core/events.ts +29 -0
- package/src/core/registry.ts +336 -0
- package/src/css-side-effect-imports.d.ts +7 -0
- package/src/html-extensions.ts +12 -0
- package/src/index.css +49 -0
- package/src/index.ts +23 -0
- package/src/lib/api.ts +57 -0
- package/src/lib/utils.ts +138 -0
- package/src/modules/access/__tests__/ManageAccessDialog.test.tsx +130 -0
- package/src/modules/access/__tests__/useFileAccess.test.tsx +253 -0
- package/src/modules/access/api.ts +205 -0
- package/src/modules/access/components/AccessRestrictedBanner.tsx +31 -0
- package/src/modules/access/components/ManageAccessDialog.tsx +1232 -0
- package/src/modules/access/components/NodeOwnersBanner.tsx +30 -0
- package/src/modules/access/hooks/useFileAccess.ts +151 -0
- package/src/modules/admin/components/AdminRolesPage.tsx +943 -0
- package/src/modules/admin/components/RolesCorruptedBanner.tsx +74 -0
- package/src/modules/admin/services/admin.api.ts +92 -0
- package/src/modules/admin/services/roles.api.ts +136 -0
- package/src/modules/admin/state/admin.context.tsx +223 -0
- package/src/modules/auth/components/LoginScreen.tsx +135 -0
- package/src/modules/auth/hooks/useAuthState.ts +59 -0
- package/src/modules/auth/services/auth.api.ts +24 -0
- package/src/modules/auth/services/microsoft-oauth.ts +57 -0
- package/src/modules/auth/state/auth.context.ts +18 -0
- package/src/modules/git/__tests__/BranchSwitcher.test.tsx +347 -0
- package/src/modules/git/__tests__/FileHistoryPanel.test.tsx +201 -0
- package/src/modules/git/__tests__/ProtectedBranchBanner.test.tsx +82 -0
- package/src/modules/git/__tests__/PullNeededBanner.test.tsx +441 -0
- package/src/modules/git/__tests__/git.api.test.ts +113 -0
- package/src/modules/git/__tests__/pr.api.test.ts +44 -0
- package/src/modules/git/__tests__/useAutoPullUpdates.test.tsx +212 -0
- package/src/modules/git/components/BranchSwitcher.tsx +527 -0
- package/src/modules/git/components/DiffView.tsx +30 -0
- package/src/modules/git/components/FileComparisonPanel.tsx +377 -0
- package/src/modules/git/components/FileHistoryPanel.tsx +320 -0
- package/src/modules/git/components/ProtectedBranchBanner.tsx +42 -0
- package/src/modules/git/components/PullNeededBanner.tsx +204 -0
- package/src/modules/git/components/PullRequestsForMe.tsx +244 -0
- package/src/modules/git/components/UnifiedDiffView.tsx +37 -0
- package/src/modules/git/hooks/__tests__/useGitState.deleteBranch.test.tsx +99 -0
- package/src/modules/git/hooks/useAutoPullUpdates.ts +121 -0
- package/src/modules/git/hooks/useGitState.ts +335 -0
- package/src/modules/git/services/__tests__/error-messages.test.ts +134 -0
- package/src/modules/git/services/error-messages.ts +257 -0
- package/src/modules/git/services/git.api.ts +163 -0
- package/src/modules/git/services/pr-prompts.ts +159 -0
- package/src/modules/git/services/pr.api.ts +39 -0
- package/src/modules/git/state/auto-update.context.ts +21 -0
- package/src/modules/git/state/git.context.ts +82 -0
- package/src/modules/layout/components/AppLayout.tsx +40 -0
- package/src/modules/layout/components/DemoBanner.tsx +57 -0
- package/src/modules/layout/components/MaintenanceOverlay.tsx +104 -0
- package/src/modules/layout/components/MobileChatLayout.tsx +153 -0
- package/src/modules/layout/components/ResizableThreePaneLayout.tsx +203 -0
- package/src/modules/layout/components/SlideOverlay.tsx +224 -0
- package/src/modules/layout/components/__tests__/MobileChatLayout.test.tsx +77 -0
- package/src/modules/layout/components/__tests__/ResizableThreePaneLayout.test.tsx +57 -0
- package/src/modules/layout/hooks/useMediaQuery.ts +23 -0
- package/src/modules/layout/state/__tests__/layout.context.test.tsx +39 -0
- package/src/modules/layout/state/layout.context.ts +46 -0
- package/src/modules/library/__tests__/DetailDialog.test.tsx +200 -0
- package/src/modules/library/__tests__/diff.test.ts +62 -0
- package/src/modules/library/__tests__/loadout.test.tsx +72 -0
- package/src/modules/library/__tests__/status.test.ts +117 -0
- package/src/modules/library/components/ChangeRequestDock.tsx +47 -0
- package/src/modules/library/components/CompareView.tsx +357 -0
- package/src/modules/library/components/DetailDialog.tsx +566 -0
- package/src/modules/library/components/GearIcon.tsx +12 -0
- package/src/modules/library/components/LibraryCard.tsx +132 -0
- package/src/modules/library/components/LibraryPage.tsx +254 -0
- package/src/modules/library/components/LoadoutSidebar.tsx +156 -0
- package/src/modules/library/components/StatusGem.tsx +21 -0
- package/src/modules/library/components/SuggestChange.tsx +171 -0
- package/src/modules/library/components/particles.ts +50 -0
- package/src/modules/library/hooks/useLibraryData.ts +119 -0
- package/src/modules/library/hooks/useSkillDetail.ts +74 -0
- package/src/modules/library/library.css +320 -0
- package/src/modules/library/services/library.api.ts +164 -0
- package/src/modules/library/state/loadout.tsx +129 -0
- package/src/modules/library/state/toast.tsx +42 -0
- package/src/modules/library/utils/diff.ts +102 -0
- package/src/modules/library/utils/status.ts +116 -0
- package/src/modules/pr/__tests__/PrApprovalBadge.test.tsx +93 -0
- package/src/modules/pr/__tests__/PrCancelButton.test.tsx +158 -0
- package/src/modules/pr/__tests__/PrCancelConfirmDialog.test.tsx +44 -0
- package/src/modules/pr/__tests__/PrMergeButton.test.tsx +360 -0
- package/src/modules/pr/__tests__/bucketize-comments.test.ts +85 -0
- package/src/modules/pr/__tests__/parsePatch.test.ts +104 -0
- package/src/modules/pr/__tests__/usePrViewerState.test.ts +72 -0
- package/src/modules/pr/components/OpenChangeRequestDialog.tsx +193 -0
- package/src/modules/pr/components/PrApprovalBadge.tsx +80 -0
- package/src/modules/pr/components/PrCancelButton.tsx +99 -0
- package/src/modules/pr/components/PrCancelConfirmDialog.tsx +119 -0
- package/src/modules/pr/components/PrCommentComposer.tsx +92 -0
- package/src/modules/pr/components/PrCommentThread.tsx +168 -0
- package/src/modules/pr/components/PrCommentsPanel.tsx +143 -0
- package/src/modules/pr/components/PrDiffPane.tsx +425 -0
- package/src/modules/pr/components/PrFileRow.tsx +164 -0
- package/src/modules/pr/components/PrFilesList.tsx +53 -0
- package/src/modules/pr/components/PrHeader.tsx +45 -0
- package/src/modules/pr/components/PrHeaderOverflowMenu.tsx +58 -0
- package/src/modules/pr/components/PrMergeButton.tsx +268 -0
- package/src/modules/pr/components/PrMergeConfirmDialog.tsx +112 -0
- package/src/modules/pr/components/PrRefreshFromTargetButton.tsx +110 -0
- package/src/modules/pr/components/PrViewer.tsx +364 -0
- package/src/modules/pr/hooks/usePrViewerState.ts +150 -0
- package/src/modules/pr/services/pr-approvals.api.ts +31 -0
- package/src/modules/pr/services/pr-cancel.api.ts +19 -0
- package/src/modules/pr/services/pr-comments.api.ts +45 -0
- package/src/modules/pr/services/pr-detail.api.ts +17 -0
- package/src/modules/pr/services/pr-merge.api.ts +53 -0
- package/src/modules/pr/services/pr-open.api.ts +30 -0
- package/src/modules/pr/state/pr-viewer.context.ts +34 -0
- package/src/modules/pr/utils/bucketize-comments.ts +55 -0
- package/src/modules/pr/utils/parsePatch.ts +57 -0
- package/src/modules/review/__tests__/review.api.test.ts +121 -0
- package/src/modules/review/components/BinaryChangePlaceholder.tsx +15 -0
- package/src/modules/review/components/DiffViewer.tsx +78 -0
- package/src/modules/review/components/MarkdownDiffViewer.tsx +263 -0
- package/src/modules/review/components/ReviewFileRow.tsx +114 -0
- package/src/modules/review/components/ReviewPanel.tsx +260 -0
- package/src/modules/review/components/ReviewPanelSurface.tsx +52 -0
- package/src/modules/review/components/__tests__/ReviewPanel.test.tsx +106 -0
- package/src/modules/review/hooks/__tests__/useReviewState.test.ts +88 -0
- package/src/modules/review/hooks/useReviewState.ts +256 -0
- package/src/modules/review/services/review.api.ts +72 -0
- package/src/modules/review/state/ReviewProvider.tsx +28 -0
- package/src/modules/review/state/review.context.ts +29 -0
- package/src/modules/secrets-vault/components/ConnectToolsPage.tsx +488 -0
- package/src/modules/secrets-vault/components/SecretsPage.tsx +276 -0
- package/src/modules/secrets-vault/components/ToolSecretsPanel.tsx +362 -0
- package/src/modules/secrets-vault/components/__tests__/SecretsPage.test.tsx +51 -0
- package/src/modules/secrets-vault/services/connect.api.ts +113 -0
- package/src/modules/secrets-vault/services/secrets.api.ts +82 -0
- package/src/modules/secrets-vault/services/tool-secrets.api.ts +116 -0
- package/src/modules/toolbar/components/AdminMenu.tsx +250 -0
- package/src/modules/toolbar/components/AppSwitcher.tsx +108 -0
- package/src/modules/toolbar/components/ExternalAgentAccessPage.tsx +548 -0
- package/src/modules/toolbar/components/Toolbar.tsx +123 -0
- package/src/modules/toolbar/components/__tests__/AppSwitcher.test.tsx +122 -0
- package/src/modules/toolbar/components/__tests__/Toolbar.test.tsx +353 -0
- package/src/modules/toolbar/services/external-api-keys.api.ts +65 -0
- package/src/modules/tools/ToolsExplorerPage.tsx +380 -0
- package/src/modules/workflow/hooks/useEventBusSubscription.ts +24 -0
- package/src/modules/workflow/hooks/useFileLock.ts +430 -0
- package/src/modules/workflow/services/lock.api.ts +139 -0
- package/src/modules/workflow/state/EventBusFocusBinder.tsx +25 -0
- package/src/modules/workflow/state/EventBusProvider.tsx +232 -0
- package/src/modules/workflow/state/event-bus.context.ts +75 -0
- package/src/modules/workspace/__tests__/testFixtures.ts +54 -0
- package/src/modules/workspace/__tests__/useWorkspaceState.test.ts +91 -0
- package/src/modules/workspace/components/EditorTabs.tsx +384 -0
- package/src/modules/workspace/components/FileExplorer.tsx +1068 -0
- package/src/modules/workspace/components/FileRoute.tsx +392 -0
- package/src/modules/workspace/components/FileViewer.tsx +906 -0
- package/src/modules/workspace/components/__tests__/EditorTabs.test.tsx +241 -0
- package/src/modules/workspace/components/__tests__/FileExplorer.test.tsx +666 -0
- package/src/modules/workspace/components/__tests__/FileRoute.test.tsx +330 -0
- package/src/modules/workspace/components/__tests__/FileViewer.test.tsx +492 -0
- package/src/modules/workspace/components/renderers/CsvRenderer.tsx +174 -0
- package/src/modules/workspace/components/renderers/DocxRenderer.tsx +87 -0
- package/src/modules/workspace/components/renderers/HtmlRenderer.tsx +231 -0
- package/src/modules/workspace/components/renderers/ImageRenderer.tsx +50 -0
- package/src/modules/workspace/components/renderers/KbMarkdownView.tsx +287 -0
- package/src/modules/workspace/components/renderers/MarkdownRenderer.tsx +252 -0
- package/src/modules/workspace/components/renderers/MermaidDiagram.tsx +268 -0
- package/src/modules/workspace/components/renderers/PdfRenderer.tsx +81 -0
- package/src/modules/workspace/components/renderers/TextRenderer.tsx +86 -0
- package/src/modules/workspace/components/renderers/ToolForm.tsx +404 -0
- package/src/modules/workspace/components/renderers/ToolRenderer.tsx +417 -0
- package/src/modules/workspace/components/renderers/XlsxRenderer.tsx +157 -0
- package/src/modules/workspace/components/renderers/__tests__/CsvRenderer.test.ts +57 -0
- package/src/modules/workspace/components/renderers/__tests__/KbMarkdownView.test.tsx +95 -0
- package/src/modules/workspace/components/renderers/__tests__/MarkdownRenderer.test.tsx +328 -0
- package/src/modules/workspace/components/renderers/__tests__/PdfRenderer.test.tsx +167 -0
- package/src/modules/workspace/components/renderers/__tests__/htmlSandbox.test.ts +318 -0
- package/src/modules/workspace/components/renderers/csvUtils.ts +76 -0
- package/src/modules/workspace/components/renderers/htmlSandbox.ts +332 -0
- package/src/modules/workspace/components/renderers/index.ts +39 -0
- package/src/modules/workspace/components/renderers/types.ts +27 -0
- package/src/modules/workspace/hooks/__tests__/useWorkspaceState.test.tsx +298 -0
- package/src/modules/workspace/hooks/useWorkspaceState.ts +1315 -0
- package/src/modules/workspace/routing/__tests__/kb-routes.test.tsx +99 -0
- package/src/modules/workspace/routing/kb-routes.ts +266 -0
- package/src/modules/workspace/services/__tests__/workspace.api.test.ts +72 -0
- package/src/modules/workspace/services/workspace.api.ts +185 -0
- package/src/modules/workspace/state/workspace.context.ts +235 -0
- package/src/modules/workspace/utils/__tests__/frontmatter.test.ts +107 -0
- package/src/modules/workspace/utils/diff.ts +53 -0
- package/src/modules/workspace/utils/fileTree.ts +179 -0
- package/src/modules/workspace/utils/frontmatter.ts +80 -0
- package/src/modules/workspace/utils/readDroppedEntries.ts +119 -0
- package/src/modules/workspace/utils/tab-persistence.ts +23 -0
- package/src/shared/components/Dialog.tsx +198 -0
- package/src/shared/components/PageShell.tsx +51 -0
- package/src/shared/components/useModalLayer.ts +35 -0
- package/src/shared/markdown/Markdown.tsx +62 -0
- package/src/test-setup.ts +59 -0
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { useNavigate } from 'react-router-dom';
|
|
3
|
+
import {
|
|
4
|
+
DEFAULT_BRANCH,
|
|
5
|
+
type FileTreeEntry,
|
|
6
|
+
type PullRequestSummary,
|
|
7
|
+
} from '@bevel-software/platform-shared';
|
|
8
|
+
import { Dialog } from '../../../shared/components/Dialog';
|
|
9
|
+
import { useWorkspace } from '../../workspace/state/workspace.context';
|
|
10
|
+
import { useAuth } from '../../auth/state/auth.context';
|
|
11
|
+
import { kbFileUrl, resolveRelativePath } from '../../workspace/routing/kb-routes';
|
|
12
|
+
import { KbMarkdownView } from '../../workspace/components/renderers/KbMarkdownView';
|
|
13
|
+
import { ManageAccessDialog } from '../../access/components/ManageAccessDialog';
|
|
14
|
+
import { cancelPullRequest } from '../../pr/services/pr-cancel.api';
|
|
15
|
+
import type { ToolSecrets } from '../../secrets-vault/services/tool-secrets.api';
|
|
16
|
+
import { readFileOnBranch, suggestChange, type LibrarySkillSummary } from '../services/library.api';
|
|
17
|
+
import { useSkillDetail } from '../hooks/useSkillDetail';
|
|
18
|
+
import { useLibraryToast } from '../state/toast';
|
|
19
|
+
import {
|
|
20
|
+
neededToolsFor,
|
|
21
|
+
toolStatus,
|
|
22
|
+
toolVariableStatuses,
|
|
23
|
+
} from '../utils/status';
|
|
24
|
+
import { diffLines, hasChanges, type DiffLine } from '../utils/diff';
|
|
25
|
+
import { StatusGem } from './StatusGem';
|
|
26
|
+
import { ChangeRequestDock } from './ChangeRequestDock';
|
|
27
|
+
import { CompareView } from './CompareView';
|
|
28
|
+
import { SuggestChange } from './SuggestChange';
|
|
29
|
+
|
|
30
|
+
export type DetailTarget =
|
|
31
|
+
| { kind: 'skill'; skill: LibrarySkillSummary; owned: boolean }
|
|
32
|
+
| { kind: 'integration'; tool: ToolSecrets };
|
|
33
|
+
|
|
34
|
+
export interface DetailDialogProps {
|
|
35
|
+
target: DetailTarget;
|
|
36
|
+
tools: ToolSecrets[];
|
|
37
|
+
skills: LibrarySkillSummary[];
|
|
38
|
+
allowedToolsBySkill: Map<string, string[]>;
|
|
39
|
+
/** Open change requests (all authors). */
|
|
40
|
+
crs: PullRequestSummary[];
|
|
41
|
+
/** Numbers of the caller's own change requests. */
|
|
42
|
+
myCrNumbers: Set<number>;
|
|
43
|
+
inLoadout: boolean;
|
|
44
|
+
onToggleLoadout(): void;
|
|
45
|
+
onClose(): void;
|
|
46
|
+
/** Something durable changed (merge, send back, withdraw, new suggestion). */
|
|
47
|
+
onDataChanged(): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Does this change request touch anything inside the skill folder? */
|
|
51
|
+
function touchesSkill(cr: PullRequestSummary, skillPath: string): boolean {
|
|
52
|
+
return cr.touchedNodePaths.some((p) => p === skillPath || p.startsWith(`${skillPath}/`));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const OWNER_TAG = (
|
|
56
|
+
<span className="rounded-full border border-[#f0dda6] bg-[#fdf3d8] px-1.5 text-[9.5px] font-bold tracking-[.05em] text-[#92600a]">
|
|
57
|
+
OWNER
|
|
58
|
+
</span>
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The ⓘ detail dialog from the approved mock, on the shared Dialog primitive
|
|
63
|
+
* (Esc / backdrop close come with it). Skills: description, needed
|
|
64
|
+
* integrations with per-connection state + Connect, clickable file browser
|
|
65
|
+
* (SKILL.md tagged MAIN), owner-only Manage access + Edit, the change-request
|
|
66
|
+
* layer (owner dock → side-by-side compare; own pending suggestions inline
|
|
67
|
+
* with withdraw; select-text → suggest). Integrations: per-connection status
|
|
68
|
+
* rows and the skills that use it.
|
|
69
|
+
*/
|
|
70
|
+
export function DetailDialog(props: DetailDialogProps) {
|
|
71
|
+
const { target, inLoadout, onToggleLoadout, onClose } = props;
|
|
72
|
+
const name = target.kind === 'skill' ? target.skill.name : target.tool.name;
|
|
73
|
+
const owned = target.kind === 'skill' ? target.owned : target.tool.canWrite;
|
|
74
|
+
const [compareCr, setCompareCr] = useState<PullRequestSummary | null>(null);
|
|
75
|
+
|
|
76
|
+
const loadoutButton = (
|
|
77
|
+
<button
|
|
78
|
+
type="button"
|
|
79
|
+
className={
|
|
80
|
+
inLoadout
|
|
81
|
+
? 'rounded-[10px] border border-[#f5c2c2] bg-[#fdecec] px-3.5 py-1.5 text-xs font-bold text-[#c53030]'
|
|
82
|
+
: 'rounded-[10px] bg-gradient-to-br from-[#0d9488] to-[#0f766e] px-3.5 py-1.5 text-xs font-bold text-white shadow-[0_4px_14px_rgba(13,148,136,0.22)]'
|
|
83
|
+
}
|
|
84
|
+
onClick={onToggleLoadout}
|
|
85
|
+
>
|
|
86
|
+
{inLoadout ? 'In loadout — remove' : '+ Add to loadout'}
|
|
87
|
+
</button>
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<>
|
|
92
|
+
<div className={compareCr ? 'hidden' : undefined}>
|
|
93
|
+
<Dialog
|
|
94
|
+
open
|
|
95
|
+
onClose={onClose}
|
|
96
|
+
size="2xl"
|
|
97
|
+
title={
|
|
98
|
+
<span className="flex items-center gap-2 text-[15px]">
|
|
99
|
+
{name}
|
|
100
|
+
{owned && OWNER_TAG}
|
|
101
|
+
<span className="text-[10.5px] font-normal uppercase tracking-[.08em] text-slate-400">
|
|
102
|
+
{target.kind === 'skill' ? 'Skill' : 'Integration'}
|
|
103
|
+
</span>
|
|
104
|
+
</span>
|
|
105
|
+
}
|
|
106
|
+
headerActions={loadoutButton}
|
|
107
|
+
bodyClassName="min-h-[16rem]"
|
|
108
|
+
>
|
|
109
|
+
{target.kind === 'skill' ? (
|
|
110
|
+
<SkillDetailBody {...props} skillSummary={target.skill} owned={target.owned} onCompare={setCompareCr} />
|
|
111
|
+
) : (
|
|
112
|
+
<ToolDetailBody {...props} tool={target.tool} />
|
|
113
|
+
)}
|
|
114
|
+
</Dialog>
|
|
115
|
+
</div>
|
|
116
|
+
{target.kind === 'skill' && compareCr && (
|
|
117
|
+
<SkillCompareHost
|
|
118
|
+
{...props}
|
|
119
|
+
skillSummary={target.skill}
|
|
120
|
+
cr={compareCr}
|
|
121
|
+
onExit={() => setCompareCr(null)}
|
|
122
|
+
/>
|
|
123
|
+
)}
|
|
124
|
+
</>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* ── skill body ── */
|
|
129
|
+
|
|
130
|
+
interface SkillBodyProps extends DetailDialogProps {
|
|
131
|
+
skillSummary: LibrarySkillSummary;
|
|
132
|
+
owned: boolean;
|
|
133
|
+
onCompare(cr: PullRequestSummary): void;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function SkillDetailBody({
|
|
137
|
+
skillSummary,
|
|
138
|
+
owned,
|
|
139
|
+
tools,
|
|
140
|
+
crs,
|
|
141
|
+
myCrNumbers,
|
|
142
|
+
onCompare,
|
|
143
|
+
onDataChanged,
|
|
144
|
+
}: SkillBodyProps) {
|
|
145
|
+
const navigate = useNavigate();
|
|
146
|
+
const toast = useLibraryToast();
|
|
147
|
+
const { kbDirName } = useWorkspace();
|
|
148
|
+
const { user } = useAuth();
|
|
149
|
+
const detail = useSkillDetail(skillSummary.name);
|
|
150
|
+
const [selected, setSelected] = useState('SKILL.md');
|
|
151
|
+
const [accessOpen, setAccessOpen] = useState(false);
|
|
152
|
+
const fileViewRef = useRef<HTMLDivElement>(null);
|
|
153
|
+
|
|
154
|
+
const prefix = `${skillSummary.path}/`;
|
|
155
|
+
const relFiles = useMemo(
|
|
156
|
+
() => ['SKILL.md', ...(detail.skill?.files ?? []).map((f) => f.slice(prefix.length))],
|
|
157
|
+
[detail.skill, prefix],
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
useEffect(() => {
|
|
161
|
+
if (selected !== 'SKILL.md') detail.loadFile(selected);
|
|
162
|
+
// detail.loadFile is stable enough per (name, contents); keep deps minimal.
|
|
163
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
164
|
+
}, [selected, detail.skill]);
|
|
165
|
+
|
|
166
|
+
const raw = selected === 'SKILL.md' ? (detail.skill?.body ?? null) : detail.fileContent(selected);
|
|
167
|
+
|
|
168
|
+
const needed = useMemo(
|
|
169
|
+
() => (detail.skill ? neededToolsFor(detail.skill, tools) : []),
|
|
170
|
+
[detail.skill, tools],
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
const skillCrs = useMemo(
|
|
174
|
+
() => crs.filter((c) => touchesSkill(c, skillSummary.path)),
|
|
175
|
+
[crs, skillSummary.path],
|
|
176
|
+
);
|
|
177
|
+
const ownCr = useMemo(
|
|
178
|
+
() => skillCrs.find((c) => myCrNumbers.has(c.number)) ?? null,
|
|
179
|
+
[skillCrs, myCrNumbers],
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
// Own pending suggestions render inline: diff main → own suggestion branch.
|
|
183
|
+
const [branchRaw, setBranchRaw] = useState<string | null>(null);
|
|
184
|
+
const [branchRevision, setBranchRevision] = useState(0);
|
|
185
|
+
const fileRepoPath = `${skillSummary.path}/${selected}`;
|
|
186
|
+
const ownCrTouchesFile = ownCr !== null && ownCr.touchedNodePaths.includes(fileRepoPath);
|
|
187
|
+
useEffect(() => {
|
|
188
|
+
setBranchRaw(null);
|
|
189
|
+
if (!ownCr || !ownCrTouchesFile) return;
|
|
190
|
+
let cancelled = false;
|
|
191
|
+
readFileOnBranch(ownCr.branch, fileRepoPath)
|
|
192
|
+
.then((content) => {
|
|
193
|
+
if (!cancelled) setBranchRaw(content);
|
|
194
|
+
})
|
|
195
|
+
.catch(() => {
|
|
196
|
+
/* branch unreadable — fall back to the clean main view */
|
|
197
|
+
});
|
|
198
|
+
return () => {
|
|
199
|
+
cancelled = true;
|
|
200
|
+
};
|
|
201
|
+
}, [ownCr, ownCrTouchesFile, fileRepoPath, branchRevision]);
|
|
202
|
+
|
|
203
|
+
const suggestionDiff: DiffLine[] | null = useMemo(() => {
|
|
204
|
+
if (raw === null || branchRaw === null) return null;
|
|
205
|
+
const d = diffLines(raw, branchRaw);
|
|
206
|
+
return hasChanges(d) ? d : null;
|
|
207
|
+
}, [raw, branchRaw]);
|
|
208
|
+
|
|
209
|
+
const openInEditor = useCallback(
|
|
210
|
+
(wsRelative: string) => {
|
|
211
|
+
navigate(kbFileUrl(DEFAULT_BRANCH, wsRelative));
|
|
212
|
+
},
|
|
213
|
+
[navigate],
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
const handleSuggest = useCallback(
|
|
217
|
+
async (find: string, replace: string, note: string) => {
|
|
218
|
+
if (!user) throw new Error('Sign in to suggest a change.');
|
|
219
|
+
await suggestChange({
|
|
220
|
+
skillName: skillSummary.name,
|
|
221
|
+
repoRelativePath: fileRepoPath,
|
|
222
|
+
find,
|
|
223
|
+
replace,
|
|
224
|
+
note: note || undefined,
|
|
225
|
+
userEmail: user.email,
|
|
226
|
+
userName: user.name,
|
|
227
|
+
existingCr: ownCr,
|
|
228
|
+
});
|
|
229
|
+
toast('Suggestion saved to your draft');
|
|
230
|
+
setBranchRevision((r) => r + 1);
|
|
231
|
+
onDataChanged();
|
|
232
|
+
},
|
|
233
|
+
[user, skillSummary.name, fileRepoPath, ownCr, toast, onDataChanged],
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
async function withdrawOwn() {
|
|
237
|
+
if (!ownCr) return;
|
|
238
|
+
try {
|
|
239
|
+
await cancelPullRequest(ownCr.number);
|
|
240
|
+
toast('Suggestion withdrawn');
|
|
241
|
+
setBranchRaw(null);
|
|
242
|
+
onDataChanged();
|
|
243
|
+
} catch (err) {
|
|
244
|
+
toast(err instanceof Error ? err.message : "Couldn't withdraw the suggestion.");
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (detail.loading) {
|
|
249
|
+
return <div className="py-8 text-center text-sm text-slate-400">Loading…</div>;
|
|
250
|
+
}
|
|
251
|
+
if (detail.error || !detail.skill) {
|
|
252
|
+
return <div className="py-8 text-center text-sm text-[#c53030]">{detail.error ?? "Couldn't load this skill."}</div>;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const accessEntry: FileTreeEntry | null = kbDirName
|
|
256
|
+
? { name: 'SKILL.md', relativePath: `${kbDirName}/${skillSummary.path}/SKILL.md`, type: 'file' }
|
|
257
|
+
: null;
|
|
258
|
+
|
|
259
|
+
return (
|
|
260
|
+
<div className="text-sm">
|
|
261
|
+
<p className="mb-4 text-[13.5px] text-slate-600">{detail.skill.description}</p>
|
|
262
|
+
|
|
263
|
+
<section className="mb-4">
|
|
264
|
+
<div className="mb-2 flex items-center justify-between">
|
|
265
|
+
<h4 className="text-[10.5px] font-bold uppercase tracking-[.09em] text-slate-400">
|
|
266
|
+
Integrations this skill needs
|
|
267
|
+
</h4>
|
|
268
|
+
{owned && accessEntry && (
|
|
269
|
+
<button
|
|
270
|
+
type="button"
|
|
271
|
+
className="rounded-lg bg-[#eef2f7] px-3.5 py-1 text-[11.5px] font-bold text-slate-600 shadow-[inset_0_0_0_1px_#d3dbe6] transition-transform hover:-translate-y-px"
|
|
272
|
+
onClick={() => setAccessOpen(true)}
|
|
273
|
+
>
|
|
274
|
+
Manage access
|
|
275
|
+
</button>
|
|
276
|
+
)}
|
|
277
|
+
</div>
|
|
278
|
+
<div className="flex flex-col gap-1.5">
|
|
279
|
+
{needed.length === 0 ? (
|
|
280
|
+
<IntItem
|
|
281
|
+
title="Knowledge base only"
|
|
282
|
+
sub="No external connections needed"
|
|
283
|
+
right={<StatusGem state="ok" />}
|
|
284
|
+
/>
|
|
285
|
+
) : (
|
|
286
|
+
needed.map((t) => {
|
|
287
|
+
const status = toolStatus(t);
|
|
288
|
+
return (
|
|
289
|
+
<IntItem
|
|
290
|
+
key={t.slug}
|
|
291
|
+
title={t.name}
|
|
292
|
+
sub={status.state === 'ok' ? 'Connected — nothing to do' : status.text}
|
|
293
|
+
right={
|
|
294
|
+
status.state === 'ok' ? (
|
|
295
|
+
<StatusGem state="ok" />
|
|
296
|
+
) : (
|
|
297
|
+
<ConnectButton
|
|
298
|
+
label={status.state === 'err' ? 'Reconnect' : 'Connect'}
|
|
299
|
+
onClick={() => navigate('/connect')}
|
|
300
|
+
/>
|
|
301
|
+
)
|
|
302
|
+
}
|
|
303
|
+
/>
|
|
304
|
+
);
|
|
305
|
+
})
|
|
306
|
+
)}
|
|
307
|
+
</div>
|
|
308
|
+
</section>
|
|
309
|
+
|
|
310
|
+
<section className="mb-4">
|
|
311
|
+
<h4 className="mb-2 text-[10.5px] font-bold uppercase tracking-[.09em] text-slate-400">
|
|
312
|
+
Files in this skill — click one to view it
|
|
313
|
+
</h4>
|
|
314
|
+
<div className="flex flex-col gap-1.5">
|
|
315
|
+
{relFiles.map((rel) => (
|
|
316
|
+
<button
|
|
317
|
+
key={rel}
|
|
318
|
+
type="button"
|
|
319
|
+
className={`flex items-center gap-2 rounded-[9px] border px-2.5 py-1.5 text-left transition-colors ${
|
|
320
|
+
selected === rel
|
|
321
|
+
? 'border-[#0d9488] bg-[#e6f7f4]'
|
|
322
|
+
: 'border-slate-200 bg-[#fafbfd] hover:border-[#7fd0c4]'
|
|
323
|
+
}`}
|
|
324
|
+
onClick={() => setSelected(rel)}
|
|
325
|
+
>
|
|
326
|
+
<span
|
|
327
|
+
className={`font-mono text-[11.5px] font-semibold ${selected === rel ? 'text-[#0f766e]' : 'text-slate-600'}`}
|
|
328
|
+
>
|
|
329
|
+
{rel}
|
|
330
|
+
</span>
|
|
331
|
+
{rel === 'SKILL.md' && (
|
|
332
|
+
<span className="rounded-full bg-white px-1.5 text-[9.5px] font-bold tracking-[.04em] text-[#0f766e] shadow-[inset_0_0_0_1px_#d2e9e4]">
|
|
333
|
+
MAIN
|
|
334
|
+
</span>
|
|
335
|
+
)}
|
|
336
|
+
</button>
|
|
337
|
+
))}
|
|
338
|
+
</div>
|
|
339
|
+
</section>
|
|
340
|
+
|
|
341
|
+
<section>
|
|
342
|
+
<div className="mb-2 flex items-center justify-between">
|
|
343
|
+
<h4 className="font-mono text-[11px] text-slate-500">{selected}</h4>
|
|
344
|
+
{owned && kbDirName && (
|
|
345
|
+
<button
|
|
346
|
+
type="button"
|
|
347
|
+
className="rounded-lg bg-[#e0f8ee] px-3.5 py-1 text-[11.5px] font-bold text-[#0a8f60] shadow-[inset_0_0_0_1px_#a9e8cd] transition-transform hover:-translate-y-px"
|
|
348
|
+
onClick={() => openInEditor(`${kbDirName}/${skillSummary.path}/${selected}`)}
|
|
349
|
+
>
|
|
350
|
+
Edit
|
|
351
|
+
</button>
|
|
352
|
+
)}
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
{suggestionDiff && (
|
|
356
|
+
<div className="mb-2 flex items-center justify-between rounded-lg border border-[#d2e9e4] bg-[#e6f7f4] px-3 py-1.5 text-[11.5px] text-[#0f766e]">
|
|
357
|
+
<span>Your pending suggestions are shown inline</span>
|
|
358
|
+
<button
|
|
359
|
+
type="button"
|
|
360
|
+
className="rounded-full bg-[#fdecec] px-3 py-0.5 font-bold text-[#c53030] shadow-[inset_0_0_0_1px_#f3c4c4]"
|
|
361
|
+
onClick={() => void withdrawOwn()}
|
|
362
|
+
>
|
|
363
|
+
Withdraw
|
|
364
|
+
</button>
|
|
365
|
+
</div>
|
|
366
|
+
)}
|
|
367
|
+
|
|
368
|
+
<div ref={fileViewRef}>
|
|
369
|
+
{raw === null ? (
|
|
370
|
+
<div className="py-4 text-center text-xs text-slate-400">Loading…</div>
|
|
371
|
+
) : suggestionDiff ? (
|
|
372
|
+
<pre className="lib-sug whitespace-pre-wrap break-words rounded-[13px] border border-slate-200 bg-[#f7f9fb] p-3.5 font-mono text-[11.5px] leading-relaxed text-slate-600">
|
|
373
|
+
{suggestionDiff.map((l, i) =>
|
|
374
|
+
l.kind === 'same' ? (
|
|
375
|
+
<div key={i}>{l.text || ' '}</div>
|
|
376
|
+
) : l.kind === 'removed' ? (
|
|
377
|
+
<del key={i} className="block">
|
|
378
|
+
{l.text || ' '}
|
|
379
|
+
</del>
|
|
380
|
+
) : (
|
|
381
|
+
<ins key={i} className="block">
|
|
382
|
+
{l.text || ' '}
|
|
383
|
+
</ins>
|
|
384
|
+
),
|
|
385
|
+
)}
|
|
386
|
+
</pre>
|
|
387
|
+
) : selected.endsWith('.md') ? (
|
|
388
|
+
<div className="rounded-[13px] border border-slate-200 bg-[#f7f9fb] px-4 py-3">
|
|
389
|
+
<KbMarkdownView
|
|
390
|
+
source={raw}
|
|
391
|
+
onOpenFile={(href) => {
|
|
392
|
+
if (!kbDirName) return;
|
|
393
|
+
openInEditor(resolveRelativePath(`${kbDirName}/${skillSummary.path}/${selected}`, href));
|
|
394
|
+
}}
|
|
395
|
+
/>
|
|
396
|
+
</div>
|
|
397
|
+
) : (
|
|
398
|
+
<pre className="whitespace-pre-wrap break-words rounded-[13px] border border-slate-200 bg-[#f7f9fb] p-3.5 font-mono text-[11.5px] leading-relaxed text-slate-600">
|
|
399
|
+
{raw}
|
|
400
|
+
</pre>
|
|
401
|
+
)}
|
|
402
|
+
</div>
|
|
403
|
+
</section>
|
|
404
|
+
|
|
405
|
+
<SuggestChange containerRef={fileViewRef} raw={raw} onSubmit={handleSuggest} />
|
|
406
|
+
|
|
407
|
+
{owned && <ChangeRequestDock crs={skillCrs} onSelect={onCompare} />}
|
|
408
|
+
|
|
409
|
+
{accessOpen && accessEntry && (
|
|
410
|
+
<ManageAccessDialog entry={accessEntry} onClose={() => setAccessOpen(false)} />
|
|
411
|
+
)}
|
|
412
|
+
</div>
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/* ── compare host: mounts the split view once the skill detail is available ── */
|
|
417
|
+
|
|
418
|
+
interface CompareHostProps extends DetailDialogProps {
|
|
419
|
+
skillSummary: LibrarySkillSummary;
|
|
420
|
+
cr: PullRequestSummary;
|
|
421
|
+
onExit(): void;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
function SkillCompareHost({ skillSummary, cr, onExit, onDataChanged }: CompareHostProps) {
|
|
425
|
+
const toast = useLibraryToast();
|
|
426
|
+
const detail = useSkillDetail(skillSummary.name);
|
|
427
|
+
|
|
428
|
+
if (detail.loading) {
|
|
429
|
+
return (
|
|
430
|
+
<div className="fixed inset-0 z-[60] flex items-center justify-center bg-slate-950/40 text-sm text-white">
|
|
431
|
+
Loading…
|
|
432
|
+
</div>
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
if (!detail.skill) return null;
|
|
436
|
+
|
|
437
|
+
return (
|
|
438
|
+
<CompareView
|
|
439
|
+
skill={detail.skill}
|
|
440
|
+
mainContent={(rel) => (rel === 'SKILL.md' ? detail.skill!.body : detail.fileContent(rel))}
|
|
441
|
+
loadMainFile={(rel) => {
|
|
442
|
+
if (rel !== 'SKILL.md') detail.loadFile(rel);
|
|
443
|
+
}}
|
|
444
|
+
cr={cr}
|
|
445
|
+
onClose={onExit}
|
|
446
|
+
onResolved={(kind) => {
|
|
447
|
+
toast(kind === 'applied' ? 'Change request is being applied' : 'Sent back to the author');
|
|
448
|
+
onExit();
|
|
449
|
+
onDataChanged();
|
|
450
|
+
}}
|
|
451
|
+
/>
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/* ── integration body ── */
|
|
456
|
+
|
|
457
|
+
interface ToolBodyProps extends DetailDialogProps {
|
|
458
|
+
tool: ToolSecrets;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
function ToolDetailBody({ tool, skills, allowedToolsBySkill }: ToolBodyProps) {
|
|
462
|
+
const navigate = useNavigate();
|
|
463
|
+
const { kbDirName } = useWorkspace();
|
|
464
|
+
const rows = toolVariableStatuses(tool);
|
|
465
|
+
|
|
466
|
+
const usedBy = useMemo(
|
|
467
|
+
() =>
|
|
468
|
+
skills.filter(
|
|
469
|
+
(s) =>
|
|
470
|
+
neededToolsFor({ allowedTools: allowedToolsBySkill.get(s.name) }, [tool]).length > 0,
|
|
471
|
+
),
|
|
472
|
+
[skills, allowedToolsBySkill, tool],
|
|
473
|
+
);
|
|
474
|
+
|
|
475
|
+
return (
|
|
476
|
+
<div className="text-sm">
|
|
477
|
+
<section className="mb-4">
|
|
478
|
+
<h4 className="mb-2 text-[10.5px] font-bold uppercase tracking-[.09em] text-slate-400">
|
|
479
|
+
Connection status
|
|
480
|
+
</h4>
|
|
481
|
+
<div className="flex flex-col gap-1.5">
|
|
482
|
+
{rows.length === 0 ? (
|
|
483
|
+
<IntItem title="Nothing to set up" sub="This integration works for everyone as-is" right={<StatusGem state="ok" />} />
|
|
484
|
+
) : (
|
|
485
|
+
rows.map(({ v, status }) => (
|
|
486
|
+
<IntItem
|
|
487
|
+
key={v.name}
|
|
488
|
+
title={v.label ?? v.name}
|
|
489
|
+
sub={
|
|
490
|
+
status.state === 'ok'
|
|
491
|
+
? v.scope === 'admin'
|
|
492
|
+
? 'Set up for the whole team'
|
|
493
|
+
: 'Connected'
|
|
494
|
+
: status.text
|
|
495
|
+
}
|
|
496
|
+
right={
|
|
497
|
+
status.state === 'ok' ? (
|
|
498
|
+
<StatusGem state="ok" />
|
|
499
|
+
) : v.scope === 'user' && v.adminConfigured !== false ? (
|
|
500
|
+
<ConnectButton
|
|
501
|
+
label={status.state === 'err' ? 'Reconnect' : 'Connect'}
|
|
502
|
+
onClick={() => navigate('/connect')}
|
|
503
|
+
/>
|
|
504
|
+
) : tool.canWrite && kbDirName ? (
|
|
505
|
+
<ConnectButton
|
|
506
|
+
label="Set up"
|
|
507
|
+
onClick={() => navigate(kbFileUrl(DEFAULT_BRANCH, `${kbDirName}/${tool.path}`))}
|
|
508
|
+
/>
|
|
509
|
+
) : (
|
|
510
|
+
<StatusGem state={status.state} />
|
|
511
|
+
)
|
|
512
|
+
}
|
|
513
|
+
/>
|
|
514
|
+
))
|
|
515
|
+
)}
|
|
516
|
+
</div>
|
|
517
|
+
</section>
|
|
518
|
+
|
|
519
|
+
<section>
|
|
520
|
+
<h4 className="mb-2 text-[10.5px] font-bold uppercase tracking-[.09em] text-slate-400">
|
|
521
|
+
Used by these skills
|
|
522
|
+
</h4>
|
|
523
|
+
{usedBy.length === 0 ? (
|
|
524
|
+
<span className="text-[11.5px] italic text-slate-400">No skills use this yet</span>
|
|
525
|
+
) : (
|
|
526
|
+
<div className="flex flex-wrap gap-1.5">
|
|
527
|
+
{usedBy.map((s) => (
|
|
528
|
+
<span
|
|
529
|
+
key={s.name}
|
|
530
|
+
className="rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[11.5px] font-semibold text-slate-500"
|
|
531
|
+
>
|
|
532
|
+
{s.name}
|
|
533
|
+
</span>
|
|
534
|
+
))}
|
|
535
|
+
</div>
|
|
536
|
+
)}
|
|
537
|
+
</section>
|
|
538
|
+
</div>
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/* ── small shared rows ── */
|
|
543
|
+
|
|
544
|
+
function IntItem({ title, sub, right }: { title: string; sub: string; right: React.ReactNode }) {
|
|
545
|
+
return (
|
|
546
|
+
<div className="flex items-center gap-3 rounded-[11px] border border-slate-200 bg-[#fafbfd] px-3 py-2">
|
|
547
|
+
<div className="min-w-0">
|
|
548
|
+
<b className="block text-[12.5px] text-slate-800">{title}</b>
|
|
549
|
+
<small className="block text-[11px] text-slate-400">{sub}</small>
|
|
550
|
+
</div>
|
|
551
|
+
<div className="ml-auto flex shrink-0 items-center gap-2">{right}</div>
|
|
552
|
+
</div>
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
function ConnectButton({ label, onClick }: { label: string; onClick(): void }) {
|
|
557
|
+
return (
|
|
558
|
+
<button
|
|
559
|
+
type="button"
|
|
560
|
+
className="rounded-lg bg-gradient-to-br from-[#f59e0b] to-[#d97706] px-3 py-1.5 text-[11.5px] font-bold text-white shadow-[0_2px_10px_rgba(245,158,11,0.35)] transition-transform hover:-translate-y-px"
|
|
561
|
+
onClick={onClick}
|
|
562
|
+
>
|
|
563
|
+
{label} →
|
|
564
|
+
</button>
|
|
565
|
+
);
|
|
566
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The thin gear from the approved mock (mocks/gear-thin.svg, inlined there as
|
|
3
|
+
* `GEAR_SVG`), converted to a React component with `fill="currentColor"` so the
|
|
4
|
+
* integration-card chrome can tint it. Purely decorative — always aria-hidden.
|
|
5
|
+
*/
|
|
6
|
+
export function GearIcon({ className }: { className?: string }) {
|
|
7
|
+
return (
|
|
8
|
+
<svg viewBox="0 0 256 256" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className={className} aria-hidden="true">
|
|
9
|
+
<path d="M128.001,76a52,52,0,1,0,52,52A52.05895,52.05895,0,0,0,128.001,76Zm0,96a44,44,0,1,1,44-44A44.04978,44.04978,0,0,1,128.001,172Zm103.606-19.19434-15.70459-20.93652c.07276-2.56543.01953-5.86182-.02246-7.709l15.72022-20.95948a3.99977,3.99977,0,0,0,.66162-3.44238,107.44341,107.44341,0,0,0-10.55664-25.51025,4.00044,4.00044,0,0,0-2.90332-1.96778L192.915,68.5835c-1.74854-1.9087-3.59033-3.75049-5.49854-5.49854l-3.6958-25.87549a3.99946,3.99946,0,0,0-1.96582-2.90234A107.46494,107.46494,0,0,0,156.251,23.7334a3.9984,3.9984,0,0,0-3.44385.66162L131.88867,40.08545c-2.58594-.11328-5.19043-.11328-7.77637,0L103.20215,24.40186a3.99975,3.99975,0,0,0-3.44238-.66163A107.43015,107.43015,0,0,0,74.24854,34.29736a3.99987,3.99987,0,0,0-1.96729,2.90284L68.585,63.08643c-1.90869,1.74853-3.75049,3.59033-5.499,5.499L37.21045,72.28076a4.00233,4.00233,0,0,0-2.90234,1.96631A107.45352,107.45352,0,0,0,23.73437,99.75146a4.00034,4.00034,0,0,0,.66163,3.44385l15.70459,20.93653c-.07276,2.56543-.01954,5.86181.02246,7.709L24.40283,152.80029a3.9998,3.9998,0,0,0-.66162,3.44239,107.44358,107.44358,0,0,0,10.55664,25.51025,4.0004,4.0004,0,0,0,2.90332,1.96777l25.88672,3.69678c1.74854,1.90869,3.59033,3.75049,5.49854,5.49854l3.6958,25.87548a3.99943,3.99943,0,0,0,1.96582,2.90235,107.46536,107.46536,0,0,0,25.5039,10.57373,3.99865,3.99865,0,0,0,3.44385-.66162l20.91846-15.69043c2.58594.11328,5.19043.11328,7.77636,0l20.91016,15.68359a3.99818,3.99818,0,0,0,3.44238.66162,107.42974,107.42974,0,0,0,25.51123-10.55713,3.99985,3.99985,0,0,0,1.96729-2.90283l3.69971-25.90918c1.86523-1.76269,4.1582-4.13135,5.43506-5.4668l25.936-3.70459a4.00231,4.00231,0,0,0,2.90234-1.9663,107.453,107.453,0,0,0,10.57373-25.5044A4.00032,4.00032,0,0,0,231.60693,152.80566Zm-15.89941,23.27393-25.35889,3.62207a4.00012,4.00012,0,0,0-2.34765,1.21875c-.0459.04883-4.59473,4.87744-6.98926,6.99756a4.00188,4.00188,0,0,0-1.30811,2.42969l-3.62256,25.36718a99.46249,99.46249,0,0,1-20.05908,8.29981l-20.4917-15.36914a3.99365,3.99365,0,0,0-2.64257-.793,80.73137,80.73137,0,0,1-9.77051,0,3.99956,3.99956,0,0,0-2.64258.793l-20.499,15.376a99.48407,99.48407,0,0,1-20.05274-8.31494l-3.62207-25.35742a3.9995,3.9995,0,0,0-1.3081-2.42969,80.77735,80.77735,0,0,1-6.90918-6.90869,3.99933,3.99933,0,0,0-2.4292-1.3081l-25.36719-3.62256a99.46525,99.46525,0,0,1-8.29981-20.0586l15.37012-20.49316a3.99957,3.99957,0,0,0,.79785-2.52148c-.002-.0669-.20019-6.69825-.00586-9.89063a4.00065,4.00065,0,0,0-.793-2.64307l-15.376-20.49853a99.49477,99.49477,0,0,1,8.31494-20.05322l25.35791-3.6211a4.00129,4.00129,0,0,0,2.4292-1.30859A80.70375,80.70375,0,0,1,74.99121,68.083a4.00194,4.00194,0,0,0,1.30811-2.42969l3.62255-25.36719A99.46278,99.46278,0,0,1,99.981,31.98633l20.4917,15.36914a4.01364,4.01364,0,0,0,2.64257.793,80.72728,80.72728,0,0,1,9.77051,0,4.00878,4.00878,0,0,0,2.64258-.793l20.499-15.376a99.48407,99.48407,0,0,1,20.05274,8.31494l3.62207,25.35743a3.9994,3.9994,0,0,0,1.3081,2.42968,80.78169,80.78169,0,0,1,6.90918,6.90869,3.99939,3.99939,0,0,0,2.4292,1.30811l25.36719,3.62256a99.46513,99.46513,0,0,1,8.2998,20.05859l-15.37011,20.49317a3.99954,3.99954,0,0,0-.79785,2.52148c.002.0669.20019,6.69824.00586,9.89063a4.00063,4.00063,0,0,0,.793,2.64306l15.376,20.49854A99.49477,99.49477,0,0,1,215.70752,176.07959Z" />
|
|
10
|
+
</svg>
|
|
11
|
+
);
|
|
12
|
+
}
|