yadflow 2.5.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/CHANGELOG.md +8 -2
  2. package/README.md +65 -22
  3. package/bin/yad.mjs +27 -1
  4. package/cli/docs.mjs +298 -0
  5. package/cli/doctor.mjs +1 -0
  6. package/cli/manifest.mjs +23 -2
  7. package/cli/ship.mjs +37 -0
  8. package/docs/index.html +44 -13
  9. package/package.json +2 -2
  10. package/skills/sdlc/config.yaml +26 -2
  11. package/skills/sdlc/install.sh +1 -1
  12. package/skills/sdlc/module-help.csv +11 -4
  13. package/skills/yad-checks/references/check-gates.md +58 -2
  14. package/skills/yad-checks/templates/checks/commit-message.sh +82 -0
  15. package/skills/yad-checks/templates/github/yad-checks.yml +27 -0
  16. package/skills/yad-checks/templates/github/yad-hub-checks.yml +36 -0
  17. package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +20 -0
  18. package/skills/yad-checks/templates/gitlab/yad-hub-checks.gitlab-ci.yml +39 -0
  19. package/skills/yad-commit/SKILL.md +66 -0
  20. package/skills/yad-connect-docs/SKILL.md +132 -0
  21. package/skills/yad-connect-docs/references/docs-registry.md +74 -0
  22. package/skills/yad-docs/SKILL.md +159 -0
  23. package/skills/yad-docs/references/data-mapping.md +75 -0
  24. package/skills/yad-docs/references/theme-map.md +69 -0
  25. package/skills/yad-docs/templates/app/README.md +31 -0
  26. package/skills/yad-docs/templates/app/eslint.config.js +23 -0
  27. package/skills/yad-docs/templates/app/index.html +17 -0
  28. package/skills/yad-docs/templates/app/package-lock.json +4030 -0
  29. package/skills/yad-docs/templates/app/package.json +35 -0
  30. package/skills/yad-docs/templates/app/public/favicon.svg +28 -0
  31. package/skills/yad-docs/templates/app/public/logo.svg +39 -0
  32. package/skills/yad-docs/templates/app/public/vite.svg +1 -0
  33. package/skills/yad-docs/templates/app/src/App.tsx +98 -0
  34. package/skills/yad-docs/templates/app/src/components/Auth/LoginPage.tsx +101 -0
  35. package/skills/yad-docs/templates/app/src/components/Canvas/AnimatedMessage.tsx +101 -0
  36. package/skills/yad-docs/templates/app/src/components/Canvas/ConnectionLine.tsx +90 -0
  37. package/skills/yad-docs/templates/app/src/components/Canvas/FlowCanvas.tsx +216 -0
  38. package/skills/yad-docs/templates/app/src/components/Canvas/SystemComponent.tsx +153 -0
  39. package/skills/yad-docs/templates/app/src/components/Controls/PlaybackBar.tsx +284 -0
  40. package/skills/yad-docs/templates/app/src/components/Controls/StepDetail.tsx +167 -0
  41. package/skills/yad-docs/templates/app/src/components/DetailPanel/HandlerLogicSnippet.tsx +41 -0
  42. package/skills/yad-docs/templates/app/src/components/DetailPanel/RequestPayloadPreview.tsx +46 -0
  43. package/skills/yad-docs/templates/app/src/components/DetailPanel/RightPanel.tsx +88 -0
  44. package/skills/yad-docs/templates/app/src/components/DetailPanel/StatusCard.tsx +76 -0
  45. package/skills/yad-docs/templates/app/src/components/DetailPanel/TriggerEventCard.tsx +45 -0
  46. package/skills/yad-docs/templates/app/src/components/DocLayout/DocPageShell.tsx +80 -0
  47. package/skills/yad-docs/templates/app/src/components/DocLayout/DocSectionCard.tsx +55 -0
  48. package/skills/yad-docs/templates/app/src/components/DocLayout/DocTableOfContents.tsx +79 -0
  49. package/skills/yad-docs/templates/app/src/components/DocLayout/RoleCard.tsx +67 -0
  50. package/skills/yad-docs/templates/app/src/components/DocSections/ApiReferenceSection.tsx +108 -0
  51. package/skills/yad-docs/templates/app/src/components/DocSections/CancelabilitySection.tsx +73 -0
  52. package/skills/yad-docs/templates/app/src/components/DocSections/CriticalRunbookSection.tsx +177 -0
  53. package/skills/yad-docs/templates/app/src/components/DocSections/DataMigrationSection.tsx +102 -0
  54. package/skills/yad-docs/templates/app/src/components/DocSections/DbSchemaSection.tsx +98 -0
  55. package/skills/yad-docs/templates/app/src/components/DocSections/DeploymentGuideSection.tsx +104 -0
  56. package/skills/yad-docs/templates/app/src/components/DocSections/DriverIntegrationSection.tsx +127 -0
  57. package/skills/yad-docs/templates/app/src/components/DocSections/ExecutiveSummarySection.tsx +69 -0
  58. package/skills/yad-docs/templates/app/src/components/DocSections/FlowOverviewSection.tsx +73 -0
  59. package/skills/yad-docs/templates/app/src/components/DocSections/FlowPathsChecklistSection.tsx +96 -0
  60. package/skills/yad-docs/templates/app/src/components/DocSections/MiddlewareChainSection.tsx +107 -0
  61. package/skills/yad-docs/templates/app/src/components/DocSections/MonitoringAlertingSection.tsx +106 -0
  62. package/skills/yad-docs/templates/app/src/components/DocSections/NotificationLocalizationSection.tsx +102 -0
  63. package/skills/yad-docs/templates/app/src/components/DocSections/PMRoadmapSection.tsx +133 -0
  64. package/skills/yad-docs/templates/app/src/components/DocSections/PerformanceTestingSection.tsx +91 -0
  65. package/skills/yad-docs/templates/app/src/components/DocSections/RiderIntegrationSection.tsx +99 -0
  66. package/skills/yad-docs/templates/app/src/components/DocSections/SecuritySection.tsx +74 -0
  67. package/skills/yad-docs/templates/app/src/components/DocSections/StatusMachineSection.tsx +90 -0
  68. package/skills/yad-docs/templates/app/src/components/DocSections/TestPlanSection.tsx +163 -0
  69. package/skills/yad-docs/templates/app/src/components/Logs/SystemLogsTerminal.tsx +126 -0
  70. package/skills/yad-docs/templates/app/src/components/Navigation/TopNavBar.tsx +90 -0
  71. package/skills/yad-docs/templates/app/src/components/Reference/BullMQJobsList.tsx +60 -0
  72. package/skills/yad-docs/templates/app/src/components/Reference/DecisionTreeView.tsx +49 -0
  73. package/skills/yad-docs/templates/app/src/components/Reference/DeeplinkActionsChips.tsx +69 -0
  74. package/skills/yad-docs/templates/app/src/components/Reference/DriverUIStatesTable.tsx +61 -0
  75. package/skills/yad-docs/templates/app/src/components/Reference/FeatureFlagMatrix.tsx +73 -0
  76. package/skills/yad-docs/templates/app/src/components/Reference/RiderUIStatesTable.tsx +61 -0
  77. package/skills/yad-docs/templates/app/src/components/Reference/RulesLegendPanel.tsx +217 -0
  78. package/skills/yad-docs/templates/app/src/components/Reference/StakeholderToggle.tsx +41 -0
  79. package/skills/yad-docs/templates/app/src/components/Reference/TroubleshootingSection.tsx +93 -0
  80. package/skills/yad-docs/templates/app/src/components/Sidebar/PathSelector.tsx +148 -0
  81. package/skills/yad-docs/templates/app/src/components/Sidebar/SidebarFooter.tsx +40 -0
  82. package/skills/yad-docs/templates/app/src/components/Sidebar/StepList.tsx +234 -0
  83. package/skills/yad-docs/templates/app/src/components/shared/Badge.tsx +28 -0
  84. package/skills/yad-docs/templates/app/src/components/shared/CommandPalette.tsx +213 -0
  85. package/skills/yad-docs/templates/app/src/components/shared/Icon.tsx +21 -0
  86. package/skills/yad-docs/templates/app/src/components/shared/Tooltip.tsx +42 -0
  87. package/skills/yad-docs/templates/app/src/data/components.ts +74 -0
  88. package/skills/yad-docs/templates/app/src/data/docSections.ts +231 -0
  89. package/skills/yad-docs/templates/app/src/data/paths.ts +2319 -0
  90. package/skills/yad-docs/templates/app/src/data/referenceData.ts +392 -0
  91. package/skills/yad-docs/templates/app/src/data/roles.ts +145 -0
  92. package/skills/yad-docs/templates/app/src/data/types.ts +79 -0
  93. package/skills/yad-docs/templates/app/src/hooks/useAnimationQueue.ts +41 -0
  94. package/skills/yad-docs/templates/app/src/hooks/usePlayback.ts +100 -0
  95. package/skills/yad-docs/templates/app/src/hooks/useStakeholderFilter.ts +10 -0
  96. package/skills/yad-docs/templates/app/src/index.css +121 -0
  97. package/skills/yad-docs/templates/app/src/main.tsx +13 -0
  98. package/skills/yad-docs/templates/app/src/pages/RoleSelectPage.tsx +34 -0
  99. package/skills/yad-docs/templates/app/src/pages/StakeholderDocPage.tsx +98 -0
  100. package/skills/yad-docs/templates/app/src/pages/SubPathDetailPage.tsx +282 -0
  101. package/skills/yad-docs/templates/app/src/store/useAuthStore.ts +42 -0
  102. package/skills/yad-docs/templates/app/src/store/useFlowStore.ts +197 -0
  103. package/skills/yad-docs/templates/app/src/utils/iconMap.ts +46 -0
  104. package/skills/yad-docs/templates/app/tsconfig.app.json +28 -0
  105. package/skills/yad-docs/templates/app/tsconfig.json +7 -0
  106. package/skills/yad-docs/templates/app/tsconfig.node.json +26 -0
  107. package/skills/yad-docs/templates/app/vite.config.ts +10 -0
  108. package/skills/yad-docs-overview/SKILL.md +129 -0
  109. package/skills/yad-docs-overview/references/pipeline-model.md +102 -0
  110. package/skills/yad-docs-sync/SKILL.md +99 -0
  111. package/skills/yad-docs-sync/references/staleness.md +81 -0
  112. package/skills/yad-engineer-review/SKILL.md +86 -0
  113. package/skills/{yad-ship → yad-engineer-review}/references/ship-and-record.md +2 -2
  114. package/skills/{yad-ship → yad-engineer-review}/templates/.coderabbit.yaml +1 -1
  115. package/skills/yad-epic/references/state-schema.md +1 -1
  116. package/skills/yad-implement/SKILL.md +1 -1
  117. package/skills/yad-implement/references/implement-conventions.md +1 -1
  118. package/skills/yad-open-pr/SKILL.md +72 -0
  119. package/skills/yad-pr-template/templates/checks/pr-template.sh +62 -0
  120. package/skills/yad-pr-template/templates/checks/pr-title.sh +51 -0
  121. package/skills/yad-run/SKILL.md +2 -2
  122. package/skills/yad-run/references/run-loop.md +4 -4
  123. package/skills/yad-ship/SKILL.md +44 -66
  124. package/skills/yad-spec/SKILL.md +1 -1
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "yadflow-docs-site",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "lint": "eslint .",
10
+ "preview": "vite preview"
11
+ },
12
+ "dependencies": {
13
+ "framer-motion": "^12.34.4",
14
+ "react": "^19.2.0",
15
+ "react-dom": "^19.2.0",
16
+ "react-router-dom": "^7.13.1",
17
+ "zustand": "^5.0.11"
18
+ },
19
+ "devDependencies": {
20
+ "@eslint/js": "^9.39.1",
21
+ "@tailwindcss/vite": "^4.2.1",
22
+ "@types/node": "^24.10.1",
23
+ "@types/react": "^19.2.7",
24
+ "@types/react-dom": "^19.2.3",
25
+ "@vitejs/plugin-react": "^5.1.1",
26
+ "eslint": "^9.39.1",
27
+ "eslint-plugin-react-hooks": "^7.0.1",
28
+ "eslint-plugin-react-refresh": "^0.4.24",
29
+ "globals": "^16.5.0",
30
+ "tailwindcss": "^4.2.1",
31
+ "typescript": "~5.9.3",
32
+ "typescript-eslint": "^8.48.0",
33
+ "vite": "^7.3.1"
34
+ }
35
+ }
@@ -0,0 +1,28 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 180">
2
+ <style type="text/css">
3
+ .st0{fill:url(#SVGID_1_);}
4
+ .st1{fill:#6316DB;}
5
+ .st2{fill:#FB2576;}
6
+ </style>
7
+ <g>
8
+ <g>
9
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="8.8225" y1="171.023" x2="69.9754" y2="119.7096">
10
+ <stop offset="2.964744e-03" style="stop-color:#FB2576"/>
11
+ <stop offset="0.2422" style="stop-color:#F82475"/>
12
+ <stop offset="0.412" style="stop-color:#EF2273"/>
13
+ <stop offset="0.5603" style="stop-color:#DF1E6F"/>
14
+ <stop offset="0.6963" style="stop-color:#C91969"/>
15
+ <stop offset="0.8238" style="stop-color:#AD1361"/>
16
+ <stop offset="0.9434" style="stop-color:#8A0A58"/>
17
+ <stop offset="1" style="stop-color:#770653"/>
18
+ </linearGradient>
19
+ <path class="st0" d="M55.3,94.9L1.6,174.3h47.6l21.6-32c5-7.5,7.6-12.8-1.1-26.2L55.3,94.9z"/>
20
+ </g>
21
+ <g>
22
+ <path class="st1" d="M156.7,15.5h-47.5l-30,44.3l14.4,21.2c8.7,13.3,6,18.7,1.1,26.2L156.7,15.5z"/>
23
+ </g>
24
+ <g>
25
+ <path class="st2" d="M93.5,80.9L49.2,15.5H1.6l68.1,100.6c8.7,13.3,6,18.7,1.1,26.2l1.7-2.6l22.1-32.6C99.6,99.6,102.3,94.3,93.5,80.9z"/>
26
+ </g>
27
+ </g>
28
+ </svg>
@@ -0,0 +1,39 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" style="enable-background:new 0 0 600 177.3;" xml:space="preserve" viewBox="1.6 -5.68 597.1 181.68">
2
+ <style type="text/css">
3
+ .st0{fill:url(#SVGID_1_);}
4
+ .st1{fill:#6316DB;}
5
+ .st2{fill:#FB2576;}
6
+ </style>
7
+ <g>
8
+ <g>
9
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="8.8225" y1="171.023" x2="69.9754" y2="119.7096">
10
+ <stop offset="2.964744e-03" style="stop-color:#FB2576"/>
11
+ <stop offset="0.2422" style="stop-color:#F82475"/>
12
+ <stop offset="0.412" style="stop-color:#EF2273"/>
13
+ <stop offset="0.5603" style="stop-color:#DF1E6F"/>
14
+ <stop offset="0.6963" style="stop-color:#C91969"/>
15
+ <stop offset="0.8238" style="stop-color:#AD1361"/>
16
+ <stop offset="0.9434" style="stop-color:#8A0A58"/>
17
+ <stop offset="1" style="stop-color:#770653"/>
18
+ </linearGradient>
19
+ <path class="st0" d="M55.3,94.9L1.6,174.3h47.6l21.6-32c5-7.5,7.6-12.8-1.1-26.2L55.3,94.9z"/>
20
+ </g>
21
+ <g>
22
+ <path class="st1" d="M156.7,15.5h-47.5l-30,44.3l14.4,21.2c8.7,13.3,6,18.7,1.1,26.2L156.7,15.5z"/>
23
+ </g>
24
+ <g>
25
+ <path class="st2" d="M93.5,80.9L49.2,15.5H1.6l68.1,100.6c8.7,13.3,6,18.7,1.1,26.2l1.7-2.6l22.1-32.6 C99.6,99.6,102.3,94.3,93.5,80.9z"/>
26
+ </g>
27
+ <path class="st1" d="M276.8,170.6c-8.2-3.6-13.1-8.5-17.9-14.8c-4.8-6.3-7.4-13.3-8-21.1h34.9c0.4,4.2,2.4,7.6,5.8,10.2 c3.5,2.6,7.7,3.9,12.8,3.9c4.6,0,8.2-0.9,10.7-2.7c2.5-1.8,3.8-4.1,3.8-7c0-3.5-1.8-6-5.4-7.7c-3.6-1.7-9.4-3.5-17.5-5.5 c-8.6-2-15.9-4.1-21.6-6.4c-5.8-2.2-10.7-5.8-14.9-10.6c-4.2-4.8-6.3-11.3-6.3-19.6c0-6.9,1.9-13.2,5.7-18.9 c3.8-5.7,9.4-10.2,16.9-13.5c7.4-3.3,16.2-5,26.5-5c15.1,0,27.1,3.8,35.8,11.2c8.7,7.5,13.7,17.4,15,29.8H319 c-0.6-4.2-2.4-7.5-5.5-9.9c-3.1-2.4-7.2-3.7-12.2-3.7c-4.3,0-7.6,0.8-9.9,2.5c-2.3,1.7-3.5,3.9-3.5,6.8c0,3.5,1.8,6.1,5.5,7.8 c3.7,1.7,9.4,3.5,17.2,5.2c8.9,2.3,16.2,4.6,21.8,6.8c5.6,2.2,10.6,5.8,14.8,10.8c4.3,5,6.4,11.6,6.6,20c0,7.1-2,13.4-5.9,18.9 c-4,5.6-9.7,9.9-17.1,13.1c-7.4,3.2-16,4.8-25.8,4.8C294.4,176,285,174.2,276.8,170.6z"/>
28
+ <path class="st1" d="M386.7,170.6c-8.2-3.6-13.1-8.5-17.9-14.8c-4.8-6.3-7.4-13.3-8-21.1h34.9c0.4,4.2,2.4,7.6,5.8,10.2 c3.5,2.6,7.7,3.9,12.8,3.9c4.6,0,8.2-0.9,10.7-2.7c2.5-1.8,3.8-4.1,3.8-7c0-3.5-1.8-6-5.4-7.7c-3.6-1.7-9.4-3.5-17.5-5.5 c-8.6-2-15.9-4.1-21.6-6.4c-5.8-2.2-10.7-5.8-14.9-10.6c-4.2-4.8-6.3-11.3-6.3-19.6c0-6.9,1.9-13.2,5.7-18.9 c3.8-5.7,9.4-10.2,16.9-13.5c7.4-3.3,16.2-5,26.5-5c15.1,0,27.1,3.8,35.8,11.2c8.7,7.5,13.7,17.4,15,29.8h-34.2 c-0.6-4.2-2.4-7.5-5.5-9.9c-3.1-2.4-7.2-3.7-12.2-3.7c-4.3,0-7.6,0.8-9.9,2.5c-2.3,1.7-3.5,3.9-3.5,6.8c0,3.5,1.8,6.1,5.5,7.8 c3.7,1.7,9.4,3.5,17.2,5.2c8.9,2.3,16.2,4.6,21.8,6.8c5.6,2.2,10.6,5.8,14.8,10.8c4.3,5,6.4,11.6,6.6,20c0,7.1-2,13.4-5.9,18.9 c-4,5.6-9.7,9.9-17.1,13.1c-7.4,3.2-16,4.8-25.8,4.8C404.2,176,394.9,174.2,386.7,170.6z"/>
29
+ <g>
30
+ <rect x="475.3" y="53.6" class="st1" width="34.9" height="120.6"/>
31
+
32
+ <ellipse transform="matrix(0.9239 -0.3827 0.3827 0.9239 29.4375 190.1633)" class="st1" cx="492.7" cy="21.1" rx="20.5" ry="20.5"/>
33
+ </g>
34
+ <g>
35
+ <path class="st1" d="M589.1,53.6c-15.6,0-33.6,6-46.2,18.9c-13.9,14.3-19,30.7-19,45.7v56h34.9v-56c0-9.9,4.4-16.8,8.7-21 c4.4-4.3,10.6-8.7,21-8.7h10.2V53.6H589.1z"/>
36
+ </g>
37
+ <path class="st1" d="M180.8,52.8c-34.2,0-61.2,27-61.2,61.2c0,33.8,25.6,60.3,60.4,60.3h2.9l23.3-34.4h-19.2 c-9.7,0-19.2-2.6-24.3-7.7c-4.7-4.7-7.8-11.1-7.8-18.2c0-14.8,11.2-25.9,25.9-25.9c14.8,0,26,11.2,26,25.9v60.3h35.2v-60.3 C241.9,79.7,214.9,52.8,180.8,52.8z"/>
38
+ </g>
39
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,98 @@
1
+ import { Routes, Route } from 'react-router-dom';
2
+ import { FlowCanvas } from './components/Canvas/FlowCanvas';
3
+ import { PathSelector } from './components/Sidebar/PathSelector';
4
+ import { StepList } from './components/Sidebar/StepList';
5
+ import { SidebarFooter } from './components/Sidebar/SidebarFooter';
6
+ import { PlaybackBar } from './components/Controls/PlaybackBar';
7
+ import { TopNavBar } from './components/Navigation/TopNavBar';
8
+ import { RightPanel } from './components/DetailPanel/RightPanel';
9
+ import { RulesLegendPanel } from './components/Reference/RulesLegendPanel';
10
+ import { CommandPalette } from './components/shared/CommandPalette';
11
+ import { SystemLogsTerminal } from './components/Logs/SystemLogsTerminal';
12
+ import { SubPathDetailPage } from './pages/SubPathDetailPage';
13
+ import { RoleSelectPage } from './pages/RoleSelectPage';
14
+ import { StakeholderDocPage } from './pages/StakeholderDocPage';
15
+ import { LoginPage } from './components/Auth/LoginPage';
16
+ import { usePlayback } from './hooks/usePlayback';
17
+ import { useFlowStore } from './store/useFlowStore';
18
+ import { useAuthStore } from './store/useAuthStore';
19
+
20
+ function Dashboard() {
21
+ usePlayback();
22
+ const isLogsPanelOpen = useFlowStore((s) => s.isLogsPanelOpen);
23
+
24
+ return (
25
+ <div className="flex flex-1 overflow-hidden">
26
+ {/* Left Sidebar */}
27
+ <aside
28
+ className="w-80 flex-none flex flex-col border-r z-10"
29
+ style={{
30
+ borderColor: 'var(--color-border-default)',
31
+ background: 'var(--color-bg-primary)',
32
+ }}
33
+ >
34
+ {/* Path Selection */}
35
+ <div className="p-4 border-b overflow-y-auto" style={{ borderColor: 'var(--color-border-default)' }}>
36
+ <PathSelector />
37
+ </div>
38
+
39
+ {/* Step Timeline */}
40
+ <div className="flex-1 overflow-y-auto p-4">
41
+ <StepList />
42
+ </div>
43
+
44
+ {/* Footer */}
45
+ <SidebarFooter />
46
+ </aside>
47
+
48
+ {/* Main Canvas Area */}
49
+ <main className="flex-1 flex flex-col overflow-hidden relative flow-grid"
50
+ style={{ background: '#1b172d' }}
51
+ >
52
+ {/* Canvas */}
53
+ <div className="flex-1 overflow-hidden">
54
+ <FlowCanvas />
55
+ </div>
56
+
57
+ {/* System Logs (collapsible) */}
58
+ {isLogsPanelOpen && (
59
+ <div className="h-48 flex-shrink-0 border-t"
60
+ style={{ borderColor: 'var(--color-border-default)' }}
61
+ >
62
+ <SystemLogsTerminal />
63
+ </div>
64
+ )}
65
+
66
+ {/* Playback Controls */}
67
+ <PlaybackBar />
68
+ </main>
69
+
70
+ {/* Right Detail Panel */}
71
+ <RightPanel />
72
+ </div>
73
+ );
74
+ }
75
+
76
+ function App() {
77
+ const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
78
+
79
+ if (!isAuthenticated) {
80
+ return <LoginPage />;
81
+ }
82
+
83
+ return (
84
+ <div className="flex flex-col h-screen w-screen overflow-hidden" style={{ background: 'var(--color-bg-primary)' }}>
85
+ <TopNavBar />
86
+ <Routes>
87
+ <Route path="/" element={<Dashboard />} />
88
+ <Route path="/path/:pathId" element={<SubPathDetailPage />} />
89
+ <Route path="/docs" element={<RoleSelectPage />} />
90
+ <Route path="/docs/:roleSlug" element={<StakeholderDocPage />} />
91
+ </Routes>
92
+ <RulesLegendPanel />
93
+ <CommandPalette />
94
+ </div>
95
+ );
96
+ }
97
+
98
+ export default App;
@@ -0,0 +1,101 @@
1
+ import { useState } from 'react';
2
+ import { useAuthStore } from '../../store/useAuthStore';
3
+
4
+ export function LoginPage() {
5
+ const [username, setUsername] = useState('');
6
+ const [password, setPassword] = useState('');
7
+ const { login, error } = useAuthStore();
8
+
9
+ const handleSubmit = (e: React.FormEvent) => {
10
+ e.preventDefault();
11
+ login(username, password);
12
+ };
13
+
14
+ return (
15
+ <div
16
+ className="h-screen w-screen flex items-center justify-center"
17
+ style={{ background: 'var(--color-bg-primary)' }}
18
+ >
19
+ <div
20
+ className="w-full max-w-md rounded-2xl p-10 shadow-2xl"
21
+ style={{
22
+ background: 'var(--color-bg-secondary)',
23
+ border: '1px solid var(--color-border-default)',
24
+ }}
25
+ >
26
+ {/* Logo */}
27
+ <div className="flex justify-center mb-6">
28
+ <img src="/logo.svg" alt="Logo" className="h-14" />
29
+ </div>
30
+
31
+ {/* Title */}
32
+ <h1 className="text-center text-xl font-bold text-white mb-1">
33
+ Booking Flow Documentation
34
+ </h1>
35
+ <p className="text-center text-sm mb-8" style={{ color: 'var(--color-text-muted)' }}>
36
+ Sign in to access the documentation
37
+ </p>
38
+
39
+ <form onSubmit={handleSubmit} className="space-y-5">
40
+ {/* Username */}
41
+ <div>
42
+ <label className="block text-sm font-semibold text-white mb-2">
43
+ Username
44
+ </label>
45
+ <input
46
+ type="text"
47
+ value={username}
48
+ onChange={(e) => setUsername(e.target.value)}
49
+ placeholder="Enter your username"
50
+ className="w-full px-4 py-3 rounded-lg text-sm text-white placeholder-slate-500 border outline-none transition-colors focus:border-[var(--color-primary)]"
51
+ style={{
52
+ background: 'var(--color-surface-highlight)',
53
+ borderColor: 'var(--color-border-default)',
54
+ }}
55
+ autoFocus
56
+ />
57
+ </div>
58
+
59
+ {/* Password */}
60
+ <div>
61
+ <label className="block text-sm font-semibold text-white mb-2">
62
+ Password
63
+ </label>
64
+ <input
65
+ type="password"
66
+ value={password}
67
+ onChange={(e) => setPassword(e.target.value)}
68
+ placeholder="Enter your password"
69
+ className="w-full px-4 py-3 rounded-lg text-sm text-white placeholder-slate-500 border outline-none transition-colors focus:border-[var(--color-primary)]"
70
+ style={{
71
+ background: 'var(--color-surface-highlight)',
72
+ borderColor: 'var(--color-border-default)',
73
+ }}
74
+ />
75
+ </div>
76
+
77
+ {/* Error */}
78
+ {error && (
79
+ <p className="text-sm text-red-400 text-center">{error}</p>
80
+ )}
81
+
82
+ {/* Submit */}
83
+ <button
84
+ type="submit"
85
+ className="w-full py-3 rounded-xl text-white font-semibold text-sm transition-all hover:opacity-90 cursor-pointer"
86
+ style={{
87
+ background: 'var(--color-primary)',
88
+ boxShadow: '0 4px 20px rgba(97, 22, 218, 0.4)',
89
+ }}
90
+ >
91
+ Sign In
92
+ </button>
93
+ </form>
94
+
95
+ <p className="text-center text-xs mt-6" style={{ color: 'var(--color-text-muted)' }}>
96
+ Booking flow documentation portal
97
+ </p>
98
+ </div>
99
+ </div>
100
+ );
101
+ }
@@ -0,0 +1,101 @@
1
+ import React, { useMemo } from 'react';
2
+ import { motion } from 'framer-motion';
3
+ import { COMPONENTS } from '../../data/components';
4
+
5
+ interface AnimatedMessageProps {
6
+ from: string;
7
+ to: string;
8
+ label: string;
9
+ color: string;
10
+ delay: number;
11
+ duration: number;
12
+ speed: number;
13
+ containerWidth: number;
14
+ containerHeight: number;
15
+ }
16
+
17
+ export const AnimatedMessage: React.FC<AnimatedMessageProps> = React.memo(
18
+ ({ from, to, label, color, delay, duration, speed, containerWidth, containerHeight }) => {
19
+ const coords = useMemo(() => {
20
+ const fromComp = COMPONENTS.find((c) => c.id === from);
21
+ const toComp = COMPONENTS.find((c) => c.id === to);
22
+ if (!fromComp || !toComp) return null;
23
+
24
+ const x1 = (fromComp.position.x / 100) * containerWidth;
25
+ const y1 = (fromComp.position.y / 100) * containerHeight;
26
+ const x2 = (toComp.position.x / 100) * containerWidth;
27
+ const y2 = (toComp.position.y / 100) * containerHeight;
28
+
29
+ const midX = (x1 + x2) / 2;
30
+ const dx = Math.abs(x2 - x1);
31
+ const dy = Math.abs(y2 - y1);
32
+ const curveFactor = Math.min(dx, dy) * 0.25;
33
+ const midY = (y1 + y2) / 2 - curveFactor;
34
+
35
+ return { x1, y1, x2, y2, midX, midY };
36
+ }, [from, to, containerWidth, containerHeight]);
37
+
38
+ if (!coords) return null;
39
+
40
+ const { x1, y1, x2, y2, midX, midY } = coords;
41
+ const animDelay = delay / speed / 1000;
42
+ const animDuration = duration / speed / 1000;
43
+ const pathD = `M ${x1} ${y1} Q ${midX} ${midY} ${x2} ${y2}`;
44
+
45
+ return (
46
+ <>
47
+ {/* Trail line */}
48
+ <svg
49
+ className="pointer-events-none absolute inset-0 h-full w-full"
50
+ style={{ zIndex: 15 }}
51
+ >
52
+ <motion.path
53
+ d={pathD}
54
+ fill="none"
55
+ stroke={color}
56
+ strokeWidth={2}
57
+ strokeLinecap="round"
58
+ initial={{ pathLength: 0, opacity: 0 }}
59
+ animate={{ pathLength: 1, opacity: [0, 0.6, 0.3] }}
60
+ transition={{
61
+ duration: animDuration,
62
+ delay: animDelay,
63
+ ease: 'easeInOut',
64
+ }}
65
+ />
66
+ </svg>
67
+
68
+ {/* Floating message bubble */}
69
+ <motion.div
70
+ className="pointer-events-none absolute z-20 flex items-center gap-1 rounded-full px-3 py-1.5"
71
+ style={{
72
+ backgroundColor: `${color}ee`,
73
+ boxShadow: `0 0 20px ${color}60, 0 2px 12px rgba(0,0,0,0.4)`,
74
+ whiteSpace: 'nowrap',
75
+ left: 0,
76
+ top: 0,
77
+ translateX: '-50%',
78
+ translateY: '-50%',
79
+ border: '1px solid rgba(255,255,255,0.2)',
80
+ }}
81
+ initial={{ x: x1, y: y1, opacity: 0, scale: 0.5 }}
82
+ animate={{
83
+ x: [x1, midX, x2],
84
+ y: [y1, midY, y2],
85
+ opacity: [0, 1, 1, 0.8],
86
+ scale: [0.5, 1, 1, 0.9],
87
+ }}
88
+ transition={{
89
+ duration: animDuration,
90
+ delay: animDelay,
91
+ ease: 'easeInOut',
92
+ }}
93
+ >
94
+ <span className="text-[9px] font-bold leading-none text-white drop-shadow-sm">
95
+ {label}
96
+ </span>
97
+ </motion.div>
98
+ </>
99
+ );
100
+ }
101
+ );
@@ -0,0 +1,90 @@
1
+ import React, { useMemo } from 'react';
2
+ import { COMPONENTS } from '../../data/components';
3
+
4
+ interface ConnectionLineProps {
5
+ from: string;
6
+ to: string;
7
+ isActive: boolean;
8
+ containerWidth: number;
9
+ containerHeight: number;
10
+ }
11
+
12
+ let gradientCounter = 0;
13
+
14
+ export const ConnectionLine: React.FC<ConnectionLineProps> = React.memo(
15
+ ({ from, to, isActive, containerWidth, containerHeight }) => {
16
+ const gradientId = useMemo(() => `gradient-${from}-${to}-${++gradientCounter}`, [from, to]);
17
+
18
+ const path = useMemo(() => {
19
+ const fromComp = COMPONENTS.find((c) => c.id === from);
20
+ const toComp = COMPONENTS.find((c) => c.id === to);
21
+ if (!fromComp || !toComp) return null;
22
+
23
+ const x1 = (fromComp.position.x / 100) * containerWidth;
24
+ const y1 = (fromComp.position.y / 100) * containerHeight;
25
+ const x2 = (toComp.position.x / 100) * containerWidth;
26
+ const y2 = (toComp.position.y / 100) * containerHeight;
27
+
28
+ const midX = (x1 + x2) / 2;
29
+ const dx = Math.abs(x2 - x1);
30
+ const dy = Math.abs(y2 - y1);
31
+ const curveFactor = Math.min(dx, dy) * 0.3;
32
+ const midY = (y1 + y2) / 2 - curveFactor;
33
+
34
+ return `M ${x1} ${y1} Q ${midX} ${midY} ${x2} ${y2}`;
35
+ }, [from, to, containerWidth, containerHeight]);
36
+
37
+ if (!path) return null;
38
+
39
+ if (isActive) {
40
+ return (
41
+ <g>
42
+ <defs>
43
+ <linearGradient id={gradientId} x1="0%" y1="0%" x2="100%" y2="0%">
44
+ <stop offset="0%" stopColor="#6116da" stopOpacity="1" />
45
+ <stop offset="100%" stopColor="#ff6490" stopOpacity="1" />
46
+ </linearGradient>
47
+ </defs>
48
+ {/* Background dashed path */}
49
+ <path
50
+ d={path}
51
+ fill="none"
52
+ stroke="var(--color-surface-highlight)"
53
+ strokeWidth={1}
54
+ strokeDasharray="5,5"
55
+ opacity={0.5}
56
+ />
57
+ {/* Active gradient path */}
58
+ <path
59
+ d={path}
60
+ fill="none"
61
+ stroke={`url(#${gradientId})`}
62
+ strokeWidth={2}
63
+ opacity={0.7}
64
+ style={{ transition: 'all 0.3s ease' }}
65
+ >
66
+ <animate
67
+ attributeName="stroke-dasharray"
68
+ from="0, 1000"
69
+ to="1000, 0"
70
+ dur="2s"
71
+ repeatCount="indefinite"
72
+ />
73
+ </path>
74
+ </g>
75
+ );
76
+ }
77
+
78
+ return (
79
+ <path
80
+ d={path}
81
+ fill="none"
82
+ stroke="var(--color-surface-highlight)"
83
+ strokeWidth={0.8}
84
+ strokeDasharray="4 4"
85
+ opacity={0.3}
86
+ style={{ transition: 'all 0.3s ease' }}
87
+ />
88
+ );
89
+ }
90
+ );