create-rubrica 0.3.3 → 0.3.5

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 (2) hide show
  1. package/dist/index.js +69 -226
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -215,236 +215,32 @@ async function applyLayout(layout, options, fsModule = defaultFs) {
215
215
  import * as nodeFsPromises2 from "fs/promises";
216
216
  var PRESETS = {
217
217
  "editorial-cream": {
218
- root: ` --background: 38 30% 96%;
219
- --foreground: 24 10% 10%;
220
- --card: 38 30% 99%;
221
- --card-foreground: 24 10% 10%;
222
- --popover: 38 30% 99%;
223
- --popover-foreground: 24 10% 10%;
224
- --primary: 35 90% 50%;
225
- --primary-foreground: 0 0% 100%;
226
- --secondary: 38 25% 90%;
227
- --secondary-foreground: 24 10% 10%;
228
- --muted: 38 25% 90%;
229
- --muted-foreground: 24 8% 45%;
230
- --accent: 38 25% 90%;
231
- --accent-foreground: 24 10% 10%;
232
- --destructive: 0 84% 60%;
233
- --destructive-foreground: 0 0% 100%;
234
- --border: 35 20% 85%;
235
- --input: 35 20% 85%;
236
- --ring: 35 90% 50%;
237
- --sidebar: 38 30% 94%;
238
- --sidebar-foreground: 24 8% 45%;
239
- --sidebar-primary: 35 90% 50%;
240
- --sidebar-primary-foreground: 0 0% 100%;
241
- --sidebar-accent: 38 25% 90%;
242
- --sidebar-accent-foreground: 24 10% 10%;
243
- --sidebar-border: 35 20% 85%;
244
- --sidebar-ring: 35 90% 50%;
245
- --neon-purple: 35 90% 50%;
246
- --neon-lime: 45 93% 47%;`,
247
- dark: ` --background: 25 20% 8%;
248
- --foreground: 38 20% 90%;
249
- --card: 25 18% 12%;
250
- --card-foreground: 38 20% 90%;
251
- --popover: 25 18% 12%;
252
- --popover-foreground: 38 20% 90%;
253
- --primary: 35 90% 50%;
254
- --primary-foreground: 0 0% 100%;
255
- --secondary: 25 15% 18%;
256
- --secondary-foreground: 38 20% 90%;
257
- --muted: 25 15% 18%;
258
- --muted-foreground: 35 10% 55%;
259
- --accent: 25 15% 18%;
260
- --accent-foreground: 38 20% 90%;
261
- --destructive: 0 62% 50%;
262
- --destructive-foreground: 0 0% 100%;
263
- --border: 25 15% 18%;
264
- --input: 25 15% 18%;
265
- --ring: 35 90% 50%;
266
- --sidebar: 25 20% 6%;
267
- --sidebar-foreground: 35 10% 55%;
268
- --sidebar-primary: 35 90% 50%;
269
- --sidebar-primary-foreground: 0 0% 100%;
270
- --sidebar-accent: 25 15% 18%;
271
- --sidebar-accent-foreground: 38 20% 90%;
272
- --sidebar-border: 25 15% 18%;
273
- --sidebar-ring: 35 90% 50%;`
218
+ root: ` --bg: #faf7f2;
219
+ --text: #1a1614;
220
+ --primary: #a855f7;
221
+ --accent: #ef4444;`,
222
+ dark: ``
274
223
  },
275
224
  "paper-noir": {
276
- root: ` --background: 0 0% 98%;
277
- --foreground: 0 0% 5%;
278
- --card: 0 0% 100%;
279
- --card-foreground: 0 0% 5%;
280
- --popover: 0 0% 100%;
281
- --popover-foreground: 0 0% 5%;
282
- --primary: 0 84% 50%;
283
- --primary-foreground: 0 0% 100%;
284
- --secondary: 0 0% 92%;
285
- --secondary-foreground: 0 0% 5%;
286
- --muted: 0 0% 92%;
287
- --muted-foreground: 0 0% 40%;
288
- --accent: 0 0% 92%;
289
- --accent-foreground: 0 0% 5%;
290
- --destructive: 0 84% 60%;
291
- --destructive-foreground: 0 0% 100%;
292
- --border: 0 0% 88%;
293
- --input: 0 0% 88%;
294
- --ring: 0 84% 50%;
295
- --sidebar: 0 0% 96%;
296
- --sidebar-foreground: 0 0% 40%;
297
- --sidebar-primary: 0 84% 50%;
298
- --sidebar-primary-foreground: 0 0% 100%;
299
- --sidebar-accent: 0 0% 92%;
300
- --sidebar-accent-foreground: 0 0% 5%;
301
- --sidebar-border: 0 0% 88%;
302
- --sidebar-ring: 0 84% 50%;
303
- --neon-purple: 0 84% 50%;
304
- --neon-lime: 0 0% 20%;`,
305
- dark: ` --background: 0 0% 5%;
306
- --foreground: 0 0% 95%;
307
- --card: 0 0% 8%;
308
- --card-foreground: 0 0% 95%;
309
- --popover: 0 0% 8%;
310
- --popover-foreground: 0 0% 95%;
311
- --primary: 0 84% 50%;
312
- --primary-foreground: 0 0% 100%;
313
- --secondary: 0 0% 12%;
314
- --secondary-foreground: 0 0% 95%;
315
- --muted: 0 0% 12%;
316
- --muted-foreground: 0 0% 60%;
317
- --accent: 0 0% 12%;
318
- --accent-foreground: 0 0% 95%;
319
- --destructive: 0 62% 50%;
320
- --destructive-foreground: 0 0% 100%;
321
- --border: 0 0% 15%;
322
- --input: 0 0% 15%;
323
- --ring: 0 84% 50%;
324
- --sidebar: 0 0% 3%;
325
- --sidebar-foreground: 0 0% 60%;
326
- --sidebar-primary: 0 84% 50%;
327
- --sidebar-primary-foreground: 0 0% 100%;
328
- --sidebar-accent: 0 0% 12%;
329
- --sidebar-accent-foreground: 0 0% 95%;
330
- --sidebar-border: 0 0% 15%;
331
- --sidebar-ring: 0 84% 50%;`
225
+ root: ` --bg: #f0eee9;
226
+ --text: #0a0a0a;
227
+ --primary: #ef4444;
228
+ --accent: #3b82f6;`,
229
+ dark: ``
332
230
  },
333
231
  "midnight-blue": {
334
- root: ` --background: 222 47% 8%;
335
- --foreground: 210 40% 96%;
336
- --card: 222 47% 11%;
337
- --card-foreground: 210 40% 96%;
338
- --popover: 222 47% 11%;
339
- --popover-foreground: 210 40% 96%;
340
- --primary: 220 90% 56%;
341
- --primary-foreground: 0 0% 100%;
342
- --secondary: 217 33% 17%;
343
- --secondary-foreground: 210 40% 96%;
344
- --muted: 217 33% 17%;
345
- --muted-foreground: 215 20% 65%;
346
- --accent: 217 33% 17%;
347
- --accent-foreground: 210 40% 96%;
348
- --destructive: 0 62% 50%;
349
- --destructive-foreground: 0 0% 100%;
350
- --border: 217 33% 17%;
351
- --input: 217 33% 17%;
352
- --ring: 220 90% 56%;
353
- --sidebar: 222 47% 6%;
354
- --sidebar-foreground: 215 20% 65%;
355
- --sidebar-primary: 220 90% 56%;
356
- --sidebar-primary-foreground: 0 0% 100%;
357
- --sidebar-accent: 217 33% 17%;
358
- --sidebar-accent-foreground: 210 40% 96%;
359
- --sidebar-border: 217 33% 17%;
360
- --sidebar-ring: 220 90% 56%;
361
- --neon-purple: 220 90% 56%;
362
- --neon-lime: 190 90% 50%;`,
363
- dark: ` --background: 220 14% 5%;
364
- --foreground: 210 40% 96%;
365
- --card: 222 47% 8%;
366
- --card-foreground: 210 40% 96%;
367
- --popover: 222 47% 8%;
368
- --popover-foreground: 210 40% 96%;
369
- --primary: 220 90% 56%;
370
- --primary-foreground: 0 0% 100%;
371
- --secondary: 217 33% 13%;
372
- --secondary-foreground: 210 40% 96%;
373
- --muted: 217 33% 13%;
374
- --muted-foreground: 215 20% 65%;
375
- --accent: 217 33% 13%;
376
- --accent-foreground: 210 40% 96%;
377
- --destructive: 0 62% 50%;
378
- --destructive-foreground: 0 0% 100%;
379
- --border: 217 33% 13%;
380
- --input: 217 33% 13%;
381
- --ring: 220 90% 56%;
382
- --sidebar: 222 47% 3%;
383
- --sidebar-foreground: 215 20% 65%;
384
- --sidebar-primary: 220 90% 56%;
385
- --sidebar-primary-foreground: 0 0% 100%;
386
- --sidebar-accent: 217 33% 13%;
387
- --sidebar-accent-foreground: 210 40% 96%;
388
- --sidebar-border: 217 33% 13%;
389
- --sidebar-ring: 220 90% 56%;`
232
+ root: ` --bg: #0a1224;
233
+ --text: #e8e6e0;
234
+ --primary: #06b6d4;
235
+ --accent: #facc15;`,
236
+ dark: ``
390
237
  },
391
238
  "solar-warm": {
392
- root: ` --background: 20 30% 8%;
393
- --foreground: 35 30% 92%;
394
- --card: 20 28% 11%;
395
- --card-foreground: 35 30% 92%;
396
- --popover: 20 28% 11%;
397
- --popover-foreground: 35 30% 92%;
398
- --primary: 25 95% 53%;
399
- --primary-foreground: 0 0% 100%;
400
- --secondary: 20 25% 18%;
401
- --secondary-foreground: 35 30% 92%;
402
- --muted: 20 25% 18%;
403
- --muted-foreground: 30 15% 60%;
404
- --accent: 20 25% 18%;
405
- --accent-foreground: 35 30% 92%;
406
- --destructive: 0 62% 50%;
407
- --destructive-foreground: 0 0% 100%;
408
- --border: 20 25% 18%;
409
- --input: 20 25% 18%;
410
- --ring: 25 95% 53%;
411
- --sidebar: 20 30% 6%;
412
- --sidebar-foreground: 30 15% 60%;
413
- --sidebar-primary: 25 95% 53%;
414
- --sidebar-primary-foreground: 0 0% 100%;
415
- --sidebar-accent: 20 25% 18%;
416
- --sidebar-accent-foreground: 35 30% 92%;
417
- --sidebar-border: 20 25% 18%;
418
- --sidebar-ring: 25 95% 53%;
419
- --neon-purple: 25 95% 53%;
420
- --neon-lime: 45 93% 47%;`,
421
- dark: ` --background: 20 35% 5%;
422
- --foreground: 35 30% 92%;
423
- --card: 20 30% 8%;
424
- --card-foreground: 35 30% 92%;
425
- --popover: 20 30% 8%;
426
- --popover-foreground: 35 30% 92%;
427
- --primary: 25 95% 53%;
428
- --primary-foreground: 0 0% 100%;
429
- --secondary: 20 30% 13%;
430
- --secondary-foreground: 35 30% 92%;
431
- --muted: 20 30% 13%;
432
- --muted-foreground: 30 15% 60%;
433
- --accent: 20 30% 13%;
434
- --accent-foreground: 35 30% 92%;
435
- --destructive: 0 62% 50%;
436
- --destructive-foreground: 0 0% 100%;
437
- --border: 20 30% 13%;
438
- --input: 20 30% 13%;
439
- --ring: 25 95% 53%;
440
- --sidebar: 20 35% 3%;
441
- --sidebar-foreground: 30 15% 60%;
442
- --sidebar-primary: 25 95% 53%;
443
- --sidebar-primary-foreground: 0 0% 100%;
444
- --sidebar-accent: 20 30% 13%;
445
- --sidebar-accent-foreground: 35 30% 92%;
446
- --sidebar-border: 20 30% 13%;
447
- --sidebar-ring: 25 95% 53%;`
239
+ root: ` --bg: #1a1410;
240
+ --text: #f2ede4;
241
+ --primary: #f97316;
242
+ --accent: #facc15;`,
243
+ dark: ``
448
244
  }
449
245
  };
450
246
  function replaceBlock(css, selector, newVars) {
@@ -460,7 +256,9 @@ async function applyTheme(options, cssPath, fsModule = nodeFsPromises2) {
460
256
  }
461
257
  const css = await fsModule.readFile(cssPath, "utf-8");
462
258
  let updated = replaceBlock(css, ":root", theme.root);
463
- updated = replaceBlock(updated, ".dark", theme.dark);
259
+ if (theme.dark) {
260
+ updated = replaceBlock(updated, ".dark", theme.dark);
261
+ }
464
262
  await fsModule.writeFile(cssPath, updated);
465
263
  }
466
264
 
@@ -847,7 +645,16 @@ async function runCreate(projectName, deps) {
847
645
  theme: themeChoice,
848
646
  fontSans,
849
647
  fontMono,
850
- plugins: pluginsRecord
648
+ plugins: pluginsRecord,
649
+ identity: {
650
+ siteName: identity.siteName,
651
+ siteUrl: identity.siteUrl,
652
+ siteDescription: identity.siteDescription,
653
+ authorName: identity.authorName,
654
+ authorEmail: identity.authorEmail,
655
+ twitterHandle: identity.twitterHandle,
656
+ lang: identity.lang
657
+ }
851
658
  },
852
659
  fs
853
660
  );
