@polymorphism-tech/morph-spec 4.3.4 → 4.3.6

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 (164) hide show
  1. package/.morph/.morphversion +5 -0
  2. package/.morph/config/agents.json +948 -0
  3. package/.morph/config/config.json +9 -9
  4. package/.morph/project/context/README.md +17 -0
  5. package/.morph/project/context/detection-log.md +16 -0
  6. package/.morph/project/standards/inferred.md +59 -0
  7. package/.morph/standards/ai-agents/blazor-ui.md +364 -0
  8. package/.morph/standards/ai-agents/production.md +415 -0
  9. package/.morph/standards/ai-agents/setup.md +418 -0
  10. package/.morph/standards/ai-agents/team-orchestration.md +479 -0
  11. package/.morph/standards/ai-agents/workflows.md +354 -0
  12. package/.morph/standards/architecture/ddd/aggregates.md +120 -0
  13. package/.morph/standards/architecture/ddd/entities.md +99 -0
  14. package/.morph/standards/architecture/ddd/value-objects.md +124 -0
  15. package/.morph/standards/backend/api/minimal-api.md +494 -0
  16. package/.morph/standards/backend/api/rest.md +492 -0
  17. package/.morph/standards/backend/api/validation.md +88 -0
  18. package/.morph/standards/backend/authentication/passkeys.md +428 -0
  19. package/.morph/standards/backend/database/ef-core.md +199 -0
  20. package/.morph/standards/backend/database/migrations.md +393 -0
  21. package/.morph/standards/backend/database/postgresql/database.md +352 -0
  22. package/.morph/standards/backend/database/repository-patterns.md +528 -0
  23. package/.morph/standards/backend/database/vector-search-rag.md +541 -0
  24. package/.morph/standards/backend/dotnet/async.md +366 -0
  25. package/.morph/standards/backend/dotnet/core.md +117 -0
  26. package/.morph/standards/backend/dotnet/di.md +439 -0
  27. package/.morph/standards/backend/dotnet/program-cs-checklist.md +92 -0
  28. package/.morph/standards/backend/integrations/asaas/asaas-api.md +216 -0
  29. package/.morph/standards/backend/integrations/clerk/clerk-auth.md +290 -0
  30. package/.morph/standards/backend/integrations/hangfire/hangfire-jobs.md +350 -0
  31. package/.morph/standards/backend/integrations/resend/resend-email.md +385 -0
  32. package/.morph/standards/context/analytics.md +96 -0
  33. package/.morph/standards/context/bundles.md +110 -0
  34. package/.morph/standards/context/priming.md +78 -0
  35. package/.morph/standards/core/architecture.md +185 -0
  36. package/.morph/standards/core/coding.md +214 -0
  37. package/.morph/standards/core/git-branching-strategy.md +403 -0
  38. package/.morph/standards/core/git.md +185 -0
  39. package/.morph/standards/core/testing.md +295 -0
  40. package/.morph/standards/data/nosql/blob-storage.md +102 -0
  41. package/.morph/standards/data/nosql/cache/redis.md +97 -0
  42. package/.morph/standards/data/nosql/cosmos-db.md +118 -0
  43. package/.morph/standards/data/vector-search/azure-ai-search.md +121 -0
  44. package/.morph/standards/data/vector-search/rag-chunking.md +104 -0
  45. package/.morph/standards/frontend/blazor/design-checklist.md +222 -0
  46. package/.morph/standards/frontend/blazor/fluent-ui-setup.md +595 -0
  47. package/.morph/standards/frontend/blazor/fluent-ui.md +137 -0
  48. package/.morph/standards/frontend/blazor/html-conversion.md +184 -0
  49. package/.morph/standards/frontend/blazor/lifecycle.md +195 -0
  50. package/.morph/standards/frontend/blazor/pitfalls.md +198 -0
  51. package/.morph/standards/frontend/blazor/state.md +191 -0
  52. package/.morph/standards/frontend/design-system/animations.md +151 -0
  53. package/.morph/standards/frontend/design-system/naming.md +64 -0
  54. package/.morph/standards/frontend/nextjs/nextjs-patterns.md +198 -0
  55. package/.morph/standards/infrastructure/azure/azure.md +624 -0
  56. package/.morph/standards/infrastructure/azure/bicep/bicep-patterns.md +422 -0
  57. package/.morph/standards/infrastructure/azure/devops/azure-devops-setup.md +516 -0
  58. package/.morph/standards/infrastructure/azure/devops/local-development.md +520 -0
  59. package/.morph/standards/infrastructure/azure/services/functions.md +486 -0
  60. package/.morph/standards/infrastructure/azure/services/service-bus.md +459 -0
  61. package/.morph/standards/infrastructure/azure/services/storage.md +407 -0
  62. package/.morph/standards/infrastructure/docker/easypanel-deploy.md +196 -0
  63. package/.morph/standards/infrastructure/supabase/mcp-setup.md +252 -0
  64. package/.morph/standards/infrastructure/supabase/supabase-auth.md +176 -0
  65. package/.morph/standards/infrastructure/supabase/supabase-pgvector.md +169 -0
  66. package/.morph/standards/infrastructure/supabase/supabase-rls.md +184 -0
  67. package/.morph/standards/infrastructure/supabase/supabase-storage.md +153 -0
  68. package/.morph/standards/integration/api/graphql.md +91 -0
  69. package/.morph/standards/integration/api/grpc.md +114 -0
  70. package/.morph/standards/integration/api/rest-design.md +95 -0
  71. package/.morph/standards/integration/event-driven/cqrs.md +101 -0
  72. package/.morph/standards/integration/event-driven/event-sourcing.md +124 -0
  73. package/.morph/standards/integration/event-driven/service-bus.md +95 -0
  74. package/.morph/standards/observability/logging.md +131 -0
  75. package/.morph/standards/observability/metrics.md +121 -0
  76. package/.morph/standards/observability/monitoring.md +114 -0
  77. package/.morph/standards/observability/tracing.md +132 -0
  78. package/.morph/standards/workflows/parallel-execution.md +112 -0
  79. package/.morph/standards/workflows/thread-management.md +113 -0
  80. package/.morph/templates/.idea/morph-templates.xml +92 -0
  81. package/.morph/templates/.vscode/morph-templates.code-snippets +186 -0
  82. package/.morph/templates/IDE-SNIPPETS.md +266 -0
  83. package/.morph/templates/README.md +814 -0
  84. package/.morph/templates/REGISTRY.json +1677 -0
  85. package/.morph/templates/code/dotnet/backend/repository.cs +141 -0
  86. package/.morph/templates/code/dotnet/backend/service.cs +139 -0
  87. package/.morph/templates/code/dotnet/contracts/Commands.cs +74 -0
  88. package/.morph/templates/code/dotnet/contracts/Entities.cs +25 -0
  89. package/.morph/templates/code/dotnet/contracts/Queries.cs +74 -0
  90. package/.morph/templates/code/dotnet/contracts/README.md +74 -0
  91. package/.morph/templates/code/dotnet/contracts/api-contracts.cs +173 -0
  92. package/.morph/templates/code/dotnet/contracts/contracts.cs +217 -0
  93. package/.morph/templates/code/dotnet/database/migration.cs +83 -0
  94. package/.morph/templates/code/dotnet/frontend/component.razor +239 -0
  95. package/.morph/templates/code/dotnet/jobs/agent.cs +163 -0
  96. package/.morph/templates/code/dotnet/jobs/job.cs +171 -0
  97. package/.morph/templates/code/dotnet/test.cs +239 -0
  98. package/.morph/templates/code/sql/rls-policy.sql +57 -0
  99. package/.morph/templates/code/sql/supabase-migration.sql +100 -0
  100. package/.morph/templates/code/sql/supabase-migration.template.sql +113 -0
  101. package/.morph/templates/code/typescript/contracts.ts +168 -0
  102. package/.morph/templates/context/CONTEXT-FEATURE.md +276 -0
  103. package/.morph/templates/context/CONTEXT.md +181 -0
  104. package/.morph/templates/docs/proposal.md +182 -0
  105. package/.morph/templates/docs/spec.md +149 -0
  106. package/.morph/templates/examples/design-system-examples.md +357 -0
  107. package/.morph/templates/examples/spec-examples.md +90 -0
  108. package/.morph/templates/feature/decisions.md +187 -0
  109. package/.morph/templates/feature/recap.md +146 -0
  110. package/.morph/templates/feature/tasks.md +199 -0
  111. package/.morph/templates/infrastructure/azure/Dockerfile.example +82 -0
  112. package/.morph/templates/infrastructure/azure/README.md +286 -0
  113. package/.morph/templates/infrastructure/azure/app-insights.bicep +63 -0
  114. package/.morph/templates/infrastructure/azure/app-service.bicep +164 -0
  115. package/.morph/templates/infrastructure/azure/container-app-env.bicep +49 -0
  116. package/.morph/templates/infrastructure/azure/container-app.bicep +156 -0
  117. package/.morph/templates/infrastructure/azure/deploy-checklist.md +426 -0
  118. package/.morph/templates/infrastructure/azure/deploy.ps1 +229 -0
  119. package/.morph/templates/infrastructure/azure/deploy.sh +208 -0
  120. package/.morph/templates/infrastructure/azure/key-vault.bicep +91 -0
  121. package/.morph/templates/infrastructure/azure/main.bicep +189 -0
  122. package/.morph/templates/infrastructure/azure/parameters.dev.json +29 -0
  123. package/.morph/templates/infrastructure/azure/parameters.prod.json +29 -0
  124. package/.morph/templates/infrastructure/azure/parameters.staging.json +29 -0
  125. package/.morph/templates/infrastructure/azure/sql-database.bicep +103 -0
  126. package/.morph/templates/infrastructure/azure/storage.bicep +106 -0
  127. package/.morph/templates/infrastructure/docker/Dockerfile.template +58 -0
  128. package/.morph/templates/infrastructure/docker/docker-compose.template.yml +67 -0
  129. package/.morph/templates/infrastructure/docker/dockerfile-api.dockerfile +38 -0
  130. package/.morph/templates/infrastructure/docker/dockerfile-web.dockerfile +48 -0
  131. package/.morph/templates/infrastructure/docker/easypanel.template.json +54 -0
  132. package/.morph/templates/infrastructure/github/README.md +593 -0
  133. package/.morph/templates/infrastructure/github/actions/azure-auth/action.yml.hbs +22 -0
  134. package/.morph/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +45 -0
  135. package/.morph/templates/infrastructure/github/actions/health-check/action.yml.hbs +27 -0
  136. package/.morph/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +61 -0
  137. package/.morph/templates/infrastructure/github/workflows/deploy-easypanel.yml.hbs +31 -0
  138. package/.morph/templates/infrastructure/github/workflows/docker-build-push.yml.hbs +59 -0
  139. package/.morph/templates/infrastructure/github/workflows/dotnet-build.yml.hbs +39 -0
  140. package/.morph/templates/integrations/asaas-client.cs +387 -0
  141. package/.morph/templates/integrations/asaas-webhook.cs +351 -0
  142. package/.morph/templates/integrations/azure-identity-config.cs +288 -0
  143. package/.morph/templates/integrations/clerk-config.cs +258 -0
  144. package/.morph/templates/meta-prompts/fusion/fusion-agent.md +76 -0
  145. package/.morph/templates/meta-prompts/fusion/fusion-aggregator.md +100 -0
  146. package/.morph/templates/meta-prompts/hops/hop-retry.md +78 -0
  147. package/.morph/templates/meta-prompts/hops/hop-validation.md +97 -0
  148. package/.morph/templates/meta-prompts/hops/hop-wrapper.md +36 -0
  149. package/.morph/templates/meta-prompts/parallel-workers/parallel-coordinator.md +113 -0
  150. package/.morph/templates/meta-prompts/parallel-workers/parallel-worker.md +80 -0
  151. package/.morph/templates/meta-prompts/squad-leaders/backend-squad.md +90 -0
  152. package/.morph/templates/meta-prompts/squad-leaders/frontend-squad.md +126 -0
  153. package/.morph/templates/meta-prompts/squad-leaders/squad-leader.md +43 -0
  154. package/.morph/templates/meta-prompts/validators/checkpoint-validator.md +107 -0
  155. package/.morph/templates/meta-prompts/validators/pre-commit-validator.md +95 -0
  156. package/.morph/templates/saas/subscription.cs +347 -0
  157. package/.morph/templates/saas/tenant.cs +338 -0
  158. package/.morph/templates/state.template.json +17 -0
  159. package/.morph/templates/ui/FluentDesignTheme.cs +149 -0
  160. package/.morph/templates/ui/MudTheme.cs +281 -0
  161. package/.morph/templates/ui/design-system.css +226 -0
  162. package/bin/morph-spec.js +1 -1
  163. package/package.json +1 -1
  164. package/src/commands/project/update.js +185 -46
