@decantr/cli 1.6.4 → 1.6.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.
package/dist/bin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-NH3YWDNG.js";
3
- import "./chunk-AFX57QLI.js";
2
+ import "./chunk-MEW5X6AP.js";
3
+ import "./chunk-GSRPDFXK.js";
@@ -262,7 +262,7 @@ function generatePersonalityCSS(personality, themeData) {
262
262
  rules.push(`.status-ring[data-status="error"] { border-color: var(--d-error); box-shadow: 0 0 12px color-mix(in srgb, var(--d-error) 25%, transparent); }`);
263
263
  rules.push(`.status-ring[data-status="warning"] { border-color: var(--d-warning); }`);
264
264
  rules.push(`.status-ring[data-status="idle"] { border-color: var(--d-text-muted); }`);
265
- rules.push(`.status-ring[data-status="processing"] { border-color: var(--d-primary); }`);
265
+ rules.push(`.status-ring[data-status="processing"] { border-color: var(--d-primary); animation: pulse-ring 2s ease-in-out infinite; }`);
266
266
  rules.push(`@keyframes pulse-ring { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }`);
267
267
  rules.push(`.status-ring[data-status="active"]::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--d-success); opacity: 0; animation: pulse-ring 2s ease-out infinite; }`);
268
268
  }
