/** * Flux theme adapter. * * Walks a JSON token pack (``catalog/flux/tokens/flux-light.json`` etc.) * and flattens it into CSS custom properties under the ``--flux-`` prefix. * * Key conventions: * - Dotted paths become ``-``-joined segments. * - Underscores become ``_`` (e.g. ``space.0_5`` → ``--flux-space-0_5``). * Underscore preservation matches the token file keys; renderer CSS * uses the same keys. * - ``$meta`` entries are skipped. * - Number values are emitted as raw numbers (useful for font-weight, * line-height, z-index). * * Exports: * - ``renderTokenPack(pack)`` — produces a CSS string. * - ``useTheme(packId, pack)`` — React hook that injects a ``