@decantr/cli 1.7.18 → 1.7.20

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,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-VHDAHJKS.js";
3
- import "./chunk-5ZMHI3R4.js";
2
+ import "./chunk-GHLSLSRW.js";
3
+ import "./chunk-26JRGQ54.js";
4
4
  import "./chunk-QRQCPD3C.js";
@@ -3170,12 +3170,18 @@ Start implementation from the shell layouts and shared route structure before fi
3170
3170
  }
3171
3171
  briefLines.push(`- **Guard mode:** ${params.guardMode}`);
3172
3172
  briefLines.push("");
3173
+ const escDecCell = (s) => s.replace(/\|/g, "\\|");
3173
3174
  if (params.decoratorDefinitions && Object.keys(params.decoratorDefinitions).length > 0) {
3174
3175
  briefLines.push("### Decorator Quick Reference");
3175
- briefLines.push("| Class | Intent | Key CSS |");
3176
- briefLines.push("|-------|--------|---------|");
3176
+ briefLines.push(
3177
+ `Apply these classes \u2014 they carry the theme's visual identity. Without them the scaffold reads as "themed colors only."`
3178
+ );
3179
+ briefLines.push("");
3180
+ briefLines.push("| Class | Intent | Apply to | Key CSS |");
3181
+ briefLines.push("|-------|--------|----------|---------|");
3177
3182
  for (const [name, def] of Object.entries(params.decoratorDefinitions)) {
3178
- const intent = def.intent || "";
3183
+ const intent = escDecCell(def.intent || "");
3184
+ const applyTo = escDecCell((def.usage || []).join(", "));
3179
3185
  const props = def.suggested_properties ?? def.css ?? {};
3180
3186
  const base = Object.entries(props).map(([p, v]) => `${p}: ${v}`).join("; ");
3181
3187
  const hasHover = def.hover_properties && Object.keys(def.hover_properties).length > 0;
@@ -3187,7 +3193,9 @@ Start implementation from the shell layouts and shared route structure before fi
3187
3193
  hasActive && ":active"
3188
3194
  ].filter((m) => Boolean(m));
3189
3195
  const stateSuffix = stateMarkers.length > 0 ? ` _(+ ${stateMarkers.join(", ")})_` : "";
3190
- briefLines.push(`| \`.${name}\` | ${intent} | ${base}${stateSuffix} |`);
3196
+ briefLines.push(
3197
+ `| \`.${name}\` | ${intent} | ${applyTo} | ${escDecCell(base)}${stateSuffix} |`
3198
+ );
3191
3199
  }
3192
3200
  briefLines.push("");
3193
3201
  } else if (params.decorators && params.decorators.length > 0) {
@@ -3195,7 +3203,7 @@ Start implementation from the shell layouts and shared route structure before fi
3195
3203
  briefLines.push("| Class | Purpose |");
3196
3204
  briefLines.push("|-------|---------|");
3197
3205
  for (const d of params.decorators) {
3198
- briefLines.push(`| \`.${d.name}\` | ${d.description} |`);
3206
+ briefLines.push(`| \`.${d.name}\` | ${escDecCell(d.description)} |`);
3199
3207
  }
3200
3208
  briefLines.push("");
3201
3209
  }
