@jay-framework/design-system-validator 0.22.0 → 0.22.2

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.
Files changed (2) hide show
  1. package/dist/index.js +24 -6
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1106,13 +1106,16 @@ function buildColorItems(tokens, category) {
1106
1106
  category,
1107
1107
  subCategory: "Colors",
1108
1108
  prompt: `Use color token "${name}" with value ${value} from DESIGN.md.`,
1109
- html: `<div style="display:flex;align-items:center;gap:10px;font-family:sans-serif;">
1109
+ presentation: {
1110
+ type: "html-fragment",
1111
+ html: `<div style="display:flex;align-items:center;gap:10px;font-family:sans-serif;">
1110
1112
  <div style="width:40px;height:40px;border-radius:6px;background:${esc(value)};border:1px solid rgba(0,0,0,0.1);flex-shrink:0;"></div>
1111
1113
  <div>
1112
1114
  <div style="font-size:13px;font-weight:600;">${esc(name)}</div>
1113
1115
  <div style="font-size:11px;color:#888;font-family:monospace;">${esc(value)}</div>
1114
1116
  </div>
1115
1117
  </div>`
1118
+ }
1116
1119
  }));
1117
1120
  }
1118
1121
  function buildTypographyItems(tokens, category) {
@@ -1146,10 +1149,13 @@ function buildTypographyItems(tokens, category) {
1146
1149
  category,
1147
1150
  subCategory: "Typography",
1148
1151
  prompt: `Apply typography preset "${name}" from DESIGN.md: ${desc}.`,
1149
- html: `<div style="font-family:sans-serif;">
1152
+ presentation: {
1153
+ type: "html-fragment",
1154
+ html: `<div style="font-family:sans-serif;">
1150
1155
  <div style="${styles.join(";")};margin:0;">The quick brown fox</div>
1151
1156
  <div style="font-size:10px;color:#888;margin-top:6px;font-family:monospace;">${esc(name)}: ${esc(desc)}</div>
1152
1157
  </div>`
1158
+ }
1153
1159
  };
1154
1160
  });
1155
1161
  }
@@ -1160,7 +1166,9 @@ function buildSpacingItems(tokens, category) {
1160
1166
  category,
1161
1167
  subCategory: "Spacing",
1162
1168
  prompt: `Use spacing token "${name}" with value ${value} from DESIGN.md for padding, margin, or gap.`,
1163
- html: `<div style="display:flex;align-items:center;gap:8px;font-family:sans-serif;">
1169
+ presentation: {
1170
+ type: "html-fragment",
1171
+ html: `<div style="display:flex;align-items:center;gap:8px;font-family:sans-serif;">
1164
1172
  <div style="display:flex;align-items:center;gap:0;">
1165
1173
  <div style="width:16px;height:24px;background:#cbd5e1;border-radius:2px 0 0 2px;"></div>
1166
1174
  <div style="width:${esc(value)};height:24px;background:repeating-linear-gradient(45deg,#e0f2fe,#e0f2fe 2px,#bae6fd 2px,#bae6fd 4px);"></div>
@@ -1171,6 +1179,7 @@ function buildSpacingItems(tokens, category) {
1171
1179
  <span style="font-size:11px;color:#888;font-family:monospace;margin-left:4px;">${esc(value)}</span>
1172
1180
  </div>
1173
1181
  </div>`
1182
+ }
1174
1183
  }));
1175
1184
  }
1176
1185
  function buildRoundedItems(tokens, category) {
@@ -1180,13 +1189,16 @@ function buildRoundedItems(tokens, category) {
1180
1189
  category,
1181
1190
  subCategory: "Rounded",
1182
1191
  prompt: `Use border-radius token "${name}" with value ${value} from DESIGN.md.`,
1183
- html: `<div style="display:flex;align-items:center;gap:10px;font-family:sans-serif;">
1192
+ presentation: {
1193
+ type: "html-fragment",
1194
+ html: `<div style="display:flex;align-items:center;gap:10px;font-family:sans-serif;">
1184
1195
  <div style="width:40px;height:40px;border-radius:${esc(value)};background:#e2e8f0;border:1.5px solid #94a3b8;flex-shrink:0;"></div>
1185
1196
  <div>
1186
1197
  <div style="font-size:12px;font-weight:600;">${esc(name)}</div>
1187
1198
  <div style="font-size:11px;color:#888;font-family:monospace;">${esc(value)}</div>
1188
1199
  </div>
1189
1200
  </div>`
1201
+ }
1190
1202
  }));