@@ -492,10 +492,6 @@ function generateTopologySection(data, personality) {
492
492
  lines.push("");
493
493
  lines.push("### Zones");
494
494
  lines.push("");
495
- if (personality.length > 0) {
496
- lines.push(`**Personality:** ${personality.join(", ")}`);
497
- lines.push("");
498
- }
499
495
  for (const zone of data.zones) {
500
496
  const label = ZONE_LABELS[zone.role] || zone.role;
501
497
  lines.push(`**${label}** \u2014 ${zone.shell} shell`);
@@ -2147,7 +2143,11 @@ function generateSectionContext(input) {
2147
2143
  "text-muted": "Secondary text, placeholders, labels",
2148
2144
  primary: "Brand color, key interactive, selected states",
2149
2145
  "primary-hover": "Hover state for primary elements",
2150
- secondary: "Secondary brand color, supporting elements"
2146
+ secondary: "Secondary brand color, supporting elements",
2147
+ "accent-glow": "Ambient glow effect for accent-colored elements"
2148
+ };
2149
+ const paletteToTokenName = {
2150
+ "background": "bg"
2151
2151
  };
2152
2152
  const addedTokens = /* @__PURE__ */ new Set();
2153
2153
  if (input.themeData?.palette) {
@@ -2155,8 +2155,9 @@ function generateSectionContext(input) {
2155
2155
  for (const [name, values] of Object.entries(input.themeData.palette)) {
2156
2156
  if (!addedTokens.has(name)) {
2157
2157
  addedTokens.add(name);
2158
+ const tokenName = paletteToTokenName[name] || name;
2158
2159
  const val = values[modeKey] || values.dark || values.light || Object.values(values)[0];
2159
- lines.push(`| \`--d-${name}\` | \`${val}\` | ${semanticRoles[name] || ""} |`);
2160
+ lines.push(`| \`--d-${tokenName}\` | \`${val}\` | ${semanticRoles[name] || ""} |`);
2160
2161
  }
2161
2162
  }
2162
2163
  }
@@ -9,7 +9,7 @@ import {
9
9
  scaffoldMinimal,
10
10
  scaffoldProject,
11
11
  syncRegistry
12
- } from "./chunk-AFX57QLI.js";
12
+ } from "./chunk-GSRPDFXK.js";
13
13
 
14
14
  // src/index.ts
15
15
  import { readFileSync as readFileSync15, existsSync as existsSync23, readdirSync as readdirSync6 } from "fs";
@@ -4332,7 +4332,7 @@ async function main() {
4332
4332
  break;
4333
4333
  }
4334
4334
  case "upgrade": {
4335
- const { cmdUpgrade } = await import("./upgrade-74OUB65K.js");
4335
+ const { cmdUpgrade } = await import("./upgrade-WPC7QPXX.js");
4336
4336
  const applyFlag = args.includes("--apply");
4337
4337
  await cmdUpgrade(process.cwd(), { apply: applyFlag });
4338
4338
  break;
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./chunk-NH3YWDNG.js";
2
- import "./chunk-AFX57QLI.js";
1
+ import "./chunk-MEW5X6AP.js";
2
+ import "./chunk-GSRPDFXK.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RegistryClient,
3
3
  refreshDerivedFiles
4
- } from "./chunk-AFX57QLI.js";
4
+ } from "./chunk-GSRPDFXK.js";
5
5
 
6
6
  // src/commands/upgrade.ts
7
7
  import { readFileSync, writeFileSync, existsSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decantr/cli",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "Decantr CLI — search the registry, validate essence files, and access design intelligence from the terminal",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,23 +16,28 @@ You are adding new pages or features to an existing Decantr project. Guided mode
16
16
  | 4 | DNA | **Theme-mode** | ENFORCED | Theme/mode combination must be compatible |
17
17
  | 5 | Blueprint | **Structure** | ENFORCED | Page MUST exist in essence before generating code |
18
18
  | 6 | Blueprint | Layout | advisory | Pattern order is flexible |
19
- | 8 | Blueprint | **Pattern-exists** | ENFORCED | All patterns must exist in the registry |
19
+ | 7 | Blueprint | **Pattern-exists** | ENFORCED | All patterns must exist in the registry |
20
20
 
21
21
  ## Before You Start
22
22
 
23
23
  ### 1. Update the Essence
24
24
 
25
- Before generating code for a new page, add it to the essence:
25
+ Before generating code for a new page, add it to the relevant section in the essence:
26
26
 
27
27
  ```json
28
28
  {
29
29
  "blueprint": {
30
- "shell": "{{DEFAULT_SHELL}}",
31
- "pages": [
32
- // ... existing pages ...
30
+ "sections": [
33
31
  {
34
- "id": "new-page-id",
35
- "layout": ["pattern-1", "pattern-2"]
32
+ "id": "section-id",
33
+ "shell": "{{DEFAULT_SHELL}}",
34
+ "pages": [
35
+ // ... existing pages ...
36
+ {
37
+ "id": "new-page-id",
38
+ "layout": ["pattern-1", "pattern-2"]
39
+ }
40
+ ]
36
41
  }
37
42
  ]
38
43
  }
@@ -55,8 +60,8 @@ Only after the page exists in the essence should you generate code for it.
55
60
 
56
61
  Before adding a page:
57
62
 
58
- - [ ] The page ID is added to `blueprint.pages[]` in essence
59
- - [ ] The page has a `shell` defined
63
+ - [ ] The page ID is added to the target `blueprint.sections[].pages[]` in essence
64
+ - [ ] The section has a `shell` defined
60
65
  - [ ] The page has a `layout[]` with pattern IDs
61
66
  - [ ] Validation passes (`npx @decantr/cli validate`)
62
67
 
@@ -64,7 +69,7 @@ During code generation:
64
69
 
65
70
  - [ ] Use theme `{{THEME_STYLE}}` for all styling
66
71
  - [ ] Use theme `{{THEME_RECIPE}}` decorators for decoration
67
- - [ ] Follow the shell structure ({{DEFAULT_SHELL}})
72
+ - [ ] Follow the shell structure for the target section (see section context file for shell notes)
68
73
  - [ ] Include patterns from the layout array
69
74
 
70
75
  After generation:
@@ -95,7 +100,7 @@ Please confirm how you'd like to proceed.
95
100
  When adding features (auth, search, payments, etc.):
96
101
 
97
102
  1. Add the feature to `features[]` in the essence
98
- 2. Update relevant pages in `blueprint.pages[]`
103
+ 2. Update relevant pages in `blueprint.sections[].pages[]`
99
104
  3. Then implement the feature
100
105
 
101
106
  ## Pattern Selection