oneie 3.6.13 → 3.6.14
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/agents/AUDIT-agent-ops-alignment.md +379 -0
- package/.claude/agents/NEWS-QUICKSTART.md +321 -0
- package/.claude/agents/NEWS-README.md +353 -0
- package/.claude/agents/agent-backend.md +1 -1
- package/.claude/agents/agent-builder.md +220 -151
- package/.claude/agents/agent-clean.md +39 -31
- package/.claude/agents/agent-clone.md +107 -54
- package/.claude/agents/agent-designer.md +76 -71
- package/.claude/agents/agent-director.md +164 -1
- package/.claude/agents/agent-documenter.md +169 -132
- package/.claude/agents/agent-frontend.md +442 -446
- package/.claude/agents/agent-integrator.md +30 -23
- package/.claude/agents/agent-lawyer.md +145 -98
- package/.claude/agents/agent-news.md +363 -0
- package/.claude/agents/agent-onboard.md +99 -69
- package/.claude/agents/agent-ontology.md +585 -0
- package/.claude/agents/agent-ops.md +178 -171
- package/.claude/agents/agent-problem-solver.md +132 -115
- package/.claude/agents/agent-quality.md +94 -77
- package/.claude/agents/agent-sales.md +89 -67
- package/.claude/commands/release.md +3 -1
- package/.claude/hooks/README-knowledge-hooks.md +266 -80
- package/.claude/hooks/README-root-cleanup.md +200 -0
- package/.claude/hooks/README.md +284 -0
- package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/.claude/hooks/check-filenames.py +169 -32
- package/.claude/hooks/clean-post.py +195 -28
- package/.claude/hooks/clean-pre.py +96 -11
- package/.claude/hooks/done.py +74 -13
- package/.claude/hooks/format-hook.sh +105 -17
- package/.claude/hooks/hook-logger.sh +121 -7
- package/.claude/hooks/knowledge-post.py +136 -32
- package/.claude/hooks/knowledge-pre.py +129 -34
- package/.claude/hooks/notification-hook.sh +184 -17
- package/.claude/hooks/root-cleanup.py +181 -39
- package/.claude/hooks/security-hook.sh +248 -8
- package/.claude/hooks/tag-all-docs.py +175 -49
- package/.claude/hooks/test-validate-ontology.sh +170 -0
- package/.claude/hooks/todo.py +92 -22
- package/.claude/hooks/validate-ontology-structure-summary.md +243 -0
- package/.claude/hooks/validate-ontology-structure.py +83 -20
- package/AGENTS.md +60 -245
- package/CLAUDE.md +70 -1
- package/README.md +25 -0
- package/one/.claude/settings.local.json +11 -0
- package/one/.obsidian/community-plugins.json +3 -1
- package/one/.obsidian/plugins/editing-toolbar/data.json +328 -0
- package/one/.obsidian/plugins/editing-toolbar/main.js +12 -0
- package/one/.obsidian/plugins/editing-toolbar/manifest.json +10 -0
- package/one/.obsidian/plugins/editing-toolbar/styles.css +1338 -0
- package/one/.obsidian/plugins/terminal/data.json +154 -0
- package/one/.obsidian/plugins/terminal/main.js +197 -0
- package/one/.obsidian/plugins/terminal/manifest.json +14 -0
- package/one/.obsidian/plugins/terminal/styles.css +32 -0
- package/one/.obsidian/workspace.json +71 -45
- package/one/README.md +18 -0
- package/one/connections/a2a.md +49 -0
- package/one/connections/acp.md +47 -0
- package/one/connections/acps.md +18 -0
- package/one/connections/agentkit.md +18 -0
- package/one/connections/agui.md +18 -0
- package/one/connections/any-backend.md +39 -21
- package/one/connections/ap2.md +74 -0
- package/one/connections/api/queries-reference.md +18 -0
- package/one/connections/api-docs.md +18 -0
- package/one/connections/api-reference.md +18 -0
- package/one/connections/api.md +18 -0
- package/one/connections/architecture-diagram.md +18 -0
- package/one/connections/communications.md +18 -0
- package/one/connections/connections.md +18 -0
- package/one/connections/copilotkit.md +18 -0
- package/one/connections/cryptonetworks.md +18 -0
- package/one/connections/documentation.md +18 -0
- package/one/connections/effect.md +18 -0
- package/one/connections/elizaos.md +18 -0
- package/one/connections/groups.md +814 -0
- package/one/connections/inference.md +18 -0
- package/one/connections/integration-examples.md +18 -0
- package/one/connections/integration-guide.md +18 -0
- package/one/connections/integration-phase2.md +32 -14
- package/one/connections/kyc.md +18 -0
- package/one/connections/mcp.md +18 -0
- package/one/connections/membership.md +18 -0
- package/one/connections/middleware.md +18 -0
- package/one/connections/multitenant.md +18 -0
- package/one/connections/n8n.md +18 -0
- package/one/connections/patterns.md +18 -0
- package/one/connections/protocols.md +20 -2
- package/one/connections/relationships.md +18 -0
- package/one/connections/schema.md +18 -0
- package/one/connections/service-layer.md +18 -0
- package/one/connections/vectors.md +18 -0
- package/one/connections/wordpress.md +18 -0
- package/one/connections/workflow-copy.md +18 -0
- package/one/connections/workflow-examples.md +18 -0
- package/one/connections/workflow-onboarding.md +18 -0
- package/one/connections/workflow.md +18 -0
- package/one/connections/workflows/delegation.md +18 -0
- package/one/connections/workflows/frontend.md +18 -0
- package/one/connections/workflows/strategy.md +18 -0
- package/one/connections/workflows/tasks.md +18 -0
- package/one/connections/x402-baazar.md +131 -0
- package/one/connections/x402.md +268 -164
- package/one/events/2024-10-14-deployment-plan.md +15 -16
- package/one/events/2024-10-14-deployment-success.md +15 -16
- package/one/events/2024-10-14-final-sync-complete.md +15 -16
- package/one/events/2024-10-14-release-v2.0.6.md +15 -16
- package/one/events/2024-10-15-agent-clean-v2-summary.md +15 -16
- package/one/events/2024-10-15-handoff-to-clean.md +15 -16
- package/one/events/2024-10-15-package-manager-tests.md +15 -16
- package/one/events/2024-10-15-release-command-complete.md +15 -16
- package/one/events/2025-10-15-private-files-secured.md +18 -0
- package/one/events/2025-10-15-unignore-public-group-docs.md +18 -0
- package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +335 -0
- package/one/events/ALIGNMENT_SUMMARY.md +280 -0
- package/one/events/API_ROUTES_FIXES_SUMMARY.md +18 -0
- package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +18 -0
- package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +598 -0
- package/one/events/BEFORE_AFTER_COMPARISON.md +18 -0
- package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +18 -0
- package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +18 -0
- package/one/events/CLAUDE copy.md +897 -0
- package/one/events/CLEANUP-RELEASE-V2.0.8.md +18 -0
- package/one/events/CONNECTIONS_DEMO.md +18 -0
- package/one/events/CREATE-WEBSITE.md +18 -0
- package/one/events/CRITICAL-FIXES-COMPLETE.md +18 -0
- package/one/events/CUSTOM-DOMAIN.md +18 -0
- package/one/events/DELIVERABLES.md +18 -0
- package/one/events/DEMO-GROUPS-PAGE.md +18 -0
- package/one/events/DEMO-TESTING-SUMMARY.md +18 -0
- package/one/events/DEMO_COMPONENTS.md +18 -0
- package/one/events/DEMO_HOOKS_INDEX.md +18 -0
- package/one/events/DEMO_INFRASTRUCTURE.md +18 -0
- package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +18 -0
- package/one/events/DEMO_INTEGRATION_CHECKLIST.md +18 -0
- package/one/events/DEMO_QUICK_REFERENCE.md +18 -0
- package/one/events/DEMO_SETUP.md +18 -0
- package/one/events/DEPLOYMENT copy.md +18 -0
- package/one/events/DEPLOYMENT.md +18 -0
- package/one/events/ECOMMERCE-BEFORE-AFTER.md +16 -0
- package/one/events/ECOMMERCE-DEMO-PLAN.md +18 -0
- package/one/events/ECOMMERCE-ENHANCEMENTS.md +18 -0
- package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +18 -0
- package/one/events/ECOMMERCE-LIVE-DEMO.md +18 -0
- package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +18 -0
- package/one/events/ECOMMERCE-SETUP-SUMMARY.md +18 -0
- package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +18 -0
- package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +18 -0
- package/one/events/EFFECT_TS_API_PATTERN.md +18 -0
- package/one/events/FEATURE-2-4-COMPLETE.md +18 -0
- package/one/events/FEATURE_2_3_COMPLETE.md +18 -0
- package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +18 -0
- package/one/events/GROUPS-MIGRATION.md +18 -0
- package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +18 -0
- package/one/events/HANDOFF.md +18 -0
- package/one/events/HOOKS-DEMO.md +18 -0
- package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +18 -0
- package/one/events/IMPLEMENTATION_SUMMARY.md +18 -0
- package/one/events/INSTALL-TESTS.md +18 -0
- package/one/events/INSTALLATION_FOLDERS.md +18 -0
- package/one/events/INSTALLATION_FOLDERS_FILES.md +18 -0
- package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +18 -0
- package/one/events/INTEGRATION-ARCHITECTURE.md +18 -0
- package/one/events/INTEGRATION-CHECKLIST.md +18 -0
- package/one/events/INTEGRATION-ORCHESTRATION.md +18 -0
- package/one/events/INTEGRATION-SUMMARY.md +18 -0
- package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +18 -0
- package/one/events/LANDING-PAGE-IMPLEMENTATION.md +18 -0
- package/one/events/LANDING-PAGE-QUICKSTART.md +18 -0
- package/one/events/LICENSE.md +18 -0
- package/one/events/MCP-CONFIGURATION.md +18 -0
- package/one/events/MCP-SETUP-COMPLETE.md +18 -0
- package/one/events/MIGRATION-REPORT.md +18 -0
- package/one/events/MIGRATION.md +18 -0
- package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +18 -0
- package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +18 -0
- package/one/events/NODE-UPGRADE.md +18 -0
- package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +18 -0
- package/one/events/ONTOLOGY-HOOKS-README.md +18 -0
- package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +18 -0
- package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +18 -0
- package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +18 -0
- package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +18 -0
- package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +18 -0
- package/one/events/PACKAGE-STRUCTURE.md +18 -0
- package/one/events/PLAYBOOK-SETUP-SUMMARY.md +18 -0
- package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +18 -0
- package/one/events/QA-CHECKLIST.md +18 -0
- package/one/events/QUICK-START-ONTOLOGY.md +18 -0
- package/one/events/README-archived.md +18 -0
- package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +18 -0
- package/one/events/SEARCH_DEMO_DELIVERY.md +18 -0
- package/one/events/SEARCH_DEMO_SUMMARY.md +18 -0
- package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +18 -0
- package/one/events/SECURITY-AUDIT-FIXES.md +18 -0
- package/one/events/SECURITY-SCAN-COMPLETE.md +18 -0
- package/one/events/SHOP-BUILD-STATUS.md +18 -0
- package/one/events/SHOP-PREMIUM-UPDATE.md +16 -0
- package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +18 -0
- package/one/events/SITE-WIDE-GRADIENT-FIX.md +18 -0
- package/one/events/STORE-PRODUCTION-READY-STATUS.md +18 -0
- package/one/events/STRIPE-INTEGRATION.md +18 -0
- package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +18 -0
- package/one/events/STRIPE-SETUP-GUIDE.md +18 -0
- package/one/events/TEST-PLAN-INDEX.md +18 -0
- package/one/events/TEST-PLAN.md +18 -0
- package/one/events/TEST-SUMMARY.md +18 -0
- package/one/events/TESTS-QUICK-REF.md +18 -0
- package/one/events/TRANSITIONS-QUICK-START.md +18 -0
- package/one/events/TRANSPARENCY-FIXES.md +18 -0
- package/one/events/TYPESCRIPT_FIXES.md +18 -0
- package/one/events/TYPESCRIPT_FIXES_INDEX.md +18 -0
- package/one/events/VIEW-TRANSITIONS.md +18 -0
- package/one/events/agent-director-enhancement-summary.md +18 -0
- package/one/events/agent-onboard-implementation-summary.md +18 -0
- package/one/events/agent-ontology-alignment-completion.md +263 -0
- package/one/events/backend-integration-tests.md +18 -0
- package/one/events/clean-agent-ontology-cleanup-report.md +18 -0
- package/one/events/clean-agent-todo-analysis-summary.md +336 -0
- package/one/events/cloudflare-automation-complete.md +18 -0
- package/one/events/cloudflare-pages-infrastructure-setup.md +18 -0
- package/one/events/contact-page-complete.md +18 -0
- package/one/events/convex-analysis-index.md +18 -0
- package/one/events/convex-structure-analysis.md +18 -0
- package/one/events/deployment-installation-folders.md +18 -0
- package/one/events/deployment-ops-summary.md +18 -0
- package/one/events/deployment-verification.md +18 -0
- package/one/events/design-spec-complete.md +18 -0
- package/one/events/documentation-audit-index.md +473 -0
- package/one/events/documentation-audit-summary.md +417 -0
- package/one/events/documentation-improvement-roadmap.md +906 -0
- package/one/events/documentation-standards-compliance-report.md +538 -0
- package/one/events/events.md +18 -0
- package/one/events/frontend-effects-complete.md +584 -0
- package/one/events/frontend-effects-orchestration.md +1356 -0
- package/one/events/frontend-effects-risk-register.md +1055 -0
- package/one/events/frontend-effects-week1-assignments.md +1594 -0
- package/one/events/hook-ontology-alignment-summary.md +528 -0
- package/one/events/installation-folders-workflow-integration.md +18 -0
- package/one/events/landing-page-generator.md +18 -0
- package/one/events/legal-assessment-2025-10-16.md +18 -0
- package/one/events/onboarding-implementation-complete.md +18 -0
- package/one/events/ontology-test-examples.md +18 -0
- package/one/events/phase1-backend-implementation-complete.md +18 -0
- package/one/events/release.md +18 -0
- package/one/events/root-cleanup-alignment-report.md +265 -0
- package/one/events/separate-implementation-status.md +18 -0
- package/one/events/session-summary-2025-10-18.md +18 -0
- package/one/events/skills-complete.md +18 -0
- package/one/events/skills-infer-6-10-summary.md +18 -0
- package/one/events/skills-phase1-complete.md +18 -0
- package/one/events/structural-analysis-architecture-vs-plans.md +559 -0
- package/one/events/test-dashboard.md +18 -0
- package/one/events/test-index.md +18 -0
- package/one/events/test-report-ontology.md +18 -0
- package/one/events/testing-summary.md +18 -0
- package/one/events/todo-refactoring-complete.md +408 -0
- package/one/events/wave1-backend-implementation-complete.md +698 -0
- package/one/groups/features.md +26 -0
- package/one/groups/groups.md +83 -39
- package/one/groups/one.md +47 -27
- package/one/groups/{strategy copy.md → strategy-copy.md} +23 -5
- package/one/knowledge/.obsidian/ecommerce-ontology.md +18 -0
- package/one/knowledge/100-inference-quick-reference.md +18 -0
- package/one/knowledge/agent-onboard-usage.md +18 -0
- package/one/knowledge/agentic-commerce.md +146 -0
- package/one/knowledge/ai-agents-vs-memecoins-thesis.md +683 -0
- package/one/knowledge/ai-platform.md +18 -0
- package/one/knowledge/ai-token-crypto-analysis-framework.md +1191 -0
- package/one/knowledge/ai-token-paradigm-shift-2025.md +732 -0
- package/one/knowledge/altcoin-cycle-prediction-ontology.md +884 -0
- package/one/knowledge/altcoin-cycle-trading-strategy.md +642 -0
- package/one/knowledge/architecture-any-backend.md +265 -42
- package/one/knowledge/architecture-diagram.md +404 -94
- package/one/knowledge/architecture-frontend.md +130 -51
- package/one/knowledge/architecture.md +1496 -1831
- package/one/knowledge/{ontology.md.backup → archived/ontology.old.md} +18 -0
- package/one/knowledge/astro-effect-complete-vision.md +2148 -0
- package/one/knowledge/astro-effect-simple-architecture.md +717 -0
- package/one/knowledge/audit-agent-onboard-alignment.md +481 -0
- package/one/knowledge/audit-agent-sales-alignment.md +444 -0
- package/one/knowledge/backend-api-reference.md +18 -0
- package/one/knowledge/cli-claude-handoff.md +18 -0
- package/one/knowledge/context-engineering.md +610 -0
- package/one/knowledge/crypto-analysis-strategy.md +1276 -0
- package/one/knowledge/crypto-cycle-2024-2025-analysis.md +44 -0
- package/one/knowledge/crypto.md +18 -0
- package/one/knowledge/docs.md +627 -0
- package/one/knowledge/dsl.md +18 -0
- package/one/knowledge/files.md +18 -0
- package/one/knowledge/frontend.md +18 -0
- package/one/knowledge/hono.md +18 -0
- package/one/knowledge/implementation-examples.md +18 -0
- package/one/knowledge/installation-folders.md +18 -0
- package/one/knowledge/institutional-cycle-paradigm-2025.md +555 -0
- package/one/knowledge/knowledge.md +18 -0
- package/one/knowledge/language.md +18 -0
- package/one/knowledge/lessons-learned.md +18 -0
- package/one/knowledge/lessons-website-building-focus.md +18 -0
- package/one/knowledge/merge-report.md +254 -0
- package/one/knowledge/nine-padel-playbook.md +18 -0
- package/one/knowledge/ontology-blog.yaml +42 -26
- package/one/knowledge/ontology-cheatsheet.md +18 -0
- package/one/knowledge/ontology-community.yaml +60 -37
- package/one/knowledge/ontology-core-universal.md +19 -1
- package/one/knowledge/ontology-core.yaml +58 -45
- package/one/knowledge/ontology-courses.yaml +71 -48
- package/one/knowledge/ontology-creator.md +30 -4
- package/one/knowledge/ontology-crypto.md +1603 -0
- package/one/knowledge/ontology-developer-guide.md +18 -0
- package/one/knowledge/ontology-documentation.md +46 -25
- package/one/knowledge/ontology-ecommerce.md +24 -6
- package/one/knowledge/ontology-education.md +18 -0
- package/one/knowledge/ontology-engineering-specification.md +22 -4
- package/one/knowledge/ontology-engineering.md +67 -43
- package/one/knowledge/ontology-files.yaml +525 -0
- package/one/knowledge/ontology-frontend-master.md +2898 -0
- package/one/knowledge/ontology-frontend-specifications.md +57 -49
- package/one/knowledge/ontology-frontend.md +40 -22
- package/one/knowledge/ontology-index.md +18 -0
- package/one/knowledge/ontology-minimal.yaml +18 -16
- package/one/knowledge/ontology-portfolio.yaml +40 -26
- package/one/knowledge/ontology-quickstart.md +18 -0
- package/one/knowledge/ontology-release.md +317 -0
- package/one/knowledge/ontology-shop.yaml +146 -119
- package/one/knowledge/ontology-tokens.yaml +46 -27
- package/one/knowledge/ontology-tutorial.md +18 -0
- package/one/knowledge/ontology-video-script.md +18 -0
- package/one/knowledge/ontology-visual-guide.md +20 -2
- package/one/knowledge/ontology.md +1329 -304
- package/one/knowledge/ontology.yaml +763 -275
- package/one/knowledge/patterns/backend/convex-mutation-pattern.md +48 -18
- package/one/knowledge/patterns/backend/convex-query-pattern.md +78 -23
- package/one/knowledge/patterns/backend/mutation-template.md +28 -10
- package/one/knowledge/patterns/backend/query-template.md +44 -25
- package/one/knowledge/patterns/backend/service-template.md +35 -14
- package/one/knowledge/patterns/design/component-architecture.md +45 -9
- package/one/knowledge/patterns/design/test-driven-design-pattern.md +37 -3
- package/one/knowledge/patterns/design/wireframe-template.md +36 -2
- package/one/knowledge/patterns/frontend/component-template.md +91 -40
- package/one/knowledge/patterns/frontend/form-template.md +131 -59
- package/one/knowledge/patterns/frontend/page-template.md +59 -28
- package/one/knowledge/patterns/frontend/react-component-pattern.md +87 -27
- package/one/knowledge/patterns/test/acceptance-criteria-template.md +28 -10
- package/one/knowledge/patterns/test/technical-test-template.md +48 -26
- package/one/knowledge/patterns/test/test-driven-pattern.md +25 -5
- package/one/knowledge/patterns/test/user-flow-template.md +18 -0
- package/one/knowledge/provider-agnostic-content.md +995 -0
- package/one/knowledge/provider-creation-guide.md +18 -0
- package/one/knowledge/quality-loop.md +18 -0
- package/one/knowledge/readme-architecture.md +158 -0
- package/one/knowledge/readme.md +18 -0
- package/one/knowledge/rules.md +18 -0
- package/one/knowledge/score.md +18 -0
- package/one/knowledge/specifications.md +18 -0
- package/one/knowledge/tags.md +18 -0
- package/one/knowledge/todo-template.md +18 -0
- package/one/knowledge/todo.md +18 -0
- package/one/knowledge/typescript-patterns.md +18 -0
- package/one/knowledge/universal-generation-language.md +827 -0
- package/one/knowledge/x402-research.md +104 -0
- package/one/license.md +18 -0
- package/one/people/anthony-o-connell.md +48 -19
- package/one/people/people.md +54 -31
- package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +401 -0
- package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +588 -0
- package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +461 -0
- package/one/things/CHECKLIST.md +51 -0
- package/one/things/IMPLEMENTATION_STATUS.md +379 -0
- package/one/things/ONE.md +19 -1
- package/one/things/agents/agent-backend.md +198 -98
- package/one/things/agents/agent-builder.md +267 -158
- package/one/things/agents/agent-clean.md +40 -15
- package/one/things/agents/agent-clone.md +33 -50
- package/one/things/agents/agent-deploy.md +59 -11
- package/one/things/agents/agent-designer.md +274 -146
- package/one/things/agents/agent-director.md +20 -2
- package/one/things/agents/agent-documenter.md +126 -46
- package/one/things/agents/agent-frontend.md +104 -22
- package/one/things/agents/agent-integrator.md +153 -76
- package/one/things/agents/agent-lawyer.md +197 -92
- package/one/things/agents/agent-problem-solver.md +302 -224
- package/one/things/agents/agent-quality.md +149 -19
- package/one/things/agents/agent-sales.md +95 -7
- package/one/things/cascade/cascade.yaml +20 -3
- package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +53 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +50 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts.md +76 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +49 -3
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +45 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +32 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +45 -3
- package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +44 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination.md +40 -1
- package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +81 -25
- package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +41 -0
- package/one/things/cascade/docs/examples/1-4-knowledge-management.md +91 -16
- package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +136 -73
- package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +43 -0
- package/one/things/cascade/docs/examples/1-5-quality-loops.md +88 -4
- package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +52 -3
- package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +44 -1
- package/one/things/cascade/docs/examples/1-6-numbering-structure.md +78 -14
- package/one/things/cascade/docs/examples/readme.md +37 -0
- package/one/things/cascade/docs/getting-started.md +18 -0
- package/one/things/cascade/docs/workflow.md +18 -12
- package/one/things/cascade/readme.md +43 -0
- package/one/things/cascade/templates/feature-template.md +28 -6
- package/one/things/claude/agents/advocacy-activation-manager.md +64 -39
- package/one/things/claude/agents/advocacy-campaign-designer.md +64 -39
- package/one/things/claude/agents/analyst.md +64 -39
- package/one/things/claude/agents/architect.md +64 -39
- package/one/things/claude/agents/brand-identity-specialist.md +64 -39
- package/one/things/claude/agents/bstp-token-strategist.md +48 -25
- package/one/things/claude/agents/builder-repo.md +69 -26
- package/one/things/claude/agents/bullstamp-community-builder.md +48 -25
- package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +48 -25
- package/one/things/claude/agents/bulltilt-platform-growth.md +48 -25
- package/one/things/claude/agents/company-bullstamp-character.md +45 -30
- package/one/things/claude/agents/company-bullstamp-community.md +45 -30
- package/one/things/claude/agents/company-bullstamp-marketing.md +45 -30
- package/one/things/claude/agents/company-bullstamp-token.md +45 -30
- package/one/things/claude/agents/company-bulltilt-growth.md +45 -30
- package/one/things/claude/agents/content-bibliography-formatter.md +48 -25
- package/one/things/claude/agents/content-calendar-planner.md +59 -34
- package/one/things/claude/agents/content-chapter-formatter.md +60 -35
- package/one/things/claude/agents/content-formatter.md +59 -34
- package/one/things/claude/agents/content-hook-specialist.md +54 -31
- package/one/things/claude/agents/content-image-formatter.md +59 -34
- package/one/things/claude/agents/content-introduction-formatter.md +59 -34
- package/one/things/claude/agents/content-multiplication-engine.md +54 -31
- package/one/things/claude/agents/content-playbook-writer.md +60 -35
- package/one/things/claude/agents/content-team-manager.md +59 -34
- package/one/things/claude/agents/content-toc-formatter.md +60 -35
- package/one/things/claude/agents/convex-backend-specialist.md +380 -216
- package/one/things/claude/agents/core-manager.md +59 -34
- package/one/things/claude/agents/core-master.md +55 -32
- package/one/things/claude/agents/cross-functional-manager.md +46 -41
- package/one/things/claude/agents/crypto-airdrop-strategist.md +74 -54
- package/one/things/claude/agents/crypto-analytics-educator.md +73 -30
- package/one/things/claude/agents/crypto-architecture-specialist.md +70 -39
- package/one/things/claude/agents/crypto-community-analyst.md +47 -31
- package/one/things/claude/agents/crypto-community-psychologist.md +68 -31
- package/one/things/claude/agents/crypto-dex-optimization-expert.md +72 -31
- package/one/things/claude/agents/crypto-dex-optimizer.md +45 -30
- package/one/things/claude/agents/crypto-diamond-formation-specialist.md +69 -30
- package/one/things/claude/agents/crypto-diamond-hands.md +45 -30
- package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +73 -30
- package/one/things/claude/agents/crypto-engagement-specialist.md +71 -30
- package/one/things/claude/agents/crypto-market-researcher.md +45 -30
- package/one/things/claude/agents/crypto-marketing-orchestrator.md +74 -34
- package/one/things/claude/agents/crypto-network-effect-amplifier.md +75 -30
- package/one/things/claude/agents/crypto-optimization-analyst.md +73 -30
- package/one/things/claude/agents/crypto-strategic-synthesizer.md +69 -30
- package/one/things/claude/agents/crypto-team-manager.md +45 -40
- package/one/things/claude/agents/crypto-token-analyst.md +66 -25
- package/one/things/claude/agents/crypto-viral-content-creator.md +64 -61
- package/one/things/claude/agents/crypto-wallet-identification-expert.md +61 -51
- package/one/things/claude/agents/crypto-wallet-identifier.md +45 -30
- package/one/things/claude/agents/customer-journey-designer.md +51 -58
- package/one/things/claude/agents/customer-success-manager.md +51 -58
- package/one/things/claude/agents/dev.md +51 -58
- package/one/things/claude/agents/documenter.md +71 -69
- package/one/things/claude/agents/elevate-marketing-orchestrator.md +45 -52
- package/one/things/claude/agents/engagement-specialist.md +45 -52
- package/one/things/claude/agents/engineering-architect.md +54 -54
- package/one/things/claude/agents/engineering-business-analyst.md +46 -56
- package/one/things/claude/agents/engineering-developer.md +51 -52
- package/one/things/claude/agents/engineering-director.md +65 -25
- package/one/things/claude/agents/engineering-ingestor.md +110 -100
- package/one/things/claude/agents/engineering-product-manager.md +43 -55
- package/one/things/claude/agents/engineering-product-owner.md +46 -56
- package/one/things/claude/agents/engineering-project-coordinator.md +44 -56
- package/one/things/claude/agents/engineering-quality-assurance.md +53 -54
- package/one/things/claude/agents/engineering-team-manager.md +46 -43
- package/one/things/claude/agents/engineering-user-experience.md +51 -52
- package/one/things/claude/agents/framework-elevate-manager.md +45 -30
- package/one/things/claude/agents/improver.md +120 -78
- package/one/things/claude/agents/intelligence-team-manager.md +45 -40
- package/one/things/claude/agents/lead-capture-expert.md +45 -52
- package/one/things/claude/agents/lead-magnet-creator.md +45 -52
- package/one/things/claude/agents/market-research-analyst.md +48 -25
- package/one/things/claude/agents/marketing-brand-identity.md +57 -27
- package/one/things/claude/agents/marketing-content-hooks.md +45 -40
- package/one/things/claude/agents/marketing-content-multiplier.md +45 -40
- package/one/things/claude/agents/marketing-content-poster.md +71 -60
- package/one/things/claude/agents/marketing-customer-journey.md +45 -40
- package/one/things/claude/agents/marketing-director.md +46 -41
- package/one/things/claude/agents/marketing-engagement.md +45 -40
- package/one/things/claude/agents/marketing-lead-capture.md +45 -40
- package/one/things/claude/agents/marketing-lead-magnet.md +45 -40
- package/one/things/claude/agents/marketing-network-effects.md +45 -40
- package/one/things/claude/agents/marketing-nurture-campaigns.md +45 -40
- package/one/things/claude/agents/marketing-share-optimizer.md +45 -40
- package/one/things/claude/agents/marketing-team-manager.md +45 -40
- package/one/things/claude/agents/marketing-viral-growth.md +49 -18
- package/one/things/claude/agents/mission-commander.md +45 -40
- package/one/things/claude/agents/network-effect-analyst.md +48 -31
- package/one/things/claude/agents/nextjs-15-specialist.md +209 -122
- package/one/things/claude/agents/npx.md +126 -70
- package/one/things/claude/agents/nurture-campaign-manager.md +48 -25
- package/one/things/claude/agents/one-master.md +48 -25
- package/one/things/claude/agents/one-orchestrator.md +57 -27
- package/one/things/claude/agents/one.md +88 -31
- package/one/things/claude/agents/playbook-generator.md +48 -25
- package/one/things/claude/agents/pm.md +48 -25
- package/one/things/claude/agents/po.md +51 -26
- package/one/things/claude/agents/qa.md +50 -25
- package/one/things/claude/agents/research-foundation-analyst.md +48 -31
- package/one/things/claude/agents/research-intelligence-gatherer.md +59 -32
- package/one/things/claude/agents/research-market-analyst.md +47 -30
- package/one/things/claude/agents/research-team-manager.md +47 -40
- package/one/things/claude/agents/sales-environment-optimizer.md +50 -25
- package/one/things/claude/agents/sales-team-manager.md +47 -40
- package/one/things/claude/agents/sales-upsell-strategist.md +47 -30
- package/one/things/claude/agents/service-advocacy-campaigns.md +47 -30
- package/one/things/claude/agents/service-advocacy-manager.md +47 -30
- package/one/things/claude/agents/service-success-manager.md +47 -30
- package/one/things/claude/agents/service-team-manager.md +45 -40
- package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +85 -30
- package/one/things/claude/agents/share-optimization-specialist.md +50 -25
- package/one/things/claude/agents/sm.md +50 -25
- package/one/things/claude/agents/story-teller.md +51 -26
- package/one/things/claude/agents/task-master.md +52 -27
- package/one/things/claude/agents/tauri-cross-platform-specialist.md +201 -116
- package/one/things/claude/agents/tester.md +85 -46
- package/one/things/claude/agents/the-bull-character-manager.md +48 -25
- package/one/things/claude/agents/tools-playbook-generator.md +43 -40
- package/one/things/claude/agents/turbo-repo-builder.md +57 -27
- package/one/things/claude/agents/upsell-strategist.md +48 -25
- package/one/things/claude/agents/ux-expert.md +50 -25
- package/one/things/claude/agents/viral-growth-orchestrator.md +50 -27
- package/one/things/claude/commands/agent.md +25 -5
- package/one/things/claude/commands/cascade-status.md +33 -8
- package/one/things/claude/commands/ingest.md +64 -11
- package/one/things/claude/commands/ingestor.md +29 -7
- package/one/things/claude/commands/mission.md +24 -4
- package/one/things/claude/commands/npx.md +30 -7
- package/one/things/claude/commands/one.md +114 -68
- package/one/things/claude/commands/quality-check.md +72 -24
- package/one/things/claude/commands/smart-route.md +45 -4
- package/one/things/claude/commands/start.md +22 -4
- package/one/things/claude/commands/story.md +25 -5
- package/one/things/claude/commands/task.md +21 -1
- package/one/things/cli/cli-code.md +244 -219
- package/one/things/cli/cli-compiler-code.md +244 -219
- package/one/things/cli/cli.md +30 -6
- package/one/things/components/card-shadcn.md +252 -228
- package/one/things/components/card.md +315 -324
- package/one/things/components.md +667 -593
- package/one/things/componets.md +16 -1
- package/one/things/creator-diagram.md +23 -5
- package/one/things/demo-accessibility-animations.md +73 -47
- package/one/things/demo-components.md +225 -219
- package/one/things/demo-design-summary.md +89 -26
- package/one/things/demo-design-system.md +184 -130
- package/one/things/demo-page-layouts.md +52 -25
- package/one/things/designs/accessibility-audit.md +153 -66
- package/one/things/designs/component-specifications.md +163 -65
- package/one/things/designs/design-overview.md +81 -22
- package/one/things/designs/design-tokens.md +127 -93
- package/one/things/designs/wireframes-dashboard.md +64 -7
- package/one/things/docs/api-requests.md +75 -11
- package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +18 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +57 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +62 -6
- package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +60 -5
- package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +95 -27
- package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +130 -62
- package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +43 -19
- package/one/things/docs/ecommerce/QUICK-START.md +41 -4
- package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +75 -6
- package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +58 -24
- package/one/things/examples/children/lemonade-stand.md +52 -14
- package/one/things/examples/enterprise/crm-saas.md +43 -28
- package/one/things/features/1-1-agent-prompts.md +76 -0
- package/one/things/features/1-2-yaml-orchestrator.md +32 -0
- package/one/things/features/1-3-event-coordination.md +40 -1
- package/one/things/features/1-4-knowledge-management.md +91 -16
- package/one/things/features/1-5-quality-loops.md +88 -4
- package/one/things/features/1-6-numbering-structure.md +78 -14
- package/one/things/features/2-1-dataprovider-interface.md +311 -86
- package/one/things/features/2-2-config-system.md +307 -140
- package/one/things/features/2-3-effectts-services.md +263 -116
- package/one/things/features/2-4-react-hooks.md +217 -201
- package/one/things/features/2-5-auth-migration.md +406 -308
- package/one/things/features/2-6-dashboard-migration.md +112 -13
- package/one/things/features/2-7-alternative-providers.md +138 -65
- package/one/things/features/2-7-implementation-report.md +68 -24
- package/one/things/features/2-cli.md +88 -76
- package/one/things/features/2-design.md +112 -80
- package/one/things/features/2-tests.md +56 -0
- package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +91 -36
- package/one/things/features/DECOUPLING.md +36 -18
- package/one/things/features/DEPLOYMENT.md +22 -4
- package/one/things/features/IMPLEMENTATION_SUMMARY.md +48 -2
- package/one/things/features/improve.md +47 -29
- package/one/things/features/remove-convex-deps.md +18 -0
- package/one/things/features/top-features.md +28 -20
- package/one/things/features/use-one-backend.md +210 -173
- package/one/things/features-in-english.md +19 -6
- package/one/things/files.yaml +721 -0
- package/one/things/ideas/1-create-workflow.md +18 -0
- package/one/things/ideas/2-backend-agnostic-frontend.md +57 -2
- package/one/things/implementation/backend-guide.md +64 -19
- package/one/things/interface.md +43 -0
- package/one/things/landing-page-implementation.md +455 -0
- package/one/things/legal/README.md +44 -0
- package/one/things/legal/privacy-policy.md +186 -23
- package/one/things/legal/terms-of-service.md +164 -3
- package/one/things/master-workflow-plan.md +806 -0
- package/one/things/plans/0-timeline.md +36 -0
- package/one/things/plans/1-create-workflow.md +19 -0
- package/one/things/plans/QUICK-START-SIMPLIFICATION.md +333 -0
- package/one/things/plans/README-SIMPLIFICATION.md +349 -0
- package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +16 -0
- package/one/things/plans/SIMPLIFICATION-SUMMARY.md +455 -0
- package/one/things/plans/ai-elements.md +21 -2
- package/one/things/plans/ai-integration.md +108 -59
- package/one/things/plans/ai-sdk.md +85 -48
- package/one/things/plans/ai-tools.md +621 -0
- package/one/things/plans/app.md +142 -71
- package/one/things/plans/architecture-summary.md +34 -5
- package/one/things/plans/async-ai-agents.md +19 -1
- package/one/things/plans/backend-agnostic-frontend.md +70 -8
- package/one/things/plans/backend-cleanup-quickstart.md +52 -18
- package/one/things/plans/backend-ontology-conformance.md +110 -51
- package/one/things/plans/backend-status.md +58 -0
- package/one/things/plans/backend-structure.md +103 -55
- package/one/things/plans/backend-target-structure.md +61 -17
- package/one/things/plans/backend.md +60 -18
- package/one/things/plans/better-auth-any-backend-revised.md +325 -287
- package/one/things/plans/better-auth-any-backend.md +575 -531
- package/one/things/plans/better-auth-available-features.md +43 -5
- package/one/things/plans/big-plan.md +20 -6
- package/one/things/plans/cli-updates-required.md +44 -4
- package/one/things/plans/complete-step-by-step.md +223 -116
- package/one/things/plans/components.md +709 -0
- package/one/things/plans/convex-agents.md +79 -50
- package/one/things/plans/convex-better-auth.md +186 -154
- package/one/things/plans/convex-on-off.md +47 -29
- package/one/things/plans/crypto-token-researcher.md +629 -0
- package/one/things/plans/data-quality-metrics.md +745 -0
- package/one/things/plans/deep-researcher-agent.md +466 -0
- package/one/things/plans/deploy-to-cloudflare.md +55 -13
- package/one/things/plans/deployment-architecture.md +54 -11
- package/one/things/plans/desktop.md +21 -3
- package/one/things/plans/development-plan.md +184 -121
- package/one/things/plans/development-workflow-tldr.md +207 -0
- package/one/things/plans/development-workflow.md +959 -0
- package/one/things/plans/effect-components.md +667 -593
- package/one/things/plans/effect-patterns-reference.md +2235 -0
- package/one/things/plans/effect.md +204 -131
- package/one/things/plans/email.md +21 -8
- package/one/things/plans/enhance-auth.md +64 -41
- package/one/things/plans/execution-strategy.md +1291 -0
- package/one/things/plans/existing-infrastructure.md +712 -0
- package/one/things/plans/feature-based-sites.md +124 -51
- package/one/things/plans/frontend-effects.md +1276 -0
- package/one/things/plans/group-folder-multi-tenancy.md +92 -29
- package/one/things/plans/improve-codebase.md +498 -421
- package/one/things/plans/install-components.md +18 -1
- package/one/things/plans/integrate-frontend-and-backend.md +68 -44
- package/one/things/plans/landing.md +92 -0
- package/one/things/plans/layout.md +45 -1
- package/one/things/plans/mail-backend.md +546 -493
- package/one/things/plans/mail.md +379 -326
- package/one/things/plans/mcp-clear-context-prompt.md +21 -0
- package/one/things/plans/mcp-simple.md +20 -0
- package/one/things/plans/multi-ontology-architecture.md +115 -66
- package/one/things/plans/next-features.md +31 -0
- package/one/things/plans/onboarding.md +20 -1
- package/one/things/plans/one.md +18 -0
- package/one/things/plans/ontology-6-dimensions.md +24 -45
- package/one/things/plans/ontology-compliance-audit.md +315 -0
- package/one/things/plans/ontology-driven-strategy.md +19 -3
- package/one/things/plans/ontology-refine.md +586 -0
- package/one/things/plans/ontology-ui-approach.md +18 -0
- package/one/things/plans/open-agent.md +152 -97
- package/one/things/plans/performace.md +32 -0
- package/one/things/plans/phase-1-foundation.md +620 -0
- package/one/things/plans/phase-3-implementation.md +1037 -0
- package/one/things/plans/quick-wins.md +342 -187
- package/one/things/plans/readme-backend-cleanup.md +54 -13
- package/one/things/plans/release.md +55 -2
- package/one/things/plans/repos.md +22 -0
- package/one/things/plans/separate-copy-2.md +127 -71
- package/one/things/plans/separate-copy-3.md +35 -14
- package/one/things/plans/separate-copy.md +127 -71
- package/one/things/plans/separate-demo.md +37 -3
- package/one/things/plans/separate.md +24 -6
- package/one/things/plans/sequence.md +155 -12
- package/one/things/plans/shadcn-integration-summary.md +104 -44
- package/one/things/plans/sidebar.md +44 -10
- package/one/things/plans/skills.md +103 -0
- package/one/things/plans/small-fixes.md +19 -1
- package/one/things/plans/start-new.md +34 -8
- package/one/things/plans/switch-off-auth.md +22 -0
- package/one/things/plans/sync-checklist.md +30 -0
- package/one/things/plans/test-backend-connection.md +38 -0
- package/one/things/plans/unified-implementation-plan.md +144 -62
- package/one/things/plans/update-demos.md +103 -35
- package/one/things/plans/use-our-backend.md +572 -0
- package/one/things/plans/wave1-onboarding-100-inferences.md +1686 -0
- package/one/things/plans/wave1-onboarding-vision.md +744 -0
- package/one/things/plans/wave1-orchestration-summary.md +604 -0
- package/one/things/plans/wave1-specialist-assignments.md +1413 -0
- package/one/things/plans/workflow-files.md +28 -14
- package/one/things/plans/workflow.md +18 -12
- package/one/things/products/cascade-landing-page.md +150 -46
- package/one/things/products/cascade.md +185 -135
- package/one/things/products/context-engineering.md +411 -350
- package/one/things/products/onthology.md +15 -0
- package/one/things/products/ontology-ui-shadcn.md +375 -353
- package/one/things/products/ontology-ui.md +101 -59
- package/one/things/products/ontology.md +90 -18
- package/one/things/products/sdk.md +181 -165
- package/one/things/promptkit.md +70 -43
- package/one/things/repos/all-repos.md +0 -0
- package/one/things/service-providers-new.md +95 -25
- package/one/things/service-providers.md +231 -202
- package/one/things/structure.md +532 -0
- package/one/things/system.md +18 -0
- package/one/things/templates.md +40 -0
- package/one/things/tests/2-1-dataprovider-interface.md +103 -31
- package/one/things/tests/2-1-test-analysis.md +65 -17
- package/one/things/things.md +48 -13
- package/one/things/todo-acp-integration.md +744 -0
- package/one/things/todo-ai.md +933 -0
- package/one/things/todo-api.md +1078 -0
- package/one/things/todo-assignment.md +580 -0
- package/one/things/todo-buy-chatgpt.md +1450 -0
- package/one/things/todo-components.md +1683 -0
- package/one/things/todo-connections.md +278 -0
- package/one/things/todo-ecommerce-frontend.md +1313 -0
- package/one/things/todo-ecommerce.md +569 -0
- package/one/things/todo-effects.md +1075 -0
- package/one/things/todo-frontend-effects.md +977 -0
- package/one/things/todo-landing-page.md +1091 -0
- package/one/things/todo-mail.md +1160 -0
- package/one/things/todo-master-plan.md +490 -0
- package/one/things/todo-onboard.md +666 -0
- package/one/things/todo-one-ie.md +538 -0
- package/one/things/todo-page.md +606 -0
- package/one/things/todo-plans.md +282 -0
- package/one/things/todo-projects.md +241 -0
- package/one/things/todo-refactoring-plan.md +366 -0
- package/one/things/todo-sequence.md +1621 -0
- package/one/things/todo-use-our-backend.md +1908 -0
- package/one/things/todo-workflow.md +626 -0
- package/one/things/todo-x402.md +2047 -0
- package/one/things/todo.md +459 -1075
- package/one/things/video/scripts-crypto.md +835 -0
- package/one/things/video-script-ontology.md +334 -0
- package/package.json +1 -1
- package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +0 -49
- package/one/knowledge/docs/flow.md +0 -0
- package/one/knowledge/documentation-summary.md +0 -285
- package/one/knowledge/inference-score.md +0 -159
- package/one/knowledge/ontology-frontend-copy-2.md +0 -1492
- package/one/knowledge/ontology-frontend-copy.md +0 -753
- package/one/knowledge/ontology-migration-guide.md +0 -811
- package/one/things/features/0 All Features.md +0 -2
- package/one/things/plans/1-create-workflow-status.md +0 -555
- package/one/things/plans/2-backend-agnostic-frontend.md +0 -546
- package/one/things/plans/2-sites.md +0 -895
- package/one/things/plans/3-groups.md +0 -735
- package/one/things/plans/5-build-frontend.md +0 -0
- package/one/things/plans/5-complete.md +0 -17
- package/one/things/plans/agent-director-100-inference-plans.md +0 -410
- package/one/things/plans/dual-website-strategy.md +0 -612
- package/one/things/plans/releases.md +0 -809
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Ontology Ui Shadcn
|
|
3
|
+
dimension: things
|
|
4
|
+
category: products
|
|
5
|
+
tags: 6-dimensions, ai, ontology, things
|
|
6
|
+
related_dimensions: events
|
|
7
|
+
scope: global
|
|
8
|
+
created: 2025-11-03
|
|
9
|
+
updated: 2025-11-03
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
ai_context: |
|
|
12
|
+
This document is part of the things dimension in the products category.
|
|
13
|
+
Location: one/things/products/ontology-ui-shadcn.md
|
|
14
|
+
Purpose: Documents ontology ui with shadcn/ui integration
|
|
15
|
+
Related dimensions: events
|
|
16
|
+
For AI agents: Read this to understand ontology ui shadcn.
|
|
17
|
+
---
|
|
18
|
+
|
|
1
19
|
# Ontology UI with shadcn/ui Integration
|
|
2
20
|
|
|
3
21
|
> **⚠️ DEPRECATED:** This document has been superseded by a cleaner approach. Please use:
|
|
22
|
+
>
|
|
4
23
|
> - `one/things/features/ontology-ui.md` - Clean UI metadata specification
|
|
5
24
|
> - `one/things/components/card.md` - Implementation using shadcn/ui naturally
|
|
6
25
|
> - `one/things/plans/ontology-ui-approach.md` - Philosophy explanation
|
|
@@ -16,6 +35,7 @@
|
|
|
16
35
|
The ONE ontology UI specification is fully integrated with [shadcn/ui](https://ui.shadcn.com/) - a collection of beautifully designed, accessible components built with Radix UI and Tailwind CSS.
|
|
17
36
|
|
|
18
37
|
**Why shadcn/ui:**
|
|
38
|
+
|
|
19
39
|
- ✅ **Accessible** - Built on Radix UI primitives (WAI-ARIA compliant)
|
|
20
40
|
- ✅ **Customizable** - Full control via Tailwind CSS
|
|
21
41
|
- ✅ **Copy-paste** - Not an npm dependency, you own the code
|
|
@@ -24,6 +44,7 @@ The ONE ontology UI specification is fully integrated with [shadcn/ui](https://u
|
|
|
24
44
|
- ✅ **Well-documented** - Comprehensive docs and examples
|
|
25
45
|
|
|
26
46
|
**Integration Benefits:**
|
|
47
|
+
|
|
27
48
|
- ✅ Every field component maps to shadcn/ui component
|
|
28
49
|
- ✅ Consistent design across all 66 thing types
|
|
29
50
|
- ✅ Accessible by default (screen readers, keyboard nav)
|
|
@@ -115,28 +136,28 @@ frontend/
|
|
|
115
136
|
|
|
116
137
|
Every ontology field component maps to a shadcn/ui component:
|
|
117
138
|
|
|
118
|
-
| Field Component | shadcn/ui Component
|
|
119
|
-
|
|
120
|
-
| `Heading`
|
|
121
|
-
| `Text`
|
|
122
|
-
| `Price`
|
|
123
|
-
| `Image`
|
|
124
|
-
| `Badge`
|
|
125
|
-
| `TagList`
|
|
126
|
-
| `Date`
|
|
127
|
-
| `Avatar`
|
|
128
|
-
| `Button`
|
|
129
|
-
| `Link`
|
|
130
|
-
| `Checkbox`
|
|
131
|
-
| `Switch`
|
|
132
|
-
| `Select`
|
|
133
|
-
| `Input`
|
|
134
|
-
| `Textarea`
|
|
135
|
-
| `Rating`
|
|
136
|
-
| `Progress`
|
|
137
|
-
| `Table`
|
|
138
|
-
| `Dialog`
|
|
139
|
-
| `Tooltip`
|
|
139
|
+
| Field Component | shadcn/ui Component | Usage |
|
|
140
|
+
| --------------- | --------------------------- | --------------------------- |
|
|
141
|
+
| `Heading` | Custom (Typography) | Headings with size variants |
|
|
142
|
+
| `Text` | Custom (Typography) | Body text with truncation |
|
|
143
|
+
| `Price` | `Badge` + Custom formatting | Formatted prices |
|
|
144
|
+
| `Image` | Custom `<img>` + `Skeleton` | Lazy-loaded images |
|
|
145
|
+
| `Badge` | `Badge` | Status badges |
|
|
146
|
+
| `TagList` | Multiple `Badge` | Tag collections |
|
|
147
|
+
| `Date` | Custom formatting | Formatted dates |
|
|
148
|
+
| `Avatar` | `Avatar` | User avatars |
|
|
149
|
+
| `Button` | `Button` | Action buttons |
|
|
150
|
+
| `Link` | Custom `<a>` | Hyperlinks |
|
|
151
|
+
| `Checkbox` | `Checkbox` | Checkboxes |
|
|
152
|
+
| `Switch` | `Switch` | Toggle switches |
|
|
153
|
+
| `Select` | `Select` | Dropdowns |
|
|
154
|
+
| `Input` | `Input` | Text inputs |
|
|
155
|
+
| `Textarea` | `Textarea` | Multi-line text |
|
|
156
|
+
| `Rating` | Custom stars | Star ratings |
|
|
157
|
+
| `Progress` | `Progress` | Progress bars |
|
|
158
|
+
| `Table` | `Table` | Data tables |
|
|
159
|
+
| `Dialog` | `Dialog` | Modal dialogs |
|
|
160
|
+
| `Tooltip` | `Tooltip` | Hover tooltips |
|
|
140
161
|
|
|
141
162
|
---
|
|
142
163
|
|
|
@@ -146,54 +167,57 @@ Every ontology field component maps to a shadcn/ui component:
|
|
|
146
167
|
|
|
147
168
|
```tsx
|
|
148
169
|
// frontend/src/components/generic/ThingCard.tsx
|
|
149
|
-
import { type Thing } from
|
|
150
|
-
import { useThingConfig } from
|
|
151
|
-
import {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
import { type Thing } from "@one-platform/core";
|
|
171
|
+
import { useThingConfig } from "@/ontology/hooks/useThingConfig";
|
|
172
|
+
import {
|
|
173
|
+
Card,
|
|
174
|
+
CardContent,
|
|
175
|
+
CardFooter,
|
|
176
|
+
CardHeader,
|
|
177
|
+
} from "@/components/ui/card";
|
|
178
|
+
import { Separator } from "@/components/ui/separator";
|
|
179
|
+
import { Field } from "./Field";
|
|
180
|
+
import { Actions } from "./Actions";
|
|
181
|
+
import { ConnectionBadges } from "./ConnectionBadges";
|
|
182
|
+
import { cn } from "@/lib/utils";
|
|
157
183
|
|
|
158
184
|
interface ThingCardProps {
|
|
159
|
-
thing: Thing
|
|
160
|
-
view?:
|
|
161
|
-
onClick?: (thing: Thing) => void
|
|
162
|
-
showActions?: boolean
|
|
163
|
-
showConnections?: boolean
|
|
164
|
-
className?: string
|
|
185
|
+
thing: Thing;
|
|
186
|
+
view?: "card" | "list" | "detail";
|
|
187
|
+
onClick?: (thing: Thing) => void;
|
|
188
|
+
showActions?: boolean;
|
|
189
|
+
showConnections?: boolean;
|
|
190
|
+
className?: string;
|
|
165
191
|
}
|
|
166
192
|
|
|
167
193
|
export function ThingCard({
|
|
168
194
|
thing,
|
|
169
|
-
view =
|
|
195
|
+
view = "card",
|
|
170
196
|
onClick,
|
|
171
197
|
showActions = true,
|
|
172
198
|
showConnections = true,
|
|
173
|
-
className
|
|
199
|
+
className,
|
|
174
200
|
}: ThingCardProps) {
|
|
175
|
-
const config = useThingConfig(thing.type)
|
|
176
|
-
const viewConfig = config.ui.views[view]
|
|
201
|
+
const config = useThingConfig(thing.type);
|
|
202
|
+
const viewConfig = config.ui.views[view];
|
|
177
203
|
|
|
178
|
-
if (!viewConfig) return null
|
|
204
|
+
if (!viewConfig) return null;
|
|
179
205
|
|
|
180
|
-
const fields =
|
|
181
|
-
|
|
182
|
-
|
|
206
|
+
const fields =
|
|
207
|
+
viewConfig.fields === "*"
|
|
208
|
+
? Object.keys(config.properties)
|
|
209
|
+
: viewConfig.fields;
|
|
183
210
|
|
|
184
211
|
return (
|
|
185
212
|
<Card
|
|
186
|
-
className={cn(
|
|
187
|
-
'cursor-pointer transition-all hover:shadow-lg',
|
|
188
|
-
className
|
|
189
|
-
)}
|
|
213
|
+
className={cn("cursor-pointer transition-all hover:shadow-lg", className)}
|
|
190
214
|
onClick={onClick}
|
|
191
215
|
>
|
|
192
216
|
<CardHeader className="space-y-0 pb-3">
|
|
193
217
|
{/* Render header fields (typically thumbnail + title) */}
|
|
194
|
-
{fields.slice(0, 2).map(fieldName => {
|
|
195
|
-
const fieldConfig = config.ui.fields[fieldName]
|
|
196
|
-
if (fieldConfig?.hidden) return null
|
|
218
|
+
{fields.slice(0, 2).map((fieldName) => {
|
|
219
|
+
const fieldConfig = config.ui.fields[fieldName];
|
|
220
|
+
if (fieldConfig?.hidden) return null;
|
|
197
221
|
|
|
198
222
|
return (
|
|
199
223
|
<Field
|
|
@@ -203,16 +227,17 @@ export function ThingCard({
|
|
|
203
227
|
config={fieldConfig}
|
|
204
228
|
thing={thing}
|
|
205
229
|
/>
|
|
206
|
-
)
|
|
230
|
+
);
|
|
207
231
|
})}
|
|
208
232
|
</CardHeader>
|
|
209
233
|
|
|
210
234
|
<CardContent className="space-y-2">
|
|
211
235
|
{/* Render body fields */}
|
|
212
|
-
{fields.slice(2).map(fieldName => {
|
|
213
|
-
const fieldConfig = config.ui.fields[fieldName]
|
|
214
|
-
if (fieldConfig?.hidden) return null
|
|
215
|
-
if (fieldConfig?.showOnlyIf && !thing.properties[fieldName])
|
|
236
|
+
{fields.slice(2).map((fieldName) => {
|
|
237
|
+
const fieldConfig = config.ui.fields[fieldName];
|
|
238
|
+
if (fieldConfig?.hidden) return null;
|
|
239
|
+
if (fieldConfig?.showOnlyIf && !thing.properties[fieldName])
|
|
240
|
+
return null;
|
|
216
241
|
|
|
217
242
|
return (
|
|
218
243
|
<Field
|
|
@@ -222,7 +247,7 @@ export function ThingCard({
|
|
|
222
247
|
config={fieldConfig}
|
|
223
248
|
thing={thing}
|
|
224
249
|
/>
|
|
225
|
-
)
|
|
250
|
+
);
|
|
226
251
|
})}
|
|
227
252
|
</CardContent>
|
|
228
253
|
|
|
@@ -231,29 +256,27 @@ export function ThingCard({
|
|
|
231
256
|
<>
|
|
232
257
|
<Separator />
|
|
233
258
|
<CardContent className="pt-3">
|
|
234
|
-
<ConnectionBadges
|
|
235
|
-
thing={thing}
|
|
236
|
-
config={config.ui.connections}
|
|
237
|
-
/>
|
|
259
|
+
<ConnectionBadges thing={thing} config={config.ui.connections} />
|
|
238
260
|
</CardContent>
|
|
239
261
|
</>
|
|
240
262
|
)}
|
|
241
263
|
|
|
242
264
|
{/* Actions */}
|
|
243
|
-
{showActions &&
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
<
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
265
|
+
{showActions &&
|
|
266
|
+
(config.ui.actions.primary || config.ui.actions.secondary) && (
|
|
267
|
+
<>
|
|
268
|
+
<Separator />
|
|
269
|
+
<CardFooter className="pt-3">
|
|
270
|
+
<Actions
|
|
271
|
+
thing={thing}
|
|
272
|
+
primary={config.ui.actions.primary}
|
|
273
|
+
secondary={config.ui.actions.secondary}
|
|
274
|
+
/>
|
|
275
|
+
</CardFooter>
|
|
276
|
+
</>
|
|
277
|
+
)}
|
|
255
278
|
</Card>
|
|
256
|
-
)
|
|
279
|
+
);
|
|
257
280
|
}
|
|
258
281
|
```
|
|
259
282
|
|
|
@@ -263,87 +286,92 @@ export function ThingCard({
|
|
|
263
286
|
|
|
264
287
|
```tsx
|
|
265
288
|
// frontend/src/components/generic/Field.tsx
|
|
266
|
-
import { type FieldUI } from
|
|
267
|
-
import { type Thing } from
|
|
289
|
+
import { type FieldUI } from "@/ontology/types";
|
|
290
|
+
import { type Thing } from "@one-platform/core";
|
|
268
291
|
|
|
269
292
|
// shadcn/ui components
|
|
270
|
-
import { Badge } from
|
|
271
|
-
import { Avatar, AvatarFallback, AvatarImage } from
|
|
272
|
-
import { Checkbox } from
|
|
273
|
-
import { Switch } from
|
|
274
|
-
import { Progress } from
|
|
275
|
-
import { Separator } from
|
|
276
|
-
import { Skeleton } from
|
|
293
|
+
import { Badge } from "@/components/ui/badge";
|
|
294
|
+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
295
|
+
import { Checkbox } from "@/components/ui/checkbox";
|
|
296
|
+
import { Switch } from "@/components/ui/switch";
|
|
297
|
+
import { Progress } from "@/components/ui/progress";
|
|
298
|
+
import { Separator } from "@/components/ui/separator";
|
|
299
|
+
import { Skeleton } from "@/components/ui/skeleton";
|
|
277
300
|
|
|
278
301
|
// Custom field components
|
|
279
|
-
import { Heading } from
|
|
280
|
-
import { Text } from
|
|
281
|
-
import { Price } from
|
|
282
|
-
import { Image } from
|
|
283
|
-
import { TagList } from
|
|
284
|
-
import { DateField } from
|
|
285
|
-
import { Link } from
|
|
302
|
+
import { Heading } from "@/components/fields/Heading";
|
|
303
|
+
import { Text } from "@/components/fields/Text";
|
|
304
|
+
import { Price } from "@/components/fields/Price";
|
|
305
|
+
import { Image } from "@/components/fields/Image";
|
|
306
|
+
import { TagList } from "@/components/fields/TagList";
|
|
307
|
+
import { DateField } from "@/components/fields/DateField";
|
|
308
|
+
import { Link } from "@/components/fields/Link";
|
|
286
309
|
|
|
287
310
|
interface FieldProps {
|
|
288
|
-
name: string
|
|
289
|
-
value: any
|
|
290
|
-
config: FieldUI
|
|
291
|
-
thing: Thing
|
|
311
|
+
name: string;
|
|
312
|
+
value: any;
|
|
313
|
+
config: FieldUI;
|
|
314
|
+
thing: Thing;
|
|
292
315
|
}
|
|
293
316
|
|
|
294
317
|
export function Field({ name, value, config, thing }: FieldProps) {
|
|
295
|
-
if (value === null || value === undefined) return null
|
|
318
|
+
if (value === null || value === undefined) return null;
|
|
296
319
|
|
|
297
|
-
const formattedValue = config.format
|
|
298
|
-
? config.format(value, thing)
|
|
299
|
-
: value
|
|
320
|
+
const formattedValue = config.format ? config.format(value, thing) : value;
|
|
300
321
|
|
|
301
322
|
switch (config.component) {
|
|
302
|
-
case
|
|
303
|
-
return <Heading {...config}>{formattedValue}</Heading
|
|
323
|
+
case "Heading":
|
|
324
|
+
return <Heading {...config}>{formattedValue}</Heading>;
|
|
304
325
|
|
|
305
|
-
case
|
|
306
|
-
return <Text {...config}>{formattedValue}</Text
|
|
326
|
+
case "Text":
|
|
327
|
+
return <Text {...config}>{formattedValue}</Text>;
|
|
307
328
|
|
|
308
|
-
case
|
|
309
|
-
return <Price {...config} value={formattedValue}
|
|
329
|
+
case "Price":
|
|
330
|
+
return <Price {...config} value={formattedValue} />;
|
|
310
331
|
|
|
311
|
-
case
|
|
312
|
-
return <Image {...config} src={formattedValue} alt={thing.name}
|
|
332
|
+
case "Image":
|
|
333
|
+
return <Image {...config} src={formattedValue} alt={thing.name} />;
|
|
313
334
|
|
|
314
|
-
case
|
|
315
|
-
const badgeColor = config.colors?.[value] || config.color
|
|
316
|
-
const badgeLabel = config.labels?.[value] || config.label || value
|
|
335
|
+
case "Badge":
|
|
336
|
+
const badgeColor = config.colors?.[value] || config.color;
|
|
337
|
+
const badgeLabel = config.labels?.[value] || config.label || value;
|
|
317
338
|
|
|
318
339
|
return (
|
|
319
|
-
<Badge
|
|
340
|
+
<Badge
|
|
341
|
+
variant={badgeColor as any}
|
|
342
|
+
className="inline-flex items-center gap-1"
|
|
343
|
+
>
|
|
320
344
|
{config.icon && <span className="h-3 w-3">{/* icon */}</span>}
|
|
321
345
|
{badgeLabel}
|
|
322
346
|
</Badge>
|
|
323
|
-
)
|
|
347
|
+
);
|
|
324
348
|
|
|
325
|
-
case
|
|
326
|
-
return <TagList {...config} tags={formattedValue}
|
|
349
|
+
case "TagList":
|
|
350
|
+
return <TagList {...config} tags={formattedValue} />;
|
|
327
351
|
|
|
328
|
-
case
|
|
329
|
-
return <DateField {...config} value={formattedValue}
|
|
352
|
+
case "Date":
|
|
353
|
+
return <DateField {...config} value={formattedValue} />;
|
|
330
354
|
|
|
331
|
-
case
|
|
355
|
+
case "Avatar":
|
|
332
356
|
return (
|
|
333
|
-
<Avatar className={config.size ===
|
|
357
|
+
<Avatar className={config.size === "sm" ? "h-8 w-8" : "h-10 w-10"}>
|
|
334
358
|
<AvatarImage src={formattedValue} alt={thing.name} />
|
|
335
359
|
<AvatarFallback>
|
|
336
|
-
{config.fallback ===
|
|
337
|
-
? thing.name
|
|
360
|
+
{config.fallback === "initials"
|
|
361
|
+
? thing.name
|
|
362
|
+
.split(" ")
|
|
363
|
+
.map((n) => n[0])
|
|
364
|
+
.join("")
|
|
365
|
+
.toUpperCase()
|
|
338
366
|
: config.fallback}
|
|
339
367
|
</AvatarFallback>
|
|
340
368
|
</Avatar>
|
|
341
|
-
)
|
|
369
|
+
);
|
|
342
370
|
|
|
343
|
-
case
|
|
344
|
-
return <Link {...config} href={formattedValue}
|
|
371
|
+
case "Link":
|
|
372
|
+
return <Link {...config} href={formattedValue} />;
|
|
345
373
|
|
|
346
|
-
case
|
|
374
|
+
case "Checkbox":
|
|
347
375
|
return (
|
|
348
376
|
<div className="flex items-center space-x-2">
|
|
349
377
|
<Checkbox
|
|
@@ -358,9 +386,9 @@ export function Field({ name, value, config, thing }: FieldProps) {
|
|
|
358
386
|
</label>
|
|
359
387
|
)}
|
|
360
388
|
</div>
|
|
361
|
-
)
|
|
389
|
+
);
|
|
362
390
|
|
|
363
|
-
case
|
|
391
|
+
case "Switch":
|
|
364
392
|
return (
|
|
365
393
|
<div className="flex items-center space-x-2">
|
|
366
394
|
<Switch
|
|
@@ -373,9 +401,9 @@ export function Field({ name, value, config, thing }: FieldProps) {
|
|
|
373
401
|
<label className="text-sm font-medium">{config.label}</label>
|
|
374
402
|
)}
|
|
375
403
|
</div>
|
|
376
|
-
)
|
|
404
|
+
);
|
|
377
405
|
|
|
378
|
-
case
|
|
406
|
+
case "Progress":
|
|
379
407
|
return (
|
|
380
408
|
<div className="space-y-2">
|
|
381
409
|
{config.label && (
|
|
@@ -386,16 +414,16 @@ export function Field({ name, value, config, thing }: FieldProps) {
|
|
|
386
414
|
)}
|
|
387
415
|
<Progress value={formattedValue} />
|
|
388
416
|
</div>
|
|
389
|
-
)
|
|
417
|
+
);
|
|
390
418
|
|
|
391
|
-
case
|
|
392
|
-
return <Separator
|
|
419
|
+
case "Separator":
|
|
420
|
+
return <Separator />;
|
|
393
421
|
|
|
394
|
-
case
|
|
395
|
-
return <Skeleton className={config.className}
|
|
422
|
+
case "Skeleton":
|
|
423
|
+
return <Skeleton className={config.className} />;
|
|
396
424
|
|
|
397
425
|
default:
|
|
398
|
-
return <Text size="sm">{String(formattedValue)}</Text
|
|
426
|
+
return <Text size="sm">{String(formattedValue)}</Text>;
|
|
399
427
|
}
|
|
400
428
|
}
|
|
401
429
|
```
|
|
@@ -406,16 +434,16 @@ export function Field({ name, value, config, thing }: FieldProps) {
|
|
|
406
434
|
|
|
407
435
|
```tsx
|
|
408
436
|
// frontend/src/components/generic/Actions.tsx
|
|
409
|
-
import { type Thing } from
|
|
410
|
-
import { type ActionConfig } from
|
|
411
|
-
import { Button } from
|
|
437
|
+
import { type Thing } from "@one-platform/core";
|
|
438
|
+
import { type ActionConfig } from "@/ontology/types";
|
|
439
|
+
import { Button } from "@/components/ui/button";
|
|
412
440
|
import {
|
|
413
441
|
DropdownMenu,
|
|
414
442
|
DropdownMenuContent,
|
|
415
443
|
DropdownMenuItem,
|
|
416
444
|
DropdownMenuSeparator,
|
|
417
445
|
DropdownMenuTrigger,
|
|
418
|
-
} from
|
|
446
|
+
} from "@/components/ui/dropdown-menu";
|
|
419
447
|
import {
|
|
420
448
|
AlertDialog,
|
|
421
449
|
AlertDialogAction,
|
|
@@ -425,31 +453,31 @@ import {
|
|
|
425
453
|
AlertDialogFooter,
|
|
426
454
|
AlertDialogHeader,
|
|
427
455
|
AlertDialogTitle,
|
|
428
|
-
} from
|
|
429
|
-
import { useAction } from
|
|
430
|
-
import { MoreVertical } from
|
|
431
|
-
import { useState } from
|
|
456
|
+
} from "@/components/ui/alert-dialog";
|
|
457
|
+
import { useAction } from "@/hooks/useAction";
|
|
458
|
+
import { MoreVertical } from "lucide-react";
|
|
459
|
+
import { useState } from "react";
|
|
432
460
|
|
|
433
461
|
interface ActionsProps {
|
|
434
|
-
thing: Thing
|
|
435
|
-
primary?: ActionConfig
|
|
436
|
-
secondary?: ActionConfig[]
|
|
437
|
-
context?: ActionConfig[]
|
|
462
|
+
thing: Thing;
|
|
463
|
+
primary?: ActionConfig;
|
|
464
|
+
secondary?: ActionConfig[];
|
|
465
|
+
context?: ActionConfig[];
|
|
438
466
|
}
|
|
439
467
|
|
|
440
468
|
export function Actions({ thing, primary, secondary, context }: ActionsProps) {
|
|
441
|
-
const { executeAction, loading } = useAction()
|
|
442
|
-
const [confirmAction, setConfirmAction] = useState<ActionConfig | null>(null)
|
|
469
|
+
const { executeAction, loading } = useAction();
|
|
470
|
+
const [confirmAction, setConfirmAction] = useState<ActionConfig | null>(null);
|
|
443
471
|
|
|
444
472
|
const handleAction = async (action: ActionConfig) => {
|
|
445
473
|
// Show confirmation dialog if required
|
|
446
474
|
if (action.confirm) {
|
|
447
|
-
setConfirmAction(action)
|
|
448
|
-
return
|
|
475
|
+
setConfirmAction(action);
|
|
476
|
+
return;
|
|
449
477
|
}
|
|
450
478
|
|
|
451
|
-
await executeAction(action.action, thing)
|
|
452
|
-
}
|
|
479
|
+
await executeAction(action.action, thing);
|
|
480
|
+
};
|
|
453
481
|
|
|
454
482
|
return (
|
|
455
483
|
<>
|
|
@@ -457,22 +485,22 @@ export function Actions({ thing, primary, secondary, context }: ActionsProps) {
|
|
|
457
485
|
{/* Primary action */}
|
|
458
486
|
{primary && (
|
|
459
487
|
<Button
|
|
460
|
-
variant={primary.variant ===
|
|
488
|
+
variant={primary.variant === "danger" ? "destructive" : "default"}
|
|
461
489
|
className="flex-1"
|
|
462
490
|
disabled={loading}
|
|
463
491
|
onClick={() => handleAction(primary)}
|
|
464
492
|
>
|
|
465
|
-
{loading ?
|
|
493
|
+
{loading ? "Loading..." : primary.label}
|
|
466
494
|
</Button>
|
|
467
495
|
)}
|
|
468
496
|
|
|
469
497
|
{/* Secondary actions */}
|
|
470
498
|
{secondary && secondary.length > 0 && (
|
|
471
499
|
<div className="flex gap-2">
|
|
472
|
-
{secondary.map(action => (
|
|
500
|
+
{secondary.map((action) => (
|
|
473
501
|
<Button
|
|
474
502
|
key={action.action}
|
|
475
|
-
variant={action.variant ===
|
|
503
|
+
variant={action.variant === "ghost" ? "outline" : "default"}
|
|
476
504
|
size="icon"
|
|
477
505
|
disabled={loading}
|
|
478
506
|
onClick={() => handleAction(action)}
|
|
@@ -495,13 +523,13 @@ export function Actions({ thing, primary, secondary, context }: ActionsProps) {
|
|
|
495
523
|
<DropdownMenuContent align="end">
|
|
496
524
|
{context.map((action, index) => (
|
|
497
525
|
<div key={action.action}>
|
|
498
|
-
{index > 0 && action.variant ===
|
|
526
|
+
{index > 0 && action.variant === "danger" && (
|
|
499
527
|
<DropdownMenuSeparator />
|
|
500
528
|
)}
|
|
501
529
|
<DropdownMenuItem
|
|
502
530
|
onClick={() => handleAction(action)}
|
|
503
531
|
className={
|
|
504
|
-
action.variant ===
|
|
532
|
+
action.variant === "danger" ? "text-destructive" : ""
|
|
505
533
|
}
|
|
506
534
|
>
|
|
507
535
|
{action.label}
|
|
@@ -530,8 +558,8 @@ export function Actions({ thing, primary, secondary, context }: ActionsProps) {
|
|
|
530
558
|
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
531
559
|
<AlertDialogAction
|
|
532
560
|
onClick={async () => {
|
|
533
|
-
await executeAction(confirmAction.action, thing)
|
|
534
|
-
setConfirmAction(null)
|
|
561
|
+
await executeAction(confirmAction.action, thing);
|
|
562
|
+
setConfirmAction(null);
|
|
535
563
|
}}
|
|
536
564
|
>
|
|
537
565
|
Continue
|
|
@@ -541,7 +569,7 @@ export function Actions({ thing, primary, secondary, context }: ActionsProps) {
|
|
|
541
569
|
</AlertDialog>
|
|
542
570
|
)}
|
|
543
571
|
</>
|
|
544
|
-
)
|
|
572
|
+
);
|
|
545
573
|
}
|
|
546
574
|
```
|
|
547
575
|
|
|
@@ -551,38 +579,38 @@ export function Actions({ thing, primary, secondary, context }: ActionsProps) {
|
|
|
551
579
|
|
|
552
580
|
```tsx
|
|
553
581
|
// frontend/src/components/generic/ConnectionBadges.tsx
|
|
554
|
-
import { type Thing } from
|
|
555
|
-
import { type ConnectionUI } from
|
|
556
|
-
import { useConnections } from
|
|
557
|
-
import { Badge } from
|
|
558
|
-
import { Avatar, AvatarFallback, AvatarImage } from
|
|
559
|
-
import { Separator } from
|
|
582
|
+
import { type Thing } from "@one-platform/core";
|
|
583
|
+
import { type ConnectionUI } from "@/ontology/types";
|
|
584
|
+
import { useConnections } from "@/hooks/useConnections";
|
|
585
|
+
import { Badge } from "@/components/ui/badge";
|
|
586
|
+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
587
|
+
import { Separator } from "@/components/ui/separator";
|
|
560
588
|
|
|
561
589
|
interface ConnectionBadgesProps {
|
|
562
|
-
thing: Thing
|
|
563
|
-
config: Record<string, ConnectionUI
|
|
590
|
+
thing: Thing;
|
|
591
|
+
config: Record<string, ConnectionUI>;
|
|
564
592
|
}
|
|
565
593
|
|
|
566
594
|
export function ConnectionBadges({ thing, config }: ConnectionBadgesProps) {
|
|
567
|
-
const connections = useConnections(thing._id)
|
|
595
|
+
const connections = useConnections(thing._id);
|
|
568
596
|
|
|
569
597
|
const badges = Object.entries(config).map(([type, connectionConfig]) => {
|
|
570
|
-
const items = connections.filter(c => c.relationshipType === type)
|
|
571
|
-
if (items.length === 0) return null
|
|
598
|
+
const items = connections.filter((c) => c.relationshipType === type);
|
|
599
|
+
if (items.length === 0) return null;
|
|
572
600
|
|
|
573
601
|
const label = connectionConfig.label
|
|
574
|
-
.replace(
|
|
575
|
-
.replace(
|
|
602
|
+
.replace("{count}", items.length.toString())
|
|
603
|
+
.replace("{name}", items[0]?.name || "");
|
|
576
604
|
|
|
577
605
|
switch (connectionConfig.display) {
|
|
578
|
-
case
|
|
606
|
+
case "badge":
|
|
579
607
|
return (
|
|
580
608
|
<Badge key={type} variant="secondary" className="text-xs">
|
|
581
609
|
{label}
|
|
582
610
|
</Badge>
|
|
583
|
-
)
|
|
611
|
+
);
|
|
584
612
|
|
|
585
|
-
case
|
|
613
|
+
case "avatar":
|
|
586
614
|
return (
|
|
587
615
|
<div key={type} className="flex items-center gap-2">
|
|
588
616
|
<Avatar className="h-6 w-6">
|
|
@@ -591,43 +619,37 @@ export function ConnectionBadges({ thing, config }: ConnectionBadgesProps) {
|
|
|
591
619
|
{items[0]?.name?.[0]?.toUpperCase()}
|
|
592
620
|
</AvatarFallback>
|
|
593
621
|
</Avatar>
|
|
594
|
-
<span className="text-sm text-muted-foreground">
|
|
595
|
-
{label}
|
|
596
|
-
</span>
|
|
622
|
+
<span className="text-sm text-muted-foreground">{label}</span>
|
|
597
623
|
</div>
|
|
598
|
-
)
|
|
624
|
+
);
|
|
599
625
|
|
|
600
|
-
case
|
|
626
|
+
case "inline":
|
|
601
627
|
return (
|
|
602
628
|
<span key={type} className="text-sm text-muted-foreground">
|
|
603
629
|
{label}
|
|
604
630
|
</span>
|
|
605
|
-
)
|
|
631
|
+
);
|
|
606
632
|
|
|
607
|
-
case
|
|
633
|
+
case "list":
|
|
608
634
|
return (
|
|
609
635
|
<div key={type} className="flex flex-wrap gap-1">
|
|
610
|
-
{items.slice(0, connectionConfig.max || 5).map(item => (
|
|
636
|
+
{items.slice(0, connectionConfig.max || 5).map((item) => (
|
|
611
637
|
<Badge key={item._id} variant="outline" className="text-xs">
|
|
612
638
|
{item.name}
|
|
613
639
|
</Badge>
|
|
614
640
|
))}
|
|
615
641
|
</div>
|
|
616
|
-
)
|
|
642
|
+
);
|
|
617
643
|
|
|
618
644
|
default:
|
|
619
|
-
return null
|
|
645
|
+
return null;
|
|
620
646
|
}
|
|
621
|
-
})
|
|
647
|
+
});
|
|
622
648
|
|
|
623
|
-
const validBadges = badges.filter(Boolean)
|
|
624
|
-
if (validBadges.length === 0) return null
|
|
649
|
+
const validBadges = badges.filter(Boolean);
|
|
650
|
+
if (validBadges.length === 0) return null;
|
|
625
651
|
|
|
626
|
-
return
|
|
627
|
-
<div className="flex flex-wrap items-center gap-2">
|
|
628
|
-
{validBadges}
|
|
629
|
-
</div>
|
|
630
|
-
)
|
|
652
|
+
return <div className="flex flex-wrap items-center gap-2">{validBadges}</div>;
|
|
631
653
|
}
|
|
632
654
|
```
|
|
633
655
|
|
|
@@ -639,29 +661,29 @@ export function ConnectionBadges({ thing, config }: ConnectionBadgesProps) {
|
|
|
639
661
|
|
|
640
662
|
```tsx
|
|
641
663
|
// frontend/src/components/fields/Price.tsx
|
|
642
|
-
import { Badge } from
|
|
643
|
-
import { cn } from
|
|
664
|
+
import { Badge } from "@/components/ui/badge";
|
|
665
|
+
import { cn } from "@/lib/utils";
|
|
644
666
|
|
|
645
667
|
interface PriceProps {
|
|
646
|
-
value: number
|
|
647
|
-
currency?: string
|
|
648
|
-
format?:
|
|
649
|
-
badge?: boolean
|
|
650
|
-
size?:
|
|
651
|
-
strikethrough?: boolean
|
|
652
|
-
free?: { label: string; badge: boolean }
|
|
653
|
-
className?: string
|
|
668
|
+
value: number;
|
|
669
|
+
currency?: string;
|
|
670
|
+
format?: "full" | "compact";
|
|
671
|
+
badge?: boolean;
|
|
672
|
+
size?: "sm" | "md" | "lg";
|
|
673
|
+
strikethrough?: boolean;
|
|
674
|
+
free?: { label: string; badge: boolean };
|
|
675
|
+
className?: string;
|
|
654
676
|
}
|
|
655
677
|
|
|
656
678
|
export function Price({
|
|
657
679
|
value,
|
|
658
|
-
currency =
|
|
659
|
-
format =
|
|
680
|
+
currency = "USD",
|
|
681
|
+
format = "compact",
|
|
660
682
|
badge = false,
|
|
661
|
-
size =
|
|
683
|
+
size = "md",
|
|
662
684
|
strikethrough = false,
|
|
663
685
|
free,
|
|
664
|
-
className
|
|
686
|
+
className,
|
|
665
687
|
}: PriceProps) {
|
|
666
688
|
// Show "Free" if value is 0 and free config provided
|
|
667
689
|
if (value === 0 && free) {
|
|
@@ -671,34 +693,34 @@ export function Price({
|
|
|
671
693
|
<span className="text-sm font-medium text-muted-foreground">
|
|
672
694
|
{free.label}
|
|
673
695
|
</span>
|
|
674
|
-
)
|
|
696
|
+
);
|
|
675
697
|
}
|
|
676
698
|
|
|
677
|
-
const formatted = new Intl.NumberFormat(
|
|
678
|
-
style:
|
|
699
|
+
const formatted = new Intl.NumberFormat("en-US", {
|
|
700
|
+
style: "currency",
|
|
679
701
|
currency,
|
|
680
|
-
minimumFractionDigits: format ===
|
|
681
|
-
maximumFractionDigits: format ===
|
|
682
|
-
}).format(value)
|
|
702
|
+
minimumFractionDigits: format === "compact" ? 0 : 2,
|
|
703
|
+
maximumFractionDigits: format === "compact" ? 0 : 2,
|
|
704
|
+
}).format(value);
|
|
683
705
|
|
|
684
706
|
const sizeClasses = {
|
|
685
|
-
sm:
|
|
686
|
-
md:
|
|
687
|
-
lg:
|
|
688
|
-
}
|
|
707
|
+
sm: "text-sm",
|
|
708
|
+
md: "text-base",
|
|
709
|
+
lg: "text-lg",
|
|
710
|
+
};
|
|
689
711
|
|
|
690
712
|
const content = (
|
|
691
713
|
<span
|
|
692
714
|
className={cn(
|
|
693
|
-
|
|
715
|
+
"font-semibold",
|
|
694
716
|
sizeClasses[size],
|
|
695
|
-
strikethrough &&
|
|
696
|
-
className
|
|
717
|
+
strikethrough && "line-through text-muted-foreground",
|
|
718
|
+
className,
|
|
697
719
|
)}
|
|
698
720
|
>
|
|
699
721
|
{formatted}
|
|
700
722
|
</span>
|
|
701
|
-
)
|
|
723
|
+
);
|
|
702
724
|
|
|
703
725
|
return badge ? (
|
|
704
726
|
<Badge variant="default" className="font-semibold">
|
|
@@ -706,7 +728,7 @@ export function Price({
|
|
|
706
728
|
</Badge>
|
|
707
729
|
) : (
|
|
708
730
|
content
|
|
709
|
-
)
|
|
731
|
+
);
|
|
710
732
|
}
|
|
711
733
|
```
|
|
712
734
|
|
|
@@ -714,64 +736,67 @@ export function Price({
|
|
|
714
736
|
|
|
715
737
|
```tsx
|
|
716
738
|
// frontend/src/components/fields/Image.tsx
|
|
717
|
-
import { useState } from
|
|
718
|
-
import { Skeleton } from
|
|
719
|
-
import { cn } from
|
|
739
|
+
import { useState } from "react";
|
|
740
|
+
import { Skeleton } from "@/components/ui/skeleton";
|
|
741
|
+
import { cn } from "@/lib/utils";
|
|
720
742
|
|
|
721
743
|
interface ImageProps {
|
|
722
|
-
src: string
|
|
723
|
-
alt: string
|
|
724
|
-
aspect?:
|
|
725
|
-
lazy?: boolean
|
|
726
|
-
placeholder?: string
|
|
727
|
-
fallback?: string
|
|
728
|
-
sizes?: string
|
|
729
|
-
className?: string
|
|
744
|
+
src: string;
|
|
745
|
+
alt: string;
|
|
746
|
+
aspect?: "square" | "video" | "wide" | "portrait";
|
|
747
|
+
lazy?: boolean;
|
|
748
|
+
placeholder?: string;
|
|
749
|
+
fallback?: string;
|
|
750
|
+
sizes?: string;
|
|
751
|
+
className?: string;
|
|
730
752
|
}
|
|
731
753
|
|
|
732
754
|
export function Image({
|
|
733
755
|
src,
|
|
734
756
|
alt,
|
|
735
|
-
aspect =
|
|
757
|
+
aspect = "video",
|
|
736
758
|
lazy = true,
|
|
737
759
|
placeholder,
|
|
738
760
|
fallback,
|
|
739
761
|
sizes,
|
|
740
|
-
className
|
|
762
|
+
className,
|
|
741
763
|
}: ImageProps) {
|
|
742
|
-
const [loading, setLoading] = useState(true)
|
|
743
|
-
const [error, setError] = useState(false)
|
|
764
|
+
const [loading, setLoading] = useState(true);
|
|
765
|
+
const [error, setError] = useState(false);
|
|
744
766
|
|
|
745
767
|
const aspectClasses = {
|
|
746
|
-
square:
|
|
747
|
-
video:
|
|
748
|
-
wide:
|
|
749
|
-
portrait:
|
|
750
|
-
}
|
|
768
|
+
square: "aspect-square",
|
|
769
|
+
video: "aspect-video",
|
|
770
|
+
wide: "aspect-[21/9]",
|
|
771
|
+
portrait: "aspect-[3/4]",
|
|
772
|
+
};
|
|
751
773
|
|
|
752
774
|
return (
|
|
753
|
-
<div
|
|
754
|
-
{
|
|
755
|
-
|
|
775
|
+
<div
|
|
776
|
+
className={cn(
|
|
777
|
+
"relative overflow-hidden rounded-md",
|
|
778
|
+
aspectClasses[aspect],
|
|
756
779
|
)}
|
|
780
|
+
>
|
|
781
|
+
{loading && <Skeleton className="absolute inset-0" />}
|
|
757
782
|
<img
|
|
758
783
|
src={error && fallback ? fallback : src}
|
|
759
784
|
alt={alt}
|
|
760
|
-
loading={lazy ?
|
|
785
|
+
loading={lazy ? "lazy" : "eager"}
|
|
761
786
|
sizes={sizes}
|
|
762
787
|
className={cn(
|
|
763
|
-
|
|
764
|
-
loading ?
|
|
765
|
-
className
|
|
788
|
+
"h-full w-full object-cover transition-opacity",
|
|
789
|
+
loading ? "opacity-0" : "opacity-100",
|
|
790
|
+
className,
|
|
766
791
|
)}
|
|
767
792
|
onLoad={() => setLoading(false)}
|
|
768
793
|
onError={() => {
|
|
769
|
-
setError(true)
|
|
770
|
-
setLoading(false)
|
|
794
|
+
setError(true);
|
|
795
|
+
setLoading(false);
|
|
771
796
|
}}
|
|
772
797
|
/>
|
|
773
798
|
</div>
|
|
774
|
-
)
|
|
799
|
+
);
|
|
775
800
|
}
|
|
776
801
|
```
|
|
777
802
|
|
|
@@ -779,35 +804,35 @@ export function Image({
|
|
|
779
804
|
|
|
780
805
|
```tsx
|
|
781
806
|
// frontend/src/components/fields/TagList.tsx
|
|
782
|
-
import { Badge } from
|
|
807
|
+
import { Badge } from "@/components/ui/badge";
|
|
783
808
|
import {
|
|
784
809
|
Tooltip,
|
|
785
810
|
TooltipContent,
|
|
786
811
|
TooltipProvider,
|
|
787
812
|
TooltipTrigger,
|
|
788
|
-
} from
|
|
813
|
+
} from "@/components/ui/tooltip";
|
|
789
814
|
|
|
790
815
|
interface TagListProps {
|
|
791
|
-
tags: string[]
|
|
792
|
-
max?: number
|
|
793
|
-
color?: string
|
|
794
|
-
moreLabel?: string
|
|
816
|
+
tags: string[];
|
|
817
|
+
max?: number;
|
|
818
|
+
color?: string;
|
|
819
|
+
moreLabel?: string;
|
|
795
820
|
}
|
|
796
821
|
|
|
797
822
|
export function TagList({
|
|
798
823
|
tags,
|
|
799
824
|
max = 3,
|
|
800
|
-
color =
|
|
801
|
-
moreLabel =
|
|
825
|
+
color = "default",
|
|
826
|
+
moreLabel = "+{count} more",
|
|
802
827
|
}: TagListProps) {
|
|
803
|
-
if (!tags || tags.length === 0) return null
|
|
828
|
+
if (!tags || tags.length === 0) return null;
|
|
804
829
|
|
|
805
|
-
const visibleTags = tags.slice(0, max)
|
|
806
|
-
const hiddenTags = tags.slice(max)
|
|
830
|
+
const visibleTags = tags.slice(0, max);
|
|
831
|
+
const hiddenTags = tags.slice(max);
|
|
807
832
|
|
|
808
833
|
return (
|
|
809
834
|
<div className="flex flex-wrap gap-1">
|
|
810
|
-
{visibleTags.map(tag => (
|
|
835
|
+
{visibleTags.map((tag) => (
|
|
811
836
|
<Badge key={tag} variant="secondary" className="text-xs">
|
|
812
837
|
{tag}
|
|
813
838
|
</Badge>
|
|
@@ -818,12 +843,12 @@ export function TagList({
|
|
|
818
843
|
<Tooltip>
|
|
819
844
|
<TooltipTrigger asChild>
|
|
820
845
|
<Badge variant="outline" className="text-xs cursor-help">
|
|
821
|
-
{moreLabel.replace(
|
|
846
|
+
{moreLabel.replace("{count}", hiddenTags.length.toString())}
|
|
822
847
|
</Badge>
|
|
823
848
|
</TooltipTrigger>
|
|
824
849
|
<TooltipContent>
|
|
825
850
|
<div className="flex flex-wrap gap-1 max-w-xs">
|
|
826
|
-
{hiddenTags.map(tag => (
|
|
851
|
+
{hiddenTags.map((tag) => (
|
|
827
852
|
<Badge key={tag} variant="secondary" className="text-xs">
|
|
828
853
|
{tag}
|
|
829
854
|
</Badge>
|
|
@@ -834,7 +859,7 @@ export function TagList({
|
|
|
834
859
|
</TooltipProvider>
|
|
835
860
|
)}
|
|
836
861
|
</div>
|
|
837
|
-
)
|
|
862
|
+
);
|
|
838
863
|
}
|
|
839
864
|
```
|
|
840
865
|
|
|
@@ -844,13 +869,13 @@ export function TagList({
|
|
|
844
869
|
|
|
845
870
|
```tsx
|
|
846
871
|
// frontend/src/components/generic/EmptyState.tsx
|
|
847
|
-
import { type EmptyStateConfig } from
|
|
848
|
-
import { Button } from
|
|
849
|
-
import { Card, CardContent } from
|
|
872
|
+
import { type EmptyStateConfig } from "@/ontology/types";
|
|
873
|
+
import { Button } from "@/components/ui/button";
|
|
874
|
+
import { Card, CardContent } from "@/components/ui/card";
|
|
850
875
|
|
|
851
876
|
interface EmptyStateProps {
|
|
852
|
-
config: EmptyStateConfig
|
|
853
|
-
onAction?: () => void
|
|
877
|
+
config: EmptyStateConfig;
|
|
878
|
+
onAction?: () => void;
|
|
854
879
|
}
|
|
855
880
|
|
|
856
881
|
export function EmptyState({ config, onAction }: EmptyStateProps) {
|
|
@@ -862,22 +887,18 @@ export function EmptyState({ config, onAction }: EmptyStateProps) {
|
|
|
862
887
|
<span className="h-10 w-10 text-muted-foreground" />
|
|
863
888
|
</div>
|
|
864
889
|
|
|
865
|
-
<h3 className="text-xl font-semibold mb-2">
|
|
866
|
-
{config.title}
|
|
867
|
-
</h3>
|
|
890
|
+
<h3 className="text-xl font-semibold mb-2">{config.title}</h3>
|
|
868
891
|
|
|
869
892
|
<p className="text-sm text-muted-foreground text-center mb-6 max-w-sm">
|
|
870
893
|
{config.description}
|
|
871
894
|
</p>
|
|
872
895
|
|
|
873
896
|
{config.action && (
|
|
874
|
-
<Button onClick={onAction}>
|
|
875
|
-
{config.action.label}
|
|
876
|
-
</Button>
|
|
897
|
+
<Button onClick={onAction}>{config.action.label}</Button>
|
|
877
898
|
)}
|
|
878
899
|
</CardContent>
|
|
879
900
|
</Card>
|
|
880
|
-
)
|
|
901
|
+
);
|
|
881
902
|
}
|
|
882
903
|
```
|
|
883
904
|
|
|
@@ -887,8 +908,8 @@ export function EmptyState({ config, onAction }: EmptyStateProps) {
|
|
|
887
908
|
|
|
888
909
|
```tsx
|
|
889
910
|
// frontend/src/components/generic/ThingTable.tsx
|
|
890
|
-
import { type Thing } from
|
|
891
|
-
import { useThingConfig } from
|
|
911
|
+
import { type Thing } from "@one-platform/core";
|
|
912
|
+
import { useThingConfig } from "@/ontology/hooks/useThingConfig";
|
|
892
913
|
import {
|
|
893
914
|
Table,
|
|
894
915
|
TableBody,
|
|
@@ -896,31 +917,31 @@ import {
|
|
|
896
917
|
TableHead,
|
|
897
918
|
TableHeader,
|
|
898
919
|
TableRow,
|
|
899
|
-
} from
|
|
900
|
-
import { Button } from
|
|
901
|
-
import { Field } from
|
|
902
|
-
import { ArrowUpDown } from
|
|
920
|
+
} from "@/components/ui/table";
|
|
921
|
+
import { Button } from "@/components/ui/button";
|
|
922
|
+
import { Field } from "./Field";
|
|
923
|
+
import { ArrowUpDown } from "lucide-react";
|
|
903
924
|
|
|
904
925
|
interface ThingTableProps {
|
|
905
|
-
things: Thing[]
|
|
906
|
-
onRowClick?: (thing: Thing) => void
|
|
926
|
+
things: Thing[];
|
|
927
|
+
onRowClick?: (thing: Thing) => void;
|
|
907
928
|
}
|
|
908
929
|
|
|
909
930
|
export function ThingTable({ things, onRowClick }: ThingTableProps) {
|
|
910
|
-
if (things.length === 0) return null
|
|
931
|
+
if (things.length === 0) return null;
|
|
911
932
|
|
|
912
|
-
const config = useThingConfig(things[0].type)
|
|
913
|
-
const tableView = config.ui.views.table
|
|
933
|
+
const config = useThingConfig(things[0].type);
|
|
934
|
+
const tableView = config.ui.views.table;
|
|
914
935
|
|
|
915
|
-
if (!tableView) return null
|
|
936
|
+
if (!tableView) return null;
|
|
916
937
|
|
|
917
938
|
return (
|
|
918
939
|
<div className="rounded-md border">
|
|
919
940
|
<Table>
|
|
920
941
|
<TableHeader>
|
|
921
942
|
<TableRow>
|
|
922
|
-
{tableView.fields.map(fieldName => {
|
|
923
|
-
const fieldConfig = config.ui.fields[fieldName]
|
|
943
|
+
{tableView.fields.map((fieldName) => {
|
|
944
|
+
const fieldConfig = config.ui.fields[fieldName];
|
|
924
945
|
return (
|
|
925
946
|
<TableHead key={fieldName}>
|
|
926
947
|
<Button
|
|
@@ -935,18 +956,18 @@ export function ThingTable({ things, onRowClick }: ThingTableProps) {
|
|
|
935
956
|
<ArrowUpDown className="ml-2 h-4 w-4" />
|
|
936
957
|
</Button>
|
|
937
958
|
</TableHead>
|
|
938
|
-
)
|
|
959
|
+
);
|
|
939
960
|
})}
|
|
940
961
|
</TableRow>
|
|
941
962
|
</TableHeader>
|
|
942
963
|
<TableBody>
|
|
943
|
-
{things.map(thing => (
|
|
964
|
+
{things.map((thing) => (
|
|
944
965
|
<TableRow
|
|
945
966
|
key={thing._id}
|
|
946
967
|
className="cursor-pointer"
|
|
947
968
|
onClick={() => onRowClick?.(thing)}
|
|
948
969
|
>
|
|
949
|
-
{tableView.fields.map(fieldName => (
|
|
970
|
+
{tableView.fields.map((fieldName) => (
|
|
950
971
|
<TableCell key={fieldName}>
|
|
951
972
|
<Field
|
|
952
973
|
name={fieldName}
|
|
@@ -961,7 +982,7 @@ export function ThingTable({ things, onRowClick }: ThingTableProps) {
|
|
|
961
982
|
</TableBody>
|
|
962
983
|
</Table>
|
|
963
984
|
</div>
|
|
964
|
-
)
|
|
985
|
+
);
|
|
965
986
|
}
|
|
966
987
|
```
|
|
967
988
|
|
|
@@ -975,69 +996,69 @@ shadcn/ui includes built-in dark mode support:
|
|
|
975
996
|
|
|
976
997
|
```tsx
|
|
977
998
|
// frontend/src/components/ThemeProvider.tsx
|
|
978
|
-
import { createContext, useContext, useEffect, useState } from
|
|
999
|
+
import { createContext, useContext, useEffect, useState } from "react";
|
|
979
1000
|
|
|
980
|
-
type Theme =
|
|
1001
|
+
type Theme = "dark" | "light" | "system";
|
|
981
1002
|
|
|
982
1003
|
const ThemeProviderContext = createContext<{
|
|
983
|
-
theme: Theme
|
|
984
|
-
setTheme: (theme: Theme) => void
|
|
1004
|
+
theme: Theme;
|
|
1005
|
+
setTheme: (theme: Theme) => void;
|
|
985
1006
|
}>({
|
|
986
|
-
theme:
|
|
1007
|
+
theme: "system",
|
|
987
1008
|
setTheme: () => null,
|
|
988
|
-
})
|
|
1009
|
+
});
|
|
989
1010
|
|
|
990
1011
|
export function ThemeProvider({
|
|
991
1012
|
children,
|
|
992
|
-
defaultTheme =
|
|
1013
|
+
defaultTheme = "system",
|
|
993
1014
|
}: {
|
|
994
|
-
children: React.ReactNode
|
|
995
|
-
defaultTheme?: Theme
|
|
1015
|
+
children: React.ReactNode;
|
|
1016
|
+
defaultTheme?: Theme;
|
|
996
1017
|
}) {
|
|
997
|
-
const [theme, setTheme] = useState<Theme>(defaultTheme)
|
|
1018
|
+
const [theme, setTheme] = useState<Theme>(defaultTheme);
|
|
998
1019
|
|
|
999
1020
|
useEffect(() => {
|
|
1000
|
-
const root = window.document.documentElement
|
|
1001
|
-
root.classList.remove(
|
|
1021
|
+
const root = window.document.documentElement;
|
|
1022
|
+
root.classList.remove("light", "dark");
|
|
1002
1023
|
|
|
1003
|
-
if (theme ===
|
|
1004
|
-
const systemTheme = window.matchMedia(
|
|
1024
|
+
if (theme === "system") {
|
|
1025
|
+
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
|
|
1005
1026
|
.matches
|
|
1006
|
-
?
|
|
1007
|
-
:
|
|
1008
|
-
root.classList.add(systemTheme)
|
|
1009
|
-
return
|
|
1027
|
+
? "dark"
|
|
1028
|
+
: "light";
|
|
1029
|
+
root.classList.add(systemTheme);
|
|
1030
|
+
return;
|
|
1010
1031
|
}
|
|
1011
1032
|
|
|
1012
|
-
root.classList.add(theme)
|
|
1013
|
-
}, [theme])
|
|
1033
|
+
root.classList.add(theme);
|
|
1034
|
+
}, [theme]);
|
|
1014
1035
|
|
|
1015
1036
|
return (
|
|
1016
1037
|
<ThemeProviderContext.Provider value={{ theme, setTheme }}>
|
|
1017
1038
|
{children}
|
|
1018
1039
|
</ThemeProviderContext.Provider>
|
|
1019
|
-
)
|
|
1040
|
+
);
|
|
1020
1041
|
}
|
|
1021
1042
|
|
|
1022
|
-
export const useTheme = () => useContext(ThemeProviderContext)
|
|
1043
|
+
export const useTheme = () => useContext(ThemeProviderContext);
|
|
1023
1044
|
```
|
|
1024
1045
|
|
|
1025
1046
|
### Theme Toggle
|
|
1026
1047
|
|
|
1027
1048
|
```tsx
|
|
1028
1049
|
// frontend/src/components/ThemeToggle.tsx
|
|
1029
|
-
import { Moon, Sun } from
|
|
1030
|
-
import { Button } from
|
|
1050
|
+
import { Moon, Sun } from "lucide-react";
|
|
1051
|
+
import { Button } from "@/components/ui/button";
|
|
1031
1052
|
import {
|
|
1032
1053
|
DropdownMenu,
|
|
1033
1054
|
DropdownMenuContent,
|
|
1034
1055
|
DropdownMenuItem,
|
|
1035
1056
|
DropdownMenuTrigger,
|
|
1036
|
-
} from
|
|
1037
|
-
import { useTheme } from
|
|
1057
|
+
} from "@/components/ui/dropdown-menu";
|
|
1058
|
+
import { useTheme } from "./ThemeProvider";
|
|
1038
1059
|
|
|
1039
1060
|
export function ThemeToggle() {
|
|
1040
|
-
const { setTheme } = useTheme()
|
|
1061
|
+
const { setTheme } = useTheme();
|
|
1041
1062
|
|
|
1042
1063
|
return (
|
|
1043
1064
|
<DropdownMenu>
|
|
@@ -1049,18 +1070,18 @@ export function ThemeToggle() {
|
|
|
1049
1070
|
</Button>
|
|
1050
1071
|
</DropdownMenuTrigger>
|
|
1051
1072
|
<DropdownMenuContent align="end">
|
|
1052
|
-
<DropdownMenuItem onClick={() => setTheme(
|
|
1073
|
+
<DropdownMenuItem onClick={() => setTheme("light")}>
|
|
1053
1074
|
Light
|
|
1054
1075
|
</DropdownMenuItem>
|
|
1055
|
-
<DropdownMenuItem onClick={() => setTheme(
|
|
1076
|
+
<DropdownMenuItem onClick={() => setTheme("dark")}>
|
|
1056
1077
|
Dark
|
|
1057
1078
|
</DropdownMenuItem>
|
|
1058
|
-
<DropdownMenuItem onClick={() => setTheme(
|
|
1079
|
+
<DropdownMenuItem onClick={() => setTheme("system")}>
|
|
1059
1080
|
System
|
|
1060
1081
|
</DropdownMenuItem>
|
|
1061
1082
|
</DropdownMenuContent>
|
|
1062
1083
|
</DropdownMenu>
|
|
1063
|
-
)
|
|
1084
|
+
);
|
|
1064
1085
|
}
|
|
1065
1086
|
```
|
|
1066
1087
|
|
|
@@ -1117,55 +1138,52 @@ shadcn/ui components are built on Radix UI, which provides:
|
|
|
1117
1138
|
### Course Card
|
|
1118
1139
|
|
|
1119
1140
|
```tsx
|
|
1120
|
-
import { ThingCard } from
|
|
1141
|
+
import { ThingCard } from "@/components/generic/ThingCard";
|
|
1121
1142
|
|
|
1122
1143
|
export function CoursesPage() {
|
|
1123
|
-
const courses = await getCourses()
|
|
1144
|
+
const courses = await getCourses();
|
|
1124
1145
|
|
|
1125
1146
|
return (
|
|
1126
1147
|
<div className="container mx-auto py-8">
|
|
1127
1148
|
<h1 className="text-3xl font-bold mb-6">Courses</h1>
|
|
1128
1149
|
|
|
1129
1150
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
1130
|
-
{courses.map(course => (
|
|
1151
|
+
{courses.map((course) => (
|
|
1131
1152
|
<ThingCard
|
|
1132
1153
|
key={course._id}
|
|
1133
1154
|
thing={course}
|
|
1134
1155
|
onClick={(thing) => {
|
|
1135
|
-
router.push(`/courses/${thing._id}`)
|
|
1156
|
+
router.push(`/courses/${thing._id}`);
|
|
1136
1157
|
}}
|
|
1137
1158
|
/>
|
|
1138
1159
|
))}
|
|
1139
1160
|
</div>
|
|
1140
1161
|
</div>
|
|
1141
|
-
)
|
|
1162
|
+
);
|
|
1142
1163
|
}
|
|
1143
1164
|
```
|
|
1144
1165
|
|
|
1145
1166
|
### Product Grid with Filters
|
|
1146
1167
|
|
|
1147
1168
|
```tsx
|
|
1148
|
-
import { ThingCard } from
|
|
1169
|
+
import { ThingCard } from "@/components/generic/ThingCard";
|
|
1149
1170
|
import {
|
|
1150
1171
|
Select,
|
|
1151
1172
|
SelectContent,
|
|
1152
1173
|
SelectItem,
|
|
1153
1174
|
SelectTrigger,
|
|
1154
1175
|
SelectValue,
|
|
1155
|
-
} from
|
|
1156
|
-
import { Input } from
|
|
1176
|
+
} from "@/components/ui/select";
|
|
1177
|
+
import { Input } from "@/components/ui/input";
|
|
1157
1178
|
|
|
1158
1179
|
export function ProductsPage() {
|
|
1159
|
-
const [products, setProducts] = useState([])
|
|
1160
|
-
const [category, setCategory] = useState(
|
|
1180
|
+
const [products, setProducts] = useState([]);
|
|
1181
|
+
const [category, setCategory] = useState("all");
|
|
1161
1182
|
|
|
1162
1183
|
return (
|
|
1163
1184
|
<div className="container mx-auto py-8">
|
|
1164
1185
|
<div className="flex items-center gap-4 mb-6">
|
|
1165
|
-
<Input
|
|
1166
|
-
placeholder="Search products..."
|
|
1167
|
-
className="max-w-sm"
|
|
1168
|
-
/>
|
|
1186
|
+
<Input placeholder="Search products..." className="max-w-sm" />
|
|
1169
1187
|
<Select value={category} onValueChange={setCategory}>
|
|
1170
1188
|
<SelectTrigger className="w-[180px]">
|
|
1171
1189
|
<SelectValue placeholder="Category" />
|
|
@@ -1179,12 +1197,12 @@ export function ProductsPage() {
|
|
|
1179
1197
|
</div>
|
|
1180
1198
|
|
|
1181
1199
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
1182
|
-
{products.map(product => (
|
|
1200
|
+
{products.map((product) => (
|
|
1183
1201
|
<ThingCard key={product._id} thing={product} />
|
|
1184
1202
|
))}
|
|
1185
1203
|
</div>
|
|
1186
1204
|
</div>
|
|
1187
|
-
)
|
|
1205
|
+
);
|
|
1188
1206
|
}
|
|
1189
1207
|
```
|
|
1190
1208
|
|
|
@@ -1228,14 +1246,14 @@ const config = {
|
|
|
1228
1246
|
level: {
|
|
1229
1247
|
...defaultCourseConfig.ui.fields.level,
|
|
1230
1248
|
colors: {
|
|
1231
|
-
beginner:
|
|
1232
|
-
intermediate:
|
|
1233
|
-
advanced:
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1249
|
+
beginner: "blue", // Override to blue
|
|
1250
|
+
intermediate: "purple",
|
|
1251
|
+
advanced: "orange",
|
|
1252
|
+
},
|
|
1253
|
+
},
|
|
1254
|
+
},
|
|
1255
|
+
},
|
|
1256
|
+
};
|
|
1239
1257
|
```
|
|
1240
1258
|
|
|
1241
1259
|
---
|
|
@@ -1243,24 +1261,28 @@ const config = {
|
|
|
1243
1261
|
## Next Steps
|
|
1244
1262
|
|
|
1245
1263
|
### Week 1: Setup
|
|
1264
|
+
|
|
1246
1265
|
- [ ] Install shadcn/ui
|
|
1247
1266
|
- [ ] Add all required components
|
|
1248
1267
|
- [ ] Setup theme provider
|
|
1249
1268
|
- [ ] Configure Tailwind
|
|
1250
1269
|
|
|
1251
1270
|
### Week 2: Core Components
|
|
1271
|
+
|
|
1252
1272
|
- [ ] Build ThingCard with shadcn/ui
|
|
1253
1273
|
- [ ] Build Field component
|
|
1254
1274
|
- [ ] Build Actions component
|
|
1255
1275
|
- [ ] Test with 3 thing types
|
|
1256
1276
|
|
|
1257
1277
|
### Week 3: Field Components
|
|
1278
|
+
|
|
1258
1279
|
- [ ] Build all field components
|
|
1259
1280
|
- [ ] Add Price, Image, TagList
|
|
1260
1281
|
- [ ] Add DateField, Avatar, Link
|
|
1261
1282
|
- [ ] Test responsive design
|
|
1262
1283
|
|
|
1263
1284
|
### Week 4: Advanced
|
|
1285
|
+
|
|
1264
1286
|
- [ ] Build ThingTable
|
|
1265
1287
|
- [ ] Add dark mode support
|
|
1266
1288
|
- [ ] Add accessibility features
|