@decantr/cli 1.5.5 → 1.5.6

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-4KKFOXBB.js";
3
- import "./chunk-MU3657R7.js";
2
+ import "./chunk-G77ADKWE.js";
3
+ import "./chunk-VKWRNLHR.js";
@@ -9,7 +9,7 @@ import {
9
9
  scaffoldMinimal,
10
10
  scaffoldProject,
11
11
  syncRegistry
12
- } from "./chunk-MU3657R7.js";
12
+ } from "./chunk-VKWRNLHR.js";
13
13
 
14
14
  // src/index.ts
15
15
  import { readFileSync as readFileSync15, existsSync as existsSync23, readdirSync as readdirSync6 } from "fs";
@@ -4256,7 +4256,7 @@ async function main() {
4256
4256
  break;
4257
4257
  }
4258
4258
  case "upgrade": {
4259
- const { cmdUpgrade } = await import("./upgrade-T3FNFFIH.js");
4259
+ const { cmdUpgrade } = await import("./upgrade-6MKC6EDQ.js");
4260
4260
  const applyFlag = args.includes("--apply");
4261
4261
  await cmdUpgrade(process.cwd(), { apply: applyFlag });
4262
4262
  break;
@@ -1081,22 +1081,173 @@ Atoms + treatment + theme decorator:
1081
1081
  - **Theme decorators:** \`carbon-glass\`, \`carbon-code\` \u2014 theme-specific decoration from treatments.css
1082
1082
  - **Combined:** \`css('_flex _col') + ' d-surface carbon-card'\`
1083
1083
 
1084
- ### Atoms Quick Reference
1085
-
1086
- | Category | Examples | Purpose |
1087
- |----------|---------|---------|
1088
- | Layout | \`_flex\`, \`_col\`, \`_row\`, \`_wrap\`, \`_grid\` | Flex/grid containers |
1089
- | Spacing | \`_gap4\`, \`_p4\`, \`_px4\`, \`_py2\`, \`_m0\` | Gaps, padding, margin |
1090
- | Sizing | \`_w100\`, \`_h100\`, \`_mw640\`, \`_mw480\` | Width, height, max-width |
1091
- | Text | \`_textlg\`, \`_text2xl\`, \`_fontbold\`, \`_fontmono\` | Typography |
1092
- | Color | \`_fgaccent\`, \`_fgmuted\`, \`_fgsuccess\`, \`_bgsurf\` | Foreground/background |
1093
- | Alignment | \`_aic\`, \`_jcc\`, \`_jcsb\`, \`_pic\` | Flex/grid alignment |
1094
- | Position | \`_rel\`, \`_abs\`, \`_sticky\`, \`_z10\` | Positioning |
1095
- | Visual | \`_rounded\`, \`_shadow\`, \`_trans\`, \`_op50\` | Decoration |
1096
- | Responsive | \`_md:gc2\`, \`_lg:gc4\`, \`_sm:flex\` | Breakpoint prefixes |
1097
- | Cursor | \`_pointer\` | Interaction hints |
1098
-
1099
- Scale: 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24. Example: \`_gap4\` = \`gap:1rem\`.
1084
+ ### Atom Reference
1085
+
1086
+ #### Display
1087
+ | Atom | CSS |
1088
+ |------|-----|
1089
+ | \`_flex\` | \`display:flex\` |
1090
+ | \`_grid\` | \`display:grid\` |
1091
+ | \`_block\` | \`display:block\` |
1092
+ | \`_inline\` | \`display:inline\` |
1093
+ | \`_inlineflex\` | \`display:inline-flex\` |
1094
+ | \`_none\` | \`display:none\` |
1095
+ | \`_contents\` | \`display:contents\` |
1096
+
1097
+ #### Flexbox
1098
+ | Atom | CSS |
1099
+ |------|-----|
1100
+ | \`_col\` | \`flex-direction:column\` |
1101
+ | \`_row\` | \`flex-direction:row\` |
1102
+ | \`_colrev\` | \`flex-direction:column-reverse\` |
1103
+ | \`_wrap\` | \`flex-wrap:wrap\` |
1104
+ | \`_nowrap\` | \`flex-wrap:nowrap\` |
1105
+ | \`_flex1\` | \`flex:1\` |
1106
+ | \`_flex0\` | \`flex:none\` |
1107
+ | \`_flexauto\` | \`flex:auto\` |
1108
+ | \`_grow\` | \`flex-grow:1\` |
1109
+ | \`_grow0\` | \`flex-grow:0\` |
1110
+ | \`_shrink0\` | \`flex-shrink:0\` |
1111
+
1112
+ #### Alignment
1113
+ | Atom | CSS |
1114
+ |------|-----|
1115
+ | \`_aic\` | \`align-items:center\` |
1116
+ | \`_aifs\` | \`align-items:flex-start\` |
1117
+ | \`_aife\` | \`align-items:flex-end\` |
1118
+ | \`_aist\` | \`align-items:stretch\` |
1119
+ | \`_aibl\` | \`align-items:baseline\` |
1120
+ | \`_jcc\` | \`justify-content:center\` |
1121
+ | \`_jcfs\` | \`justify-content:flex-start\` |
1122
+ | \`_jcfe\` | \`justify-content:flex-end\` |
1123
+ | \`_jcsb\` | \`justify-content:space-between\` |
1124
+ | \`_jcsa\` | \`justify-content:space-around\` |
1125
+ | \`_jcse\` | \`justify-content:space-evenly\` |
1126
+ | \`_pic\` | \`place-items:center\` |
1127
+ | \`_pcc\` | \`place-content:center\` |
1128
+
1129
+ #### Spacing (scale: 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, ...)
1130
+ | Atom | CSS | Notes |
1131
+ |------|-----|-------|
1132
+ | \`_gap{n}\` | \`gap:{scale}\` | e.g. \`_gap4\` = \`gap:1rem\` |
1133
+ | \`_gx{n}\` | \`column-gap:{scale}\` | horizontal gap |
1134
+ | \`_gy{n}\` | \`row-gap:{scale}\` | vertical gap |
1135
+ | \`_p{n}\` | \`padding:{scale}\` | all sides |
1136
+ | \`_pt{n}\`, \`_pr{n}\`, \`_pb{n}\`, \`_pl{n}\` | directional padding | top/right/bottom/left |
1137
+ | \`_px{n}\` | \`padding-inline:{scale}\` | horizontal |
1138
+ | \`_py{n}\` | \`padding-block:{scale}\` | vertical |
1139
+ | \`_m{n}\` | \`margin:{scale}\` | same as padding variants |
1140
+ | \`_mx{n}\`, \`_my{n}\` | inline/block margin | horizontal/vertical |
1141
+
1142
+ #### Sizing
1143
+ | Atom | CSS |
1144
+ |------|-----|
1145
+ | \`_wfull\` / \`_w100\` | \`width:100%\` |
1146
+ | \`_hfull\` / \`_h100\` | \`height:100%\` |
1147
+ | \`_wscreen\` | \`width:100vw\` |
1148
+ | \`_hscreen\` | \`height:100vh\` |
1149
+ | \`_wfit\` | \`width:fit-content\` |
1150
+ | \`_hfit\` | \`height:fit-content\` |
1151
+ | \`_wauto\` | \`width:auto\` |
1152
+ | \`_minw0\` | \`min-width:0\` |
1153
+ | \`_minh0\` | \`min-height:0\` |
1154
+ | \`_w{n}\`, \`_h{n}\` | width/height from spacing scale |
1155
+ | \`_minw{n}\`, \`_maxw{n}\` | min/max width from scale |
1156
+
1157
+ #### Text Size
1158
+ | Atom | Size | Line-height |
1159
+ |------|------|-------------|
1160
+ | \`_textxs\` | 0.75rem | 1rem |
1161
+ | \`_textsm\` | 0.875rem | 1.25rem |
1162
+ | \`_textbase\` | 1rem | 1.5rem |
1163
+ | \`_textlg\` | 1.125rem | 1.75rem |
1164
+ | \`_textxl\` | 1.25rem | 1.75rem |
1165
+ | \`_text2xl\` | 1.5rem | 2rem |
1166
+ | \`_text3xl\` | 1.875rem | 2.25rem |
1167
+ | \`_heading1\`-\`_heading6\` | Heading presets (size + weight) |
1168
+
1169
+ #### Text Style
1170
+ | Atom | CSS |
1171
+ |------|-----|
1172
+ | \`_fontbold\` | \`font-weight:700\` |
1173
+ | \`_fontsemi\` | \`font-weight:600\` |
1174
+ | \`_fontmedium\` | \`font-weight:500\` |
1175
+ | \`_fontlight\` | \`font-weight:300\` |
1176
+ | \`_italic\` | \`font-style:italic\` |
1177
+ | \`_underline\` | \`text-decoration:underline\` |
1178
+ | \`_uppercase\` | \`text-transform:uppercase\` |
1179
+ | \`_truncate\` | overflow ellipsis + nowrap |
1180
+ | \`_textl\`, \`_textc\`, \`_textr\` | text-align left/center/right |
1181
+
1182
+ #### Color (theme variable based)
1183
+ | Atom | CSS |
1184
+ |------|-----|
1185
+ | \`_bgprimary\` | \`background:var(--d-primary)\` |
1186
+ | \`_bgsurface\` | \`background:var(--d-surface)\` |
1187
+ | \`_bgsurface0\`-\`_bgsurface2\` | surface elevation layers |
1188
+ | \`_bgmuted\` | \`background:var(--d-muted)\` |
1189
+ | \`_bgbg\` | \`background:var(--d-bg)\` |
1190
+ | \`_bgsuccess\`, \`_bgerror\`, \`_bgwarning\`, \`_bginfo\` | status backgrounds |
1191
+ | \`_fgprimary\` | \`color:var(--d-primary)\` |
1192
+ | \`_fgtext\` | \`color:var(--d-text)\` |
1193
+ | \`_fgmuted\` | \`color:var(--d-text-muted)\` |
1194
+ | \`_fgsuccess\`, \`_fgerror\`, \`_fgwarning\`, \`_fginfo\` | status text |
1195
+ | \`_bcborder\` | \`border-color:var(--d-border)\` |
1196
+
1197
+ #### Overflow & Whitespace
1198
+ | Atom | CSS |
1199
+ |------|-----|
1200
+ | \`_overhidden\` | \`overflow:hidden\` |
1201
+ | \`_overauto\` | \`overflow:auto\` |
1202
+ | \`_overscroll\` | \`overflow:scroll\` |
1203
+ | \`_overxauto\`, \`_overyauto\` | axis-specific overflow |
1204
+ | \`_nowraptext\` | \`white-space:nowrap\` |
1205
+ | \`_prewrap\` | \`white-space:pre-wrap\` |
1206
+ | \`_breakword\` | \`overflow-wrap:break-word\` |
1207
+
1208
+ #### Cursor & Interaction
1209
+ | Atom | CSS |
1210
+ |------|-----|
1211
+ | \`_pointer\` | \`cursor:pointer\` |
1212
+ | \`_cursordefault\` | \`cursor:default\` |
1213
+ | \`_notallowed\` | \`cursor:not-allowed\` |
1214
+ | \`_grab\` | \`cursor:grab\` |
1215
+ | \`_selectnone\` | \`user-select:none\` |
1216
+ | \`_ptrnone\` | \`pointer-events:none\` |
1217
+
1218
+ #### Position & Layout
1219
+ | Atom | CSS |
1220
+ |------|-----|
1221
+ | \`_rel\` | \`position:relative\` |
1222
+ | \`_abs\` | \`position:absolute\` |
1223
+ | \`_fixed\` | \`position:fixed\` |
1224
+ | \`_sticky\` | \`position:sticky\` |
1225
+ | \`_inset0\` | \`inset:0\` |
1226
+ | \`_top0\`, \`_right0\`, \`_bottom0\`, \`_left0\` | edge positioning |
1227
+ | \`_z10\`-\`_z50\` | z-index scale |
1228
+
1229
+ #### Grid
1230
+ | Atom | CSS |
1231
+ |------|-----|
1232
+ | \`_gc1\`-\`_gc12\` | \`grid-template-columns:repeat(N,...)\` |
1233
+ | \`_gr1\`-\`_gr6\` | \`grid-template-rows:repeat(N,...)\` |
1234
+ | \`_span1\`-\`_span12\`, \`_spanfull\` | column span |
1235
+ | \`_rowspan1\`-\`_rowspan6\` | row span |
1236
+
1237
+ #### Visual
1238
+ | Atom | CSS |
1239
+ |------|-----|
1240
+ | \`_rounded\` | \`border-radius:var(--d-radius)\` |
1241
+ | \`_roundedfull\` | \`border-radius:9999px\` |
1242
+ | \`_roundedsm\`, \`_roundedlg\`, \`_roundedxl\` | radius variants |
1243
+ | \`_shadow\`, \`_shadowmd\`, \`_shadowlg\` | box-shadow presets |
1244
+ | \`_bordernone\` | \`border:none\` |
1245
+ | \`_bw{n}\` | \`border-width:{n}px\` |
1246
+ | \`_op0\`-\`_op100\` | opacity (0, 25, 50, 75, 100) |
1247
+ | \`_trans\` | \`transition:all 0.15s ease\` |
1248
+ | \`_visible\`, \`_invisible\` | visibility |
1249
+
1250
+ Responsive prefixes: \`_sm:\`, \`_md:\`, \`_lg:\` (e.g. \`_md:gc2\`, \`_lg:gc4\`, \`_sm:flex\`).
1100
1251
 
1101
1252
  ### Section Labels
1102
1253
 
@@ -1685,7 +1836,8 @@ async function refreshDerivedFiles(projectRoot, essence, registry, prefetchedThe
1685
1836
  const spec = {
1686
1837
  description: inner.description || "",
1687
1838
  components: inner.components || [],
1688
- slots
1839
+ slots,
1840
+ layout_hints: inner.layout_hints
1689
1841
  };
1690
1842
  if (!spec.components || spec.components.length === 0) {
1691
1843
  const syntheticComps = generateSyntheticComponents(name, spec.description);
@@ -1865,7 +2017,8 @@ async function refreshDerivedFiles(projectRoot, essence, registry, prefetchedThe
1865
2017
  const spec = {
1866
2018
  description: inner.description || "",
1867
2019
  components: inner.components || [],
1868
- slots
2020
+ slots,
2021
+ layout_hints: inner.layout_hints
1869
2022
  };
1870
2023
  if (!spec.components || spec.components.length === 0) {
1871
2024
  const syntheticComps = generateSyntheticComponents(name, spec.description);
@@ -2087,6 +2240,10 @@ function generateSectionContext(input) {
2087
2240
  }
2088
2241
  lines.push("");
2089
2242
  }
2243
+ const themePrefix = themeName.split("-")[0] || themeName;
2244
+ lines.push("");
2245
+ lines.push(`Usage: \`className={css('_flex _col _gap4') + ' d-surface ${themePrefix}-glass'}\` \u2014 atoms via css(), treatments and theme decorators as plain class strings.`);
2246
+ lines.push("");
2090
2247
  lines.push("---");
2091
2248
  lines.push("");
2092
2249
  if (zoneContext) {
@@ -2139,6 +2296,12 @@ function generateSectionContext(input) {
2139
2296
  for (const [slot, desc] of Object.entries(spec.slots)) {
2140
2297
  lines.push(`- \`${slot}\`: ${desc}`);
2141
2298
  }
2299
+ if (spec.layout_hints && Object.keys(spec.layout_hints).length > 0) {
2300
+ lines.push(` **Layout guidance:**`);
2301
+ for (const [key, value] of Object.entries(spec.layout_hints)) {
2302
+ lines.push(` - ${key}: ${value}`);
2303
+ }
2304
+ }
2142
2305
  lines.push("");
2143
2306
  }
2144
2307
  lines.push("---");
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./chunk-4KKFOXBB.js";
2
- import "./chunk-MU3657R7.js";
1
+ import "./chunk-G77ADKWE.js";
2
+ import "./chunk-VKWRNLHR.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RegistryClient,
3
3
  refreshDerivedFiles
4
- } from "./chunk-MU3657R7.js";
4
+ } from "./chunk-VKWRNLHR.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.5.5",
3
+ "version": "1.5.6",
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": {