1191
1203
  }
1192
1204
  function buildBreakpointItems(tokens, category) {
@@ -1214,7 +1226,9 @@ function buildAnimationItems(tokens, category) {
1214
1226
  category,
1215
1227
  subCategory: "Animations",
1216
1228
  prompt: `Use animation preset "${name}" from DESIGN.md: ${desc}. Apply to transition-duration and transition-timing-function.`,
1217
- html: `<div style="font-family:sans-serif;">
1229
+ presentation: {
1230
+ type: "html-fragment",
1231
+ html: `<div style="font-family:sans-serif;">
1218
1232
  <style>
1219
1233
  @scope {
1220
1234
  .anim-preview { width:40px;height:40px;border-radius:6px;background:#8b5cf6;transition:transform ${esc(dur)} ${esc(ease)};cursor:pointer; }
@@ -1230,6 +1244,7 @@ function buildAnimationItems(tokens, category) {
1230
1244
  </div>
1231
1245
  </div>
1232
1246
  </div>`
1247
+ }
1233
1248
  };
1234
1249
  });
1235
1250
  }
@@ -1264,10 +1279,13 @@ function buildComponentItems(tokens, category) {
1264
1279
  category,
1265
1280
  subCategory: "Components",
1266
1281
  prompt: `Apply the "${name}" component spec from DESIGN.md. Required styles: ${props}. The design-system validator will flag mismatches.`,
1267
- html: `<div style="font-family:sans-serif;">
1282
+ presentation: {
1283
+ type: "html-fragment",
1284
+ html: `<div style="font-family:sans-serif;">
1268
1285
  <div style="${previewStyles.join(";")};display:inline-block;font-size:13px;min-width:80px;text-align:center;">${esc(name)}</div>
1269
1286
  <div style="font-size:10px;color:#888;margin-top:6px;font-family:monospace;">${esc(props)}</div>
1270
1287
  </div>`
1288
+ }
1271
1289
  };
1272
1290
  });
1273
1291
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jay-framework/design-system-validator",
3
- "version": "0.22.0",
3
+ "version": "0.22.2",
4
4
  "type": "module",
5
5
  "description": "Design system validation plugin for Jay Framework — validates jay-html CSS against DESIGN.md tokens",
6
6
  "license": "Apache-2.0",
@@ -26,15 +26,15 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@csstools/selector-specificity": "^5.0.0",
29
- "@jay-framework/compiler-shared": "^0.22.0",
30
- "@jay-framework/stack-server-runtime": "^0.22.0",
29
+ "@jay-framework/compiler-shared": "^0.22.2",
30
+ "@jay-framework/stack-server-runtime": "^0.22.2",
31
31
  "js-yaml": "^4.1.0",
32
32
  "postcss": "^8.5.6",
33
33
  "postcss-selector-parser": "^7.1.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@jay-framework/dev-environment": "^0.22.0",
37
- "@jay-framework/jay-stack-cli": "^0.22.0",
36
+ "@jay-framework/dev-environment": "^0.22.2",
37
+ "@jay-framework/jay-stack-cli": "^0.22.2",
38
38
  "@types/js-yaml": "^4.0.9",
39
39
  "@types/node": "^22.15.21",
40
40
  "node-html-parser": "^6.1.0",