oneie 3.5.0 → 3.6.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 (132) hide show
  1. package/.claude/agents/agent-director.md +902 -22
  2. package/.claude/agents/agent-onboard-example-output.md +600 -0
  3. package/.claude/agents/agent-onboard.md +576 -0
  4. package/.claude/commands/ONBOARDING_ENHANCEMENT_SUMMARY.md +266 -0
  5. package/.claude/commands/one.md +375 -5
  6. package/.claude/commands/release.md +64 -3
  7. package/CLAUDE.md +55 -69
  8. package/dist/commands/init.d.ts +5 -6
  9. package/dist/commands/init.d.ts.map +1 -1
  10. package/dist/commands/init.js +101 -101
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/index.js +6 -5
  13. package/dist/index.js.map +1 -1
  14. package/dist/utils/installation-setup.d.ts +24 -1
  15. package/dist/utils/installation-setup.d.ts.map +1 -1
  16. package/dist/utils/installation-setup.js +85 -1
  17. package/dist/utils/installation-setup.js.map +1 -1
  18. package/dist/utils/launch-claude.d.ts +6 -0
  19. package/dist/utils/launch-claude.d.ts.map +1 -0
  20. package/dist/utils/launch-claude.js +51 -0
  21. package/dist/utils/launch-claude.js.map +1 -0
  22. package/dist/utils/validation.d.ts +48 -0
  23. package/dist/utils/validation.d.ts.map +1 -0
  24. package/dist/utils/validation.js +73 -0
  25. package/dist/utils/validation.js.map +1 -0
  26. package/folders.yaml +1 -1
  27. package/one/.obsidian/core-plugins.json +33 -0
  28. package/one/.obsidian/workspace.json +20 -20
  29. package/one/connections/workflow-onboarding.md +683 -0
  30. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
  31. package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
  32. package/one/events/DEPLOYMENT.md +178 -0
  33. package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
  34. package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
  35. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
  36. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
  37. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
  38. package/one/events/HANDOFF.md +313 -0
  39. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
  40. package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
  41. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
  42. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
  43. package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
  44. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
  45. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
  46. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
  47. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
  48. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
  49. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
  50. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
  51. package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
  52. package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
  53. package/one/events/SHOP-BUILD-STATUS.md +114 -0
  54. package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
  55. package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
  56. package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
  57. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
  58. package/one/events/agent-director-enhancement-summary.md +386 -0
  59. package/one/events/agent-onboard-implementation-summary.md +457 -0
  60. package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
  61. package/one/events/landing-page-generator.md +458 -0
  62. package/one/events/onboarding-implementation-complete.md +505 -0
  63. package/one/events/release.md +254 -0
  64. package/one/events/separate-implementation-status.md +537 -0
  65. package/one/knowledge/100-inference-quick-reference.md +431 -0
  66. package/one/knowledge/agent-onboard-usage.md +612 -0
  67. package/one/knowledge/cli-claude-handoff.md +718 -0
  68. package/one/knowledge/ontology-blog.yaml +31 -0
  69. package/one/knowledge/ontology-cheatsheet.md +591 -0
  70. package/one/knowledge/ontology-community.yaml +42 -0
  71. package/one/knowledge/ontology-core-universal.md +722 -0
  72. package/one/knowledge/ontology-core.yaml +50 -0
  73. package/one/knowledge/ontology-courses.yaml +53 -0
  74. package/one/knowledge/ontology-creator.md +376 -0
  75. package/one/knowledge/ontology-developer-guide.md +789 -0
  76. package/one/knowledge/ontology-education.md +920 -0
  77. package/one/knowledge/ontology-index.md +354 -0
  78. package/one/knowledge/ontology-migration-guide.md +811 -0
  79. package/one/knowledge/ontology-minimal.yaml +1 -1
  80. package/one/knowledge/ontology-portfolio.yaml +31 -0
  81. package/one/knowledge/ontology-quickstart.md +576 -0
  82. package/one/knowledge/ontology-shop.yaml +121 -0
  83. package/one/knowledge/ontology-tokens.yaml +32 -0
  84. package/one/knowledge/ontology-tutorial.md +434 -0
  85. package/one/knowledge/ontology-video-script.md +890 -0
  86. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +467 -0
  87. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +408 -0
  88. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +369 -0
  89. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +396 -0
  90. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +468 -0
  91. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +582 -0
  92. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +449 -0
  93. package/one/things/docs/ecommerce/QUICK-START.md +368 -0
  94. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +498 -0
  95. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +237 -0
  96. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +171 -0
  97. package/one/things/docs/ecommerce/demo.astro +309 -0
  98. package/one/things/plans/agent-director-100-inference-plans.md +410 -0
  99. package/one/things/plans/dual-website-strategy.md +612 -0
  100. package/one/things/plans/feature-based-sites.md +821 -0
  101. package/one/things/plans/multi-ontology-architecture.md +836 -0
  102. package/one/things/plans/onboarding.md +32 -0
  103. package/one/things/plans/separate.md +15 -17
  104. package/one/things/plans/start-new.md +738 -0
  105. package/package.json +2 -2
  106. package/one/things/claude/hooks/agent-hook-manager.js +0 -525
  107. package/one/things/claude/hooks/agent-load-balancer.js +0 -271
  108. package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
  109. package/one/things/claude/hooks/cascade-feedback.js +0 -297
  110. package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
  111. package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
  112. package/one/things/claude/hooks/file-organization-engine.js +0 -427
  113. package/one/things/claude/hooks/file-organization-monitor.js +0 -269
  114. package/one/things/claude/hooks/hook-config-manager.js +0 -202
  115. package/one/things/claude/hooks/hook-orchestrator.js +0 -662
  116. package/one/things/claude/hooks/hook-performance-report.js +0 -120
  117. package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
  118. package/one/things/claude/hooks/memory-optimizer.js +0 -510
  119. package/one/things/claude/hooks/ontology-compliance.js +0 -394
  120. package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
  121. package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
  122. package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
  123. package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
  124. package/one/things/claude/hooks/simple-load-balancer.js +0 -238
  125. package/one/things/claude/hooks/startup-optimizer.js +0 -625
  126. package/one/things/claude/hooks/story-scoring-system.js +0 -445
  127. package/one/things/claude/hooks/story-validation-engine.js +0 -473
  128. package/one/things/claude/hooks/structure-synchronizer.js +0 -194
  129. package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
  130. package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
  131. package/one/things/claude/hooks/trinity-validation-system.js +0 -392
  132. package/one/things/plans/organizations-to-groups.md +0 -705
