mfeflow 0.2.0 → 0.3.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 (71) hide show
  1. package/assets/features/analytics-clarity/feature.json +64 -0
  2. package/assets/features/analytics-clarity/files/clarity-test.ts +36 -0
  3. package/assets/features/analytics-clarity/files/clarity.ts +26 -0
  4. package/assets/features/analytics-gtm/files/init.ts +2 -2
  5. package/assets/features/commit-prompt/feature.json +27 -0
  6. package/assets/features/commit-prompt/files/cz.config.js +27 -0
  7. package/assets/features/data-react-query/feature.json +89 -0
  8. package/assets/features/data-react-query/files/keys.ts.eta +8 -0
  9. package/assets/features/data-react-query/files/remote-Query-test.tsx.eta +39 -0
  10. package/assets/features/data-react-query/files/remote-Query.tsx +15 -0
  11. package/assets/features/data-react-query/files/shell-Query-test.tsx +21 -0
  12. package/assets/features/data-react-query/files/shell-Query.tsx +14 -0
  13. package/assets/features/data-react-query/files/useHealth.fetch.ts.eta +15 -0
  14. package/assets/features/data-react-query/files/useHealth.http.ts.eta +11 -0
  15. package/assets/features/env-t3/feature.json +21 -0
  16. package/assets/features/forms/feature.json +90 -0
  17. package/assets/features/forms/files/ContactForm-test.tsx +35 -0
  18. package/assets/features/forms/files/ContactForm.tsx +50 -0
  19. package/assets/features/forms/files/schema.arktype.ts +9 -0
  20. package/assets/features/forms/files/schema.valibot.ts +9 -0
  21. package/assets/features/forms/files/schema.zod.ts +9 -0
  22. package/assets/features/i18n/feature.json +139 -0
  23. package/assets/features/i18n/files/LanguageSwitcher.tsx +28 -0
  24. package/assets/features/i18n/files/Languages.tsx +12 -0
  25. package/assets/features/i18n/files/language-switcher-test.tsx +19 -0
  26. package/assets/features/i18n/files/remote-I18n-test.tsx.eta +43 -0
  27. package/assets/features/i18n/files/remote-I18n.tsx.eta +36 -0
  28. package/assets/features/i18n/files/remote-ar.json.eta +3 -0
  29. package/assets/features/i18n/files/remote-config.ts +9 -0
  30. package/assets/features/i18n/files/remote-en.json.eta +3 -0
  31. package/assets/features/i18n/files/remote-load.ts +4 -0
  32. package/assets/features/i18n/files/shell-config.ts +20 -0
  33. package/assets/features/i18n/files/shell-init-test.ts +32 -0
  34. package/assets/features/i18n/files/shell-init.ts +7 -0
  35. package/assets/features/lint-oxlint/files/oxlintrc.json +1 -1
  36. package/assets/features/lint-oxlint/files/prettierignore +1 -0
  37. package/assets/features/storybook/feature.json +119 -0
  38. package/assets/features/storybook/files/App.stories.tsx.eta +8 -0
  39. package/assets/features/storybook/files/Home.stories.tsx +9 -0
  40. package/assets/features/storybook/files/button.stories.tsx +14 -0
  41. package/assets/features/storybook/files/remote-main.ts +13 -0
  42. package/assets/features/storybook/files/rsbuild.config.ts +10 -0
  43. package/assets/features/storybook/files/shell-main.ts +39 -0
  44. package/assets/features/tailwind/feature.json +87 -0
  45. package/assets/features/tailwind/files/Scope-test.tsx.eta +17 -0
  46. package/assets/features/tailwind/files/Scope.tsx.eta +15 -0
  47. package/assets/features/tailwind/files/postcss.config.mjs +1 -0
  48. package/assets/features/tailwind/files/remote-styles.css.eta +21 -0
  49. package/assets/features/tailwind/files/shell-styles.css.eta +22 -0
  50. package/assets/features/testing/files/vitest.config.ts +11 -2
  51. package/assets/features/theming/feature.json +103 -0
  52. package/assets/features/theming/files/Theme.tsx +15 -0
  53. package/assets/features/theming/files/ThemeToggle.tsx +23 -0
  54. package/assets/features/theming/files/apply-stored-test.ts +37 -0
  55. package/assets/features/theming/files/apply-stored.ts +13 -0
  56. package/assets/features/theming/files/head-script.ts +8 -0
  57. package/assets/features/theming/files/theme-toggle-test.tsx +18 -0
  58. package/assets/features/theming/files/theme.css +14 -0
  59. package/assets/features/theming/files/themes.ts +30 -0
  60. package/assets/features/theming/files/tokens-test.ts +9 -0
  61. package/assets/features/theming/files/tokens.ts +9 -0
  62. package/assets/features/ui-shadcn/feature.json +61 -0
  63. package/assets/features/ui-shadcn/files/button-test.tsx.eta +32 -0
  64. package/assets/features/ui-shadcn/files/button.tsx.eta +36 -0
  65. package/assets/features/ui-shadcn/files/components.json.eta +22 -0
  66. package/assets/features/ui-shadcn/files/utils-test.ts.eta +17 -0
  67. package/assets/features/ui-shadcn/files/utils.ts.eta +11 -0
  68. package/assets/templates/monorepo/files/root/gitignore.eta +1 -0
  69. package/assets/templates/monorepo/files/root/pnpm-workspace.yaml.eta +3 -1
  70. package/dist/index.js +45 -0
  71. package/package.json +4 -4
