zark-design 3.0.1 → 3.0.3

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/bin/cli.js CHANGED
@@ -347,6 +347,9 @@ async function runInit(args) {
347
347
  ctx.nameDesc = ctx.preset === 'zark'
348
348
  ? 'Sistema de design para apps e sistemas internos da ZARK'
349
349
  : `Sistema de design para apps e sistemas do(a) **${ctx.name}**`;
350
+ ctx.slugUpper = (ctx.slug || ctx.name).toUpperCase().replace(/[^A-Z0-9_]/g, '_');
351
+ // Logos: preset traz PNGs reais; custom gera SVGs placeholder dinâmicos
352
+ ctx.logoExt = ctx.preset ? 'png' : 'svg';
350
353
 
351
354
  console.log(c.dim(' Contexto:'));
352
355
  console.log(c.dim(` Nome: ${ctx.name} (slug: ${ctx.slug})`));
@@ -382,10 +385,23 @@ async function runInit(args) {
382
385
  // Preset traz assets prontos
383
386
  await copyDir(path.join(PRESETS_DIR, ctx.preset, 'assets'), path.join(target, 'assets'), ctx, copyOpts);
384
387
  } else {
385
- // Custom: pasta vazia + README instrutivo
388
+ // Custom: SVG placeholders (showcase renderiza bonito até você substituir) + README instrutivo
386
389
  const assetsReadme = renderTemplate(await fs.readFile(path.join(SHARED_DIR, 'ASSETS-README.md.hbs'), 'utf-8'), ctx);
387
390
  await fs.writeFile(path.join(target, 'assets/README.md'), assetsReadme);
388
391
  written.push('assets/README.md (pasta pra você colar seus logos)');
392
+ // SVG placeholders dinâmicos com a cor de marca aplicada
393
+ const phLogo = renderTemplate(
394
+ await fs.readFile(path.join(SHARED_DIR, 'placeholder-assets/logo-primary.svg'), 'utf-8'),
395
+ ctx
396
+ ).replace(/var\(--brand-500, #888\)/g, ctx.brand['500']);
397
+ const phIcon = renderTemplate(
398
+ await fs.readFile(path.join(SHARED_DIR, 'placeholder-assets/icon.svg'), 'utf-8'),
399
+ ctx
400
+ ).replace(/var\(--brand-500, #888\)/g, ctx.brand['500'])
401
+ .replace(/>L</, `>${ctx.name.charAt(0).toUpperCase()}<`);
402
+ await fs.writeFile(path.join(target, 'assets/logo-primary.svg'), phLogo);
403
+ await fs.writeFile(path.join(target, 'assets/icon.svg'), phIcon);
404
+ written.push('assets/logo-primary.svg (placeholder com cor de marca)', 'assets/icon.svg (placeholder)');
389
405
  }
390
406
 
391
407
  // Log
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zark-design",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Design system scaffolder seguindo método ZARK — `npx zark-design init` em modo preset (ZARK pronto) ou custom (cor e logos suas, paleta 50→900 gerada). HTML + JSX side-by-side. Dark mode nativo. Sem dependência runtime.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
2
+ <rect width="64" height="64" rx="12" fill="var(--brand-500, #888)"/>
3
+ <text x="32" y="42" text-anchor="middle" font-family="system-ui, sans-serif"
4
+ font-size="28" font-weight="800" fill="#fff">L</text>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 40" width="180" height="40">
2
+ <rect width="180" height="40" rx="6" fill="var(--brand-500, #888)"/>
3
+ <text x="90" y="26" text-anchor="middle" font-family="system-ui, sans-serif"
4
+ font-size="14" font-weight="700" fill="#fff" letter-spacing="0.5">LOGO</text>
5
+ </svg>
@@ -18,7 +18,7 @@
18
18
  <!-- SIDEBAR -->
19
19
  <aside class="zk-sidebar">
20
20
  <div class="zk-sidebar-brand">
21
- <img src="assets/logo-primary.png" alt="{{name}}" class="zk-sidebar-logo"/>
21
+ <img src="assets/logo-primary.{{logoExt}}" alt="{{name}}" class="zk-sidebar-logo"/>
22
22
  </div>
23
23
 
24
24
  <div class="zk-sidebar-eyebrow">Workspace</div>