@cssdoc/spec 0.3.3 → 0.4.1

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/index.mjs CHANGED
@@ -118,6 +118,12 @@ const CSSDOC_TAGS = [
118
118
  allowMultiple: true,
119
119
  argument: "part-name"
120
120
  },
121
+ {
122
+ name: "tokens",
123
+ kind: "block",
124
+ allowMultiple: true,
125
+ argument: "custom-property"
126
+ },
121
127
  {
122
128
  name: "function",
123
129
  kind: "block",
@@ -179,6 +185,20 @@ const CSSDOC_TAGS = [
179
185
  name: "demo",
180
186
  kind: "block"
181
187
  },
188
+ {
189
+ name: "usage",
190
+ kind: "block"
191
+ },
192
+ {
193
+ name: "compat",
194
+ kind: "block",
195
+ allowMultiple: true
196
+ },
197
+ {
198
+ name: "related",
199
+ kind: "block",
200
+ allowMultiple: true
201
+ },
182
202
  {
183
203
  name: "alpha",
184
204
  kind: "modifier"
@@ -273,6 +273,11 @@ CssPropertyTag :
273
273
  CssPropertyKeyword WhiteSpace CustomPropertyName Separator Description
274
274
  CssPropertyKeyword WhiteSpace CustomPropertyName SyntaxDescriptor Separator Description
275
275
 
276
+ // A design token the component consumes (`var(--name)`); the set is derived from the CSS, this adds prose.
277
+ TokensTag :
278
+ `@tokens` WhiteSpace CustomPropertyName
279
+ `@tokens` WhiteSpace CustomPropertyName Separator Description
280
+
276
281
  // A state name: a bare identifier (a custom `:state(name)` state) or a `:`-prefixed native
277
282
  // pseudo-class state, e.g. `:disabled`.
278
283
  StateName :
@@ -377,6 +382,21 @@ DemoSpec :
377
382
  DemoTag :
378
383
  `@demo` WhiteSpace DemoSpec
379
384
 
385
+ // --- Usage, compatibility & related ------------------------------------------------------------
386
+
387
+ // How to include the stylesheet / use the component.
388
+ UsageTag :
389
+ `@usage` WhiteSpace Description
390
+
391
+ // A browser-support or feature-compatibility note.
392
+ CompatTag :
393
+ `@compat` WhiteSpace Description
394
+
395
+ // A related component cross-reference, named by its record name.
396
+ RelatedTag :
397
+ `@related` WhiteSpace RecordName
398
+ `@related` WhiteSpace RecordName Separator Description
399
+
380
400
  // --- Modifier (flag) tags: release stage / traits; presence means true ------------------------
381
401
 
382
402
  ModifierFlagTag :
@@ -407,6 +427,7 @@ BlockTag :
407
427
  PartTag
408
428
  CssPartTag
409
429
  CssPropertyTag
430
+ TokensTag
410
431
  CssStateTag
411
432
  CssFunctionTag
412
433
  KeyframesTag
@@ -419,6 +440,9 @@ BlockTag :
419
440
  StructureTag
420
441
  ExampleTag
421
442
  DemoTag
443
+ UsageTag
444
+ CompatTag
445
+ RelatedTag
422
446
  DeprecatedTag
423
447
  SeeTag
424
448
  SinceTag
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cssdoc/spec",
3
- "version": "0.3.3",
3
+ "version": "0.4.1",
4
4
  "description": "The canonical cssdoc spec: the tag vocabulary and the formal grammar (CssDoc.grammarkdown), the single source of truth shared by the parser and every syntax grammar. Zero runtime dependencies.",
5
5
  "keywords": [
6
6
  "cssdoc",