@adobe/design-system-registry 1.1.0 → 1.2.0

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.
@@ -20,6 +20,13 @@ import {
20
20
  scaleValues,
21
21
  categories,
22
22
  platforms,
23
+ tokenObjects,
24
+ structures,
25
+ substructures,
26
+ orientations,
27
+ positions,
28
+ densities,
29
+ shapes,
23
30
  getValues,
24
31
  findValue,
25
32
  hasValue,
@@ -226,6 +233,13 @@ test("sizes includes common t-shirt sizes", (t) => {
226
233
  t.true(ids.includes("xl"));
227
234
  });
228
235
 
236
+ test("sizes does not contain numeric scale values", (t) => {
237
+ const ids = getValues(sizes);
238
+ t.false(ids.includes("50"));
239
+ t.false(ids.includes("100"));
240
+ t.false(ids.includes("200"));
241
+ });
242
+
229
243
  test("states includes common interaction states", (t) => {
230
244
  const ids = getValues(states);
231
245
  t.true(ids.includes("default"));
@@ -243,10 +257,27 @@ test("variants includes semantic variants", (t) => {
243
257
 
244
258
  test("anatomyTerms includes key anatomy parts", (t) => {
245
259
  const ids = getValues(anatomyTerms);
246
- t.true(ids.includes("edge"));
247
- t.true(ids.includes("visual"));
248
260
  t.true(ids.includes("text"));
249
261
  t.true(ids.includes("icon"));
262
+ t.true(ids.includes("label"));
263
+ t.true(ids.includes("handle"));
264
+ });
265
+
266
+ test("anatomyTerms does not include styling surfaces", (t) => {
267
+ const ids = getValues(anatomyTerms);
268
+ t.false(ids.includes("background"));
269
+ t.false(ids.includes("border"));
270
+ t.false(ids.includes("edge"));
271
+ t.false(ids.includes("visual"));
272
+ });
273
+
274
+ test("tokenObjects includes styling surfaces", (t) => {
275
+ const ids = getValues(tokenObjects);
276
+ t.true(ids.includes("background"));
277
+ t.true(ids.includes("border"));
278
+ t.true(ids.includes("edge"));
279
+ t.true(ids.includes("visual"));
280
+ t.true(ids.includes("content"));
250
281
  });
251
282
 
252
283
  test("components includes core components", (t) => {
@@ -278,3 +309,70 @@ test("scaleValues includes common numeric scales", (t) => {
278
309
  t.true(ids.includes("200"));
279
310
  t.true(ids.includes("300"));
280
311
  });
312
+
313
+ test("scaleValues includes extended numeric scales", (t) => {
314
+ const ids = getValues(scaleValues);
315
+ t.true(ids.includes("1100"));
316
+ t.true(ids.includes("1200"));
317
+ t.true(ids.includes("1500"));
318
+ });
319
+
320
+ // Taxonomy registry tests
321
+
322
+ const taxonomyRegistries = [
323
+ ["tokenObjects", tokenObjects],
324
+ ["structures", structures],
325
+ ["substructures", substructures],
326
+ ["orientations", orientations],
327
+ ["positions", positions],
328
+ ["densities", densities],
329
+ ["shapes", shapes],
330
+ ];
331
+
332
+ for (const [name, registry] of taxonomyRegistries) {
333
+ test(`${name} registry loads successfully`, (t) => {
334
+ t.truthy(registry);
335
+ t.truthy(registry.values);
336
+ t.true(Array.isArray(registry.values));
337
+ t.true(registry.values.length > 0);
338
+ });
339
+
340
+ test(`${name} registry has no duplicate IDs`, (t) => {
341
+ const ids = registry.values.map((v) => v.id);
342
+ const uniqueIds = new Set(ids);
343
+ t.is(ids.length, uniqueIds.size);
344
+ });
345
+
346
+ test(`all ${name} values have id and label`, (t) => {
347
+ registry.values.forEach((value) => {
348
+ t.truthy(value.id, `${name} value missing id`);
349
+ t.truthy(value.label, `${name} value ${value.id} missing label`);
350
+ });
351
+ });
352
+ }
353
+
354
+ test("structures includes base and container", (t) => {
355
+ const ids = getValues(structures);
356
+ t.true(ids.includes("base"));
357
+ t.true(ids.includes("container"));
358
+ });
359
+
360
+ test("orientations includes vertical and horizontal", (t) => {
361
+ const ids = getValues(orientations);
362
+ t.true(ids.includes("vertical"));
363
+ t.true(ids.includes("horizontal"));
364
+ });
365
+
366
+ test("positions includes directional terms", (t) => {
367
+ const ids = getValues(positions);
368
+ t.true(ids.includes("top"));
369
+ t.true(ids.includes("bottom"));
370
+ t.true(ids.includes("start"));
371
+ t.true(ids.includes("end"));
372
+ });
373
+
374
+ test("densities includes spacious and compact", (t) => {
375
+ const ids = getValues(densities);
376
+ t.true(ids.includes("spacious"));
377
+ t.true(ids.includes("compact"));
378
+ });