@@ -0,0 +1,11 @@
1
+ <%_ const prefix = it.app.tailwindPrefix _%>
2
+ import { clsx, type ClassValue } from 'clsx';
3
+ import { extendTailwindMerge } from 'tailwind-merge';
4
+
5
+ // Knows this remote's prefix, so cn('<%= prefix %>:p-2', '<%= prefix %>:p-4') keeps only the last one.
6
+ const merge = extendTailwindMerge({ prefix: '<%= prefix %>' });
7
+
8
+ /** Joins class names and drops the ones a later class overrides. */
9
+ export function cn(...inputs: ClassValue[]): string {
10
+ return merge(clsx(inputs));
11
+ }
@@ -1,5 +1,6 @@
1
1
  node_modules/
2
2
  dist/
3
+ storybook-static/
3
4
  .turbo/
4
5
  coverage/
5
6
  *.tsbuildinfo
@@ -2,6 +2,8 @@ packages:
2
2
  - apps/*
3
3
  - packages/*
4
4
 
5
- # Dependencies allowed to run install scripts.
5
+ # Dependencies allowed to run install scripts. esbuild (pulled in by Storybook) works without its
6
+ # script; listing it as false keeps pnpm from stopping the install to ask.
6
7
  allowBuilds:
7
8
  lefthook: true
9
+ esbuild: false
package/dist/index.js CHANGED
@@ -171,6 +171,46 @@ const FIRST_PARTY = [
171
171
  always: false,
172
172
  default: false
173
173
  },
174
+ {
175
+ name: 'theming',
176
+ always: false,
177
+ default: false
178
+ },
179
+ {
180
+ name: 'i18n',
181
+ always: false,
182
+ default: false
183
+ },
184
+ {
185
+ name: 'tailwind',
186
+ always: false,
187
+ default: false
188
+ },
189
+ {
190
+ name: 'ui-shadcn',
191
+ always: false,
192
+ default: false
193
+ },
194
+ {
195
+ name: 'forms',
196
+ always: false,
197
+ default: false
198
+ },
199
+ {
200
+ name: 'data-react-query',
201
+ always: false,
202
+ default: false
203
+ },
204
+ {
205
+ name: 'analytics-clarity',
206
+ always: false,
207
+ default: false
208
+ },
209
+ {
210
+ name: 'storybook',
211
+ always: false,
212
+ default: false
213
+ },
174
214
  {
175
215
  name: 'ci-github',
176
216
  always: false,
@@ -180,6 +220,11 @@ const FIRST_PARTY = [
180
220
  name: 'git-hooks',
181
221
  always: false,
182
222
  default: false
223
+ },
224
+ {
225
+ name: 'commit-prompt',
226
+ always: false,
227
+ default: false
183
228
  }
184
229
  ];
185
230
  function isFirstParty(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mfeflow",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Create and grow a React micro-frontend platform: mfeflow init, add remote, add <feature>.",
5
5
  "keywords": [
6
6
  "micro-frontend",
@@ -49,14 +49,14 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@clack/prompts": "1.8.1",
52
- "@mfeflow/contracts": "0.2.0",
53
- "@mfeflow/core": "0.2.0",
52
+ "@mfeflow/contracts": "0.3.0",
53
+ "@mfeflow/core": "0.3.0",
54
54
  "citty": "0.2.2",
55
55
  "semver": "7.8.5",
56
56
  "yaml": "2.9.1"
57
57
  },
58
58
  "devDependencies": {
59
- "@mfeflow/rsbuild": "0.2.0",
59
+ "@mfeflow/rsbuild": "0.3.0",
60
60
  "@rslib/core": "1.0.5",
61
61
  "@types/node": "26.6.6",
62
62
  "@types/semver": "7.8.0",