@@ -1483,6 +1290,42 @@ async function runSetup(deps = {}) {
1483
1290
  execFileSync("npx", ["convex", "run", "siteTexts:seed"], { stdio: "pipe" });
1484
1291
  } catch {
1485
1292
  }
1293
+ const identity = state.identity;
1294
+ if (identity?.siteName) {
1295
+ try {
1296
+ execFileSync(
1297
+ "npx",
1298
+ ["convex", "run", "siteConfig:setBatch", JSON.stringify({
1299
+ items: [
1300
+ { key: "site_title", value: identity.siteName },
1301
+ { key: "site_name", value: identity.siteName },
1302
+ { key: "site_url", value: identity.siteUrl || "" },
1303
+ { key: "site_description", value: identity.siteDescription || "" },
1304
+ { key: "author_name", value: identity.authorName || "" },
1305
+ { key: "author_email", value: identity.authorEmail || "" },
1306
+ { key: "twitter_handle", value: identity.twitterHandle || "" },
1307
+ { key: "lang", value: identity.lang || "pt-BR" }
1308
+ ]
1309
+ })],
1310
+ { stdio: "pipe" }
1311
+ );
1312
+ } catch {
1313
+ }
1314
+ if (identity.authorName) {
1315
+ try {
1316
+ execFileSync(
1317
+ "npx",
1318
+ ["convex", "run", "contactInfo:update", JSON.stringify({
1319
+ name: identity.authorName,
1320
+ email: identity.authorEmail || "",
1321
+ showEmail: false
1322
+ })],
1323
+ { stdio: "pipe" }
1324
+ );
1325
+ } catch {
1326
+ }
1327
+ }
1328
+ }
1486
1329
  const vercelHookUrl = await text2({
1487
1330
  message: "VERCEL_DEPLOY_HOOK_URL (Enter para pular):",
1488
1331
  initialValue: ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rubrica",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "CLI para criar e configurar projetos Rubrica — portfólio profissional com React + Convex",
5
5
  "type": "module",
6
6
  "bin": {