elcrm 1.1.26 → 1.1.27

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/dist/index.js CHANGED
@@ -1149,6 +1149,11 @@ function isColorToken(name, value) {
1149
1149
  return true;
1150
1150
  return false;
1151
1151
  }
1152
+ function isButtonShadowNoise(name, value) {
1153
+ if (!/^--button-.+-shadow(-(hover|active))?$/.test(name))
1154
+ return false;
1155
+ return /^none$/i.test(value.trim());
1156
+ }
1152
1157
  function listCssFiles(dir, acc = []) {
1153
1158
  if (!existsSync5(dir))
1154
1159
  return acc;
@@ -1440,7 +1445,7 @@ function syncElcrmCss(options) {
1440
1445
  continue;
1441
1446
  let css = readFileSync7(file, "utf8");
1442
1447
  const have = existingTokenNames(css);
1443
- const missing = allDefs.filter((d) => d.bucket === bucket && !have.has(d.name) && !d.name.startsWith("--search-") && !TOKEN_DEPRECATED.has(d.name));
1448
+ const missing = allDefs.filter((d) => d.bucket === bucket && !have.has(d.name) && !d.name.startsWith("--search-") && !TOKEN_DEPRECATED.has(d.name) && !isButtonShadowNoise(d.name, d.value));
1444
1449
  const uniq = [];
1445
1450
  const seen = new Set;
1446
1451
  for (const d of missing) {
@@ -1488,6 +1493,32 @@ function syncElcrmCss(options) {
1488
1493
  }
1489
1494
  return { styleDir, added, imports, removedImports, skippedPkgs };
1490
1495
  }
1496
+ function stripButtonShadowNoiseFromTheme(styleDir, dry = false) {
1497
+ const file = join5(styleDir, "theme.css");
1498
+ if (!existsSync5(file))
1499
+ return [];
1500
+ const css = readFileSync7(file, "utf8");
1501
+ const lines = css.split(/\r?\n/);
1502
+ const removed = [];
1503
+ const kept = lines.filter((line) => {
1504
+ const m = line.match(/^\s*(--button-[a-z0-9-]+shadow[a-z0-9-]*)\s*:\s*(.+);/i);
1505
+ if (!m)
1506
+ return true;
1507
+ if (!isButtonShadowNoise(m[1], m[2]))
1508
+ return true;
1509
+ removed.push(m[1]);
1510
+ return false;
1511
+ });
1512
+ if (!removed.length)
1513
+ return [];
1514
+ const next = kept.join(`
1515
+ `).replace(/\n{3,}/g, `
1516
+
1517
+ `);
1518
+ if (!dry)
1519
+ writeFileSync3(file, next, "utf8");
1520
+ return removed;
1521
+ }
1491
1522
 
1492
1523
  // src/lib/migrate/socket-server.ts
1493
1524
  import {
@@ -4589,6 +4620,12 @@ async function cmdCss(parsed) {
4589
4620
  try {
4590
4621
  const result = syncElcrmCss({ cwd, pkgNames: names, dry });
4591
4622
  console.log(`\u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u0441\u0442\u0438\u043B\u0435\u0439: ${result.styleDir}`);
4623
+ const stripped = stripButtonShadowNoiseFromTheme(result.styleDir, dry);
4624
+ if (stripped.length) {
4625
+ console.log(` ${dry ? "[dry] " : ""}${c.yellow("\u2212")} theme.css: \u0443\u0431\u0440\u0430\u043D\u043E ${stripped.length} button-shadow (none)`);
4626
+ for (const t of stripped)
4627
+ console.log(` ${c.dim(t)}`);
4628
+ }
4592
4629
  let total = 0;
4593
4630
  for (const [file, tokens] of Object.entries(result.added)) {
4594
4631
  if (!tokens.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elcrm",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "CLI @elcrm/*: doctor --fix (порядок проекта), update, css, docs, cursor, kit, migrate",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@ elcrm cursor
18
18
  | # | Команда | Что делает |
19
19
  | --- | --- | --- |
20
20
  | 1 | `elcrm update --fix --test` | Обновляет глобальный `elcrm` + все `@elcrm/*` в `package.json` → install → **migrate front** (API/токены/css-sanitize) → внутри `--fix` ещё раз **sync CSS** → `elcrm test` |
21
- | 2 | `elcrm css` | Недостающие CSS-токены → `theme.css` / `theme-light` / `theme-dark`. В `elcrm.css`: **добавляет** рабочие `@import`, **удаляет битые** (нет export/файла в установленном пакете). Затем css-sanitize |
21
+ | 2 | `elcrm css` | Недостающие CSS-токены → `theme.css` / `theme-light` / `theme-dark`. **Не дописывает** `--button-*-shadow: none` и снимает такие строки из `theme.css`. В `elcrm.css`: **добавляет** рабочие `@import`, **удаляет битые** (нет export/файла в установленном пакете). Затем css-sanitize |
22
22
  | 3 | `elcrm docs` | Перезаписывает `docs/*.elCRM.md` (шпаргалки пакетов) |
23
23
  | 4 | `elcrm cursor` | `.cursor/rules` + `.cursor/docs` + `AGENTS.md` для агента |
24
24
 
@@ -20,24 +20,6 @@
20
20
  --button-size-s: 14px;
21
21
  --button-size-m: 16px;
22
22
  --button-size-l: 18px;
23
- --button-shadow: none;
24
- --button-shadow-hover: none;
25
- --button-shadow-active: none;
26
- --button-primary-shadow: none;
27
- --button-primary-hover-shadow: none;
28
- --button-primary-active-shadow: none;
29
- --button-secondary-shadow: none;
30
- --button-secondary-hover-shadow: none;
31
- --button-secondary-active-shadow: none;
32
- --button-positive-shadow: none;
33
- --button-positive-hover-shadow: none;
34
- --button-positive-active-shadow: none;
35
- --button-negative-shadow: none;
36
- --button-negative-hover-shadow: none;
37
- --button-negative-active-shadow: none;
38
- --button-ghost-shadow: none;
39
- --button-ghost-hover-shadow: none;
40
- --button-ghost-active-shadow: none;
41
23
 
42
24
  /* —— form / control —— */
43
25
  --control-height: 44px;
@@ -166,6 +148,26 @@
166
148
  --healthmap-l2: color-mix(in srgb, var(--shell-color-success) 45%, transparent);
167
149
  --healthmap-l3: color-mix(in srgb, var(--shell-color-success) 70%, transparent);
168
150
  --healthmap-l4: var(--shell-color-success);
151
+ --table-font-size: 0.9rem;
152
+ --table-cell-padding: 0.55rem 0.7rem;
153
+ --table-head-font-size: 0.75rem;
154
+ --table-code-font-size: 0.8rem;
155
+ --code-block-bg: var(--shell-background);
156
+ --code-block-bar-padding: 0.4rem 0.75rem;
157
+ --code-block-padding: 0.85rem 1rem;
158
+ --code-block-font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
159
+ --code-block-font-size: 0.8rem;
160
+ --code-block-line-height: 1.55;
161
+ --split-handle-size: 6px;
162
+ --split-handle-bg: var(--shell-border);
163
+ --split-handle-bg-hover: color-mix(
164
+ in srgb,
165
+ var(--shell-color-accent) 25%,
166
+ var(--shell-border)
167
+ );
168
+ --banner-padding: 0.55rem 0.85rem;
169
+ --banner-bg: color-mix(in srgb, var(--shell-color-accent) 8%, var(--shell-bg));
170
+ --banner-border: color-mix(in srgb, var(--shell-color-accent) 35%, var(--shell-border));
169
171
  }
170
172
 
171
173
  /* —— база приложения (без захардкоженных цветов) —— */
@@ -20,24 +20,6 @@
20
20
  --button-size-s: 14px;
21
21
  --button-size-m: 16px;
22
22
  --button-size-l: 18px;
23
- --button-shadow: none;
24
- --button-shadow-hover: none;
25
- --button-shadow-active: none;
26
- --button-primary-shadow: none;
27
- --button-primary-hover-shadow: none;
28
- --button-primary-active-shadow: none;
29
- --button-secondary-shadow: none;
30
- --button-secondary-hover-shadow: none;
31
- --button-secondary-active-shadow: none;
32
- --button-positive-shadow: none;
33
- --button-positive-hover-shadow: none;
34
- --button-positive-active-shadow: none;
35
- --button-negative-shadow: none;
36
- --button-negative-hover-shadow: none;
37
- --button-negative-active-shadow: none;
38
- --button-ghost-shadow: none;
39
- --button-ghost-hover-shadow: none;
40
- --button-ghost-active-shadow: none;
41
23
 
42
24
  /* —— form / control —— */
43
25
  --control-height: 44px;
@@ -177,6 +159,26 @@
177
159
  --healthmap-l2: color-mix(in srgb, var(--shell-color-success) 45%, transparent);
178
160
  --healthmap-l3: color-mix(in srgb, var(--shell-color-success) 70%, transparent);
179
161
  --healthmap-l4: var(--shell-color-success);
162
+ --table-font-size: 0.9rem;
163
+ --table-cell-padding: 0.55rem 0.7rem;
164
+ --table-head-font-size: 0.75rem;
165
+ --table-code-font-size: 0.8rem;
166
+ --code-block-bg: var(--shell-background);
167
+ --code-block-bar-padding: 0.4rem 0.75rem;
168
+ --code-block-padding: 0.85rem 1rem;
169
+ --code-block-font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
170
+ --code-block-font-size: 0.8rem;
171
+ --code-block-line-height: 1.55;
172
+ --split-handle-size: 6px;
173
+ --split-handle-bg: var(--shell-border);
174
+ --split-handle-bg-hover: color-mix(
175
+ in srgb,
176
+ var(--shell-color-accent) 25%,
177
+ var(--shell-border)
178
+ );
179
+ --banner-padding: 0.55rem 0.85rem;
180
+ --banner-bg: color-mix(in srgb, var(--shell-color-accent) 8%, var(--shell-bg));
181
+ --banner-border: color-mix(in srgb, var(--shell-color-accent) 35%, var(--shell-border));
180
182
  }
181
183
 
182
184
  /* —— база приложения (без захардкоженных цветов) —— */