@polymorphism-tech/morph-spec 10.12.1 → 11.0.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/CLAUDE.md +27 -57
- package/README.md +51 -340
- package/bin/morph-spec.js +22 -373
- package/docs/CHEATSHEET.md +37 -166
- package/docs/QUICKSTART.md +14 -74
- package/framework/CLAUDE.md +15 -26
- package/framework/MORPH.md +34 -101
- package/framework/agents.json +8 -8
- package/framework/commands/morph-apply.md +5 -5
- package/framework/commands/morph-infra.md +1 -1
- package/framework/docs/CLI.md +74 -886
- package/framework/evals/review-checklist.md +14 -14
- package/framework/hooks/README.md +21 -189
- package/framework/hooks/claude-code/core/README.md +2 -5
- package/framework/hooks/claude-code/core/conventional-commit.js +2 -2
- package/framework/hooks/claude-code/core/denylist.json +3 -3
- package/framework/hooks/claude-code/core/graph-refresh-kick.js +2 -2
- package/framework/hooks/claude-code/core/masked-exit.js +6 -6
- package/framework/hooks/claude-code/core/pre-bash-denylist.js +2 -2
- package/framework/hooks/claude-code/core/protect-spec-files.js +17 -61
- package/framework/hooks/claude-code/core/stack-changed.js +35 -0
- package/framework/hooks/claude-code/core/validate-completion.js +32 -87
- package/framework/hooks/shared/{heavy-command.js → command-kind.js} +6 -79
- package/framework/hooks/shared/command-tokens.js +0 -139
- package/framework/hooks/shared/contract.js +14 -0
- package/framework/hooks/shared/feature-slug.js +21 -0
- package/framework/hooks/shared/frontend-locations.js +0 -1
- package/framework/hooks/shared/git-paths.js +0 -15
- package/framework/hooks/shared/graph-freshness.js +0 -19
- package/framework/hooks/shared/hook-response.js +0 -7
- package/framework/hooks/shared/morph-cli.js +2 -81
- package/framework/hooks/shared/owner-words.js +2 -120
- package/framework/hooks/shared/payload-utils.js +0 -39
- package/framework/hooks/shared/report-progress.js +7 -101
- package/framework/hooks/statusline.js +16 -60
- package/framework/mcp/registry.json +2 -2
- package/framework/rules/ai-agents-standards.md +1 -1
- package/framework/rules/asaas-standards.md +1 -1
- package/framework/rules/ef-standards.md +1 -1
- package/framework/rules/gsap-standards.md +1 -1
- package/framework/rules/hangfire-standards.md +1 -1
- package/framework/rules/implement-report.md +3 -3
- package/framework/rules/neon-auth-standards.md +1 -1
- package/framework/rules/nextjs-standards.md +1 -1
- package/framework/rules/plan-grammar.md +13 -11
- package/framework/rules/resend-standards.md +1 -1
- package/framework/rules/ui-design.md +4 -0
- package/framework/schemas/config.schema.json +95 -310
- package/framework/skills/README.md +12 -32
- package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
- package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +1 -1
- package/framework/skills/core/morph-apply/SKILL.md +21 -46
- package/framework/skills/core/morph-plan/SKILL.md +28 -63
- package/framework/skills/core/morph-uiux/SKILL.md +23 -25
- package/framework/{templates/docs/ui-mockups.md → skills/core/morph-uiux/references/mockups.md} +4 -4
- package/framework/standards/STANDARDS.json +10 -11
- package/framework/standards/STANDARDS.meta.json +1 -1
- package/framework/standards/ai-agents/evals-with-cache.md +18 -32
- package/framework/standards/ai-agents/observability-patterns.md +2 -2
- package/framework/standards/architecture/code-comments.md +2 -5
- package/framework/standards/architecture/engineering-lens.md +1 -1
- package/framework/standards/backend/dotnet/testing.md +4 -4
- package/framework/standards/frontend/nextjs/lint.md +24 -10
- package/framework/standards/frontend/nextjs/testing.md +2 -2
- package/framework/standards/infrastructure/docker/local-compose-isolation.md +14 -30
- package/framework/templates/CLAUDE.md.core.guide.md +2 -2
- package/framework/templates/README.md +1 -1
- package/framework/templates/REGISTRY.json +3 -33
- package/framework/templates/docs/plan.md +3 -2
- package/framework/templates/dotnet/ai-kit/README.md +2 -4
- package/framework/templates/dotnet/ai-kit/src/Morph.AiKit/Evals/EvalCacheMissException.cs +1 -1
- package/framework/templates/dotnet/ai-kit/src/Morph.AiKit/Evals/EvalFixture.cs +1 -1
- package/package.json +1 -2
- package/src/commands/graph/explain.js +2 -1
- package/src/commands/graph/status.js +2 -1
- package/src/commands/mcp/mcp-setup.js +1 -2
- package/src/commands/project/doctor.js +5 -341
- package/src/commands/project/env.js +21 -52
- package/src/commands/project/init-contract.js +47 -0
- package/src/commands/project/init.js +36 -66
- package/src/commands/project/stack-scan.js +1 -1
- package/src/commands/project/update.js +15 -50
- package/src/commands/validation/check.js +128 -0
- package/src/commands/validation/plan-check.js +41 -64
- package/src/commands/validation/prove-red.js +1 -1
- package/src/core/paths/output-schema.js +0 -22
- package/src/core/templates/template-renderer.js +0 -14
- package/src/lib/ai/ai-project-scan.js +1 -6
- package/src/lib/check/attempts.js +38 -0
- package/src/lib/check/signals.js +145 -0
- package/src/lib/config/project-config.js +13 -0
- package/src/lib/contract/apply.js +62 -0
- package/src/lib/contract/defaults.js +96 -0
- package/src/lib/contract/merge.js +79 -0
- package/src/lib/contract/ports.js +43 -0
- package/src/lib/contract/scan.js +102 -0
- package/src/lib/detectors/claude-config-detector.js +7 -0
- package/src/lib/{procs → detectors}/mcp-config.js +1 -37
- package/src/lib/diff/diff-lines.js +64 -0
- package/src/lib/generators/architecture-scanner.js +1 -1
- package/src/lib/generators/scaffold-generator.js +0 -7
- package/src/lib/git/default-branch.js +0 -122
- package/src/lib/graph/diff-tree.js +2 -1
- package/src/lib/graph/god-nodes.js +2 -1
- package/src/lib/graph/graphify-runtime.js +0 -1
- package/src/lib/graph/graphifyignore.js +1 -1
- package/src/lib/graph/sanitize.js +2 -8
- package/src/lib/installers/memory-installer.js +15 -30
- package/src/lib/installers/stack-sync.js +16 -9
- package/src/lib/plan/checks.js +20 -64
- package/src/lib/plan/media.js +1 -1
- package/src/lib/plan/plan-parser.js +5 -5
- package/src/lib/review-reports.js +3 -77
- package/src/lib/scan/worktree-dirs.js +3 -0
- package/src/lib/specs/adr-index.js +2 -2
- package/src/lib/stack/dotnet-build-ignores.js +10 -2
- package/src/lib/stack/stack-scan.js +2 -2
- package/src/lib/stack-filter.js +3 -2
- package/src/lib/tests-audit/audit.js +1 -1
- package/src/scripts/setup-infra.js +6 -59
- package/src/utils/agents-installer.js +1 -34
- package/src/utils/atomic-json.js +27 -0
- package/src/utils/file-copier.js +4 -12
- package/src/utils/hooks-installer.js +9 -107
- package/claude-plugin.json +0 -14
- package/framework/commands/morph-archive.md +0 -46
- package/framework/commands/morph-hotfix.md +0 -17
- package/framework/commands/morph-preflight.md +0 -180
- package/framework/commands/morph-review.md +0 -15
- package/framework/commands/morph-status.md +0 -37
- package/framework/hooks/claude-code/core/block-destructive-worktree-removal.js +0 -80
- package/framework/hooks/claude-code/core/block-raw-worktree-add.js +0 -72
- package/framework/hooks/claude-code/core/enforce-phase-writes.js +0 -100
- package/framework/hooks/claude-code/core/gate-guard.js +0 -148
- package/framework/hooks/claude-code/core/heavy-gate.js +0 -78
- package/framework/hooks/claude-code/core/heavy-release.js +0 -23
- package/framework/hooks/claude-code/core/loop-detect.js +0 -79
- package/framework/hooks/claude-code/core/state-sync.js +0 -214
- package/framework/hooks/claude-code/core/telemetry-log.js +0 -259
- package/framework/hooks/claude-code/core/test-budget.js +0 -29
- package/framework/hooks/claude-code/core/worktree-context.js +0 -249
- package/framework/hooks/claude-code/core/worktree-create.js +0 -119
- package/framework/hooks/claude-code/core/worktree-env-inject.js +0 -68
- package/framework/hooks/claude-code/core/worktree-remove.js +0 -55
- package/framework/hooks/shared/build-check.js +0 -120
- package/framework/hooks/shared/claim-registry.js +0 -125
- package/framework/hooks/shared/e2e-check.js +0 -1022
- package/framework/hooks/shared/feature-locator.js +0 -82
- package/framework/hooks/shared/gate-event.js +0 -18
- package/framework/hooks/shared/gate-question.js +0 -20
- package/framework/hooks/shared/heavy-config.js +0 -113
- package/framework/hooks/shared/heavy-holders.js +0 -85
- package/framework/hooks/shared/heavy-slots.js +0 -280
- package/framework/hooks/shared/host-services.js +0 -440
- package/framework/hooks/shared/next-step.js +0 -181
- package/framework/hooks/shared/redact-secrets.js +0 -44
- package/framework/hooks/shared/reparse-scan.js +0 -40
- package/framework/hooks/shared/state-reader.js +0 -220
- package/framework/hooks/shared/state-writer.js +0 -112
- package/framework/hooks/shared/telemetry-logger.js +0 -101
- package/framework/hooks/shared/transcript-usage.js +0 -58
- package/framework/hooks/shared/worktree-root.js +0 -71
- package/framework/phases.json +0 -92
- package/framework/schemas/feature.schema.json +0 -242
- package/framework/skills/core/morph-apply/references/hotfix.md +0 -46
- package/framework/skills/core/morph-apply/references/machine.md +0 -30
- package/framework/skills/core/morph-apply/references/review.md +0 -77
- package/framework/skills/core/morph-plan/references/critique.md +0 -51
- package/framework/skills/core/morph-plan/references/interview.md +0 -37
- package/framework/templates/state.template.json +0 -17
- package/src/commands/dashboard/dashboard.js +0 -74
- package/src/commands/e2e/e2e.js +0 -400
- package/src/commands/observability/cost.js +0 -283
- package/src/commands/project/branch.js +0 -129
- package/src/commands/project/claim.js +0 -132
- package/src/commands/project/doctor-procs.js +0 -162
- package/src/commands/project/fleet.js +0 -66
- package/src/commands/project/heavy.js +0 -81
- package/src/commands/project/install-plugin-cmd.js +0 -27
- package/src/commands/project/status.js +0 -61
- package/src/commands/project/worktree.js +0 -1234
- package/src/commands/state/advance.js +0 -248
- package/src/commands/state/approve.js +0 -303
- package/src/commands/state/archive.js +0 -231
- package/src/commands/state/auto-approval.js +0 -67
- package/src/commands/state/create.js +0 -274
- package/src/commands/state/delete.js +0 -192
- package/src/commands/state/finish.js +0 -1247
- package/src/commands/state/gate-check.js +0 -244
- package/src/commands/state/gate-decision.js +0 -122
- package/src/commands/state/list.js +0 -244
- package/src/commands/state/next.js +0 -24
- package/src/commands/state/recap.js +0 -80
- package/src/commands/state/report-check.js +0 -244
- package/src/commands/state/retype.js +0 -110
- package/src/commands/validation/verify.js +0 -421
- package/src/core/state/feature-identity.js +0 -10
- package/src/core/state/gate-order.js +0 -23
- package/src/core/state/lifecycle-audit.js +0 -171
- package/src/core/state/state-manager.js +0 -523
- package/src/core/templates/template-seed.js +0 -21
- package/src/core/work-types.js +0 -44
- package/src/dashboard/app/App.jsx +0 -84
- package/src/dashboard/app/components/ActivityFeed.jsx +0 -166
- package/src/dashboard/app/components/CommandPalette.jsx +0 -144
- package/src/dashboard/app/components/DetailPanel.jsx +0 -43
- package/src/dashboard/app/components/EntityLink.jsx +0 -42
- package/src/dashboard/app/components/ErrorBoundary.jsx +0 -47
- package/src/dashboard/app/components/FlowGraph.jsx +0 -19
- package/src/dashboard/app/components/GatePauses.jsx +0 -116
- package/src/dashboard/app/components/KnowledgeMarkdown.jsx +0 -42
- package/src/dashboard/app/components/Markdown.jsx +0 -38
- package/src/dashboard/app/components/PhaseRail.jsx +0 -100
- package/src/dashboard/app/components/SearchFilter.jsx +0 -36
- package/src/dashboard/app/components/SessionMap.jsx +0 -77
- package/src/dashboard/app/components/Sidebar.jsx +0 -147
- package/src/dashboard/app/hooks/useMorphQuery.js +0 -44
- package/src/dashboard/app/hooks/usePref.js +0 -34
- package/src/dashboard/app/lib/format.js +0 -69
- package/src/dashboard/app/lib/phases.js +0 -75
- package/src/dashboard/app/lib/project.js +0 -38
- package/src/dashboard/app/main.jsx +0 -13
- package/src/dashboard/app/pages/Activity.jsx +0 -28
- package/src/dashboard/app/pages/AgentMap.jsx +0 -363
- package/src/dashboard/app/pages/FeatureDetail.jsx +0 -579
- package/src/dashboard/app/pages/Features.jsx +0 -393
- package/src/dashboard/app/pages/Guide.jsx +0 -145
- package/src/dashboard/app/pages/HookInspector.jsx +0 -444
- package/src/dashboard/app/pages/PhasePipeline.jsx +0 -273
- package/src/dashboard/app/pages/Portfolio.jsx +0 -190
- package/src/dashboard/app/pages/RulesMap.jsx +0 -285
- package/src/dashboard/app/pages/SkillsLibrary.jsx +0 -468
- package/src/dashboard/app/pages/Standards.jsx +0 -392
- package/src/dashboard/app/styles/index.css +0 -187
- package/src/dashboard/index.html +0 -14
- package/src/dashboard/package.json +0 -32
- package/src/dashboard/scanner/activity-scanner.js +0 -321
- package/src/dashboard/scanner/agents-scanner.js +0 -67
- package/src/dashboard/scanner/docs-scanner.js +0 -34
- package/src/dashboard/scanner/feature-status.js +0 -7
- package/src/dashboard/scanner/features-scanner.js +0 -397
- package/src/dashboard/scanner/hooks-scanner.js +0 -96
- package/src/dashboard/scanner/index.js +0 -21
- package/src/dashboard/scanner/phases-scanner.js +0 -14
- package/src/dashboard/scanner/portfolio.js +0 -129
- package/src/dashboard/scanner/project-api.js +0 -160
- package/src/dashboard/scanner/rules-scanner.js +0 -46
- package/src/dashboard/scanner/skills-scanner.js +0 -104
- package/src/dashboard/scanner/standards-scanner.js +0 -38
- package/src/dashboard/vite-plugin-morph-data.js +0 -120
- package/src/dashboard/vite.config.js +0 -26
- package/src/lib/ci/ci-verify.js +0 -30
- package/src/lib/ci/github-ci.js +0 -52
- package/src/lib/ci/pr-checks.js +0 -76
- package/src/lib/e2e/applicability.js +0 -39
- package/src/lib/e2e/compose-env.js +0 -80
- package/src/lib/e2e/stack-teardown.js +0 -96
- package/src/lib/git/branch-classifier.js +0 -104
- package/src/lib/git/evidence-staleness.js +0 -40
- package/src/lib/git/gh.js +0 -15
- package/src/lib/git/pending-prs.js +0 -58
- package/src/lib/git/pr-files.js +0 -31
- package/src/lib/git/pr-index.js +0 -39
- package/src/lib/git/tree-fingerprint.js +0 -58
- package/src/lib/git/tree-state.js +0 -125
- package/src/lib/heavy/cleanup.js +0 -72
- package/src/lib/heavy/gate.js +0 -168
- package/src/lib/heavy/live-stacks.js +0 -64
- package/src/lib/heavy/reclaim.js +0 -107
- package/src/lib/heavy/watchdog.js +0 -46
- package/src/lib/next-step.js +0 -12
- package/src/lib/plan/critique.js +0 -67
- package/src/lib/plan/plan-template.js +0 -18
- package/src/lib/procs/classify.js +0 -91
- package/src/lib/procs/list.js +0 -124
- package/src/lib/procs/prune.js +0 -47
- package/src/lib/procs/wslconfig.js +0 -70
- package/src/lib/projects/registry.js +0 -121
- package/src/lib/recap/piper.js +0 -36
- package/src/lib/recap/recap.js +0 -259
- package/src/lib/review-confirmation.js +0 -66
- package/src/lib/risk/diff-risk.js +0 -137
- package/src/lib/risk-detector.js +0 -638
- package/src/lib/specs/design-seed.js +0 -18
- package/src/lib/specs/screen-checklist.js +0 -315
- package/src/lib/stack/stack-profile.js +0 -69
- package/src/lib/tasks/eval-node.js +0 -293
- package/src/lib/tasks/linux-runner.js +0 -200
- package/src/lib/tasks/test-nodes.js +0 -414
- package/src/lib/tasks/test-runner.js +0 -569
- package/src/lib/telemetry/metrics.js +0 -384
- package/src/lib/telemetry/telemetry-reader.js +0 -276
- package/src/lib/telemetry/verify-event.js +0 -57
- package/src/lib/validators/code-budget/code-budget-validator.js +0 -170
- package/src/lib/validators/contracts/contract-compliance-validator.js +0 -219
- package/src/lib/validators/nextjs/next-component-validator.js +0 -142
- package/src/lib/validators/packages/package-validator.js +0 -310
- package/src/lib/validators/reuse/reuse-validator.js +0 -202
- package/src/lib/validators/reuse/symbol-scanner.js +0 -64
- package/src/lib/validators/validation-runner.js +0 -188
- package/src/lib/validators/verify-cache.js +0 -63
- package/src/lib/validators/verify-runner.js +0 -971
- package/src/lib/verify/affected.js +0 -143
- package/src/lib/verify/detached.js +0 -159
- package/src/lib/view/feature-html.js +0 -480
- package/src/lib/view/feature-page.client.js +0 -109
- package/src/lib/view/feature-page.css +0 -278
- package/src/lib/view/feature-view.js +0 -113
- package/src/lib/view/flow-layers.js +0 -79
- package/src/lib/view/flow-svg.js +0 -63
- package/src/lib/view/tokens.css +0 -18
- package/src/lib/work-type-detector.js +0 -81
- package/src/lib/worktree/dirs.js +0 -3
- package/src/lib/worktree/docker-audit.js +0 -175
- package/src/lib/worktree/env-allocator.js +0 -177
- package/src/lib/worktree/feature-truth.js +0 -145
- package/src/lib/worktree/finish-backup.js +0 -529
- package/src/lib/worktree/fleet-scanner.js +0 -223
- package/src/lib/worktree/ignored-triage.js +0 -136
- package/src/lib/worktree/vscode-settings.js +0 -112
- package/src/lib/worktree/worktree-audit.js +0 -323
- package/src/lib/worktree/worktree-include.js +0 -44
- package/src/scripts/install-plugin.js +0 -114
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import { useState, useMemo, useCallback } from 'react';
|
|
2
|
-
import { Handle, Position } from '@xyflow/react';
|
|
3
|
-
import { Robot } from '@phosphor-icons/react';
|
|
4
|
-
import morphData from 'virtual:morph-data';
|
|
5
|
-
import FlowGraph from '../components/FlowGraph.jsx';
|
|
6
|
-
import DetailPanel from '../components/DetailPanel.jsx';
|
|
7
|
-
import SearchFilter from '../components/SearchFilter.jsx';
|
|
8
|
-
import Markdown from '../components/Markdown.jsx';
|
|
9
|
-
import EntityLink, { useSelection, standardKey } from '../components/EntityLink.jsx';
|
|
10
|
-
|
|
11
|
-
const PALETTE = [
|
|
12
|
-
'var(--color-phase-implement)',
|
|
13
|
-
'var(--color-phase-uiux)',
|
|
14
|
-
'var(--color-phase-proposal)',
|
|
15
|
-
'var(--color-phase-plan)',
|
|
16
|
-
'var(--color-ok)',
|
|
17
|
-
'var(--color-warn)',
|
|
18
|
-
'var(--color-phase-review)',
|
|
19
|
-
'var(--color-dim)',
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
const tint = (color, pct = 14) => `color-mix(in srgb, ${color} ${pct}%, var(--color-core))`;
|
|
23
|
-
|
|
24
|
-
/** Stable by category name, so a color never jumps between renders. */
|
|
25
|
-
function categoryColors(standards) {
|
|
26
|
-
const cats = [...new Set(standards.map((s) => s.category || 'outros'))].sort();
|
|
27
|
-
return Object.fromEntries(cats.map((c, i) => [c, PALETTE[i % PALETTE.length]]));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function findStandard(list, sel) {
|
|
31
|
-
if (!sel) return null;
|
|
32
|
-
return list.find((s) => s.id === sel) || list.find((s) => s.path === standardKey(sel)) || null;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const HANDLE = { width: 7, height: 7, border: 0 };
|
|
36
|
-
const NODE_W = 230;
|
|
37
|
-
const NODE_H = 52;
|
|
38
|
-
|
|
39
|
-
function StandardNode({ data }) {
|
|
40
|
-
return (
|
|
41
|
-
<div
|
|
42
|
-
className="cursor-pointer select-none rounded-xl px-3 py-1.5 transition-opacity"
|
|
43
|
-
style={{
|
|
44
|
-
width: NODE_W, height: NODE_H,
|
|
45
|
-
background: tint(data.color, data.selected ? 30 : 12),
|
|
46
|
-
boxShadow: `inset 0 0 0 ${data.selected ? 2 : 1.25}px ${data.color}`,
|
|
47
|
-
opacity: data.dimmed ? 0.18 : 1,
|
|
48
|
-
}}
|
|
49
|
-
>
|
|
50
|
-
<Handle type="target" position={Position.Top} style={{ ...HANDLE, background: data.color }} />
|
|
51
|
-
<div className="truncate text-[13px] font-medium leading-tight text-[var(--color-fg)]" title={data.label}>{data.label}</div>
|
|
52
|
-
<div className="mt-0.5 truncate text-xs text-[var(--color-dim)]" title={data.sub}>{data.sub}</div>
|
|
53
|
-
</div>
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function AgentNode({ data }) {
|
|
58
|
-
return (
|
|
59
|
-
<div
|
|
60
|
-
className="flex cursor-pointer select-none items-center gap-2 rounded-full px-4 py-2 transition-opacity"
|
|
61
|
-
style={{
|
|
62
|
-
width: NODE_W,
|
|
63
|
-
background: data.active ? tint('var(--color-fg)', 16) : 'var(--color-raised)',
|
|
64
|
-
boxShadow: `inset 0 0 0 ${data.active ? 2 : 1}px ${data.active ? 'var(--color-fg)' : 'var(--color-hair-strong)'}`,
|
|
65
|
-
opacity: data.dimmed ? 0.3 : 1,
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
68
|
-
<Robot weight="light" size={16} className="shrink-0 text-[var(--color-dim)]" />
|
|
69
|
-
<div className="min-w-0">
|
|
70
|
-
<div className="truncate font-mono text-[13px] text-[var(--color-fg)]" title={data.title}>morph-{data.agentId}</div>
|
|
71
|
-
<div className="text-xs text-[var(--color-dim)]">{data.count} standards</div>
|
|
72
|
-
</div>
|
|
73
|
-
<Handle type="source" position={Position.Bottom} style={{ ...HANDLE, background: 'var(--color-dim)' }} />
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function CategoryNode({ data }) {
|
|
79
|
-
return (
|
|
80
|
-
<div
|
|
81
|
-
className="pointer-events-none rounded-2xl"
|
|
82
|
-
style={{ width: data.width, height: data.height, background: tint(data.color, 5), boxShadow: `inset 0 0 0 1px color-mix(in srgb, ${data.color} 40%, transparent)` }}
|
|
83
|
-
>
|
|
84
|
-
<div className="flex items-baseline gap-2 px-4 pt-3">
|
|
85
|
-
<span className="text-sm font-semibold" style={{ color: data.color }}>{data.label}</span>
|
|
86
|
-
<span className="text-xs text-[var(--color-dim)]">{data.count}</span>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const nodeTypes = { standardNode: StandardNode, agentNode: AgentNode, categoryNode: CategoryNode };
|
|
93
|
-
|
|
94
|
-
const CELL_W = NODE_W + 14;
|
|
95
|
-
const CELL_H = NODE_H + 12;
|
|
96
|
-
const PAD = 16;
|
|
97
|
-
const HEADER = 40;
|
|
98
|
-
const BLOCK_GAP = 36;
|
|
99
|
-
const MAX_ROW_W = 1700;
|
|
100
|
-
|
|
101
|
-
function colsFor(n) {
|
|
102
|
-
if (n > 12) return 3;
|
|
103
|
-
if (n > 5) return 2;
|
|
104
|
-
return 1;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function buildGraph({ standards, agents, colors, isMatch, hasFilter, persona, selectedId }) {
|
|
108
|
-
const nodes = [];
|
|
109
|
-
const edges = [];
|
|
110
|
-
|
|
111
|
-
const byCat = new Map();
|
|
112
|
-
for (const s of standards) {
|
|
113
|
-
const c = s.category || 'outros';
|
|
114
|
-
if (!byCat.has(c)) byCat.set(c, []);
|
|
115
|
-
byCat.get(c).push(s);
|
|
116
|
-
}
|
|
117
|
-
const cats = [...byCat.entries()]
|
|
118
|
-
.map(([cat, list]) => [cat, [...list].sort((a, b) => (a.subcategory || '').localeCompare(b.subcategory || '') || a.name.localeCompare(b.name))])
|
|
119
|
-
.sort((a, b) => b[1].length - a[1].length || a[0].localeCompare(b[0]));
|
|
120
|
-
|
|
121
|
-
const blocks = cats.map(([cat, list]) => {
|
|
122
|
-
const cols = colsFor(list.length);
|
|
123
|
-
const rows = Math.ceil(list.length / cols);
|
|
124
|
-
return { cat, list, cols, w: cols * CELL_W + PAD * 2 - 14, h: HEADER + rows * CELL_H + PAD - 12 };
|
|
125
|
-
});
|
|
126
|
-
const rows = [];
|
|
127
|
-
for (const b of blocks) {
|
|
128
|
-
const row = rows[rows.length - 1];
|
|
129
|
-
if (row && row.w + BLOCK_GAP + b.w <= MAX_ROW_W) { row.items.push(b); row.w += BLOCK_GAP + b.w; row.h = Math.max(row.h, b.h); }
|
|
130
|
-
else rows.push({ items: [b], w: b.w, h: b.h });
|
|
131
|
-
}
|
|
132
|
-
const totalW = Math.max(...rows.map((r) => r.w), 0);
|
|
133
|
-
|
|
134
|
-
const std = new Set();
|
|
135
|
-
let y = 180;
|
|
136
|
-
for (const row of rows) {
|
|
137
|
-
let x = (totalW - row.w) / 2;
|
|
138
|
-
for (const b of row.items) {
|
|
139
|
-
const color = colors[b.cat];
|
|
140
|
-
nodes.push({
|
|
141
|
-
id: `cat:${b.cat}`, type: 'categoryNode', position: { x, y },
|
|
142
|
-
data: { label: b.cat, count: b.list.length, color, width: b.w, height: b.h },
|
|
143
|
-
selectable: false, draggable: false, focusable: false, zIndex: -1,
|
|
144
|
-
});
|
|
145
|
-
b.list.forEach((s, i) => {
|
|
146
|
-
const col = i % b.cols;
|
|
147
|
-
const r = Math.floor(i / b.cols);
|
|
148
|
-
nodes.push({
|
|
149
|
-
id: `std:${s.id}`, type: 'standardNode',
|
|
150
|
-
position: { x: x + PAD + col * CELL_W, y: y + HEADER + r * CELL_H },
|
|
151
|
-
data: {
|
|
152
|
-
label: s.name, sub: s.subcategory || s.path, color, stdId: s.id,
|
|
153
|
-
dimmed: hasFilter && !isMatch(s), selected: s.id === selectedId,
|
|
154
|
-
},
|
|
155
|
-
});
|
|
156
|
-
std.add(s.id);
|
|
157
|
-
});
|
|
158
|
-
x += b.w + BLOCK_GAP;
|
|
159
|
-
}
|
|
160
|
-
y += row.h + BLOCK_GAP;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const withStandards = agents.filter((a) => (a.standards || []).some((id) => std.has(id)));
|
|
164
|
-
const agentX0 = (totalW - withStandards.length * (NODE_W + 24)) / 2;
|
|
165
|
-
const byId = new Map(standards.map((s) => [s.id, s]));
|
|
166
|
-
withStandards.forEach((a, i) => {
|
|
167
|
-
const ids = (a.standards || []).filter((id) => std.has(id));
|
|
168
|
-
const active = persona === a.id;
|
|
169
|
-
nodes.push({
|
|
170
|
-
id: `agent:${a.id}`, type: 'agentNode', position: { x: agentX0 + i * (NODE_W + 24), y: 0 },
|
|
171
|
-
data: { agentId: a.id, title: a.title, count: ids.length, active, dimmed: Boolean(persona) && !active },
|
|
172
|
-
});
|
|
173
|
-
for (const id of ids) {
|
|
174
|
-
const s = byId.get(id);
|
|
175
|
-
const lit = persona ? active : !hasFilter || isMatch(s);
|
|
176
|
-
edges.push({
|
|
177
|
-
id: `e:${a.id}->${id}`, source: `agent:${a.id}`, target: `std:${id}`, type: 'default',
|
|
178
|
-
style: { stroke: colors[s.category || 'outros'], strokeWidth: lit && persona ? 1.5 : 1, opacity: lit ? (persona ? 0.85 : 0.22) : 0.04 },
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
return { nodes, edges, categories: cats.map(([c, l]) => [c, l.length]) };
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function Section({ title, children }) {
|
|
187
|
-
return (
|
|
188
|
-
<section className="space-y-2">
|
|
189
|
-
<h3 className="text-xs font-medium text-[var(--color-faint)]">{title}</h3>
|
|
190
|
-
{children}
|
|
191
|
-
</section>
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function jumpTo(anchor) {
|
|
196
|
-
if (typeof document === 'undefined') return;
|
|
197
|
-
const id = decodeURIComponent(String(anchor).replace(/^#/, ''));
|
|
198
|
-
document.getElementById(id)?.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export function StandardDetail({ std, color = 'var(--color-dim)' }) {
|
|
202
|
-
const aliases = std.aliases || [];
|
|
203
|
-
const anchors = Object.entries(std.anchors || {});
|
|
204
|
-
const refs = std.referencedBy || [];
|
|
205
|
-
const provedBy = std.provedBy || [];
|
|
206
|
-
const stacks = std.stacks || [];
|
|
207
|
-
const verified = typeof std.verifiedAgainst === 'string' ? std.verifiedAgainst.trim() : '';
|
|
208
|
-
|
|
209
|
-
return (
|
|
210
|
-
<div className="space-y-6 text-sm text-[var(--color-dim)]">
|
|
211
|
-
<div className="flex flex-wrap items-center gap-1.5">
|
|
212
|
-
<span className="rounded-full px-2.5 py-0.5 text-xs font-medium" style={{ color, background: tint(color, 18), boxShadow: `inset 0 0 0 1px ${color}` }}>
|
|
213
|
-
{std.category}
|
|
214
|
-
</span>
|
|
215
|
-
{std.subcategory && (
|
|
216
|
-
<span className="rounded-full px-2.5 py-0.5 text-xs shadow-[inset_0_0_0_1px_var(--color-hair-strong)]">{std.subcategory}</span>
|
|
217
|
-
)}
|
|
218
|
-
{stacks.map((s) => (
|
|
219
|
-
<span key={s} className="rounded-full px-2 py-0.5 font-mono text-xs shadow-[inset_0_0_0_1px_var(--color-hair)]">stack {s}</span>
|
|
220
|
-
))}
|
|
221
|
-
</div>
|
|
222
|
-
|
|
223
|
-
<div className="font-mono text-xs text-[var(--color-faint)]">
|
|
224
|
-
<div>id <span className="text-[var(--color-dim)]">{std.id}</span></div>
|
|
225
|
-
{std.path && <div>arquivo <span className="text-[var(--color-dim)]">standards/{std.path}</span></div>}
|
|
226
|
-
</div>
|
|
227
|
-
|
|
228
|
-
{std.digest && (
|
|
229
|
-
<Section title="Resumo">
|
|
230
|
-
<p className="leading-relaxed text-[var(--color-fg)]">{std.digest}</p>
|
|
231
|
-
</Section>
|
|
232
|
-
)}
|
|
233
|
-
|
|
234
|
-
{aliases.length > 0 && (
|
|
235
|
-
<Section title="Também encontrado por">
|
|
236
|
-
<div className="flex flex-wrap gap-1.5">
|
|
237
|
-
{aliases.map((a, i) => (
|
|
238
|
-
<span key={`${a}-${i}`} className="rounded-full px-2 py-0.5 text-xs shadow-[inset_0_0_0_1px_var(--color-hair)]">{a}</span>
|
|
239
|
-
))}
|
|
240
|
-
</div>
|
|
241
|
-
</Section>
|
|
242
|
-
)}
|
|
243
|
-
|
|
244
|
-
{anchors.length > 0 && (
|
|
245
|
-
<Section title="Seções">
|
|
246
|
-
<ul className="grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1">
|
|
247
|
-
{anchors.map(([name, href]) => (
|
|
248
|
-
<li key={name} className="contents">
|
|
249
|
-
<span className="font-mono text-xs leading-6 text-[var(--color-faint)]">{name}</span>
|
|
250
|
-
<button
|
|
251
|
-
type="button" onClick={() => jumpTo(href)}
|
|
252
|
-
className="truncate text-left font-mono text-xs leading-6 text-[var(--color-phase-proposal)] hover:underline"
|
|
253
|
-
>
|
|
254
|
-
{href}
|
|
255
|
-
</button>
|
|
256
|
-
</li>
|
|
257
|
-
))}
|
|
258
|
-
</ul>
|
|
259
|
-
</Section>
|
|
260
|
-
)}
|
|
261
|
-
|
|
262
|
-
<Section title={refs.length ? `Consultado por (${refs.length})` : 'Consultado por'}>
|
|
263
|
-
{refs.length ? (
|
|
264
|
-
<div className="flex flex-wrap gap-1.5">
|
|
265
|
-
{refs.map((r, i) => <EntityLink key={`${r.agentId}-${i}`} kind="persona" id={r.agentId} chip>{`morph-${r.agentId}`}</EntityLink>)}
|
|
266
|
-
</div>
|
|
267
|
-
) : (
|
|
268
|
-
<p>Nenhuma persona lista este standard; ele é achado por busca (<code className="font-mono text-xs">morph-spec standards --find</code>).</p>
|
|
269
|
-
)}
|
|
270
|
-
</Section>
|
|
271
|
-
|
|
272
|
-
{provedBy.length > 0 && (
|
|
273
|
-
<Section title="Provado por">
|
|
274
|
-
<ul className="space-y-1">
|
|
275
|
-
{provedBy.map((p, i) => (
|
|
276
|
-
<li key={`${p}-${i}`} className="break-all font-mono text-xs text-[var(--color-fg)]">{p}</li>
|
|
277
|
-
))}
|
|
278
|
-
</ul>
|
|
279
|
-
</Section>
|
|
280
|
-
)}
|
|
281
|
-
|
|
282
|
-
{verified && (
|
|
283
|
-
<Section title="Verificado contra">
|
|
284
|
-
<Markdown text={verified} size="sm" />
|
|
285
|
-
</Section>
|
|
286
|
-
)}
|
|
287
|
-
|
|
288
|
-
{std.content && (
|
|
289
|
-
<Section title="Conteúdo completo">
|
|
290
|
-
<Markdown text={std.content} size="sm" />
|
|
291
|
-
</Section>
|
|
292
|
-
)}
|
|
293
|
-
</div>
|
|
294
|
-
);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export default function Standards() {
|
|
298
|
-
const standards = morphData.standards?.list || [];
|
|
299
|
-
const version = morphData.standards?.version;
|
|
300
|
-
const agents = morphData.agents?.list || [];
|
|
301
|
-
const [sel, setSel] = useSelection();
|
|
302
|
-
const [search, setSearch] = useState('');
|
|
303
|
-
const [categoryFilter, setCategoryFilter] = useState('');
|
|
304
|
-
const [persona, setPersona] = useState('');
|
|
305
|
-
|
|
306
|
-
const colors = useMemo(() => categoryColors(standards), [standards]);
|
|
307
|
-
const selected = useMemo(() => findStandard(standards, sel), [standards, sel]);
|
|
308
|
-
|
|
309
|
-
const isMatch = useCallback((s) => {
|
|
310
|
-
const q = search.trim().toLowerCase();
|
|
311
|
-
if (q) {
|
|
312
|
-
const hay = [s.id, s.name, s.path, s.digest, s.category, s.subcategory, ...(s.aliases || []), ...(s.tags || [])]
|
|
313
|
-
.filter(Boolean).join(' ').toLowerCase();
|
|
314
|
-
if (!hay.includes(q)) return false;
|
|
315
|
-
}
|
|
316
|
-
if (categoryFilter && s.category !== categoryFilter) return false;
|
|
317
|
-
if (persona && !(s.referencedBy || []).some((r) => r.agentId === persona)) return false;
|
|
318
|
-
return true;
|
|
319
|
-
}, [search, categoryFilter, persona]);
|
|
320
|
-
|
|
321
|
-
const hasFilter = Boolean(search.trim() || categoryFilter || persona);
|
|
322
|
-
const matchCount = useMemo(() => standards.filter(isMatch).length, [standards, isMatch]);
|
|
323
|
-
const orphanCount = standards.filter((s) => !(s.referencedBy || []).length).length;
|
|
324
|
-
|
|
325
|
-
const graph = useMemo(
|
|
326
|
-
() => buildGraph({ standards, agents, colors, isMatch, hasFilter, persona, selectedId: selected?.id }),
|
|
327
|
-
[standards, agents, colors, isMatch, hasFilter, persona, selected?.id],
|
|
328
|
-
);
|
|
329
|
-
|
|
330
|
-
const personaOptions = useMemo(
|
|
331
|
-
() => agents.filter((a) => (a.standards || []).length).map((a) => a.id),
|
|
332
|
-
[agents],
|
|
333
|
-
);
|
|
334
|
-
|
|
335
|
-
const close = useCallback(() => setSel(null), [setSel]);
|
|
336
|
-
const onNodeClick = useCallback((_e, node) => {
|
|
337
|
-
if (node.type === 'standardNode') setSel(node.data.stdId);
|
|
338
|
-
else if (node.type === 'agentNode') setPersona((p) => (p === node.data.agentId ? '' : node.data.agentId));
|
|
339
|
-
}, [setSel]);
|
|
340
|
-
|
|
341
|
-
const filters = [
|
|
342
|
-
{ name: 'category', label: 'Categoria', options: graph.categories.map(([c]) => c), value: categoryFilter },
|
|
343
|
-
{ name: 'persona', label: 'Persona', options: personaOptions, value: persona },
|
|
344
|
-
];
|
|
345
|
-
|
|
346
|
-
return (
|
|
347
|
-
<div className="flex h-full flex-col">
|
|
348
|
-
<SearchFilter
|
|
349
|
-
placeholder="Buscar standard por nome, id, caminho, resumo ou apelido"
|
|
350
|
-
filters={filters}
|
|
351
|
-
onSearchChange={setSearch}
|
|
352
|
-
onFilterChange={(name, value) => {
|
|
353
|
-
if (name === 'category') setCategoryFilter(value);
|
|
354
|
-
if (name === 'persona') setPersona(value);
|
|
355
|
-
}}
|
|
356
|
-
/>
|
|
357
|
-
|
|
358
|
-
<div className="relative flex-1">
|
|
359
|
-
<FlowGraph nodes={graph.nodes} edges={graph.edges} nodeTypes={nodeTypes} onNodeClick={onNodeClick} fitView />
|
|
360
|
-
|
|
361
|
-
<div className="absolute left-3 top-3 z-10 space-y-1.5 rounded-xl bg-[var(--color-ink)]/85 p-3 text-xs text-[var(--color-dim)] shadow-[inset_0_0_0_1px_var(--color-hair)] backdrop-blur">
|
|
362
|
-
<p className="mb-1 text-[13px] font-medium text-[var(--color-fg)]">Categorias</p>
|
|
363
|
-
{graph.categories.map(([cat, n]) => (
|
|
364
|
-
<button
|
|
365
|
-
key={cat} type="button"
|
|
366
|
-
onClick={() => setCategoryFilter((c) => (c === cat ? '' : cat))}
|
|
367
|
-
className="flex w-full items-center gap-2 text-left hover:text-[var(--color-fg)]"
|
|
368
|
-
style={{ opacity: categoryFilter && categoryFilter !== cat ? 0.45 : 1 }}
|
|
369
|
-
>
|
|
370
|
-
<span className="inline-block h-3 w-3 shrink-0 rounded" style={{ background: tint(colors[cat], 30), boxShadow: `inset 0 0 0 1px ${colors[cat]}` }} />
|
|
371
|
-
<span>{cat}</span>
|
|
372
|
-
<span className="ml-auto pl-3 text-[var(--color-faint)]">{n}</span>
|
|
373
|
-
</button>
|
|
374
|
-
))}
|
|
375
|
-
<p className="border-t border-[var(--color-hair)] pt-2 text-[var(--color-faint)]">clique numa persona para ver os standards dela</p>
|
|
376
|
-
</div>
|
|
377
|
-
|
|
378
|
-
<div className="absolute right-3 top-3 z-10 space-y-0.5 rounded-xl bg-[var(--color-ink)]/85 px-3 py-2 text-xs text-[var(--color-dim)] shadow-[inset_0_0_0_1px_var(--color-hair)] backdrop-blur">
|
|
379
|
-
<div className="text-[13px] text-[var(--color-fg)]">
|
|
380
|
-
{hasFilter ? `${matchCount} de ${standards.length} standards` : `${standards.length} standards`}
|
|
381
|
-
</div>
|
|
382
|
-
<div>{graph.categories.length} categorias{version ? ` · registro v${version}` : ''}</div>
|
|
383
|
-
<div>{orphanCount} sem persona (achados por busca)</div>
|
|
384
|
-
</div>
|
|
385
|
-
</div>
|
|
386
|
-
|
|
387
|
-
<DetailPanel open={Boolean(selected)} title={selected?.name || ''} subtitle={selected?.id || ''} onClose={close}>
|
|
388
|
-
{selected && <StandardDetail std={selected} color={colors[selected.category || 'outros']} />}
|
|
389
|
-
</DetailPanel>
|
|
390
|
-
</div>
|
|
391
|
-
);
|
|
392
|
-
}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
@import "@xyflow/react/dist/style.css";
|
|
3
|
-
@import "@fontsource-variable/geist";
|
|
4
|
-
@import "@fontsource-variable/geist-mono";
|
|
5
|
-
@import "@fontsource-variable/source-serif-4";
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
* One token system for the whole app. The phase scale is the only palette of
|
|
9
|
-
* meaning: the rail, graphs, chips and the document tree all read it, so a
|
|
10
|
-
* colour always says the same thing. `static`: the phase colours are read as
|
|
11
|
-
* `var(--color-phase-${id})`, a name Tailwind cannot see in the source.
|
|
12
|
-
*/
|
|
13
|
-
@theme static {
|
|
14
|
-
--font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
|
|
15
|
-
--font-mono: "Geist Mono Variable", ui-monospace, monospace;
|
|
16
|
-
--font-serif: "Source Serif 4 Variable", ui-serif, Georgia, serif;
|
|
17
|
-
|
|
18
|
-
--color-ink: #050505;
|
|
19
|
-
--color-shell: #0c0e12;
|
|
20
|
-
--color-core: #12151b;
|
|
21
|
-
--color-raised: #181c24;
|
|
22
|
-
--color-hair: rgb(255 255 255 / 0.08);
|
|
23
|
-
--color-hair-strong: rgb(255 255 255 / 0.14);
|
|
24
|
-
--color-fg: #e8ecf1;
|
|
25
|
-
--color-dim: #8d97a5;
|
|
26
|
-
--color-faint: #5c6573;
|
|
27
|
-
|
|
28
|
-
--color-phase-proposal: #7aa2f7;
|
|
29
|
-
--color-phase-uiux: #bb9af7;
|
|
30
|
-
--color-phase-plan: #e0af68;
|
|
31
|
-
--color-phase-implement: #73daca;
|
|
32
|
-
--color-phase-review: #f7768e;
|
|
33
|
-
|
|
34
|
-
--color-ok: #9ece6a;
|
|
35
|
-
--color-warn: #ff9e64;
|
|
36
|
-
--color-bad: #f7768e;
|
|
37
|
-
|
|
38
|
-
--ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);
|
|
39
|
-
|
|
40
|
-
/* The graph pages were written against Tailwind's gray scale; re-tinting the
|
|
41
|
-
scale to these neutrals puts them in the same room as the rest. */
|
|
42
|
-
--color-gray-50: #f3f5f8;
|
|
43
|
-
--color-gray-100: #e8ecf1;
|
|
44
|
-
--color-gray-200: #d6dce4;
|
|
45
|
-
--color-gray-300: #b8c0cc;
|
|
46
|
-
--color-gray-400: #8d97a5;
|
|
47
|
-
--color-gray-500: #6b7482;
|
|
48
|
-
--color-gray-600: #4a5260;
|
|
49
|
-
--color-gray-700: #2a303b;
|
|
50
|
-
--color-gray-800: #1b1f27;
|
|
51
|
-
--color-gray-900: #12151b;
|
|
52
|
-
--color-gray-950: #07080a;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
html { color-scheme: dark; }
|
|
56
|
-
html, body, #root { height: 100%; }
|
|
57
|
-
|
|
58
|
-
body {
|
|
59
|
-
background: var(--color-ink);
|
|
60
|
-
color: var(--color-fg);
|
|
61
|
-
font-family: var(--font-sans);
|
|
62
|
-
font-feature-settings: "ss01", "cv11";
|
|
63
|
-
-webkit-font-smoothing: antialiased;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* The ambient glow: fixed and inert, never on a scrolling layer. */
|
|
67
|
-
.ambient {
|
|
68
|
-
position: fixed;
|
|
69
|
-
inset: 0;
|
|
70
|
-
pointer-events: none;
|
|
71
|
-
z-index: 0;
|
|
72
|
-
background:
|
|
73
|
-
radial-gradient(40rem 28rem at 12% -8%, rgb(187 154 247 / 0.10), transparent 70%),
|
|
74
|
-
radial-gradient(36rem 26rem at 96% 108%, rgb(115 218 202 / 0.08), transparent 70%);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* Double bezel: an outer tray holding an inner plate with a lit top edge. */
|
|
78
|
-
.bezel {
|
|
79
|
-
border-radius: 1.25rem;
|
|
80
|
-
padding: 0.3rem;
|
|
81
|
-
background: rgb(255 255 255 / 0.025);
|
|
82
|
-
box-shadow: inset 0 0 0 1px var(--color-hair);
|
|
83
|
-
}
|
|
84
|
-
.bezel > .bezel-core {
|
|
85
|
-
border-radius: calc(1.25rem - 0.3rem);
|
|
86
|
-
background: var(--color-core);
|
|
87
|
-
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 0 0 1px rgb(255 255 255 / 0.03);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.fluid { transition-timing-function: var(--ease-fluid); transition-duration: 420ms; }
|
|
91
|
-
|
|
92
|
-
/* A single orchestrated entrance per page. */
|
|
93
|
-
@keyframes rise {
|
|
94
|
-
from { opacity: 0; transform: translateY(10px); }
|
|
95
|
-
to { opacity: 1; transform: none; }
|
|
96
|
-
}
|
|
97
|
-
.rise { animation: rise 640ms var(--ease-fluid) both; }
|
|
98
|
-
.rise-2 { animation: rise 640ms var(--ease-fluid) 80ms both; }
|
|
99
|
-
.rise-3 { animation: rise 640ms var(--ease-fluid) 160ms both; }
|
|
100
|
-
|
|
101
|
-
@media (prefers-reduced-motion: reduce) {
|
|
102
|
-
.rise, .rise-2, .rise-3 { animation: none; }
|
|
103
|
-
.fluid { transition-duration: 0ms; }
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
:focus-visible { outline: 2px solid var(--color-phase-proposal); outline-offset: 2px; border-radius: 6px; }
|
|
107
|
-
|
|
108
|
-
/* Long-form reading: serif, measured, generous leading. */
|
|
109
|
-
.prose-morph {
|
|
110
|
-
font-family: var(--font-serif);
|
|
111
|
-
font-size: 1.02rem;
|
|
112
|
-
line-height: 1.65;
|
|
113
|
-
color: #d9dee6;
|
|
114
|
-
max-width: 75ch;
|
|
115
|
-
}
|
|
116
|
-
.prose-morph h1, .prose-morph h2, .prose-morph h3, .prose-morph h4 {
|
|
117
|
-
font-family: var(--font-sans);
|
|
118
|
-
color: var(--color-fg);
|
|
119
|
-
letter-spacing: -0.01em;
|
|
120
|
-
line-height: 1.25;
|
|
121
|
-
scroll-margin-top: 1.5rem;
|
|
122
|
-
}
|
|
123
|
-
.prose-morph h1 { font-size: 1.75rem; font-weight: 600; margin: 0 0 1.25rem; }
|
|
124
|
-
.prose-morph h2 { font-size: 1.3rem; font-weight: 600; margin: 2.25rem 0 0.75rem; }
|
|
125
|
-
.prose-morph h3 { font-size: 1.08rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
|
|
126
|
-
.prose-morph h4 { font-size: 0.98rem; font-weight: 600; margin: 1.25rem 0 0.4rem; }
|
|
127
|
-
.prose-morph p, .prose-morph ul, .prose-morph ol, .prose-morph blockquote, .prose-morph table, .prose-morph pre { margin: 0 0 1rem; }
|
|
128
|
-
.prose-morph ul { list-style: disc; padding-left: 1.4rem; }
|
|
129
|
-
.prose-morph ol { list-style: decimal; padding-left: 1.4rem; }
|
|
130
|
-
.prose-morph li { margin: 0.25rem 0; }
|
|
131
|
-
.prose-morph li::marker { color: var(--color-faint); }
|
|
132
|
-
.prose-morph a { color: var(--color-phase-proposal); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(122 162 247 / 0.4); }
|
|
133
|
-
.prose-morph strong { color: var(--color-fg); font-weight: 600; }
|
|
134
|
-
.prose-morph blockquote { border-left: 2px solid var(--color-hair-strong); padding-left: 1rem; color: var(--color-dim); }
|
|
135
|
-
.prose-morph hr { border: 0; border-top: 1px solid var(--color-hair); margin: 2rem 0; }
|
|
136
|
-
.prose-morph code {
|
|
137
|
-
font-family: var(--font-mono);
|
|
138
|
-
font-size: 0.84em;
|
|
139
|
-
background: rgb(255 255 255 / 0.06);
|
|
140
|
-
border-radius: 5px;
|
|
141
|
-
padding: 0.1em 0.35em;
|
|
142
|
-
}
|
|
143
|
-
.prose-morph pre {
|
|
144
|
-
font-family: var(--font-mono);
|
|
145
|
-
font-size: 0.8rem;
|
|
146
|
-
line-height: 1.55;
|
|
147
|
-
background: var(--color-ink);
|
|
148
|
-
border-radius: 0.75rem;
|
|
149
|
-
box-shadow: inset 0 0 0 1px var(--color-hair);
|
|
150
|
-
padding: 0.9rem 1rem;
|
|
151
|
-
overflow-x: auto;
|
|
152
|
-
max-width: 100%;
|
|
153
|
-
}
|
|
154
|
-
.prose-morph pre code { background: none; padding: 0; font-size: inherit; }
|
|
155
|
-
.prose-morph table { display: block; overflow-x: auto; border-collapse: collapse; font-family: var(--font-sans); font-size: 0.86rem; }
|
|
156
|
-
.prose-morph th, .prose-morph td { border-bottom: 1px solid var(--color-hair); padding: 0.4rem 0.75rem; text-align: left; vertical-align: top; }
|
|
157
|
-
.prose-morph th { color: var(--color-dim); font-weight: 500; }
|
|
158
|
-
|
|
159
|
-
.prose-morph-sm { font-size: 0.95rem; line-height: 1.6; }
|
|
160
|
-
.prose-morph-sm h1 { font-size: 1.35rem; }
|
|
161
|
-
.prose-morph-sm h2 { font-size: 1.12rem; margin-top: 1.75rem; }
|
|
162
|
-
.prose-morph-sm h3 { font-size: 1rem; }
|
|
163
|
-
|
|
164
|
-
/* React Flow, re-skinned to the tokens. */
|
|
165
|
-
.react-flow { background: transparent; }
|
|
166
|
-
.react-flow__minimap { background: var(--color-shell); border-radius: 0.75rem; }
|
|
167
|
-
.react-flow__minimap-mask { fill: rgb(255 255 255 / 0.04); }
|
|
168
|
-
.react-flow__controls { background: var(--color-shell); border-radius: 0.75rem; overflow: hidden; box-shadow: inset 0 0 0 1px var(--color-hair); }
|
|
169
|
-
.react-flow__controls-button { background: transparent; border-bottom: 1px solid var(--color-hair); color: var(--color-dim); }
|
|
170
|
-
.react-flow__controls-button:hover { background: var(--color-raised); color: var(--color-fg); }
|
|
171
|
-
.react-flow__edge-path { stroke: #3a4250; }
|
|
172
|
-
.react-flow__node { border-radius: 0.6rem; }
|
|
173
|
-
.react-flow__attribution { background: transparent; opacity: 0.45; }
|
|
174
|
-
.react-flow__attribution a { color: var(--color-faint); }
|
|
175
|
-
|
|
176
|
-
/* The one ambient motion: a slow sheen on the current phase of an active feature. */
|
|
177
|
-
@keyframes sheen {
|
|
178
|
-
from { transform: translateX(-100%); }
|
|
179
|
-
to { transform: translateX(100%); }
|
|
180
|
-
}
|
|
181
|
-
.rail-sheen {
|
|
182
|
-
background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.45), transparent);
|
|
183
|
-
animation: sheen 2.4s var(--ease-fluid) infinite;
|
|
184
|
-
}
|
|
185
|
-
@media (prefers-reduced-motion: reduce) {
|
|
186
|
-
.rail-sheen { animation: none; display: none; }
|
|
187
|
-
}
|
package/src/dashboard/index.html
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="pt-BR" class="dark">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>morph-spec</title>
|
|
7
|
-
<!-- Inline, so the browser's /favicon.ico request never 404s in the console. -->
|
|
8
|
-
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%23030712'/%3E%3Cpath d='M8 23V9l8 8 8-8v14' fill='none' stroke='%233b82f6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" />
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<div id="root"></div>
|
|
12
|
-
<script type="module" src="/app/main.jsx"></script>
|
|
13
|
-
</body>
|
|
14
|
-
</html>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "morph-spec-dashboard",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.1.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"preview": "vite preview"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@dagrejs/dagre": "^1.1.0",
|
|
13
|
-
"@fontsource-variable/geist": "^5.3.0",
|
|
14
|
-
"@fontsource-variable/geist-mono": "^5.3.0",
|
|
15
|
-
"@fontsource-variable/source-serif-4": "^5.3.0",
|
|
16
|
-
"@phosphor-icons/react": "^2.1.10",
|
|
17
|
-
"@xyflow/react": "^12.0.0",
|
|
18
|
-
"github-slugger": "^2.0.0",
|
|
19
|
-
"react": "^19.0.0",
|
|
20
|
-
"react-dom": "^19.0.0",
|
|
21
|
-
"react-markdown": "^10.1.0",
|
|
22
|
-
"react-router-dom": "^7.0.0",
|
|
23
|
-
"rehype-slug": "^6.0.0",
|
|
24
|
-
"remark-gfm": "^4.0.1"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@tailwindcss/vite": "^4.0.0",
|
|
28
|
-
"@vitejs/plugin-react": "^4.4.0",
|
|
29
|
-
"tailwindcss": "^4.0.0",
|
|
30
|
-
"vite": "^6.0.0"
|
|
31
|
-
}
|
|
32
|
-
}
|