@@ -0,0 +1,467 @@
1
+ # Product Page Conversion Elements - Architecture Diagram
2
+
3
+ ## Component Architecture Flow
4
+
5
+ ```
6
+ ┌─────────────────────────────────────────────────────────────────────┐
7
+ │ PRODUCT LISTING PAGE │
8
+ │ (src/pages/ecommerce/) │
9
+ └─────────────────────────────────────────────────────────────────────┘
10
+ │
11
+ │ Maps products
12
+ ↓
13
+ ┌─────────────────────────────────────────────────────────────────────┐
14
+ │ ProductCard.tsx │
15
+ │ ┌──────────────────────────────────────────────────────────────┐ │
16
+ │ │ • Product Image (hover effect) │ │
17
+ │ │ • Badges (New, Sale, Low Stock, Featured) │ │
18
+ │ │ • Wishlist Button (top-right) │ │
19
+ │ │ • Quick View Button (top-right, shows on hover) ────────┐ │ │
20
+ │ │ • Product Info (name, rating, price) │ │ │
21
+ │ │ • Add to Cart Button │ │ │
22
+ │ │ • Real-time Viewers Counter │ │ │
23
+ │ └──────────────────────────────────────────────────────────────┘ │
24
+ └─────────────────────────────────────────────────────────────────────┘
25
+ │
26
+ │ Opens
27
+ ↓
28
+ ┌─────────────────────────────────────────────────────────────────────┐
29
+ │ QuickViewModal.tsx │
30
+ │ ┌──────────────────────────────────────────────────────────────┐ │
31
+ │ │ Dialog (shadcn/ui) - Lightbox Style │ │
32
+ │ │ ┌────────────────────────┬──────────────────────────────┐ │ │
33
+ │ │ │ LEFT: Image Gallery │ RIGHT: Product Info │ │ │
34
+ │ │ │ • Main image │ • Title & Rating │ │ │
35
+ │ │ │ • Thumbnails │ • Price │ │ │
36
+ │ │ │ • Badges │ • Description (truncated) │ │ │
37
+ │ │ │ │ • Variant Selector │ │ │
38
+ │ │ │ │ • Quantity Selector │ │ │
39
+ │ │ │ │ • Add to Cart Button │ │ │
40
+ │ │ │ │ • View Full Details Button │ │ │
41
+ │ │ └────────────────────────┴──────────────────────────────┘ │ │
42
+ │ └──────────────────────────────────────────────────────────────┘ │
43
+ └─────────────────────────────────────────────────────────────────────┘
44
+ │
45
+ │ Click "View Full Details"
46
+ ↓
47
+ ┌─────────────────────────────────────────────────────────────────────┐
48
+ │ PRODUCT DETAIL PAGE │
49
+ │ (src/pages/ecommerce/product/[slug].astro) │
50
+ └─────────────────────────────────────────────────────────────────────┘
51
+ │
52
+ │ Renders
53
+ ↓
54
+ ┌─────────────────────────────────────────────────────────────────────┐
55
+ │ Product Detail Layout │
56
+ │ ┌──────────────────────────┬──────────────────────────────────┐ │
57
+ │ │ LEFT COLUMN │ RIGHT COLUMN │ │
58
+ │ │ ┌──────────────────┐ │ ┌──────────────────────────┐ │ │
59
+ │ │ │ ProductGallery │ │ │ Product Info Section │ │ │
60
+ │ │ │ (Enhanced) │ │ │ • Title & Description │ │ │
61
+ │ │ │ │ │ │ • Price │ │ │
62
+ │ │ │ • Click to zoom │ │ │ │ │ │
63
+ │ │ │ • Mouse tracking │ │ │ ┌──────────────────────┐ │ │ │
64
+ │ │ │ • Swipe support │ │ │ │ id="variant-selector"│ │ │ │
65
+ │ │ │ • Fullscreen btn │ │ │ │ • Size Selector │ │ │ │
66
+ │ │ │ • Thumbnails │ │ │ │ • Color Selector │ │ │ │
67
+ │ │ │ • Keyboard nav │ │ │ │ • Size Guide Link ───┼─┼─┐ │ │
68
+ │ │ └──────────────────┘ │ │ └──────────────────────┘ │ │ │ │
69
+ │ │ │ │ • Quantity Selector │ │ │ │
70
+ │ │ │ │ • Add to Cart Button │ │ │ │
71
+ │ │ │ │ • Stock Warning │ │ │ │
72
+ │ └──────────────────────────┴──┴───────────────────────────┴─┘ │ │
73
+ │ │ │ │
74
+ │ [Scroll Past Variant Selector triggers...] │ │ │
75
+ │ │ │ │
76
+ │ ┌──────────────────────────────────────────────────────┐ │ │ │
77
+ │ │ StickyCartBar (Mobile Only) │ │ │ │
78
+ │ │ • Fixed bottom position │ │ │ │
79
+ │ │ • Product thumbnail + info + price │ │ │ │
80
+ │ │ • Selected variant text │ │ │ │
81
+ │ │ • Add to Cart button │ │ │ │
82
+ │ │ • Appears on scroll past #variant-selector │◄──┘ │ │
83
+ │ └──────────────────────────────────────────────────────┘ │ │
84
+ └─────────────────────────────────────────────────────────────────────┘
85
+ │
86
+ │ Triggers
87
+ ↓
88
+ ┌─────────────────────────────────────────────────────────────────────┐
89
+ │ SizeGuideModal.tsx │
90
+ │ ┌──────────────────────────────────────────────────────────────┐ │
91
+ │ │ Dialog (shadcn/ui) - Full Modal │ │
92
+ │ │ ┌──────────────────────────────────────────────────────┐ │ │
93
+ │ │ │ Tabs (shadcn/ui) │ │ │
94
+ │ │ │ ┌────────────┬──────────────┬─────────────────┐ │ │ │
95
+ │ │ │ │ Measurements│ How to Measure│ Fit Guide │ │ │ │
96
+ │ │ │ └────────────┴──────────────┴─────────────────┘ │ │ │
97
+ │ │ │ │ │ │
98
+ │ │ │ TAB 1: Measurements │ │ │
99
+ │ │ │ • Size Chart Table (shadcn/ui Table) │ │ │
100
+ │ │ │ - Size | Chest | Waist | Hips | Length │ │ │
101
+ │ │ │ • Shoe Size Conversion (if shoes) │ │ │
102
+ │ │ │ • Model Stats │ │ │
103
+ │ │ │ │ │ │
104
+ │ │ │ TAB 2: How to Measure │ │ │
105
+ │ │ │ • Step-by-step instructions │ │ │
106
+ │ │ │ • Visual guides (future) │ │ │
107
+ │ │ │ • Pro tips │ │ │
108
+ │ │ │ │ │ │
109
+ │ │ │ TAB 3: Fit Guide │ │ │
110
+ │ │ │ • Regular Fit description │ │ │
111
+ │ │ │ • Slim Fit description │ │ │
112
+ │ │ │ • Relaxed Fit description │ │ │
113
+ │ │ │ • Between sizes guidance │ │ │
114
+ │ │ └──────────────────────────────────────────────────────┘ │ │
115
+ │ └──────────────────────────────────────────────────────────────┘ │
116
+ └─────────────────────────────────────────────────────────────────────┘
117
+
118
+
119
+ ┌─────────────────────────────────────────────────────────────────────┐
120
+ │ ProductGallery.tsx - Fullscreen Mode │
121
+ │ ┌──────────────────────────────────────────────────────────────┐ │
122
+ │ │ Dialog (shadcn/ui) - Fullscreen │ │
123
+ │ │ ┌──────────────────────────────────────────────────────┐ │ │
124
+ │ │ │ Black background (95vw × 90vh) │ │ │
125
+ │ │ │ │ │ │
126
+ │ │ │ [◄ Previous] [Image - object-contain] [Next ►] │ │ │
127
+ │ │ │ │ │ │
128
+ │ │ │ [3 / 8] │ │ │
129
+ │ │ │ │ │ │
130
+ │ │ │ [✕ Close] │ │ │
131
+ │ │ └──────────────────────────────────────────────────────┘ │ │
132
+ │ └──────────────────────────────────────────────────────────────┘ │
133
+ └─────────────────────────────────────────────────────────────────────┘
134
+ ```
135
+
136
+ ## Data Flow Architecture
137
+
138
+ ```
139
+ ┌──────────────────────────────────────────────────────────────────┐
140
+ │ USER ACTIONS │
141
+ └──────────────────────────────────────────────────────────────────┘
142
+ │ │ │
143
+ │ Click │ Scroll │ Click
144
+ │ Quick View │ Past Trigger │ Size Guide
145
+ ↓ ↓ ↓
146
+ ┌─────────┐ ┌──────────┐ ┌──────────┐
147
+ │ setState│ │ setState │ │ setState │
148
+ │ (true) │ │ (visible)│ │ (true) │
149
+ └─────────┘ └──────────┘ └──────────┘
150
+ │ │ │
151
+ ↓ ↓ ↓
152
+ ┌──────────────────────────────────────────────────────────────────┐
153
+ │ COMPONENT STATE │
154
+ │ showQuickView: boolean │
155
+ │ isVisible: boolean (sticky bar) │
156
+ │ showSizeGuide: boolean │
157
+ │ isZoomed: boolean (gallery) │
158
+ │ isFullscreen: boolean (gallery) │
159
+ │ selectedVariants: Record<string, string> │
160
+ │ quantity: number │
161
+ └──────────────────────────────────────────────────────────────────┘
162
+ │
163
+ │ User adds to cart
164
+ ↓
165
+ ┌──────────────────────────────────────────────────────────────────┐
166
+ │ CART STORE (Nanostores) │
167
+ │ $cart: Cart │
168
+ │ $cartCount: number (computed) │
169
+ │ $cartSubtotal: number (computed) │
170
+ │ $cartTotal: number (computed) │
171
+ │ │
172
+ │ cartActions: │
173
+ │ • addItem(item) │
174
+ │ • removeItem(id, variant) │
175
+ │ • updateQuantity(id, qty, variant) │
176
+ │ • clearCart() │
177
+ └──────────────────────────────────────────────────────────────────┘
178
+ │
179
+ │ Persists to localStorage
180
+ ↓
181
+ ┌──────────────────────────────────────────────────────────────────┐
182
+ │ LOCAL STORAGE │
183
+ │ Key: "shopping-cart" │
184
+ │ Value: { items: CartItem[], updatedAt: number } │
185
+ └──────────────────────────────────────────────────────────────────┘
186
+ │
187
+ │ Updates UI
188
+ ↓
189
+ ┌──────────────────────────────────────────────────────────────────┐
190
+ │ UI FEEDBACK │
191
+ │ • Toast notification (success) │
192
+ │ • Cart icon badge updates │
193
+ │ • Button loading state │
194
+ │ • Modal auto-close (quick view) │
195
+ └──────────────────────────────────────────────────────────────────┘
196
+ ```
197
+
198
+ ## Event Flow Diagram
199
+
200
+ ```
201
+ ┌────────────────────────────────────────────────────────────────┐
202
+ │ PRODUCT LISTING PAGE │
203
+ └────────────────────────────────────────────────────────────────┘
204
+ │
205
+ │ User hovers ProductCard
206
+ ↓
207
+ [Quick View Button Appears]
208
+ │
209
+ │ User clicks
210
+ ↓
211
+ [QuickViewModal Opens]
212
+ │
213
+ ┌─────────┴─────────┐
214
+ │ │
215
+ User selects variants User clicks backdrop
216
+ │ │
217
+ ↓ ↓
218
+ [Variant state updates] [Modal closes]
219
+ │
220
+ │ User clicks "Add to Cart"
221
+ ↓
222
+ [cartActions.addItem()]
223
+ │
224
+ ┌─────────┴─────────┐
225
+ │ │
226
+ [Cart updates] [Toast shows]
227
+ │ │
228
+ └─────────┬─────────┘
229
+ │
230
+ │ After 600ms
231
+ ↓
232
+ [Modal auto-closes]
233
+
234
+
235
+ ┌────────────────────────────────────────────────────────────────┐
236
+ │ PRODUCT DETAIL PAGE │
237
+ └────────────────────────────────────────────────────────────────┘
238
+ │
239
+ │ Page loads
240
+ ↓
241
+ [ProductGallery renders]
242
+ │
243
+ ┌─────────┴─────────┐
244
+ │ │
245
+ Click image Click fullscreen
246
+ │ │
247
+ ↓ ↓
248
+ [Zoom to 2x] [Fullscreen modal]
249
+ │ │
250
+ Move mouse Click arrows
251
+ │ │
252
+ ↓ ↓
253
+ [Pan zoomed] [Navigate images]
254
+ │
255
+ │ Click again
256
+ ↓
257
+ [Zoom out]
258
+
259
+
260
+ │
261
+ │ User scrolls down
262
+ ↓
263
+ [IntersectionObserver triggers]
264
+ │
265
+ │ Past #variant-selector
266
+ ↓
267
+ [StickyCartBar slides up]
268
+ │
269
+ ┌─────────┴─────────┐
270
+ │ │
271
+ Scroll back up Click "Add to Cart"
272
+ │ │
273
+ ↓ ↓
274
+ [Bar slides down] [cartActions.addItem()]
275
+ │
276
+ ↓
277
+ [Toast shows]
278
+
279
+
280
+ │
281
+ │ User clicks "Size Guide"
282
+ ↓
283
+ [SizeGuideModal opens]
284
+ │
285
+ ┌─────────┴─────────┐
286
+ │ │ │
287
+ Tab 1: Size Tab 2: Tab 3: Fit
288
+ Chart Table How to Descriptions
289
+ │
290
+ │ User clicks backdrop
291
+ ↓
292
+ [Modal closes]
293
+ ```
294
+
295
+ ## Component Dependencies
296
+
297
+ ```
298
+ QuickViewModal.tsx
299
+ ├── @/components/ui/dialog (shadcn/ui)
300
+ ├── @/components/ui/button (shadcn/ui)
301
+ ├── @/components/ui/badge (shadcn/ui)
302
+ ├── ../static/PriceDisplay
303
+ ├── ../static/ReviewStars
304
+ ├── ./VariantSelector
305
+ ├── ./QuantitySelector
306
+ ├── @/stores/cart
307
+ └── ./Toast
308
+
309
+ ProductGallery.tsx
310
+ ├── @/components/ui/dialog (shadcn/ui)
311
+ └── React hooks (useState, useRef, useEffect)
312
+
313
+ SizeGuideModal.tsx
314
+ ├── @/components/ui/dialog (shadcn/ui)
315
+ ├── @/components/ui/tabs (shadcn/ui)
316
+ └── @/components/ui/table (shadcn/ui)
317
+
318
+ StickyCartBar.tsx
319
+ ├── @/components/ui/button (shadcn/ui)
320
+ ├── ../static/PriceDisplay
321
+ ├── @/stores/cart
322
+ ├── ./Toast
323
+ └── React hooks (useState, useRef, useEffect)
324
+
325
+ ProductCard.tsx
326
+ ├── @/components/ui/button (shadcn/ui)
327
+ ├── @/components/ui/badge (shadcn/ui)
328
+ ├── ./QuickViewModal ← NEW
329
+ ├── ../static/PriceDisplay
330
+ ├── ../static/ReviewStars
331
+ ├── @/stores/cart
332
+ ├── ./Toast
333
+ ├── ./ViewersCounter
334
+ ├── ./Wishlist
335
+ └── framer-motion
336
+ ```
337
+
338
+ ## State Management Flow
339
+
340
+ ```
341
+ ┌────────────────────────────────────────────────────────────────┐
342
+ │ COMPONENT LOCAL STATE │
343
+ ├────────────────────────────────────────────────────────────────┤
344
+ │ ProductCard: │
345
+ │ • showQuickView: boolean │
346
+ │ • isAdding: boolean │
347
+ │ │
348
+ │ QuickViewModal: │
349
+ │ • currentImageIndex: number │
350
+ │ • selectedVariants: Record<string, string> │
351
+ │ • quantity: number │
352
+ │ • isAdding: boolean │
353
+ │ │
354
+ │ ProductGallery: │
355
+ │ • currentIndex: number │
356
+ │ • isZoomed: boolean │
357
+ │ • isFullscreen: boolean │
358
+ │ • zoomPosition: { x: number, y: number } │
359
+ │ │
360
+ │ StickyCartBar: │
361
+ │ • isVisible: boolean │
362
+ │ • isAdding: boolean │
363
+ │ │
364
+ │ SizeGuideModal: │
365
+ │ • (Controlled by parent) │
366
+ └────────────────────────────────────────────────────────────────┘
367
+ │
368
+ │ Updates
369
+ ↓
370
+ ┌────────────────────────────────────────────────────────────────┐
371
+ │ GLOBAL STATE (Nanostores) │
372
+ ├────────────────────────────────────────────────────────────────┤
373
+ │ $cart: Cart │
374
+ │ ├── items: CartItem[] │
375
+ │ └── updatedAt: number │
376
+ │ │
377
+ │ Computed: │
378
+ │ $cartCount: number │
379
+ │ $cartSubtotal: number │
380
+ │ $cartTotal: number │
381
+ └────────────────────────────────────────────────────────────────┘
382
+ │
383
+ │ Persists
384
+ ↓
385
+ ┌────────────────────────────────────────────────────────────────┐
386
+ │ PERSISTENCE LAYER │
387
+ ├────────────────────────────────────────────────────────────────┤
388
+ │ localStorage: │
389
+ │ • Key: "shopping-cart" │
390
+ │ • Automatic save on cart updates │
391
+ │ • Automatic load on page refresh │
392
+ └────────────────────────────────────────────────────────────────┘
393
+ ```
394
+
395
+ ## Performance Optimization Strategy
396
+
397
+ ```
398
+ ┌────────────────────────────────────────────────────────────────┐
399
+ │ LAZY LOADING STRATEGY │
400
+ ├────────────────────────────────────────────────────────────────┤
401
+ │ ProductCard: │
402
+ │ • Renders immediately (SSR/Static) │
403
+ │ • QuickViewModal: Conditional render (only when open) │
404
+ │ │
405
+ │ Product Detail Page: │
406
+ │ • ProductGallery: Immediate (client:load) │
407
+ │ • SizeGuideModal: Conditional render (only when open) │
408
+ │ • StickyCartBar: Deferred (waits for scroll) │
409
+ │ │
410
+ │ Fullscreen Modal: │
411
+ │ • Dialog component handles portal rendering │
412
+ │ • Only mounts when isFullscreen = true │
413
+ └────────────────────────────────────────────────────────────────┘
414
+ │
415
+ ↓
416
+ ┌────────────────────────────────────────────────────────────────┐
417
+ │ EVENT OPTIMIZATION │
418
+ ├────────────────────────────────────────────────────────────────┤
419
+ │ Scroll Listeners: │
420
+ │ • requestAnimationFrame throttle │
421
+ │ • Passive event listeners │
422
+ │ • Cleanup on unmount │
423
+ │ │
424
+ │ Touch Events: │
425
+ │ • 50px minimum threshold │
426
+ │ • Prevents false triggers │
427
+ │ │
428
+ │ Keyboard Events: │
429
+ │ • Debounced handlers │
430
+ │ • Event listener cleanup │
431
+ └────────────────────────────────────────────────────────────────┘
432
+ ```
433
+
434
+ ---
435
+
436
+ ## Mobile-First Responsive Breakpoints
437
+
438
+ ```
439
+ ┌────────────────────────────────────────────────────────────────┐
440
+ │ Mobile (< 768px) │
441
+ ├────────────────────────────────────────────────────────────────┤
442
+ │ • QuickViewModal: Single column layout │
443
+ │ • ProductGallery: Swipe gestures enabled │
444
+ │ • StickyCartBar: Visible (main use case) │
445
+ │ • SizeGuideModal: Scrollable tables │
446
+ └────────────────────────────────────────────────────────────────┘
447
+
448
+ ┌────────────────────────────────────────────────────────────────┐
449
+ │ Tablet (768px - 1024px) │
450
+ ├────────────────────────────────────────────────────────────────┤
451
+ │ • QuickViewModal: Two column layout starts │
452
+ │ • ProductGallery: Mouse + touch support │
453
+ │ • StickyCartBar: Still visible │
454
+ │ • SizeGuideModal: Full table width │
455
+ └────────────────────────────────────────────────────────────────┘
456
+
457
+ ┌────────────────────────────────────────────────────────────────┐
458
+ │ Desktop (> 1024px) │
459
+ ├────────────────────────────────────────────────────────────────┤
460
+ │ • QuickViewModal: Optimal two column layout │
461
+ │ • ProductGallery: Mouse interactions primary │
462
+ │ • StickyCartBar: Hidden (md:hidden) │
463
+ │ • SizeGuideModal: Full-width tables │
464
+ └────────────────────────────────────────────────────────────────┘
465
+ ```
466
+
467
+ This architecture ensures optimal performance, accessibility, and conversion rates across all devices.