hydrogen-forge 0.1.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 (118) hide show
  1. package/README.md +212 -0
  2. package/dist/commands/add.d.ts +7 -0
  3. package/dist/commands/add.d.ts.map +1 -0
  4. package/dist/commands/add.js +123 -0
  5. package/dist/commands/add.js.map +1 -0
  6. package/dist/commands/create.d.ts +8 -0
  7. package/dist/commands/create.d.ts.map +1 -0
  8. package/dist/commands/create.js +160 -0
  9. package/dist/commands/create.js.map +1 -0
  10. package/dist/commands/setup-mcp.d.ts +7 -0
  11. package/dist/commands/setup-mcp.d.ts.map +1 -0
  12. package/dist/commands/setup-mcp.js +179 -0
  13. package/dist/commands/setup-mcp.js.map +1 -0
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +50 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/lib/generators.d.ts +6 -0
  19. package/dist/lib/generators.d.ts.map +1 -0
  20. package/dist/lib/generators.js +470 -0
  21. package/dist/lib/generators.js.map +1 -0
  22. package/dist/lib/utils.d.ts +17 -0
  23. package/dist/lib/utils.d.ts.map +1 -0
  24. package/dist/lib/utils.js +101 -0
  25. package/dist/lib/utils.js.map +1 -0
  26. package/package.json +54 -0
  27. package/templates/starter/.env.example +21 -0
  28. package/templates/starter/.graphqlrc.ts +27 -0
  29. package/templates/starter/README.md +117 -0
  30. package/templates/starter/app/assets/favicon.svg +28 -0
  31. package/templates/starter/app/components/AddToCartButton.tsx +102 -0
  32. package/templates/starter/app/components/Aside.tsx +136 -0
  33. package/templates/starter/app/components/CartLineItem.tsx +229 -0
  34. package/templates/starter/app/components/CartMain.tsx +131 -0
  35. package/templates/starter/app/components/CartSummary.tsx +315 -0
  36. package/templates/starter/app/components/CollectionFilters.tsx +330 -0
  37. package/templates/starter/app/components/CollectionGrid.tsx +141 -0
  38. package/templates/starter/app/components/Footer.tsx +218 -0
  39. package/templates/starter/app/components/Header.tsx +296 -0
  40. package/templates/starter/app/components/PageLayout.tsx +174 -0
  41. package/templates/starter/app/components/PaginatedResourceSection.tsx +41 -0
  42. package/templates/starter/app/components/ProductCard.tsx +151 -0
  43. package/templates/starter/app/components/ProductForm.tsx +156 -0
  44. package/templates/starter/app/components/ProductGallery.tsx +164 -0
  45. package/templates/starter/app/components/ProductGrid.tsx +64 -0
  46. package/templates/starter/app/components/ProductImage.tsx +23 -0
  47. package/templates/starter/app/components/ProductItem.tsx +44 -0
  48. package/templates/starter/app/components/ProductPrice.tsx +97 -0
  49. package/templates/starter/app/components/SearchDialog.tsx +599 -0
  50. package/templates/starter/app/components/SearchForm.tsx +68 -0
  51. package/templates/starter/app/components/SearchFormPredictive.tsx +76 -0
  52. package/templates/starter/app/components/SearchResults.tsx +161 -0
  53. package/templates/starter/app/components/SearchResultsPredictive.tsx +461 -0
  54. package/templates/starter/app/entry.client.tsx +21 -0
  55. package/templates/starter/app/entry.server.tsx +53 -0
  56. package/templates/starter/app/graphql/customer-account/CustomerAddressMutations.ts +64 -0
  57. package/templates/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +40 -0
  58. package/templates/starter/app/graphql/customer-account/CustomerOrderQuery.ts +90 -0
  59. package/templates/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +63 -0
  60. package/templates/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +25 -0
  61. package/templates/starter/app/lib/context.ts +60 -0
  62. package/templates/starter/app/lib/fragments.ts +234 -0
  63. package/templates/starter/app/lib/orderFilters.ts +90 -0
  64. package/templates/starter/app/lib/redirect.ts +23 -0
  65. package/templates/starter/app/lib/search.ts +79 -0
  66. package/templates/starter/app/lib/session.ts +72 -0
  67. package/templates/starter/app/lib/variants.ts +46 -0
  68. package/templates/starter/app/root.tsx +209 -0
  69. package/templates/starter/app/routes/$.tsx +11 -0
  70. package/templates/starter/app/routes/[robots.txt].tsx +117 -0
  71. package/templates/starter/app/routes/[sitemap.xml].tsx +16 -0
  72. package/templates/starter/app/routes/_index.tsx +167 -0
  73. package/templates/starter/app/routes/account.$.tsx +9 -0
  74. package/templates/starter/app/routes/account._index.tsx +5 -0
  75. package/templates/starter/app/routes/account.addresses.tsx +516 -0
  76. package/templates/starter/app/routes/account.orders.$id.tsx +222 -0
  77. package/templates/starter/app/routes/account.orders._index.tsx +222 -0
  78. package/templates/starter/app/routes/account.profile.tsx +133 -0
  79. package/templates/starter/app/routes/account.tsx +97 -0
  80. package/templates/starter/app/routes/account_.authorize.tsx +5 -0
  81. package/templates/starter/app/routes/account_.login.tsx +7 -0
  82. package/templates/starter/app/routes/account_.logout.tsx +11 -0
  83. package/templates/starter/app/routes/api.$version.[graphql.json].tsx +14 -0
  84. package/templates/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +129 -0
  85. package/templates/starter/app/routes/blogs.$blogHandle._index.tsx +175 -0
  86. package/templates/starter/app/routes/blogs._index.tsx +109 -0
  87. package/templates/starter/app/routes/cart.$lines.tsx +70 -0
  88. package/templates/starter/app/routes/cart.tsx +117 -0
  89. package/templates/starter/app/routes/collections.$handle.tsx +161 -0
  90. package/templates/starter/app/routes/collections._index.tsx +133 -0
  91. package/templates/starter/app/routes/collections.all.tsx +122 -0
  92. package/templates/starter/app/routes/discount.$code.tsx +48 -0
  93. package/templates/starter/app/routes/pages.$handle.tsx +88 -0
  94. package/templates/starter/app/routes/policies.$handle.tsx +93 -0
  95. package/templates/starter/app/routes/policies._index.tsx +69 -0
  96. package/templates/starter/app/routes/products.$handle.tsx +232 -0
  97. package/templates/starter/app/routes/search.tsx +426 -0
  98. package/templates/starter/app/routes/sitemap.$type.$page[.xml].tsx +23 -0
  99. package/templates/starter/app/routes.ts +9 -0
  100. package/templates/starter/app/styles/app.css +574 -0
  101. package/templates/starter/app/styles/reset.css +139 -0
  102. package/templates/starter/app/styles/tailwind.css +116 -0
  103. package/templates/starter/customer-accountapi.generated.d.ts +543 -0
  104. package/templates/starter/env.d.ts +7 -0
  105. package/templates/starter/eslint.config.js +247 -0
  106. package/templates/starter/guides/predictiveSearch/predictiveSearch.jpg +0 -0
  107. package/templates/starter/guides/predictiveSearch/predictiveSearch.md +394 -0
  108. package/templates/starter/guides/search/search.jpg +0 -0
  109. package/templates/starter/guides/search/search.md +335 -0
  110. package/templates/starter/package.json +71 -0
  111. package/templates/starter/postcss.config.js +6 -0
  112. package/templates/starter/public/.gitkeep +0 -0
  113. package/templates/starter/react-router.config.ts +13 -0
  114. package/templates/starter/server.ts +59 -0
  115. package/templates/starter/storefrontapi.generated.d.ts +1264 -0
  116. package/templates/starter/tailwind.config.js +83 -0
  117. package/templates/starter/tsconfig.json +67 -0
  118. package/templates/starter/vite.config.ts +32 -0