@@ -0,0 +1,149 @@
1
+ using Microsoft.FluentUI.AspNetCore.Components;
2
+
3
+ namespace {Namespace}.Themes;
4
+
5
+ /// <summary>
6
+ /// Fluent UI Design Theme customizado para {Project Name}.
7
+ /// Gerado automaticamente baseado em ui-design-system.md
8
+ /// </summary>
9
+ /// <remarks>
10
+ /// Template MORPH-SPEC v2.1.1 by Polymorphism Tech
11
+ /// </remarks>
12
+ public static class FluentDesignTheme
13
+ {
14
+ /// <summary>
15
+ /// Paleta de cores do tema
16
+ /// </summary>
17
+ public static DesignThemePalette GetPalette() => new()
18
+ {
19
+ // Cores Principais
20
+ Primary = "#{hex da cor primária}", // Ex: #3b82f6
21
+ Secondary = "#{hex da cor secundária}", // Ex: #6b7280
22
+
23
+ // Cores de Estado
24
+ Success = "#{hex}", // Ex: #10b981
25
+ Error = "#{hex}", // Ex: #ef4444
26
+ Warning = "#{hex}", // Ex: #f59e0b
27
+ Info = "#{hex}", // Ex: #06b6d4
28
+
29
+ // Neutros
30
+ NeutralLight = "#{hex do gray-50}", // Ex: #f9fafb
31
+ NeutralLighter = "#{hex do gray-100}", // Ex: #f3f4f6
32
+ NeutralDark = "#{hex do gray-800}", // Ex: #1f2937
33
+ NeutralDarker = "#{hex do gray-900}", // Ex: #111827
34
+
35
+ // Background e Foreground
36
+ Background = "#ffffff",
37
+ Foreground = "#{hex do gray-900}", // Texto principal
38
+
39
+ // Accent (geralmente = Primary)
40
+ Accent = "#{hex da cor primária}",
41
+ };
42
+
43
+ /// <summary>
44
+ /// Configuração de tipografia
45
+ /// </summary>
46
+ public static DesignThemeTypography GetTypography() => new()
47
+ {
48
+ FontFamily = "'{Font Name}', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
49
+
50
+ // Tamanhos
51
+ FontSizeBase = "1rem", // 16px
52
+ FontSizeSmall = "0.875rem", // 14px
53
+ FontSizeLarge = "1.125rem", // 18px
54
+
55
+ // Weights
56
+ FontWeightRegular = 400,
57
+ FontWeightSemibold = 600,
58
+ FontWeightBold = 700,
59
+
60
+ // Line Heights
61
+ LineHeightBase = 1.5,
62
+ };
63
+
64
+ /// <summary>
65
+ /// Configuração de espaçamento e layout
66
+ /// </summary>
67
+ public static DesignThemeLayout GetLayout() => new()
68
+ {
69
+ // Espaçamento (baseado em múltiplos de {base}px - ex: 4px)
70
+ SpacingBase = "0.25rem", // 4px
71
+ SpacingSmall = "0.5rem", // 8px
72
+ SpacingMedium = "1rem", // 16px
73
+ SpacingLarge = "1.5rem", // 24px
74
+
75
+ // Border Radius
76
+ BorderRadiusSmall = "0.125rem", // 2px
77
+ BorderRadiusMedium = "0.375rem", // 6px
78
+ BorderRadiusLarge = "0.5rem", // 8px
79
+
80
+ // Shadows (depende da biblioteca - ajustar conforme API)
81
+ Elevation1 = "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
82
+ Elevation2 = "0 4px 6px -1px rgba(0, 0, 0, 0.1)",
83
+ Elevation3 = "0 10px 15px -3px rgba(0, 0, 0, 0.1)",
84
+ };
85
+
86
+ /// <summary>
87
+ /// Aplica o tema customizado ao FluentUI
88
+ /// </summary>
89
+ /// <param name="services">Service collection</param>
90
+ public static void AddFluentUIWithCustomTheme(this IServiceCollection services)
91
+ {
92
+ services.AddFluentUIComponents(options =>
93
+ {
94
+ // Aplicar paleta customizada
95
+ options.DesignThemePalette = GetPalette();
96
+
97
+ // Outras configurações do Fluent UI
98
+ // ...
99
+ });
100
+ }
101
+ }
102
+
103
+ /// <summary>
104
+ /// Classe de configuração de tipografia
105
+ /// (Ajustar conforme API do Fluent UI Blazor v4.x)
106
+ /// </summary>
107
+ public class DesignThemeTypography
108
+ {
109
+ public string FontFamily { get; set; } = string.Empty;
110
+ public string FontSizeBase { get; set; } = string.Empty;
111
+ public string FontSizeSmall { get; set; } = string.Empty;
112
+ public string FontSizeLarge { get; set; } = string.Empty;
113
+ public int FontWeightRegular { get; set; }
114
+ public int FontWeightSemibold { get; set; }
115
+ public int FontWeightBold { get; set; }
116
+ public double LineHeightBase { get; set; }
117
+ }
118
+
119
+ /// <summary>
120
+ /// Classe de configuração de layout
121
+ /// (Ajustar conforme API do Fluent UI Blazor v4.x)
122
+ /// </summary>
123
+ public class DesignThemeLayout
124
+ {
125
+ public string SpacingBase { get; set; } = string.Empty;
126
+ public string SpacingSmall { get; set; } = string.Empty;
127
+ public string SpacingMedium { get; set; } = string.Empty;
128
+ public string SpacingLarge { get; set; } = string.Empty;
129
+
130
+ public string BorderRadiusSmall { get; set; } = string.Empty;
131
+ public string BorderRadiusMedium { get; set; } = string.Empty;
132
+ public string BorderRadiusLarge { get; set; } = string.Empty;
133
+
134
+ public string Elevation1 { get; set; } = string.Empty;
135
+ public string Elevation2 { get; set; } = string.Empty;
136
+ public string Elevation3 { get; set; } = string.Empty;
137
+ }
138
+
139
+ /// <summary>
140
+ /// EXEMPLO DE USO:
141
+ ///
142
+ /// // Program.cs
143
+ /// builder.Services.AddFluentUIWithCustomTheme();
144
+ ///
145
+ /// // App.razor ou MainLayout.razor
146
+ /// <FluentDesignTheme Mode="DesignThemeMode.Light" />
147
+ ///
148
+ /// // Componentes podem acessar cores via CSS variables ou propriedades do tema
149
+ /// </summary>
@@ -0,0 +1,281 @@
1
+ using MudBlazor;
2
+
3
+ namespace {Namespace}.Themes;
4
+
5
+ /// <summary>
6
+ /// MudBlazor Theme customizado para {Project Name}.
7
+ /// Gerado automaticamente baseado em ui-design-system.md
8
+ /// </summary>
9
+ /// <remarks>
10
+ /// Template MORPH-SPEC v2.1.1 by Polymorphism Tech
11
+ /// </remarks>
12
+ public static class AppTheme
13
+ {
14
+ /// <summary>
15
+ /// Tema Light Mode
16
+ /// </summary>
17
+ public static MudTheme LightTheme => new()
18
+ {
19
+ Palette = new PaletteLight
20
+ {
21
+ // Cores Principais
22
+ Primary = "#{hex da cor primária}", // Ex: #3b82f6
23
+ Secondary = "#{hex da cor secundária}", // Ex: #6b7280
24
+ Tertiary = "#{hex da cor terciária}", // Opcional
25
+
26
+ // Cores de Estado
27
+ Success = "#{hex}", // Ex: #10b981
28
+ Error = "#{hex}", // Ex: #ef4444
29
+ Warning = "#{hex}", // Ex: #f59e0b
30
+ Info = "#{hex}", // Ex: #06b6d4
31
+
32
+ // Background e Superfícies
33
+ Background = "#ffffff",
34
+ BackgroundGrey = "#{hex do gray-50}", // Ex: #f9fafb
35
+ Surface = "#ffffff",
36
+
37
+ // Text Colors
38
+ TextPrimary = "#{hex do gray-900}", // Texto principal
39
+ TextSecondary = "#{hex do gray-600}", // Texto secundário
40
+ TextDisabled = "#{hex do gray-400}", // Texto desabilitado
41
+
42
+ // Borders
43
+ Divider = "#{hex do gray-200}", // Divisores
44
+ DividerLight = "#{hex do gray-100}", // Divisores mais claros
45
+ Lines = "#{hex do gray-300}", // Linhas de borda
46
+
47
+ // Action colors (usados em botões, links, etc)
48
+ ActionDefault = "#{hex do gray-500}",
49
+ ActionDisabled = "#{hex do gray-300}",
50
+ ActionDisabledBackground = "#{hex do gray-100}",
51
+
52
+ // Outros
53
+ Dark = "#{hex do gray-800}",
54
+ DarkLighten = "#{hex do gray-700}",
55
+ DarkDarken = "#{hex do gray-900}",
56
+
57
+ // Overlay (usado em modais, dropdowns)
58
+ OverlayLight = "rgba(255, 255, 255, 0.95)",
59
+ OverlayDark = "rgba(33, 33, 33, 0.95)",
60
+
61
+ // Hover effects
62
+ HoverOpacity = 0.06, // Opacidade do hover (6%)
63
+ },
64
+
65
+ Typography = new Typography
66
+ {
67
+ // Font Families
68
+ Default = new Default
69
+ {
70
+ FontFamily = new[] { "{Font Name}", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "sans-serif" },
71
+ FontSize = "1rem", // 16px
72
+ FontWeight = 400, // Regular
73
+ LineHeight = 1.5,
74
+ LetterSpacing = "normal",
75
+ },
76
+
77
+ H1 = new H1
78
+ {
79
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
80
+ FontSize = "2.25rem", // 36px
81
+ FontWeight = 700, // Bold
82
+ LineHeight = 1.2,
83
+ },
84
+
85
+ H2 = new H2
86
+ {
87
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
88
+ FontSize = "1.875rem", // 30px
89
+ FontWeight = 700,
90
+ LineHeight = 1.3,
91
+ },
92
+
93
+ H3 = new H3
94
+ {
95
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
96
+ FontSize = "1.5rem", // 24px
97
+ FontWeight = 600,
98
+ LineHeight = 1.4,
99
+ },
100
+
101
+ H4 = new H4
102
+ {
103
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
104
+ FontSize = "1.25rem", // 20px
105
+ FontWeight = 600,
106
+ LineHeight = 1.4,
107
+ },
108
+
109
+ H5 = new H5
110
+ {
111
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
112
+ FontSize = "1.125rem", // 18px
113
+ FontWeight = 600,
114
+ LineHeight = 1.5,
115
+ },
116
+
117
+ H6 = new H6
118
+ {
119
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
120
+ FontSize = "1rem", // 16px
121
+ FontWeight = 600,
122
+ LineHeight = 1.5,
123
+ },
124
+
125
+ Body1 = new Body1
126
+ {
127
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
128
+ FontSize = "1rem", // 16px
129
+ FontWeight = 400,
130
+ LineHeight = 1.5,
131
+ },
132
+
133
+ Body2 = new Body2
134
+ {
135
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
136
+ FontSize = "0.875rem", // 14px
137
+ FontWeight = 400,
138
+ LineHeight = 1.43,
139
+ },
140
+
141
+ Button = new Button
142
+ {
143
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
144
+ FontSize = "0.875rem", // 14px
145
+ FontWeight = 600, // Semibold
146
+ LineHeight = 1.75,
147
+ TextTransform = "none", // Ou "uppercase" se preferir
148
+ },
149
+
150
+ Caption = new Caption
151
+ {
152
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
153
+ FontSize = "0.75rem", // 12px
154
+ FontWeight = 400,
155
+ LineHeight = 1.66,
156
+ },
157
+
158
+ Subtitle1 = new Subtitle1
159
+ {
160
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
161
+ FontSize = "1rem",
162
+ FontWeight = 500, // Medium
163
+ LineHeight = 1.75,
164
+ },
165
+
166
+ Subtitle2 = new Subtitle2
167
+ {
168
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
169
+ FontSize = "0.875rem",
170
+ FontWeight = 500,
171
+ LineHeight = 1.57,
172
+ },
173
+
174
+ Overline = new Overline
175
+ {
176
+ FontFamily = new[] { "{Font Name}", "sans-serif" },
177
+ FontSize = "0.75rem",
178
+ FontWeight = 600,
179
+ LineHeight = 2.66,
180
+ LetterSpacing = "0.08em",
181
+ },
182
+ },
183
+
184
+ Shadows = new Shadow
185
+ {
186
+ Elevation = new[]
187
+ {
188
+ "none", // 0
189
+ "0 1px 2px 0 rgba(0, 0, 0, 0.05)", // 1
190
+ "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)", // 2
191
+ "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)", // 3
192
+ "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)", // 4
193
+ "0 25px 50px -12px rgba(0, 0, 0, 0.25)", // 5
194
+ // Adicione mais elevações conforme necessário
195
+ }
196
+ },
197
+
198
+ LayoutProperties = new LayoutProperties
199
+ {
200
+ // Border Radius
201
+ DefaultBorderRadius = "6px", // md
202
+
203
+ // Drawer
204
+ DrawerWidthLeft = "240px",
205
+ DrawerWidthRight = "240px",
206
+
207
+ // AppBar
208
+ AppbarHeight = "64px",
209
+ },
210
+
211
+ ZIndex = new ZIndex
212
+ {
213
+ Drawer = 1200,
214
+ AppBar = 1100,
215
+ Dialog = 1300,
216
+ Popover = 1400,
217
+ Snackbar = 1500,
218
+ Tooltip = 1600,
219
+ },
220
+ };
221
+
222
+ /// <summary>
223
+ /// Tema Dark Mode (opcional - ajustar cores)
224
+ /// </summary>
225
+ public static MudTheme DarkTheme => new()
226
+ {
227
+ Palette = new PaletteDark
228
+ {
229
+ // Cores Principais (ajustar para dark mode)
230
+ Primary = "#{hex}",
231
+ Secondary = "#{hex}",
232
+
233
+ // Cores de Estado
234
+ Success = "#{hex}",
235
+ Error = "#{hex}",
236
+ Warning = "#{hex}",
237
+ Info = "#{hex}",
238
+
239
+ // Background e Superfícies (tons escuros)
240
+ Background = "#{hex do gray-900}",
241
+ BackgroundGrey = "#{hex do gray-800}",
242
+ Surface = "#{hex do gray-800}",
243
+
244
+ // Text Colors (invertidos)
245
+ TextPrimary = "#{hex do gray-50}",
246
+ TextSecondary = "#{hex do gray-400}",
247
+ TextDisabled = "#{hex do gray-600}",
248
+
249
+ // Etc... (ajustar conforme design system dark mode)
250
+ },
251
+
252
+ // Compartilhar Typography e outras configurações do LightTheme
253
+ Typography = LightTheme.Typography,
254
+ Shadows = LightTheme.Shadows,
255
+ LayoutProperties = LightTheme.LayoutProperties,
256
+ ZIndex = LightTheme.ZIndex,
257
+ };
258
+ }
259
+
260
+ /// <summary>
261
+ /// EXEMPLO DE USO:
262
+ ///
263
+ /// // Program.cs
264
+ /// builder.Services.AddMudServices(config =>
265
+ /// {
266
+ /// config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomRight;
267
+ /// });
268
+ ///
269
+ /// // App.razor ou MainLayout.razor
270
+ /// <MudThemeProvider Theme="@AppTheme.LightTheme" />
271
+ /// <MudDialogProvider />
272
+ /// <MudSnackbarProvider />
273
+ ///
274
+ /// // Para suportar dark mode dinâmico:
275
+ /// <MudThemeProvider @bind-IsDarkMode="@_isDarkMode"
276
+ /// Theme="@(_isDarkMode ? AppTheme.DarkTheme : AppTheme.LightTheme)" />
277
+ ///
278
+ /// @code {
279
+ /// private bool _isDarkMode;
280
+ /// }
281
+ /// </summary>
@@ -0,0 +1,226 @@
1
+ /**
2
+ * Design System - {Project Name}
3
+ *
4
+ * CSS Variables generated from ui-design-system.md
5
+ * Use estas variáveis em todo o projeto para manter consistência visual.
6
+ *
7
+ * Template MORPH-SPEC v2.1.1 by Polymorphism Tech
8
+ */
9
+
10
+ :root {
11
+ /* ========================================
12
+ * CORES PRINCIPAIS
13
+ * ======================================== */
14
+
15
+ --color-primary: #{hex da cor primária};
16
+ --color-primary-hover: #{hex da cor primária mais escura};
17
+ --color-primary-active: #{hex da cor primária ainda mais escura};
18
+
19
+ --color-secondary: #{hex da cor secundária};
20
+ --color-secondary-hover: #{hex};
21
+ --color-secondary-active: #{hex};
22
+
23
+ /* ========================================
24
+ * CORES DE ESTADO
25
+ * ======================================== */
26
+
27
+ --color-success: #{hex};
28
+ --color-success-bg: #{hex com transparência ou shade mais claro};
29
+ --color-success-border: #{hex};
30
+
31
+ --color-error: #{hex};
32
+ --color-error-bg: #{hex};
33
+ --color-error-border: #{hex};
34
+
35
+ --color-warning: #{hex};
36
+ --color-warning-bg: #{hex};
37
+ --color-warning-border: #{hex};
38
+
39
+ --color-info: #{hex};
40
+ --color-info-bg: #{hex};
41
+ --color-info-border: #{hex};
42
+
43
+ /* ========================================
44
+ * ESCALA DE NEUTROS (Cinzas)
45
+ * ======================================== */
46
+
47
+ --color-gray-50: #{hex};
48
+ --color-gray-100: #{hex};
49
+ --color-gray-200: #{hex};
50
+ --color-gray-300: #{hex};
51
+ --color-gray-400: #{hex};
52
+ --color-gray-500: #{hex};
53
+ --color-gray-600: #{hex};
54
+ --color-gray-700: #{hex};
55
+ --color-gray-800: #{hex};
56
+ --color-gray-900: #{hex};
57
+
58
+ /* ========================================
59
+ * TIPOGRAFIA - FONTES
60
+ * ======================================== */
61
+
62
+ --font-sans: '{Font Name}', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
63
+ --font-serif: '{Font Name}', Georgia, 'Times New Roman', serif;
64
+ --font-mono: '{Font Name}', 'Fira Code', 'Courier New', Consolas, monospace;
65
+
66
+ /* ========================================
67
+ * TIPOGRAFIA - TAMANHOS
68
+ * ======================================== */
69
+
70
+ --text-xs: 0.75rem; /* 12px */
71
+ --text-sm: 0.875rem; /* 14px */
72
+ --text-base: 1rem; /* 16px */
73
+ --text-lg: 1.125rem; /* 18px */
74
+ --text-xl: 1.25rem; /* 20px */
75
+ --text-2xl: 1.5rem; /* 24px */
76
+ --text-3xl: 1.875rem; /* 30px */
77
+ --text-4xl: 2.25rem; /* 36px */
78
+ --text-5xl: 3rem; /* 48px */
79
+
80
+ /* ========================================
81
+ * TIPOGRAFIA - LINE HEIGHTS
82
+ * ======================================== */
83
+
84
+ --leading-none: 1;
85
+ --leading-tight: 1.25;
86
+ --leading-snug: 1.375;
87
+ --leading-normal: 1.5;
88
+ --leading-relaxed: 1.625;
89
+ --leading-loose: 2;
90
+
91
+ /* ========================================
92
+ * TIPOGRAFIA - FONT WEIGHTS
93
+ * ======================================== */
94
+
95
+ --font-light: 300;
96
+ --font-regular: 400;
97
+ --font-medium: 500;
98
+ --font-semibold: 600;
99
+ --font-bold: 700;
100
+ --font-extrabold: 800;
101
+
102
+ /* ========================================
103
+ * ESPAÇAMENTO
104
+ * Baseado em múltiplos de {base}px (ex: 4px)
105
+ * ======================================== */
106
+
107
+ --space-0: 0;
108
+ --space-1: 0.25rem; /* 4px */
109
+ --space-2: 0.5rem; /* 8px */
110
+ --space-3: 0.75rem; /* 12px */
111
+ --space-4: 1rem; /* 16px */
112
+ --space-5: 1.25rem; /* 20px */
113
+ --space-6: 1.5rem; /* 24px */
114
+ --space-7: 1.75rem; /* 28px */
115
+ --space-8: 2rem; /* 32px */
116
+ --space-10: 2.5rem; /* 40px */
117
+ --space-12: 3rem; /* 48px */
118
+ --space-16: 4rem; /* 64px */
119
+ --space-20: 5rem; /* 80px */
120
+ --space-24: 6rem; /* 96px */
121
+
122
+ /* ========================================
123
+ * BORDER RADIUS
124
+ * ======================================== */
125
+
126
+ --rounded-none: 0;
127
+ --rounded-sm: 0.125rem; /* 2px */
128
+ --rounded-md: 0.375rem; /* 6px */
129
+ --rounded-lg: 0.5rem; /* 8px */
130
+ --rounded-xl: 0.75rem; /* 12px */
131
+ --rounded-2xl: 1rem; /* 16px */
132
+ --rounded-full: 9999px;
133
+
134
+ /* ========================================
135
+ * SOMBRAS (Shadows)
136
+ * ======================================== */
137
+
138
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
139
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
140
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
141
+ --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
142
+ --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
143
+
144
+ /* ========================================
145
+ * Z-INDEX LAYERS
146
+ * ======================================== */
147
+
148
+ --z-0: 0;
149
+ --z-10: 10;
150
+ --z-20: 20;
151
+ --z-30: 30;
152
+ --z-40: 40;
153
+ --z-50: 50; /* Modals, dropdowns */
154
+ --z-100: 100; /* Tooltips */
155
+ --z-max: 9999; /* Toasts, notifications */
156
+
157
+ /* ========================================
158
+ * TRANSITIONS / ANIMATIONS
159
+ * ======================================== */
160
+
161
+ --transition-fast: 150ms ease-in-out;
162
+ --transition-base: 250ms ease-in-out;
163
+ --transition-slow: 350ms ease-in-out;
164
+
165
+ --ease-in: cubic-bezier(0.4, 0, 1, 1);
166
+ --ease-out: cubic-bezier(0, 0, 0.2, 1);
167
+ --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
168
+
169
+ /* ========================================
170
+ * BREAKPOINTS (informativo - usar em media queries)
171
+ * ======================================== */
172
+
173
+ /* @media (min-width: 640px) - sm */
174
+ /* @media (min-width: 768px) - md */
175
+ /* @media (min-width: 1024px) - lg */
176
+ /* @media (min-width: 1280px) - xl */
177
+ /* @media (min-width: 1536px) - 2xl */
178
+ }
179
+
180
+ /* ========================================
181
+ * MODO ESCURO (Dark Mode)
182
+ * Opcional - ajuste as cores para dark theme
183
+ * ======================================== */
184
+
185
+ @media (prefers-color-scheme: dark) {
186
+ :root {
187
+ /* Inverter cores conforme necessário */
188
+ --color-gray-50: #{hex do gray-900};
189
+ --color-gray-900: #{hex do gray-50};
190
+ /* ... outras inversões */
191
+ }
192
+ }
193
+
194
+ /* ========================================
195
+ * CLASSES UTILITÁRIAS (Exemplo)
196
+ * ======================================== */
197
+
198
+ /* Exemplo de uso das variáveis */
199
+ .btn-primary {
200
+ background-color: var(--color-primary);
201
+ color: white;
202
+ padding: var(--space-2) var(--space-4);
203
+ border-radius: var(--rounded-md);
204
+ font-weight: var(--font-semibold);
205
+ transition: background-color var(--transition-base);
206
+ }
207
+
208
+ .btn-primary:hover {
209
+ background-color: var(--color-primary-hover);
210
+ }
211
+
212
+ .card {
213
+ background-color: white;
214
+ padding: var(--space-6);
215
+ border-radius: var(--rounded-lg);
216
+ box-shadow: var(--shadow-md);
217
+ }
218
+
219
+ .text-muted {
220
+ color: var(--color-gray-600);
221
+ font-size: var(--text-sm);
222
+ }
223
+
224
+ /* ========================================
225
+ * FIM DO DESIGN SYSTEM
226
+ * ======================================== */
package/bin/morph-spec.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import { program } from 'commander';
4
4
  import chalk from 'chalk';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polymorphism-tech/morph-spec",
3
- "version": "4.3.4",
3
+ "version": "4.3.6",
4
4
  "description": "MORPH-SPEC: AI-First development framework with validation pipeline and multi-stack support",
5
5
  "keywords": [
6
6
  "claude-code",