@almadar/cli 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/almadar +32 -1
- package/package.json +8 -6
- package/scripts/postinstall.js +41 -0
- package/shells/python-shell/.dockerignore +50 -0
- package/shells/python-shell/.env.example +55 -0
- package/shells/python-shell/Dockerfile +56 -0
- package/shells/python-shell/README.md +253 -0
- package/shells/python-shell/cloudbuild.yaml +76 -0
- package/shells/python-shell/docker-compose.yaml +57 -0
- package/shells/python-shell/pyproject.toml +28 -0
- package/shells/python-shell/scripts/deploy.sh +108 -0
- package/shells/python-shell/scripts/setup-secrets.sh +104 -0
- package/shells/python-shell/src/orbital_app/__init__.py +8 -0
- package/shells/python-shell/src/orbital_app/core/__init__.py +40 -0
- package/shells/python-shell/src/orbital_app/core/bindings.py +75 -0
- package/shells/python-shell/src/orbital_app/core/effect_executor.py +196 -0
- package/shells/python-shell/src/orbital_app/core/event_bus.py +119 -0
- package/shells/python-shell/src/orbital_app/core/event_router.py +38 -0
- package/shells/python-shell/src/orbital_app/core/firebase.py +112 -0
- package/shells/python-shell/src/orbital_app/core/repository.py +257 -0
- package/shells/python-shell/src/orbital_app/core/settings.py +74 -0
- package/shells/python-shell/src/orbital_app/core/websocket.py +202 -0
- package/shells/python-shell/src/orbital_app/main.py +108 -0
- package/shells/python-shell/src/orbital_app/middleware/__init__.py +18 -0
- package/shells/python-shell/src/orbital_app/middleware/auth.py +126 -0
- package/shells/python-shell/src/orbital_app/nn/__init__.py +28 -0
- package/shells/python-shell/src/orbital_app/nn/constraints.py +104 -0
- package/shells/python-shell/src/orbital_app/nn/forward.py +34 -0
- package/shells/python-shell/src/orbital_app/nn/training.py +101 -0
- package/shells/python-shell/src/orbital_app/tensor/__init__.py +46 -0
- package/shells/python-shell/src/orbital_app/tensor/contracts.py +112 -0
- package/shells/python-shell/src/orbital_app/tensor/ops.py +196 -0
- package/shells/python-shell/tests/conftest.py +63 -0
- package/shells/python-shell/tests/test_effect_executor.py +197 -0
- package/shells/python-shell/tests/test_event_bus.py +194 -0
- package/shells/python-shell/tests/test_generated_traits.py +268 -0
- package/shells/python-shell/tests/test_integration.py +347 -0
- package/shells/python-shell/tests/test_nn_builder.py +113 -0
- package/shells/python-shell/tests/test_nn_constraints.py +187 -0
- package/shells/python-shell/tests/test_nn_forward.py +98 -0
- package/shells/python-shell/tests/test_nn_training.py +130 -0
- package/shells/python-shell/tests/test_repository.py +151 -0
- package/shells/python-shell/tests/test_tensor_contracts.py +168 -0
- package/shells/python-shell/tests/test_tensor_ops.py +260 -0
- package/shells/typescript-shell/.env.example +30 -0
- package/shells/typescript-shell/.firebaserc.template +14 -0
- package/shells/typescript-shell/.prettierrc +7 -0
- package/shells/typescript-shell/Dockerfile +0 -0
- package/shells/typescript-shell/apphosting.yaml.template +0 -0
- package/shells/typescript-shell/firebase.json.template +0 -0
- package/shells/typescript-shell/firestore.indexes.json +4 -0
- package/shells/typescript-shell/firestore.rules.template +0 -0
- package/shells/typescript-shell/infra/aws/alb.tf +0 -0
- package/shells/typescript-shell/infra/aws/cloudfront.tf +0 -0
- package/shells/typescript-shell/infra/aws/ecs.tf +0 -0
- package/shells/typescript-shell/infra/aws/main.tf +0 -0
- package/shells/typescript-shell/infra/aws/rds.tf +0 -0
- package/shells/typescript-shell/infra/docker/Dockerfile.client +0 -0
- package/shells/typescript-shell/infra/docker/Dockerfile.server +0 -0
- package/shells/typescript-shell/infra/docker/docker-compose.prod.yml +45 -0
- package/shells/typescript-shell/infra/docker/docker-compose.yml +57 -0
- package/shells/typescript-shell/infra/docker/nginx.conf +0 -0
- package/shells/typescript-shell/infra/main.tf +0 -0
- package/shells/typescript-shell/infra/terraform/aws/alb.tf +0 -0
- package/shells/typescript-shell/infra/terraform/aws/cloudfront.tf +0 -0
- package/shells/typescript-shell/infra/terraform/aws/ecs.tf +0 -0
- package/shells/typescript-shell/infra/terraform/aws/main.tf +0 -0
- package/shells/typescript-shell/infra/terraform/aws/rds.tf +0 -0
- package/shells/typescript-shell/infra/terraform/main.tf +0 -0
- package/shells/typescript-shell/infra/terraform/variables.tf +0 -0
- package/shells/typescript-shell/infra/variables.tf +0 -0
- package/shells/typescript-shell/package-lock.json +15210 -0
- package/shells/typescript-shell/package.json +64 -0
- package/shells/typescript-shell/packages/client/.env.example +30 -0
- package/shells/typescript-shell/packages/client/index.html +13 -0
- package/shells/typescript-shell/packages/client/package.json +52 -0
- package/shells/typescript-shell/packages/client/postcss.config.js +6 -0
- package/shells/typescript-shell/packages/client/src/App.tsx +56 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/CreditExpirationAlert.stories.tsx +75 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/CreditExpirationAlert.tsx +157 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/CreditMeter.stories.tsx +155 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/CreditMeter.tsx +370 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/ExerciseVideoLink.stories.tsx +50 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/ExerciseVideoLink.tsx +143 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/ShareableLinkGenerator.stories.tsx +54 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/ShareableLinkGenerator.tsx +210 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/atoms/index.ts +4 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/index.ts +83 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/BodyMeasurementInput.stories.tsx +117 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/BodyMeasurementInput.tsx +343 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/DailyProgressInput.stories.tsx +82 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/DailyProgressInput.tsx +345 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/GroupSessionCard.stories.tsx +155 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/GroupSessionCard.tsx +319 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/LiftTracker.stories.tsx +110 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/LiftTracker.tsx +395 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/MealPlanCard.stories.tsx +132 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/MealPlanCard.tsx +394 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/NutritionSummary.stories.tsx +127 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/NutritionSummary.tsx +360 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/ProgressChart.stories.tsx +119 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/ProgressChart.tsx +377 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/SpecialExerciseCard.stories.tsx +115 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/SpecialExerciseCard.tsx +294 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/TraineeCard.stories.tsx +139 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/TraineeCard.tsx +306 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/WorkoutPlanCard.stories.tsx +140 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/WorkoutPlanCard.tsx +379 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/molecules/index.ts +10 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/AIAnalysisPanel.stories.tsx +171 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/AIAnalysisPanel.tsx +257 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/KinesiologyExamForm.stories.tsx +157 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/KinesiologyExamForm.tsx +383 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/SessionScheduler.stories.tsx +249 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/SessionScheduler.tsx +637 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/TraineeComparison.stories.tsx +221 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/TraineeComparison.tsx +438 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/WeeklyCalendar.stories.tsx +208 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/WeeklyCalendar.tsx +380 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/organisms/index.ts +5 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/CreditsTemplate.stories.tsx +243 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/CreditsTemplate.tsx +496 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/FitnessTemplate.stories.tsx +237 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/FitnessTemplate.tsx +457 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/MealPlanDetailTemplate.stories.tsx +184 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/MealPlanDetailTemplate.tsx +414 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/MealPlansTemplate.stories.tsx +198 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/MealPlansTemplate.tsx +296 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/ProgressTemplate.stories.tsx +242 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/ProgressTemplate.tsx +497 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/ScheduleTemplate.stories.tsx +267 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/ScheduleTemplate.tsx +424 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/SessionDetailTemplate.stories.tsx +214 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/SessionDetailTemplate.tsx +518 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/SessionsTemplate.stories.tsx +207 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/SessionsTemplate.tsx +508 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/TraineeDetailTemplate.stories.tsx +178 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/TraineeDetailTemplate.tsx +396 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/TraineesTemplate.stories.tsx +168 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/TraineesTemplate.tsx +429 -0
- package/shells/typescript-shell/packages/client/src/clients/blaz-kelemnc/templates/index.ts +44 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/atoms/LawReferenceBadge.stories.tsx +78 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/atoms/LawReferenceBadge.tsx +87 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/atoms/PhaseIndicator.stories.tsx +91 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/atoms/PhaseIndicator.tsx +142 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/atoms/index.ts +8 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/index.ts +79 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-001-uvod.json +361 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-001-uvod.ts +361 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-002-podjetje.json +115 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-002-podjetje.ts +115 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-003-udelezenci.json +78 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-003-udelezenci.ts +78 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-004-izbira-podrocja.json +85 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-004-izbira-podrocja.ts +94 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-005-trgovina.json +1056 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-005-trgovina.ts +1056 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-006-ugotovitve.json +128 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-006-ugotovitve.ts +128 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-007-odlocbe.json +136 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-007-odlocbe.ts +136 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-008-pripombe.json +148 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-008-pripombe.ts +148 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-009-zakljucek.json +207 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T-009-zakljucek.ts +207 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T2-1-oznacevanje-cen.json +1265 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/configs/tabs/T2-1-oznacevanje-cen.ts +1265 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/index.ts +137 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/CardSelector.stories.tsx +128 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/CardSelector.tsx +174 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/ComplianceSummary.stories.tsx +115 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/ComplianceSummary.tsx +263 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/ConditionalField.tsx +254 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/DocumentPreview.tsx +249 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/EntitySearch.tsx +290 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/InspectionTimeline.stories.tsx +138 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/InspectionTimeline.tsx +253 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/ObjectionRecorder.tsx +213 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/ParticipantList.stories.tsx +86 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/ParticipantList.tsx +227 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/PhotoAttachment.tsx +276 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/ProgressHeader.stories.tsx +89 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/ProgressHeader.tsx +157 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/RepeatableFormSection.tsx +189 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/RuleCheckItem.stories.tsx +118 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/RuleCheckItem.tsx +237 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/molecules/index.ts +18 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/organisms/FloatingActionMenu.stories.tsx +75 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/organisms/FloatingActionMenu.tsx +197 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/organisms/SignatureCapture.stories.tsx +96 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/organisms/SignatureCapture.tsx +278 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/organisms/index.ts +8 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/CompaniesTemplate.stories.tsx +107 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/CompaniesTemplate.tsx +266 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectionFormDemoTemplate.stories.tsx +607 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectionFormDemoTemplate.tsx +1428 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectionProcessTemplate.stories.tsx +713 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectionProcessTemplate.tsx +1582 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectionWizardTemplate.stories.tsx +174 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectionWizardTemplate.tsx +264 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectionsTemplate.stories.tsx +129 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectionsTemplate.tsx +287 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectorsTemplate.stories.tsx +94 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/InspectorsTemplate.tsx +255 -0
- package/shells/typescript-shell/packages/client/src/clients/inspection-system/templates/index.ts +47 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/atoms/MindMapConnections.stories.tsx +82 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/atoms/MindMapConnections.tsx +75 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/atoms/index.ts +2 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/index.ts +96 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/ConceptMetaTags.stories.tsx +64 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/ConceptMetaTags.tsx +77 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/GraphLegend.stories.tsx +100 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/GraphLegend.tsx +120 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/LayerNavigator.stories.tsx +109 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/LayerNavigator.tsx +157 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/LearningGoalDisplay.stories.tsx +62 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/LearningGoalDisplay.tsx +138 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/MindMapHeader.tsx +47 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/MindMapNode.stories.tsx +212 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/MindMapNode.tsx +294 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/NoteContent.stories.tsx +98 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/NoteContent.tsx +163 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/NoteListItem.stories.tsx +196 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/NoteListItem.tsx +239 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/QuizBlock.tsx +3 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/StreamingDisplay.stories.tsx +132 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/StreamingDisplay.tsx +232 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/index.ts +28 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/ActivationBlock.stories.tsx +71 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/ActivationBlock.tsx +127 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/BloomQuizBlock.stories.tsx +154 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/BloomQuizBlock.tsx +232 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/ConnectionBlock.stories.tsx +57 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/ConnectionBlock.tsx +60 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/QuizBlock.tsx +138 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/ReflectionBlock.stories.tsx +90 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/ReflectionBlock.tsx +151 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/learning/index.ts +14 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/markdown/CodeBlock.stories.tsx +188 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/markdown/CodeBlock.tsx +165 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/markdown/MarkdownContent.stories.tsx +160 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/markdown/MarkdownContent.tsx +131 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/molecules/markdown/index.ts +5 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/ConceptCard.stories.tsx +155 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/ConceptCard.tsx +301 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/FlashCard.stories.tsx +105 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/FlashCard.tsx +200 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/FlashCardStack.stories.tsx +97 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/FlashCardStack.tsx +163 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/FlashCardsDisplay.tsx +236 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/ForceDirectedGraph.stories.tsx +230 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/ForceDirectedGraph.tsx +488 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/MindMapCanvas.stories.tsx +256 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/MindMapCanvas.tsx +185 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/NoteList.stories.tsx +178 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/NoteList.tsx +209 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/SegmentRenderer.stories.tsx +238 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/SegmentRenderer.tsx +196 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/organisms/index.ts +18 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/patterns/component-mapping.json +122 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/patterns/event-contracts.json +145 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/patterns/index.ts +46 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/templates/ConceptDetailTemplate.stories.tsx +148 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/templates/ConceptDetailTemplate.tsx +266 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/templates/KnowledgeGraphTemplate.stories.tsx +215 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/templates/KnowledgeGraphTemplate.tsx +302 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/templates/LessonTemplate.stories.tsx +161 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/templates/LessonTemplate.tsx +264 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/templates/index.ts +4 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/types/index.ts +9 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/types/mindMapTypes.ts +13 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/utils/index.ts +6 -0
- package/shells/typescript-shell/packages/client/src/clients/kflow/utils/parseLessonSegments.ts +191 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/atoms/CareIndicator.tsx +113 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/atoms/GrowthMeter.tsx +216 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/atoms/SeasonIndicator.tsx +140 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/atoms/TrustMeter.tsx +221 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/atoms/index.ts +15 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/index.ts +159 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/molecules/HarvestCard.tsx +254 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/molecules/PlantCard.tsx +412 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/molecules/WeatherWidget.tsx +229 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/molecules/index.ts +12 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/organisms/GardenView.tsx +344 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/organisms/index.ts +6 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/AdminDashboardTemplate.tsx +423 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/AssessmentTemplate.tsx +409 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/ConnectionsTemplate.tsx +465 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/GraphIntelligenceTemplate.tsx +388 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/InvitesTemplate.tsx +359 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/ProjectDetailTemplate.tsx +483 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/ProjectsTemplate.tsx +474 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/RelationshipGardenTemplate.tsx +198 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/SeedNetworkTemplate.tsx +410 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/SuggestionsTemplate.tsx +352 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/TeamDetailTemplate.tsx +494 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/TeamMembersTemplate.tsx +427 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/TeamsTemplate.tsx +424 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/TrustIntelligenceTemplate.tsx +312 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/UserProfileTemplate.tsx +308 -0
- package/shells/typescript-shell/packages/client/src/clients/winning-11/templates/UsersTemplate.tsx +303 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Avatar.tsx +226 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Badge.tsx +79 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Box.tsx +262 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Button.tsx +150 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Card.tsx +151 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Center.tsx +67 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Checkbox.tsx +46 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/ConditionalWrapper.tsx +139 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Divider.tsx +102 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Icon.tsx +224 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Input.tsx +192 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Label.tsx +26 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/LawReferenceTooltip.tsx +190 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Overlay.tsx +37 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/ProgressBar.tsx +256 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Radio.tsx +164 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Select.tsx +62 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Spacer.tsx +68 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Spinner.tsx +32 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Stack.tsx +151 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Switch.tsx +91 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/TextHighlight.tsx +111 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Textarea.tsx +32 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/ThemeSelector.tsx +128 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/ThemeToggle.tsx +91 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/Typography.tsx +207 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/game/ControlButton.tsx +118 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/game/HealthBar.tsx +93 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/game/ScoreDisplay.tsx +86 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/game/Sprite.tsx +188 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/game/index.ts +12 -0
- package/shells/typescript-shell/packages/client/src/components/atoms/index.ts +88 -0
- package/shells/typescript-shell/packages/client/src/components/index.ts +4 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Accordion.tsx +223 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Alert.tsx +117 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Breadcrumb.tsx +159 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/ButtonGroup.tsx +226 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Card.tsx +135 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Container.tsx +78 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Drawer.tsx +254 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/EmptyState.tsx +132 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/ErrorState.tsx +48 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/FilterGroup.tsx +529 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Flex.tsx +131 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/FloatingActionButton.tsx +264 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/FormField.tsx +48 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/FormSectionHeader.tsx +139 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Grid.tsx +194 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/InputGroup.tsx +109 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/LoadingState.tsx +39 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Menu.tsx +266 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Modal.tsx +171 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Pagination.tsx +254 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Popover.tsx +201 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/RelationSelect.tsx +328 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/RepeatableFormSection.tsx +236 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/SearchInput.tsx +196 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/SidePanel.tsx +116 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/SimpleGrid.tsx +90 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Tabs.tsx +208 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Toast.tsx +154 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/Tooltip.tsx +172 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/ViolationAlert.tsx +253 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/WizardNavigation.tsx +166 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/WizardProgress.tsx +140 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/game/ActionButtons.tsx +148 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/game/DPad.tsx +98 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/game/StatBadge.tsx +104 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/game/index.ts +11 -0
- package/shells/typescript-shell/packages/client/src/components/molecules/index.ts +36 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/CardGrid.tsx +479 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/ComponentPatterns.tsx +1000 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/ConfirmDialog.tsx +165 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/CustomPattern.tsx +479 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/DataTable.tsx +816 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/DetailPanel.tsx +626 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/DrawerSlot.tsx +86 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/Form.tsx +968 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/FormSection.tsx +168 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/Header.tsx +263 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/LayoutPatterns.tsx +325 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/List.tsx +838 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/MasterDetail.tsx +85 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/ModalSlot.tsx +81 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/Navigation.tsx +157 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/OrbitalVisualization.tsx +480 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/PageHeader.tsx +244 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/Section.tsx +131 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/Sidebar.tsx +270 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/Split.tsx +121 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/StatCard.tsx +360 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/Table.tsx +394 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/ToastSlot.tsx +106 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/UISlotRenderer.tsx +647 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/WizardContainer.tsx +369 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/RuntimeDebugger.css +102 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/RuntimeDebugger.tsx +176 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/hooks/useDebugData.ts +100 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/index.ts +10 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/tabs/EntitiesTab.tsx +130 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/tabs/EventFlowTab.tsx +135 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/tabs/GuardsPanel.tsx +124 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/tabs/TicksTab.tsx +100 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/debug/tabs/TraitsTab.tsx +102 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/CollisionDetector.tsx +195 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/DialogueBox.tsx +279 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/GameCanvas.tsx +550 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/GameControls.tsx +173 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/GameHud.tsx +135 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/GameMenu.tsx +188 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/GameOverScreen.tsx +241 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/GamePauseOverlay.tsx +158 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/InputListener.tsx +161 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/InventoryPanel.tsx +230 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/LevelSelect.tsx +236 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/TilemapRenderer.tsx +233 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/game/index.ts +28 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/index.ts +83 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/layout/DashboardGrid.tsx +94 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/layout/MasterDetail.tsx +93 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/layout/SplitPane.tsx +136 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/layout/TabbedContainer.tsx +162 -0
- package/shells/typescript-shell/packages/client/src/components/organisms/layout/index.ts +10 -0
- package/shells/typescript-shell/packages/client/src/components/templates/AuthLayout.tsx +125 -0
- package/shells/typescript-shell/packages/client/src/components/templates/CounterTemplate.tsx +224 -0
- package/shells/typescript-shell/packages/client/src/components/templates/CrudTemplate.tsx +511 -0
- package/shells/typescript-shell/packages/client/src/components/templates/DashboardLayout.tsx +295 -0
- package/shells/typescript-shell/packages/client/src/components/templates/FormTemplate.tsx +328 -0
- package/shells/typescript-shell/packages/client/src/components/templates/GameTemplate.tsx +142 -0
- package/shells/typescript-shell/packages/client/src/components/templates/GenericAppTemplate.tsx +79 -0
- package/shells/typescript-shell/packages/client/src/components/templates/ListTemplate.tsx +361 -0
- package/shells/typescript-shell/packages/client/src/components/templates/SettingsTemplate.tsx +459 -0
- package/shells/typescript-shell/packages/client/src/components/templates/index.ts +54 -0
- package/shells/typescript-shell/packages/client/src/config/firebase.ts +58 -0
- package/shells/typescript-shell/packages/client/src/context/DesignThemeContext.tsx +40 -0
- package/shells/typescript-shell/packages/client/src/context/ThemeContext.tsx +321 -0
- package/shells/typescript-shell/packages/client/src/context/UISlotContext.tsx +143 -0
- package/shells/typescript-shell/packages/client/src/context/UserContext.tsx +259 -0
- package/shells/typescript-shell/packages/client/src/context/index.ts +44 -0
- package/shells/typescript-shell/packages/client/src/evaluator/SExpressionEvaluator.ts +715 -0
- package/shells/typescript-shell/packages/client/src/evaluator/context.ts +196 -0
- package/shells/typescript-shell/packages/client/src/evaluator/index.ts +52 -0
- package/shells/typescript-shell/packages/client/src/evaluator/operators/arithmetic.ts +120 -0
- package/shells/typescript-shell/packages/client/src/evaluator/operators/collections.ts +177 -0
- package/shells/typescript-shell/packages/client/src/evaluator/operators/comparison.ts +130 -0
- package/shells/typescript-shell/packages/client/src/evaluator/operators/control.ts +86 -0
- package/shells/typescript-shell/packages/client/src/evaluator/operators/effects.ts +285 -0
- package/shells/typescript-shell/packages/client/src/evaluator/operators/index.ts +69 -0
- package/shells/typescript-shell/packages/client/src/evaluator/operators/logic.ts +66 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/array.ts +657 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/async.ts +210 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/format.ts +224 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/index.ts +206 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/math.ts +219 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/object.ts +435 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/str.ts +372 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/time.ts +594 -0
- package/shells/typescript-shell/packages/client/src/evaluator/std/validate.ts +445 -0
- package/shells/typescript-shell/packages/client/src/evaluator/types/expression.ts +297 -0
- package/shells/typescript-shell/packages/client/src/features/auth/AuthContext.tsx +192 -0
- package/shells/typescript-shell/packages/client/src/features/auth/authService.ts +90 -0
- package/shells/typescript-shell/packages/client/src/features/auth/components/Login.tsx +282 -0
- package/shells/typescript-shell/packages/client/src/features/auth/components/ProtectedRoute.tsx +28 -0
- package/shells/typescript-shell/packages/client/src/features/auth/components/UserProfile.tsx +52 -0
- package/shells/typescript-shell/packages/client/src/features/auth/components/index.ts +3 -0
- package/shells/typescript-shell/packages/client/src/features/auth/index.ts +4 -0
- package/shells/typescript-shell/packages/client/src/features/auth/types.ts +33 -0
- package/shells/typescript-shell/packages/client/src/hooks/event-bus-types.ts +70 -0
- package/shells/typescript-shell/packages/client/src/hooks/index.ts +84 -0
- package/shells/typescript-shell/packages/client/src/hooks/useEntities.ts +118 -0
- package/shells/typescript-shell/packages/client/src/hooks/useEntityData.ts +288 -0
- package/shells/typescript-shell/packages/client/src/hooks/useEntityMutations.ts +258 -0
- package/shells/typescript-shell/packages/client/src/hooks/useEventBus.ts +166 -0
- package/shells/typescript-shell/packages/client/src/hooks/useOrbitalMutations.ts +234 -0
- package/shells/typescript-shell/packages/client/src/hooks/useQuerySingleton.ts +179 -0
- package/shells/typescript-shell/packages/client/src/hooks/useUIEvents.ts +228 -0
- package/shells/typescript-shell/packages/client/src/hooks/useUISlots.ts +320 -0
- package/shells/typescript-shell/packages/client/src/index.css +15 -0
- package/shells/typescript-shell/packages/client/src/lib/api-client.ts +134 -0
- package/shells/typescript-shell/packages/client/src/lib/cn.ts +10 -0
- package/shells/typescript-shell/packages/client/src/lib/debug.ts +114 -0
- package/shells/typescript-shell/packages/client/src/lib/debugRegistry.ts +108 -0
- package/shells/typescript-shell/packages/client/src/lib/debugUtils.ts +62 -0
- package/shells/typescript-shell/packages/client/src/lib/entityDebug.ts +79 -0
- package/shells/typescript-shell/packages/client/src/lib/guardRegistry.ts +79 -0
- package/shells/typescript-shell/packages/client/src/lib/tickRegistry.ts +86 -0
- package/shells/typescript-shell/packages/client/src/lib/traitRegistry.ts +84 -0
- package/shells/typescript-shell/packages/client/src/loaders/AssetLoader.ts +315 -0
- package/shells/typescript-shell/packages/client/src/loaders/index.ts +17 -0
- package/shells/typescript-shell/packages/client/src/main.tsx +24 -0
- package/shells/typescript-shell/packages/client/src/pages/index.ts +2 -0
- package/shells/typescript-shell/packages/client/src/providers/EventBusProvider.tsx +212 -0
- package/shells/typescript-shell/packages/client/src/providers/FetchedDataProvider.tsx +280 -0
- package/shells/typescript-shell/packages/client/src/providers/OrbitalProvider.tsx +136 -0
- package/shells/typescript-shell/packages/client/src/providers/SelectionProvider.tsx +232 -0
- package/shells/typescript-shell/packages/client/src/providers/index.ts +31 -0
- package/shells/typescript-shell/packages/client/src/renderer/client-effect-executor.ts +267 -0
- package/shells/typescript-shell/packages/client/src/renderer/data-resolver.ts +253 -0
- package/shells/typescript-shell/packages/client/src/renderer/index.ts +138 -0
- package/shells/typescript-shell/packages/client/src/renderer/offline-executor.ts +610 -0
- package/shells/typescript-shell/packages/client/src/renderer/pattern-resolver.ts +209 -0
- package/shells/typescript-shell/packages/client/src/renderer/slot-definitions.ts +154 -0
- package/shells/typescript-shell/packages/client/src/renderer/types.ts +214 -0
- package/shells/typescript-shell/packages/client/src/renderer/useClientEffects.ts +236 -0
- package/shells/typescript-shell/packages/client/src/stores/entityStore.ts +233 -0
- package/shells/typescript-shell/packages/client/src/stores/filtering.ts +180 -0
- package/shells/typescript-shell/packages/client/src/stores/index.ts +11 -0
- package/shells/typescript-shell/packages/client/src/test/setup.ts +126 -0
- package/shells/typescript-shell/packages/client/src/themes/almadar.css +196 -0
- package/shells/typescript-shell/packages/client/src/themes/index.css +11 -0
- package/shells/typescript-shell/packages/client/src/themes/minimalist.css +193 -0
- package/shells/typescript-shell/packages/client/src/themes/wireframe.css +188 -0
- package/shells/typescript-shell/packages/client/src/types/__tests__/event-contracts.test.ts +204 -0
- package/shells/typescript-shell/packages/client/src/types/event-contracts.ts +267 -0
- package/shells/typescript-shell/packages/client/tailwind.config.js +55 -0
- package/shells/typescript-shell/packages/client/tsconfig.json +33 -0
- package/shells/typescript-shell/packages/client/tsconfig.node.json +12 -0
- package/shells/typescript-shell/packages/client/vite.config.d.ts +3 -0
- package/shells/typescript-shell/packages/client/vite.config.d.ts.map +1 -0
- package/shells/typescript-shell/packages/client/vite.config.js +43 -0
- package/shells/typescript-shell/packages/client/vite.config.js.map +1 -0
- package/shells/typescript-shell/packages/client/vite.config.ts +48 -0
- package/shells/typescript-shell/packages/server/.env.development +8 -0
- package/shells/typescript-shell/packages/server/.env.example +22 -0
- package/shells/typescript-shell/packages/server/package.json +41 -0
- package/shells/typescript-shell/packages/server/src/__tests__/integration.test.ts +23 -0
- package/shells/typescript-shell/packages/server/src/app.ts +53 -0
- package/shells/typescript-shell/packages/server/src/features/.gitkeep +10 -0
- package/shells/typescript-shell/packages/server/src/index.ts +60 -0
- package/shells/typescript-shell/packages/server/src/integrators/INTEGRATORS.md +357 -0
- package/shells/typescript-shell/packages/server/src/integrators/__tests__/registry.test.ts +419 -0
- package/shells/typescript-shell/packages/server/src/integrators/__tests__/types.test.ts +382 -0
- package/shells/typescript-shell/packages/server/src/integrators/__tests__/youtube.closed-circuit.test.ts +454 -0
- package/shells/typescript-shell/packages/server/src/integrators/__tests__/youtube.test.ts +519 -0
- package/shells/typescript-shell/packages/server/src/integrators/index.ts +67 -0
- package/shells/typescript-shell/packages/server/src/integrators/llm.ts +585 -0
- package/shells/typescript-shell/packages/server/src/integrators/registry.ts +318 -0
- package/shells/typescript-shell/packages/server/src/integrators/types.ts +248 -0
- package/shells/typescript-shell/packages/server/src/integrators/youtube.ts +614 -0
- package/shells/typescript-shell/packages/server/src/lib/db.ts +130 -0
- package/shells/typescript-shell/packages/server/src/lib/env.ts +47 -0
- package/shells/typescript-shell/packages/server/src/lib/eventBus.ts +80 -0
- package/shells/typescript-shell/packages/server/src/lib/index.ts +10 -0
- package/shells/typescript-shell/packages/server/src/lib/logger.ts +48 -0
- package/shells/typescript-shell/packages/server/src/lib/websocket.ts +161 -0
- package/shells/typescript-shell/packages/server/src/middleware/authenticateFirebase.ts +29 -0
- package/shells/typescript-shell/packages/server/src/middleware/errorHandler.ts +135 -0
- package/shells/typescript-shell/packages/server/src/middleware/index.ts +15 -0
- package/shells/typescript-shell/packages/server/src/middleware/validation.ts +77 -0
- package/shells/typescript-shell/packages/server/src/routes/__tests__/orbitals.e2e.test.ts +405 -0
- package/shells/typescript-shell/packages/server/src/routes/features/.gitkeep +0 -0
- package/shells/typescript-shell/packages/server/src/routes/index.ts +11 -0
- package/shells/typescript-shell/packages/server/src/routes/orbitals.ts +138 -0
- package/shells/typescript-shell/packages/server/src/routes/register.ts +19 -0
- package/shells/typescript-shell/packages/server/src/routes.ts +58 -0
- package/shells/typescript-shell/packages/server/src/seedMockData.ts +27 -0
- package/shells/typescript-shell/packages/server/src/services/DataService.ts +402 -0
- package/shells/typescript-shell/packages/server/src/services/MockDataService.ts +347 -0
- package/shells/typescript-shell/packages/server/src/services/index.ts +8 -0
- package/shells/typescript-shell/packages/server/src/types/express.d.ts +13 -0
- package/shells/typescript-shell/packages/server/src/utils/index.ts +9 -0
- package/shells/typescript-shell/packages/server/src/utils/queryFilters.ts +231 -0
- package/shells/typescript-shell/packages/server/tsconfig.json +28 -0
- package/shells/typescript-shell/packages/shared/package.json +22 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/atom-demo.test.ts +61 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/container-demo.test.ts +43 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/content-item.test.ts +55 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/game-state.test.ts +67 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/layout-demo.test.ts +43 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/modal-item.test.ts +49 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/molecule-demo.test.ts +55 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/nav-item.test.ts +55 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/product.test.ts +78 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/project.test.ts +85 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/searchable-item.test.ts +61 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/state-demo.test.ts +43 -0
- package/shells/typescript-shell/packages/shared/src/__tests__/entities/wizard-data.test.ts +61 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/SExpressionEvaluator.ts +715 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/context.ts +196 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/index.ts +52 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/operators/arithmetic.ts +120 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/operators/collections.ts +177 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/operators/comparison.ts +130 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/operators/control.ts +86 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/operators/effects.ts +285 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/operators/index.ts +69 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/operators/logic.ts +66 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/array.ts +657 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/async.ts +210 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/format.ts +224 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/index.ts +206 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/math.ts +219 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/object.ts +435 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/str.ts +372 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/time.ts +594 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/std/validate.ts +445 -0
- package/shells/typescript-shell/packages/shared/src/evaluator/types/expression.ts +297 -0
- package/shells/typescript-shell/packages/shared/src/index.ts +12 -0
- package/shells/typescript-shell/packages/shared/src/schemas/entities.ts +13 -0
- package/shells/typescript-shell/packages/shared/src/types/entities.ts +321 -0
- package/shells/typescript-shell/packages/shared/src/types/events.ts +82 -0
- package/shells/typescript-shell/packages/shared/tsconfig.json +16 -0
- package/shells/typescript-shell/tests/setup.ts +22 -0
- package/shells/typescript-shell/tsconfig.base.json +21 -0
- package/shells/typescript-shell/tsconfig.json +13 -0
- package/shells/typescript-shell/vitest.config.ts +54 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "orbital-app",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"workspaces": [
|
|
6
|
+
"packages/*"
|
|
7
|
+
],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "node packages/server/dist/index.js",
|
|
10
|
+
"dev": "concurrently \"npm run dev:client\" \"npm run dev:server\"",
|
|
11
|
+
"dev:server": "npm run dev -w @almadar/server",
|
|
12
|
+
"dev:client": "npm run dev -w @almadar/client",
|
|
13
|
+
"build": "npm run build:shared && npm run build:client && npm run build:server",
|
|
14
|
+
"build:all": "npm run build:shared && npm run build --workspaces --if-present",
|
|
15
|
+
"build:shared": "npm run build -w @almadar/shared",
|
|
16
|
+
"build:client": "npm run build -w @almadar/client",
|
|
17
|
+
"build:server": "npx esbuild packages/server/src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=packages/server/dist/index.js --alias:@almadar/shared=./packages/shared/src/index.ts --external:express --external:cors --external:helmet --external:zod --external:dotenv --external:firebase-admin --external:@faker-js/faker",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"test:watch": "vitest",
|
|
20
|
+
"lint": "eslint packages --ext .ts,.tsx",
|
|
21
|
+
"format": "prettier --write \"**/*.{ts,tsx,js,json,md}\"",
|
|
22
|
+
"clean": "npm run clean --workspaces --if-present && rm -rf node_modules",
|
|
23
|
+
"typecheck": "tsc -b",
|
|
24
|
+
"deploy": "npm run deploy:hosting && npm run deploy:firestore",
|
|
25
|
+
"deploy:hosting": "npm run build:client && firebase deploy --only hosting:theme-kitchen-sink",
|
|
26
|
+
"deploy:hosting:preview": "npm run build:client && firebase hosting:channel:deploy preview --expires 7d --only theme-kitchen-sink",
|
|
27
|
+
"deploy:apphosting": "npm run build:server && firebase deploy --only apphosting",
|
|
28
|
+
"deploy:firestore": "firebase deploy --only firestore --force",
|
|
29
|
+
"deploy:rules": "firebase deploy --only firestore:rules",
|
|
30
|
+
"deploy:indexes": "firebase deploy --only firestore:indexes --force",
|
|
31
|
+
"deploy:all": "npm run deploy && npm run deploy:apphosting",
|
|
32
|
+
"firebase:login": "firebase login",
|
|
33
|
+
"firebase:init": "firebase init",
|
|
34
|
+
"firebase:use": "firebase use theme-kitchen-sink-project",
|
|
35
|
+
"firebase:setup:hosting": "firebase hosting:sites:get theme-kitchen-sink --project theme-kitchen-sink-project 2>/dev/null || firebase hosting:sites:create theme-kitchen-sink --project theme-kitchen-sink-project",
|
|
36
|
+
"firebase:setup:apphosting": "firebase apphosting:backends:get theme-kitchen-sink-backend --project theme-kitchen-sink-project 2>/dev/null || firebase apphosting:backends:create --backend theme-kitchen-sink-backend --project theme-kitchen-sink-project --primary-region us-central1 --root-dir . --non-interactive",
|
|
37
|
+
"firebase:setup:firestore": "firebase firestore:databases:get theme-kitchen-sink --project theme-kitchen-sink-project 2>/dev/null || firebase firestore:databases:create theme-kitchen-sink --location nam5 --project theme-kitchen-sink-project",
|
|
38
|
+
"firebase:setup": "npm run firebase:setup:firestore && npm run firebase:setup:hosting && npm run firebase:setup:apphosting",
|
|
39
|
+
"deploy:setup": "npm run firebase:use && npm run firebase:setup",
|
|
40
|
+
"logs": "firebase apphosting:backends:logs theme-kitchen-sink-backend",
|
|
41
|
+
"logs:live": "firebase apphosting:backends:logs theme-kitchen-sink-backend --follow"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@testing-library/react": "^14.0.0",
|
|
45
|
+
"@testing-library/user-event": "^14.0.0",
|
|
46
|
+
"@types/node": "^20.0.0",
|
|
47
|
+
"@types/react": "^18.0.0",
|
|
48
|
+
"@types/react-dom": "^18.0.0",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
50
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
51
|
+
"concurrently": "^8.0.0",
|
|
52
|
+
"esbuild": "^0.27.2",
|
|
53
|
+
"eslint": "^8.0.0",
|
|
54
|
+
"eslint-plugin-react": "^7.0.0",
|
|
55
|
+
"eslint-plugin-react-hooks": "^4.0.0",
|
|
56
|
+
"jsdom": "^22.0.0",
|
|
57
|
+
"prettier": "^3.1.0",
|
|
58
|
+
"typescript": "^5.0.0",
|
|
59
|
+
"vitest": "^1.0.0"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=20.0.0"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# ===========================================
|
|
2
|
+
# Orbital Client - Environment Variables
|
|
3
|
+
# ===========================================
|
|
4
|
+
# Copy this file to .env and fill in your values
|
|
5
|
+
|
|
6
|
+
# ------------------------------------------
|
|
7
|
+
# API Configuration
|
|
8
|
+
# ------------------------------------------
|
|
9
|
+
# URL to the backend API (leave empty to use proxy in development)
|
|
10
|
+
VITE_API_URL=
|
|
11
|
+
|
|
12
|
+
# ------------------------------------------
|
|
13
|
+
# Firebase Client SDK
|
|
14
|
+
# ------------------------------------------
|
|
15
|
+
# Get these from Firebase Console > Project Settings > General
|
|
16
|
+
# Scroll down to "Your apps" and select your web app
|
|
17
|
+
|
|
18
|
+
VITE_APP_FIREBASE_API_KEY=your-api-key
|
|
19
|
+
VITE_APP_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
|
|
20
|
+
VITE_APP_FIREBASE_PROJECT_ID=your-project-id
|
|
21
|
+
VITE_APP_FIREBASE_STORAGE_BUCKET=your-project-id.firebasestorage.app
|
|
22
|
+
VITE_APP_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
|
|
23
|
+
VITE_APP_FIREBASE_APP_ID=your-app-id
|
|
24
|
+
VITE_APP_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXX
|
|
25
|
+
|
|
26
|
+
# ------------------------------------------
|
|
27
|
+
# Optional: Feature Flags
|
|
28
|
+
# ------------------------------------------
|
|
29
|
+
# VITE_ENABLE_AI_FEATURES=true
|
|
30
|
+
# VITE_ENABLE_DEBUG_MODE=false
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Theme Kitchen Sink</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@almadar/client",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"clean": "rm -rf dist",
|
|
11
|
+
"test": "vitest --run",
|
|
12
|
+
"test:coverage": "vitest --coverage",
|
|
13
|
+
"lint": "eslint src/"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@almadar/shared": "*",
|
|
17
|
+
"@tanstack/react-query": "^5.62.0",
|
|
18
|
+
"clsx": "^2.1.0",
|
|
19
|
+
"firebase": "^10.7.0",
|
|
20
|
+
"lucide-react": "^0.469.0",
|
|
21
|
+
"react": "^18.3.0",
|
|
22
|
+
"react-dom": "^18.3.0",
|
|
23
|
+
"react-force-graph-2d": "^1.25.0",
|
|
24
|
+
"react-markdown": "^9.0.0",
|
|
25
|
+
"react-router-dom": "^7.1.0",
|
|
26
|
+
"react-syntax-highlighter": "^15.5.0",
|
|
27
|
+
"rehype-katex": "^7.0.0",
|
|
28
|
+
"rehype-raw": "^7.0.0",
|
|
29
|
+
"remark-gfm": "^4.0.0",
|
|
30
|
+
"remark-math": "^6.0.0",
|
|
31
|
+
"tailwind-merge": "^2.2.0",
|
|
32
|
+
"zod": "^3.24.0",
|
|
33
|
+
"zustand": "^4.5.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@testing-library/jest-dom": "^6.6.0",
|
|
37
|
+
"@testing-library/react": "^16.1.0",
|
|
38
|
+
"@testing-library/user-event": "^14.5.0",
|
|
39
|
+
"@types/react": "^18.3.0",
|
|
40
|
+
"@types/react-dom": "^18.3.0",
|
|
41
|
+
"@types/react-syntax-highlighter": "^15.5.0",
|
|
42
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
43
|
+
"@vitest/coverage-v8": "^2.1.0",
|
|
44
|
+
"autoprefixer": "^10.4.20",
|
|
45
|
+
"jsdom": "^25.0.0",
|
|
46
|
+
"postcss": "^8.4.49",
|
|
47
|
+
"tailwindcss": "^3.4.0",
|
|
48
|
+
"typescript": "^5.3.0",
|
|
49
|
+
"vite": "^6.0.0",
|
|
50
|
+
"vitest": "^2.1.0"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
|
2
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
3
|
+
import { ThemeProvider } from '@/contexts';
|
|
4
|
+
import { ToastProvider } from '@/contexts/ToastContext';
|
|
5
|
+
import { EventBusProvider } from '@/providers/EventBusProvider';
|
|
6
|
+
import { UISlotProvider } from '@/context/UISlotContext';
|
|
7
|
+
import { DashboardLayout } from '@components';
|
|
8
|
+
import { Home } from 'lucide-react';
|
|
9
|
+
import type { LucideIcon } from 'lucide-react';
|
|
10
|
+
|
|
11
|
+
// {{GENERATED_IMPORTS}}
|
|
12
|
+
|
|
13
|
+
// Export queryClient for test access (to clear cache between tests)
|
|
14
|
+
export const queryClient = new QueryClient({
|
|
15
|
+
defaultOptions: {
|
|
16
|
+
queries: {
|
|
17
|
+
staleTime: 1000 * 60 * 5, // 5 minutes
|
|
18
|
+
retry: 1,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** Navigation items for sidebar - generated from schema */
|
|
24
|
+
const navItems: Array<{ label: string; href: string; icon: LucideIcon }> = [
|
|
25
|
+
{ label: 'Home', href: '/', icon: Home },
|
|
26
|
+
// {{GENERATED_NAV_ITEMS}}
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
export function App() {
|
|
30
|
+
return (
|
|
31
|
+
<ThemeProvider>
|
|
32
|
+
<ToastProvider>
|
|
33
|
+
<QueryClientProvider client={queryClient}>
|
|
34
|
+
<EventBusProvider>
|
|
35
|
+
<UISlotProvider>
|
|
36
|
+
<BrowserRouter>
|
|
37
|
+
<Routes>
|
|
38
|
+
{/* Dashboard layout routes */}
|
|
39
|
+
<Route element={<DashboardLayout navItems={navItems} appName="{{APP_NAME}}" />}>
|
|
40
|
+
<Route index element={<Navigate to="/" replace />} />
|
|
41
|
+
{/* {{GENERATED_ROUTES}} */}
|
|
42
|
+
</Route>
|
|
43
|
+
|
|
44
|
+
{/* Fallback route - redirect to main page */}
|
|
45
|
+
<Route path="*" element={<Navigate to="/" replace />} />
|
|
46
|
+
</Routes>
|
|
47
|
+
</BrowserRouter>
|
|
48
|
+
</UISlotProvider>
|
|
49
|
+
</EventBusProvider>
|
|
50
|
+
</QueryClientProvider>
|
|
51
|
+
</ToastProvider>
|
|
52
|
+
</ThemeProvider>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default App;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { CreditExpirationAlert } from "./CreditExpirationAlert";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof CreditExpirationAlert> = {
|
|
5
|
+
title: "Blaz-Klemenc/Atoms/CreditExpirationAlert",
|
|
6
|
+
component: CreditExpirationAlert,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof CreditExpirationAlert>;
|
|
15
|
+
|
|
16
|
+
// Helper to create dates relative to now
|
|
17
|
+
const daysFromNow = (days: number) =>
|
|
18
|
+
new Date(Date.now() + days * 24 * 60 * 60 * 1000);
|
|
19
|
+
|
|
20
|
+
export const ExpiresTomorrow: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
expiresAt: daysFromNow(1),
|
|
23
|
+
credits: 5,
|
|
24
|
+
traineeId: "trainee-1",
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const ExpiresIn3Days: Story = {
|
|
29
|
+
args: {
|
|
30
|
+
expiresAt: daysFromNow(3),
|
|
31
|
+
credits: 8,
|
|
32
|
+
traineeId: "trainee-2",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const ExpiresIn7Days: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
expiresAt: daysFromNow(7),
|
|
39
|
+
credits: 3,
|
|
40
|
+
traineeId: "trainee-3",
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const AlreadyExpired: Story = {
|
|
45
|
+
args: {
|
|
46
|
+
expiresAt: daysFromNow(-1),
|
|
47
|
+
credits: 2,
|
|
48
|
+
traineeId: "trainee-4",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const LowCreditsExpiring: Story = {
|
|
53
|
+
args: {
|
|
54
|
+
expiresAt: daysFromNow(2),
|
|
55
|
+
credits: 1,
|
|
56
|
+
traineeId: "trainee-5",
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const Dismissible: Story = {
|
|
61
|
+
args: {
|
|
62
|
+
expiresAt: daysFromNow(5),
|
|
63
|
+
credits: 5,
|
|
64
|
+
dismissible: true,
|
|
65
|
+
onDismiss: () => console.log("Dismissed"),
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const NotDismissible: Story = {
|
|
70
|
+
args: {
|
|
71
|
+
expiresAt: daysFromNow(3),
|
|
72
|
+
credits: 4,
|
|
73
|
+
dismissible: false,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreditExpirationAlert
|
|
3
|
+
*
|
|
4
|
+
* Alert banner for expiring credits with renewal action.
|
|
5
|
+
* Business retention - prompt credit renewal.
|
|
6
|
+
*
|
|
7
|
+
* Event Contract:
|
|
8
|
+
* - Emits: UI:RENEW_CREDITS - when renew button is clicked
|
|
9
|
+
* - Payload: { expiresAt, credits, entity }
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React, { useCallback, useMemo } from "react";
|
|
13
|
+
import { cn } from "../../../lib/cn";
|
|
14
|
+
import { Box } from "../../../components/atoms/Box";
|
|
15
|
+
import { HStack } from "../../../components/atoms/Stack";
|
|
16
|
+
import { Typography } from "../../../components/atoms/Typography";
|
|
17
|
+
import { Button } from "../../../components/atoms/Button";
|
|
18
|
+
import { useEventBus } from "../../../hooks/useEventBus";
|
|
19
|
+
import { AlertTriangle, Clock, X } from "lucide-react";
|
|
20
|
+
|
|
21
|
+
export interface CreditExpirationAlertProps {
|
|
22
|
+
/** Expiration date */
|
|
23
|
+
expiresAt: string | Date;
|
|
24
|
+
/** Credits expiring */
|
|
25
|
+
credits: number;
|
|
26
|
+
/** Trainee ID for context */
|
|
27
|
+
traineeId?: string;
|
|
28
|
+
/** Allow dismissing the alert */
|
|
29
|
+
dismissible?: boolean;
|
|
30
|
+
/** Callback when dismissed */
|
|
31
|
+
onDismiss?: () => void;
|
|
32
|
+
/** Entity context for events */
|
|
33
|
+
entity?: string;
|
|
34
|
+
/** Additional CSS classes */
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Calculate days until expiration
|
|
39
|
+
const getDaysUntilExpiration = (expiresAt: string | Date): number => {
|
|
40
|
+
const expDate = new Date(expiresAt);
|
|
41
|
+
const now = new Date();
|
|
42
|
+
const diffTime = expDate.getTime() - now.getTime();
|
|
43
|
+
return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const CreditExpirationAlert: React.FC<CreditExpirationAlertProps> = ({
|
|
47
|
+
expiresAt,
|
|
48
|
+
credits,
|
|
49
|
+
traineeId,
|
|
50
|
+
dismissible = true,
|
|
51
|
+
onDismiss,
|
|
52
|
+
entity = "Credit",
|
|
53
|
+
className,
|
|
54
|
+
}) => {
|
|
55
|
+
const eventBus = useEventBus();
|
|
56
|
+
|
|
57
|
+
const daysUntilExpiration = useMemo(
|
|
58
|
+
() => getDaysUntilExpiration(expiresAt),
|
|
59
|
+
[expiresAt]
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
// Determine urgency level
|
|
63
|
+
const urgency: "critical" | "warning" | "info" = useMemo(() => {
|
|
64
|
+
if (daysUntilExpiration <= 0) return "critical";
|
|
65
|
+
if (daysUntilExpiration <= 3) return "critical";
|
|
66
|
+
if (daysUntilExpiration <= 7) return "warning";
|
|
67
|
+
return "info";
|
|
68
|
+
}, [daysUntilExpiration]);
|
|
69
|
+
|
|
70
|
+
const urgencyConfig = {
|
|
71
|
+
critical: {
|
|
72
|
+
bgColor: "bg-red-50",
|
|
73
|
+
borderColor: "border-red-200",
|
|
74
|
+
textColor: "text-red-700",
|
|
75
|
+
iconColor: "text-red-500",
|
|
76
|
+
buttonVariant: "primary" as const,
|
|
77
|
+
},
|
|
78
|
+
warning: {
|
|
79
|
+
bgColor: "bg-amber-50",
|
|
80
|
+
borderColor: "border-amber-200",
|
|
81
|
+
textColor: "text-amber-700",
|
|
82
|
+
iconColor: "text-amber-500",
|
|
83
|
+
buttonVariant: "secondary" as const,
|
|
84
|
+
},
|
|
85
|
+
info: {
|
|
86
|
+
bgColor: "bg-blue-50",
|
|
87
|
+
borderColor: "border-blue-200",
|
|
88
|
+
textColor: "text-blue-700",
|
|
89
|
+
iconColor: "text-blue-500",
|
|
90
|
+
buttonVariant: "secondary" as const,
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const config = urgencyConfig[urgency];
|
|
95
|
+
|
|
96
|
+
// Emit RENEW_CREDITS event
|
|
97
|
+
const handleRenew = useCallback(() => {
|
|
98
|
+
eventBus.emit("UI:CREATE", {
|
|
99
|
+
traineeId,
|
|
100
|
+
entity,
|
|
101
|
+
});
|
|
102
|
+
}, [eventBus, traineeId, entity]);
|
|
103
|
+
|
|
104
|
+
// Don't show if already expired for more than 30 days
|
|
105
|
+
if (daysUntilExpiration < -30) return null;
|
|
106
|
+
|
|
107
|
+
// Get message based on days
|
|
108
|
+
const getMessage = () => {
|
|
109
|
+
if (daysUntilExpiration <= 0) {
|
|
110
|
+
return `${credits} credit${credits > 1 ? "s" : ""} expired!`;
|
|
111
|
+
}
|
|
112
|
+
if (daysUntilExpiration === 1) {
|
|
113
|
+
return `${credits} credit${credits > 1 ? "s" : ""} expire${credits > 1 ? "" : "s"} tomorrow!`;
|
|
114
|
+
}
|
|
115
|
+
return `${credits} credit${credits > 1 ? "s" : ""} expire${credits > 1 ? "" : "s"} in ${daysUntilExpiration} days`;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<Box
|
|
120
|
+
rounded="lg"
|
|
121
|
+
border
|
|
122
|
+
padding="sm"
|
|
123
|
+
className={cn(config.bgColor, config.borderColor, className)}
|
|
124
|
+
>
|
|
125
|
+
<HStack justify="between" align="center">
|
|
126
|
+
<HStack gap="sm" align="center">
|
|
127
|
+
{urgency === "critical" ? (
|
|
128
|
+
<AlertTriangle className={cn("h-5 w-5", config.iconColor)} />
|
|
129
|
+
) : (
|
|
130
|
+
<Clock className={cn("h-5 w-5", config.iconColor)} />
|
|
131
|
+
)}
|
|
132
|
+
<Typography variant="body" className={cn("font-medium", config.textColor)}>
|
|
133
|
+
{getMessage()}
|
|
134
|
+
</Typography>
|
|
135
|
+
</HStack>
|
|
136
|
+
|
|
137
|
+
<HStack gap="sm" align="center">
|
|
138
|
+
<Button variant={config.buttonVariant} size="sm" onClick={handleRenew}>
|
|
139
|
+
{daysUntilExpiration <= 0 ? "Add Credits" : "Renew Now"}
|
|
140
|
+
</Button>
|
|
141
|
+
{dismissible && onDismiss && (
|
|
142
|
+
<Button
|
|
143
|
+
variant="ghost"
|
|
144
|
+
size="sm"
|
|
145
|
+
onClick={onDismiss}
|
|
146
|
+
className={config.textColor}
|
|
147
|
+
>
|
|
148
|
+
<X className="h-4 w-4" />
|
|
149
|
+
</Button>
|
|
150
|
+
)}
|
|
151
|
+
</HStack>
|
|
152
|
+
</HStack>
|
|
153
|
+
</Box>
|
|
154
|
+
);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
CreditExpirationAlert.displayName = "CreditExpirationAlert";
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { CreditMeter, CreditData } from "./CreditMeter";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof CreditMeter> = {
|
|
5
|
+
title: "Blaz-Klemenc/Atoms/CreditMeter",
|
|
6
|
+
component: CreditMeter,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
argTypes: {
|
|
12
|
+
size: {
|
|
13
|
+
control: { type: "select" },
|
|
14
|
+
options: ["sm", "md", "lg"],
|
|
15
|
+
},
|
|
16
|
+
compact: {
|
|
17
|
+
control: "boolean",
|
|
18
|
+
},
|
|
19
|
+
showActionButton: {
|
|
20
|
+
control: "boolean",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof CreditMeter>;
|
|
27
|
+
|
|
28
|
+
// Sample credit data
|
|
29
|
+
const baseCreditData: CreditData = {
|
|
30
|
+
id: "credit-1",
|
|
31
|
+
traineeId: "trainee-1",
|
|
32
|
+
totalCredits: 10,
|
|
33
|
+
remainingCredits: 7,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const Default: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
data: baseCreditData,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const FullCredits: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
data: {
|
|
45
|
+
...baseCreditData,
|
|
46
|
+
remainingCredits: 10,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const MediumCredits: Story = {
|
|
52
|
+
args: {
|
|
53
|
+
data: {
|
|
54
|
+
...baseCreditData,
|
|
55
|
+
remainingCredits: 4,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const LowCredits: Story = {
|
|
61
|
+
args: {
|
|
62
|
+
data: {
|
|
63
|
+
...baseCreditData,
|
|
64
|
+
remainingCredits: 2,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const NoCredits: Story = {
|
|
70
|
+
args: {
|
|
71
|
+
data: {
|
|
72
|
+
...baseCreditData,
|
|
73
|
+
remainingCredits: 0,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const ExpiringCredits: Story = {
|
|
79
|
+
args: {
|
|
80
|
+
data: {
|
|
81
|
+
...baseCreditData,
|
|
82
|
+
remainingCredits: 5,
|
|
83
|
+
expiresAt: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000), // 3 days from now
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const ExpiresTomorrow: Story = {
|
|
89
|
+
args: {
|
|
90
|
+
data: {
|
|
91
|
+
...baseCreditData,
|
|
92
|
+
remainingCredits: 3,
|
|
93
|
+
expiresAt: new Date(Date.now() + 1 * 24 * 60 * 60 * 1000), // 1 day from now
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const Compact: Story = {
|
|
99
|
+
args: {
|
|
100
|
+
data: {
|
|
101
|
+
...baseCreditData,
|
|
102
|
+
remainingCredits: 5,
|
|
103
|
+
},
|
|
104
|
+
compact: true,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const CompactExpiring: Story = {
|
|
109
|
+
args: {
|
|
110
|
+
data: {
|
|
111
|
+
...baseCreditData,
|
|
112
|
+
remainingCredits: 5,
|
|
113
|
+
expiresAt: new Date(Date.now() + 5 * 24 * 60 * 60 * 1000),
|
|
114
|
+
},
|
|
115
|
+
compact: true,
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const Small: Story = {
|
|
120
|
+
args: {
|
|
121
|
+
data: {
|
|
122
|
+
...baseCreditData,
|
|
123
|
+
remainingCredits: 6,
|
|
124
|
+
},
|
|
125
|
+
size: "sm",
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const Large: Story = {
|
|
130
|
+
args: {
|
|
131
|
+
data: {
|
|
132
|
+
...baseCreditData,
|
|
133
|
+
remainingCredits: 8,
|
|
134
|
+
},
|
|
135
|
+
size: "lg",
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const WithoutActionButton: Story = {
|
|
140
|
+
args: {
|
|
141
|
+
data: {
|
|
142
|
+
...baseCreditData,
|
|
143
|
+
remainingCredits: 2,
|
|
144
|
+
},
|
|
145
|
+
showActionButton: false,
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const UsingDirectProps: Story = {
|
|
150
|
+
args: {
|
|
151
|
+
remainingCredits: 5,
|
|
152
|
+
totalCredits: 20,
|
|
153
|
+
expiresAt: new Date(Date.now() + 14 * 24 * 60 * 60 * 1000),
|
|
154
|
+
},
|
|
155
|
+
};
|