@salifbiaye/create-boutique 0.1.2 → 0.1.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salifbiaye/create-boutique",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Usine à Boutiques : génère un projet complet (backend Medusa + une boutique Next.js par campagne) prêt pour docker compose",
5
5
  "type": "module",
6
6
  "repository": { "type": "git", "url": "git+https://github.com/salifbiaye/create-boutique.git" },
@@ -108,6 +108,9 @@ module.exports = defineConfig({
108
108
  jwtSecret: process.env.JWT_SECRET!,
109
109
  cookieSecret: process.env.COOKIE_SECRET!,
110
110
  },
111
+ // En production Medusa pose un cookie de session `Secure`, jamais envoyé sur http : la connexion à
112
+ // l'admin échouerait sur http://localhost. Secure seulement si l'admin est servi en https.
113
+ cookieOptions: { secure: (process.env.ADMIN_CORS ?? "").startsWith("https://") },
111
114
  },
112
115
  modules,
113
116
  })
@@ -0,0 +1,3 @@
1
+ Polices auto-hébergées (sous-ensemble latin), sous licence SIL Open Font License 1.1 :
2
+ Inter, Plus Jakarta Sans, Oswald, Outfit, Sora, Space Grotesk (versions variables), Poppins.
3
+ Source : paquets Fontsource (@fontsource-variable/*, @fontsource/poppins). https://openfontlicense.org
@@ -1,16 +1,25 @@
1
- import { Inter, Oswald, Outfit, Plus_Jakarta_Sans, Poppins, Sora, Space_Grotesk } from "next/font/google"
1
+ import localFont from "next/font/local"
2
2
  import type { FontId, Theme } from "./schema"
3
3
 
4
- // Polices des presets (design/bundle.css). Servies par next/font (auto-hébergées) :
5
- // seules les 2 polices du thème de l'instance sont appliquées.
4
+ // Polices des presets (design/bundle.css), fichiers woff2 dans ./fonts (licence OFL, voir fonts/LICENSE.txt) :
5
+ // aucun accès à Google Fonts au build ni à l'exécution. Seules les 2 polices du thème de l'instance sont appliquées.
6
6
  // Chaque police expose --nf-<id>, repris par --font-<id> dans styles/ub/fonts.css.
7
- const inter = Inter({ subsets: ["latin"], weight: ["400", "500", "600", "700"], variable: "--nf-inter", preload: false })
8
- const jakarta = Plus_Jakarta_Sans({ subsets: ["latin"], weight: ["500", "700", "800"], variable: "--nf-jakarta", preload: false })
9
- const oswald = Oswald({ subsets: ["latin"], weight: ["500", "700"], variable: "--nf-oswald", preload: false })
10
- const outfit = Outfit({ subsets: ["latin"], weight: ["400", "500", "600", "700"], variable: "--nf-outfit", preload: false })
11
- const poppins = Poppins({ subsets: ["latin"], weight: ["400", "500", "600", "700"], variable: "--nf-poppins", preload: false })
12
- const sora = Sora({ subsets: ["latin"], weight: ["400", "600", "700"], variable: "--nf-sora", preload: false })
13
- const spaceGrotesk = Space_Grotesk({ subsets: ["latin"], weight: ["500", "700"], variable: "--nf-space-grotesk", preload: false })
7
+ const inter = localFont({ src: "./fonts/inter.woff2", weight: "100 900", variable: "--nf-inter", preload: false })
8
+ const jakarta = localFont({ src: "./fonts/plus-jakarta-sans.woff2", weight: "200 800", variable: "--nf-jakarta", preload: false })
9
+ const oswald = localFont({ src: "./fonts/oswald.woff2", weight: "200 700", variable: "--nf-oswald", preload: false })
10
+ const outfit = localFont({ src: "./fonts/outfit.woff2", weight: "100 900", variable: "--nf-outfit", preload: false })
11
+ const poppins = localFont({
12
+ src: [
13
+ { path: "./fonts/poppins-400.woff2", weight: "400" },
14
+ { path: "./fonts/poppins-500.woff2", weight: "500" },
15
+ { path: "./fonts/poppins-600.woff2", weight: "600" },
16
+ { path: "./fonts/poppins-700.woff2", weight: "700" },
17
+ ],
18
+ variable: "--nf-poppins",
19
+ preload: false,
20
+ })
21
+ const sora = localFont({ src: "./fonts/sora.woff2", weight: "100 800", variable: "--nf-sora", preload: false })
22
+ const spaceGrotesk = localFont({ src: "./fonts/space-grotesk.woff2", weight: "300 700", variable: "--nf-space-grotesk", preload: false })
14
23
 
15
24
  const fonts: Partial<Record<FontId, { variable: string }>> = {
16
25
  inter,
@@ -88,3 +88,28 @@ html[data-theme] {
88
88
  -webkit-text-fill-color: var(--ink);
89
89
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
90
90
  }
91
+
92
+ /* Couleurs Tailwind écrites en dur dans le starter (compte, panier, checkout, squelettes de chargement) :
93
+ ramenées aux tokens du thème, sinon un thème sombre affiche des blocs blancs au texte illisible. */
94
+ .ub :is(.bg-white, .bg-gray-50, .bg-neutral-50) {
95
+ background-color: var(--surface);
96
+ }
97
+ .ub :is(.bg-gray-100, .bg-neutral-100) {
98
+ background-color: var(--tint-1);
99
+ }
100
+ .ub :is(.bg-gray-200, .bg-neutral-300) {
101
+ background-color: var(--tint-2);
102
+ }
103
+ .ub :is(.border-gray-200, .border-gray-300),
104
+ .ub .divide-gray-200 > * + * {
105
+ border-color: var(--border);
106
+ }
107
+ .ub :is(.border-gray-700, .border-gray-900) {
108
+ border-color: var(--ink);
109
+ }
110
+ .ub :is(.text-black, .text-neutral-950) {
111
+ color: var(--ink);
112
+ }
113
+ .ub :is(.text-neutral-400, .text-neutral-500, .text-neutral-600, .text-grey-700) {
114
+ color: var(--ink-muted);
115
+ }
@@ -10,3 +10,8 @@
10
10
  .ub-promo__cd {
11
11
  display: contents;
12
12
  }
13
+
14
+ /* Accès au compte client : toujours visible (certains presets du design le masquent). */
15
+ .ub .ub-nav__icons .ub-icon--user {
16
+ display: inline-flex;
17
+ }