@@ -4598,14 +4606,20 @@ function generateQuickStart(input) {
4598
4606
  if (patternLabels.length > 0) {
4599
4607
  lines.push(`**Key patterns:** ${patternLabels.join(", ")}`);
4600
4608
  }
4601
- const cssClasses = [];
4602
- const topDecorators = decorators.slice(0, 3).map((d) => d.name);
4603
- cssClasses.push(...topDecorators);
4609
+ if (decorators.length > 0) {
4610
+ const count = decorators.length;
4611
+ lines.push(
4612
+ `**Theme decorators:** ${count} class${count === 1 ? "" : "es"} \u2014 see "Required Theme Decorators" below for class + intent + apply-to`
4613
+ );
4614
+ }
4604
4615
  const pLower = personality.join(" ").toLowerCase();
4605
- if (pLower.includes("neon") || pLower.includes("glow")) cssClasses.push("neon-glow");
4606
- if (pLower.includes("mono") || pLower.includes("monospace")) cssClasses.push("mono-data");
4607
- if (cssClasses.length > 0) {
4608
- lines.push(`**CSS classes:** ${cssClasses.map((c) => `\`.${c}\``).join(", ")}`);
4616
+ const personalityUtils = [];
4617
+ if (pLower.includes("neon") || pLower.includes("glow")) personalityUtils.push("neon-glow");
4618
+ if (pLower.includes("mono") || pLower.includes("monospace")) personalityUtils.push("mono-data");
4619
+ if (personalityUtils.length > 0) {
4620
+ lines.push(
4621
+ `**Personality utilities:** ${personalityUtils.map((c) => `\`.${c}\``).join(", ")}`
4622
+ );
4609
4623
  }
4610
4624
  const density = section.dna_overrides?.density || "comfortable";
4611
4625
  lines.push(`**Density:** ${density}`);
@@ -4756,21 +4770,38 @@ function generateSectionContext(input) {
4756
4770
  );
4757
4771
  lines.push("");
4758
4772
  const decoratorDefs = input.themeData?.decorator_definitions;
4773
+ const escCell = (s) => s.replace(/\|/g, "\\|");
4759
4774
  if (decoratorDefs && Object.keys(decoratorDefs).length > 0) {
4760
- const usageEntries = Object.entries(decoratorDefs).filter(
4761
- ([, def]) => def.usage && def.usage.length > 0
4775
+ const renderableEntries = Object.entries(decoratorDefs).filter(
4776
+ ([, def]) => def.intent || def.description || def.usage && def.usage.length > 0
4762
4777
  );
4763
- if (usageEntries.length > 0) {
4764
- lines.push("**Section decorators (usage hints):**");
4765
- for (const [name, def] of usageEntries) {
4766
- lines.push(`- \`.${name}\`: ${(def.usage || []).join(", ")}`);
4778
+ if (renderableEntries.length > 0) {
4779
+ lines.push(`## Required Theme Decorators (${themeName})`);
4780
+ lines.push("");
4781
+ lines.push(
4782
+ `These classes carry the active theme's visual identity. Tokens alone give bones; decorators give personality. Generated source MUST apply these \u2014 without them, the page reads as "themed colors only" with no theme character.`
4783
+ );
4784
+ lines.push("");
4785
+ lines.push("| Class | Intent | Apply to |");
4786
+ lines.push("|-------|--------|----------|");
4787
+ for (const [name, def] of renderableEntries) {
4788
+ const intent = escCell(def.intent || def.description || "");
4789
+ const applyTo = escCell((def.usage || []).join(", "));
4790
+ lines.push(`| \`.${name}\` | ${intent} | ${applyTo} |`);
4767
4791
  }
4768
4792
  lines.push("");
4769
4793
  }
4770
4794
  } else if (decorators.length > 0) {
4771
- lines.push("**Section decorators:**");
4795
+ lines.push(`## Required Theme Decorators (${themeName})`);
4796
+ lines.push("");
4797
+ lines.push(
4798
+ "These classes carry the active theme's visual identity. Apply them across this section's patterns or the scaffold reads as generic."
4799
+ );
4800
+ lines.push("");
4801
+ lines.push("| Class | Description |");
4802
+ lines.push("|-------|-------------|");
4772
4803
  for (const d of decorators) {
4773
- lines.push(`- \`.${d.name}\` \u2014 ${d.description}`);
4804
+ lines.push(`| \`.${d.name}\` | ${escCell(d.description)} |`);
4774
4805
  }
4775
4806
  lines.push("");
4776
4807
  }
@@ -14,7 +14,7 @@ import {
14
14
  scaffoldProject,
15
15
  syncRegistry,
16
16
  writeExecutionPackBundleArtifacts
17
- } from "./chunk-5ZMHI3R4.js";
17
+ } from "./chunk-26JRGQ54.js";
18
18
  import {
19
19
  buildGuardRegistryContext,
20
20
  scanProjectInteractions
@@ -5942,7 +5942,7 @@ async function main() {
5942
5942
  break;
5943
5943
  }
5944
5944
  case "upgrade": {
5945
- const { cmdUpgrade } = await import("./upgrade-LK3Z44M2.js");
5945
+ const { cmdUpgrade } = await import("./upgrade-LVMAKWEA.js");
5946
5946
  const applyFlag = args.includes("--apply");
5947
5947
  await cmdUpgrade(process.cwd(), { apply: applyFlag });
5948
5948
  break;
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./chunk-VHDAHJKS.js";
2
- import "./chunk-5ZMHI3R4.js";
1
+ import "./chunk-GHLSLSRW.js";
2
+ import "./chunk-26JRGQ54.js";
3
3
  import "./chunk-QRQCPD3C.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RegistryClient,
3
3
  refreshDerivedFiles
4
- } from "./chunk-5ZMHI3R4.js";
4
+ } from "./chunk-26JRGQ54.js";
5
5
 
6
6
  // src/commands/upgrade.ts
7
7
  import { existsSync, readFileSync, writeFileSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decantr/cli",
3
- "version": "1.7.18",
3
+ "version": "1.7.20",
4
4
  "description": "Decantr CLI — scaffold, audit, and maintain Decantr projects from the terminal",
5
5
  "author": "Decantr AI",
6
6
  "license": "MIT",
@@ -27,10 +27,10 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@decantr/core": "1.0.2",
30
+ "@decantr/core": "1.0.3",
31
31
  "@decantr/essence-spec": "1.0.5",
32
- "@decantr/verifier": "1.0.3",
33
- "@decantr/registry": "1.0.2"
32
+ "@decantr/registry": "1.0.2",
33
+ "@decantr/verifier": "1.0.3"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsup",