# The interop example that actually demonstrates DSDS's central claim about
# tokens — that an entry points at a real DTCG file rather than restating
# it — against a DTCG file with the features a real token set actually has:
# group-level `$type` inheritance, an alias value (`{color.palette.blue-500}`),
# and a `$extensions` payload from a design tool. color-action-primary.dsds.yaml
# (this directory's other token example) is the simple case, one flat token
# with no aliasing; this is the harder one.
#
# 0.20.0 has no `token-group`/nested-children shape (that model flattened to
# top-level entries — see the CHANGELOG's 0.20.0 entry), so the alias
# relationship nested-color.tokens.json's own `$value` expresses structurally
# is restated here as an explicit `depends-on` ref between two flat token
# entries instead of a parent/child tree.
schemaVersion: "0.20.0"

name: Nested Color Tokens

entries:
  - id: color.palette.blue-500
    kind: token
    name: Blue 500
    description: A primitive blue value in the palette scale. No usage meaning of its own — semantic tokens like color.action.primary alias it.
    tokenType: color
    source: ./nested-color.tokens.json

  - id: color.palette.blue-600
    kind: token
    name: Blue 600
    description: A primitive blue value in the palette scale, one step darker than blue-500. No usage meaning of its own.
    tokenType: color
    source: ./nested-color.tokens.json

  - id: color.action.primary
    kind: token
    name: Action Primary
    description: Background for the single primary action on a surface. Its value is a DTCG alias into the palette (`{color.palette.blue-500}`) — the primitive and the semantic meaning live in two different places on purpose, so the palette can be re-themed without touching what "primary action" means.
    tokenType: color
    source: ./nested-color.tokens.json
    refs:
      - to: color.palette.blue-500
        rel: depends-on
        note: Resolves its value from this primitive via the DTCG file's own alias syntax, not a separate DSDS-level indirection.
    sections:
      - kind: guidelines
        for: all
        items:
          - statement: Use for at most one action per surface — two competing primary actions split the user's attention and dilute the visual hierarchy the color exists to create.
            level: should

  - id: color.action.primary-hover
    kind: token
    name: Action Primary Hover
    description: Hover state for the primary action background.
    tokenType: color
    source: ./nested-color.tokens.json
    refs:
      - to: color.palette.blue-600
        rel: depends-on
        note: Resolves its value from this primitive via the DTCG file's own alias syntax.