@@ -0,0 +1,83 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./app/**/*.{js,ts,jsx,tsx}'],
4
+ theme: {
5
+ extend: {
6
+ colors: {
7
+ // Custom brand colors - override as needed
8
+ primary: {
9
+ 50: '#f0f9ff',
10
+ 100: '#e0f2fe',
11
+ 200: '#bae6fd',
12
+ 300: '#7dd3fc',
13
+ 400: '#38bdf8',
14
+ 500: '#0ea5e9',
15
+ 600: '#0284c7',
16
+ 700: '#0369a1',
17
+ 800: '#075985',
18
+ 900: '#0c4a6e',
19
+ 950: '#082f49',
20
+ },
21
+ secondary: {
22
+ 50: '#fafafa',
23
+ 100: '#f4f4f5',
24
+ 200: '#e4e4e7',
25
+ 300: '#d4d4d8',
26
+ 400: '#a1a1aa',
27
+ 500: '#71717a',
28
+ 600: '#52525b',
29
+ 700: '#3f3f46',
30
+ 800: '#27272a',
31
+ 900: '#18181b',
32
+ 950: '#09090b',
33
+ },
34
+ },
35
+ fontFamily: {
36
+ sans: [
37
+ 'Inter',
38
+ 'ui-sans-serif',
39
+ 'system-ui',
40
+ '-apple-system',
41
+ 'BlinkMacSystemFont',
42
+ 'Segoe UI',
43
+ 'Roboto',
44
+ 'Helvetica Neue',
45
+ 'Arial',
46
+ 'sans-serif',
47
+ ],
48
+ mono: [
49
+ 'JetBrains Mono',
50
+ 'ui-monospace',
51
+ 'SFMono-Regular',
52
+ 'Menlo',
53
+ 'Monaco',
54
+ 'Consolas',
55
+ 'monospace',
56
+ ],
57
+ },
58
+ screens: {
59
+ xs: '475px',
60
+ },
61
+ animation: {
62
+ 'fade-in': 'fadeIn 0.3s ease-out',
63
+ 'slide-up': 'slideUp 0.3s ease-out',
64
+ 'slide-down': 'slideDown 0.3s ease-out',
65
+ },
66
+ keyframes: {
67
+ fadeIn: {
68
+ '0%': {opacity: '0'},
69
+ '100%': {opacity: '1'},
70
+ },
71
+ slideUp: {
72
+ '0%': {opacity: '0', transform: 'translateY(10px)'},
73
+ '100%': {opacity: '1', transform: 'translateY(0)'},
74
+ },
75
+ slideDown: {
76
+ '0%': {opacity: '0', transform: 'translateY(-10px)'},
77
+ '100%': {opacity: '1', transform: 'translateY(0)'},
78
+ },
79
+ },
80
+ },
81
+ },
82
+ plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
83
+ };
@@ -0,0 +1,67 @@
1
+ {
2
+ "include": [
3
+ "env.d.ts",
4
+ "app/**/*.ts",
5
+ "app/**/*.tsx",
6
+ "app/**/*.d.ts",
7
+ "*.ts",
8
+ "*.tsx",
9
+ "*.d.ts",
10
+ ".graphqlrc.ts",
11
+ ".react-router/types/**/*"
12
+ ],
13
+ "exclude": ["node_modules", "dist", "build", "packages/**/dist/**/*"],
14
+ "compilerOptions": {
15
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
16
+ "isolatedModules": true,
17
+ "esModuleInterop": true,
18
+ "jsx": "react-jsx",
19
+ "moduleResolution": "Bundler",
20
+ "resolveJsonModule": true,
21
+ "module": "ES2022",
22
+ "target": "ES2022",
23
+ "allowJs": true,
24
+ "forceConsistentCasingInFileNames": true,
25
+ "skipLibCheck": true,
26
+ "baseUrl": ".",
27
+ "types": [
28
+ "@shopify/oxygen-workers-types",
29
+ "react-router",
30
+ "@shopify/hydrogen/react-router-types",
31
+ "vite/client"
32
+ ],
33
+ "paths": {
34
+ "~/*": ["app/*"]
35
+ },
36
+ "noEmit": true,
37
+ "rootDirs": [".", "./.react-router/types"],
38
+ "incremental": true,
39
+ "composite": false,
40
+ "verbatimModuleSyntax": true,
41
+
42
+ /* Strict Type-Checking Options */
43
+ "strict": true,
44
+ "noImplicitAny": true,
45
+ "strictNullChecks": true,
46
+ "strictFunctionTypes": true,
47
+ "strictBindCallApply": true,
48
+ "strictPropertyInitialization": true,
49
+ "noImplicitThis": true,
50
+ "useUnknownInCatchVariables": true,
51
+ "alwaysStrict": true,
52
+
53
+ /* Additional Checks - relaxed for skeleton compatibility */
54
+ "noUnusedLocals": false,
55
+ "noUnusedParameters": false,
56
+ "noImplicitReturns": true,
57
+ "noFallthroughCasesInSwitch": true
58
+
59
+ /* These options are too strict for inherited skeleton code:
60
+ * "exactOptionalPropertyTypes": true,
61
+ * "noUncheckedIndexedAccess": true,
62
+ * "noImplicitOverride": true,
63
+ * "noPropertyAccessFromIndexSignature": true
64
+ * Enable them when cleaning up component code
65
+ */
66
+ }
67
+ }
@@ -0,0 +1,32 @@
1
+ import {defineConfig} from 'vite';
2
+ import {hydrogen} from '@shopify/hydrogen/vite';
3
+ import {oxygen} from '@shopify/mini-oxygen/vite';
4
+ import {reactRouter} from '@react-router/dev/vite';
5
+ import tsconfigPaths from 'vite-tsconfig-paths';
6
+
7
+ export default defineConfig({
8
+ plugins: [hydrogen(), oxygen(), reactRouter(), tsconfigPaths()],
9
+ build: {
10
+ // Allow a strict Content-Security-Policy
11
+ // withtout inlining assets as base64:
12
+ assetsInlineLimit: 0,
13
+ },
14
+ ssr: {
15
+ optimizeDeps: {
16
+ /**
17
+ * Include dependencies here if they throw CJS<>ESM errors.
18
+ * For example, for the following error:
19
+ *
20
+ * > ReferenceError: module is not defined
21
+ * > at /Users/.../node_modules/example-dep/index.js:1:1
22
+ *
23
+ * Include 'example-dep' in the array below.
24
+ * @see https://vitejs.dev/config/dep-optimization-options
25
+ */
26
+ include: ['set-cookie-parser', 'cookie', 'react-router'],
27
+ },
28
+ },
29
+ server: {
30
+ allowedHosts: ['.tryhydrogen.dev'],
31
+ },
32
+ });