zark-design 3.0.2 → 3.0.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/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.2",
3
+ "version": "3.0.4",
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>
@@ -12,9 +12,35 @@
12
12
  <link rel="stylesheet" href="components.css"/>
13
13
  <style>
14
14
  /* ============================================================
15
- SHOWCASE — page-specific styles (sidebar, topbar, sections)
15
+ SHOWCASE — page-specific styles (BASE + app shell + sections)
16
16
  Os tokens e componentes vêm de tokens.css + components.css.
17
17
  ============================================================ */
18
+ * { box-sizing: border-box; }
19
+ html, body {
20
+ margin: 0; padding: 0;
21
+ font-family: var(--font-sans);
22
+ font-size: var(--fs-base);
23
+ line-height: var(--lh-base);
24
+ color: var(--ink-700);
25
+ background: var(--paper);
26
+ -webkit-font-smoothing: antialiased;
27
+ text-rendering: optimizeLegibility;
28
+ }
29
+ ::selection { background: var(--brand-200); color: var(--ink-700); }
30
+ a { color: inherit; text-decoration: none; }
31
+ button { font-family: inherit; }
32
+
33
+ @keyframes zk-spin { to { transform: rotate(360deg); } }
34
+ @keyframes zk-fadein { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: translateY(0);} }
35
+
36
+ /* ============================================================
37
+ APP SHELL
38
+ ============================================================ */
39
+ .app {
40
+ display: grid;
41
+ grid-template-columns: var(--sidebar-w) 1fr;
42
+ min-height: 100vh;
43
+ }
18
44
 
19
45
  /* ---------- SIDEBAR ---------- */
20
46
  .sidebar {
@@ -307,7 +333,7 @@ main { background: var(--paper); }
307
333
  .tag-sm { height: 22px; padding: 0 8px; font-size: var(--fs-xs); }
308
334
  .tag-md { height: 26px; padding: 0 10px; font-size: var(--fs-sm); }
309
335
  .tag-square { border-radius: var(--r-xs); }
310
- .tag-brand { background: var(--brand-50); color: var(--brand-700); }
336
+ .tag-ember { background: var(--brand-50); color: var(--brand-700); }
311
337
  .tag-mono { background: var(--tag-bg); color: var(--tag-fg); }
312
338
  .tag-success { background: var(--success-50); color: var(--success-700); }
313
339
  .tag-warning { background: var(--warning-50); color: var(--warning-700); }
@@ -1207,7 +1233,7 @@ main { background: var(--paper); }
1207
1233
  <!-- =================== SIDEBAR =================== -->
1208
1234
  <aside class="sidebar">
1209
1235
  <div class="sidebar-brand">
1210
- <img src="assets/logo-primary.png" alt="{{name}}" class="sidebar-logo"/>
1236
+ <img src="assets/logo-primary.{{logoExt}}" alt="{{name}}" class="sidebar-logo"/>
1211
1237
  </div>
1212
1238
 
1213
1239
  <div class="sidebar-eyebrow">Foundations</div>
@@ -1798,7 +1824,7 @@ main { background: var(--paper); }
1798
1824
  <div class="row">
1799
1825
  <div style="display:flex; align-items:center; gap:8px">
1800
1826
  <span class="avatar" style="width:22px; height:22px; font-size:10px">M</span>
1801
- <span style="font-size:var(--fs-sm); color:var(--ink-500); font-family:var(--font-mono)">mayconjordanr@gmail.com</span>
1827
+ <span style="font-size:var(--fs-sm); color:var(--ink-500); font-family:var(--font-mono)">user@exemplo.com</span>
1802
1828
  </div>
1803
1829
  </div>
1804
1830
  </div>
@@ -1850,7 +1876,7 @@ main { background: var(--paper); }
1850
1876
  <div class="demo-sidebar">
1851
1877
  <div class="ds-side">
1852
1878
  <div style="padding:8px 10px 16px">
1853
- <img src="assets/logo-primary.png" alt="{{name}}" style="height:18px; display:block"/>
1879
+ <img src="assets/logo-primary.{{logoExt}}" alt="{{name}}" style="height:18px; display:block"/>
1854
1880
  </div>
1855
1881
  <div style="padding:0 4px 8px">
1856
1882
  <label class="input input-sm">
@@ -1906,7 +1932,7 @@ main { background: var(--paper); }
1906
1932
 
1907
1933
  <div style="display:flex; align-items:center; gap:8px; padding:8px 10px">
1908
1934
  <span class="avatar avatar-sq" style="width:22px; height:22px; font-size:10px">M</span>
1909
- <span style="font-size:var(--fs-xs); color:var(--ink-500); font-family:var(--font-mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap">maycon@zark.app</span>
1935
+ <span style="font-size:var(--fs-xs); color:var(--ink-500); font-family:var(--font-mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap">contato@exemplo.com</span>
1910
1936
  </div>
1911
1937
  </div>
1912
1938
 
@@ -2299,7 +2325,7 @@ main { background: var(--paper); }
2299
2325
  <div class="row">
2300
2326
  <div class="toast">
2301
2327
  Welcome to {{name}}!
2302
- <img src="assets/icon.png" alt="{{name}}" style="height:14px; width:auto; display:block; filter:brightness(0) invert(1)"/>
2328
+ <img src="assets/icon.{{logoExt}}" alt="{{name}}" style="height:14px; width:auto; display:block; filter:brightness(0) invert(1)"/>
2303
2329
  </div>
2304
2330
 
2305
2331
  <div class="toast toast-success">
@@ -3073,7 +3099,7 @@ main { background: var(--paper); }
3073
3099
  <div style="height:80px"></div>
3074
3100
 
3075
3101
  <div style="text-align:center; padding:48px 0; border-top:1px solid var(--line-200)">
3076
- <img src="assets/logo-primary.png" alt="{{name}}" style="height:48px; display:inline-block"/>
3102
+ <img src="assets/logo-primary.{{logoExt}}" alt="{{name}}" style="height:48px; display:inline-block"/>
3077
3103
  <div style="font-family:var(--font-mono); font-size:var(--fs-xs); color:var(--ink-300); letter-spacing:var(--ls-wider); text-transform:uppercase; margin-top:16px">Design System · Sistemas v3 · 2026 · App Patterns extraídos do CRM</div>
3078
3104
  </div>
3079
3105
  </div>
@@ -40,8 +40,8 @@ import {
40
40
  Icons,
41
41
  } from './index';
42
42
 
43
- import logoZark from './assets/logo-primary.png';
44
- import iconZark from './assets/icon.png';
43
+ import logoZark from './assets/logo-primary.{{logoExt}}';
44
+ import iconZark from './assets/icon.{{logoExt}}';
45
45
 
46
46
  export default function App() {
47
47
  const [tab, setTab] = useState('hoje');