{"_id":"@dugyu/luna-reactlynx","_rev":"6-e371640dfef7beb9758470cfb25c5370","name":"@dugyu/luna-reactlynx","dist-tags":{"oidc-bootstrap":"0.0.0-oidc-bootstrap.0","latest":"0.5.0"},"versions":{"0.0.0-oidc-bootstrap.0":{"name":"@dugyu/luna-reactlynx","version":"0.0.0-oidc-bootstrap.0","author":{"name":"The Lynx Authors"},"license":"Apache-2.0","_id":"@dugyu/luna-reactlynx@0.0.0-oidc-bootstrap.0","maintainers":[{"name":"sevensever","email":"yxylyzy@gmail.com"}],"dist":{"shasum":"a6673580c8f70923e28ebf55ce64bb0af2bba11a","tarball":"https://registry.npmjs.org/@dugyu/luna-reactlynx/-/luna-reactlynx-0.0.0-oidc-bootstrap.0.tgz","fileCount":3,"integrity":"sha512-BBQM8yTgR5Yxz5s6B1aoUlnFyX3Z7k437E4guGyb1k6l5R1MUbzXKYEMVcJjivmlz+FD7+3fW37hSJDblwGE/g==","signatures":[{"sig":"MEUCIQDMci+ADIudE6zJVIiIrHDCFwS2tSkd3Zg6DV6mhOS9XQIgTg/wH+bBm8ia10jIYydwgUl0Bsd8Qq1UuhJJB0/vXaQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12071},"gitHead":"0275a93df669ff61cc54711370f584d3c26429a0","_npmUser":{"name":"sevensever","email":"yxylyzy@gmail.com"},"_npmVersion":"11.8.0","description":"Reactlynx theming primitives (provider/hooks) and optional runtime wrappers for the L.U.N.A project (OIDC bootstrap placeholder)","directories":{},"_nodeVersion":"24.13.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/luna-reactlynx_0.0.0-oidc-bootstrap.0_1772550484310_0.8803244037451738","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@dugyu/luna-reactlynx","version":"0.2.0","keywords":["luna","theme","theming","reactlynx","lynx-ui","react","lynx"],"author":{"name":"The Lynx Authors"},"license":"Apache-2.0","_id":"@dugyu/luna-reactlynx@0.2.0","maintainers":[{"name":"sevensever","email":"dugy.guangyu@gmail.com"}],"homepage":"https://github.com/Dugyu/lunarium/tree/main/packages/reactlynx#readme","bugs":{"url":"https://github.com/Dugyu/lunarium/issues"},"dist":{"shasum":"7daff535fbb39d8221c79cb95e5d8bcc3334cc7b","tarball":"https://registry.npmjs.org/@dugyu/luna-reactlynx/-/luna-reactlynx-0.2.0.tgz","fileCount":57,"integrity":"sha512-lg0JmfuzqA58gwSpXv2jXlH/HjAWeVODKWaZlyQLHMFtBR9+RmNze0OyiZfpgcRoMgh7FqxNn0bCk4o8MB8e5g==","signatures":[{"sig":"MEYCIQCMiBJ1EEMj2mO9B9gLgG7Ej+kBHGVV9V6tz20aMDJ6dAIhAO8euyM1pAkrXfvn8l7OpioLEXyeDc8w48XG7zmwGNSB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dugyu%2fluna-reactlynx@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":88456},"type":"module","_from":"file:dugyu-luna-reactlynx-0.2.0.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.jsx"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.jsx"},"./theming":{"types":"./dist/theme/index.d.ts","import":"./dist/theme/index.jsx"},"./runtime/global-props":{"types":"./dist/runtime/global-props.d.ts","import":"./dist/runtime/global-props.jsx"}},"scripts":{"build":"rslib build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be57e2a3-b0d0-4897-9c3a-6b82124414dd"}},"_resolved":"/tmp/7fb09eefd344dd219ab2161074c77f01/dugyu-luna-reactlynx-0.2.0.tgz","_integrity":"sha512-lg0JmfuzqA58gwSpXv2jXlH/HjAWeVODKWaZlyQLHMFtBR9+RmNze0OyiZfpgcRoMgh7FqxNn0bCk4o8MB8e5g==","repository":{"url":"git+https://github.com/Dugyu/lunarium.git","type":"git","directory":"packages/reactlynx"},"_npmVersion":"11.9.0","description":"Reactlynx theming primitives (provider/hooks) and optional runtime wrappers for the L.U.N.A project","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","dependencies":{"@dugyu/luna-core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.2","@rslib/core":"0.17.1","@types/react":"18.3.24","@lynx-js/react":"0.114.4","@lynx-js/types":"3.4.11","@rsbuild/plugin-react":"1.4.2","@typescript/native-preview":"7.0.0-dev.20251103.1"},"peerDependencies":{"@types/react":"^18","@lynx-js/react":">=0.100.0","@lynx-js/types":"*"},"_npmOperationalInternal":{"tmp":"tmp/luna-reactlynx_0.2.0_1775045402619_0.9469761975876025","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@dugyu/luna-reactlynx","version":"0.3.0","keywords":["luna","theme","theming","reactlynx","lynx-ui","react","lynx"],"author":{"name":"The Lynx Authors"},"license":"Apache-2.0","_id":"@dugyu/luna-reactlynx@0.3.0","maintainers":[{"name":"sevensever","email":"dugy.guangyu@gmail.com"}],"homepage":"https://github.com/Dugyu/lunarium/tree/main/packages/reactlynx#readme","bugs":{"url":"https://github.com/Dugyu/lunarium/issues"},"dist":{"shasum":"2e09bee68a8cbcfd6817afec7a75ca897d77dbdc","tarball":"https://registry.npmjs.org/@dugyu/luna-reactlynx/-/luna-reactlynx-0.3.0.tgz","fileCount":58,"integrity":"sha512-lthLq4BRBG32KYDBfq+kMx0N9KiI9TU5bYZeWyWUeSX6M6ywTVqUj21UHeoxq+JOLu7yhYPJds7XZxNxrPoIuw==","signatures":[{"sig":"MEYCIQCAcZ2yJ+a1PXbfR1+NX+1fO8aZzR5OIOHjpSazgZNRMAIhANA9R6v9QKkGnkDPUe2sQpFJKv/d0rah5e4azxBEJIUX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dugyu%2fluna-reactlynx@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":89321},"main":"./dist/index.jsx","type":"module","_from":"file:dugyu-luna-reactlynx-0.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.jsx","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.jsx"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.jsx"},"./theming":{"types":"./dist/theming/index.d.ts","import":"./dist/theming/index.jsx"},"./runtime/global-props":{"types":"./dist/runtime/global-props.d.ts","import":"./dist/runtime/global-props.jsx"}},"scripts":{"build":"rslib build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be57e2a3-b0d0-4897-9c3a-6b82124414dd"}},"_resolved":"/tmp/663d739ec2a559faa6684dddbf43c0ed/dugyu-luna-reactlynx-0.3.0.tgz","_integrity":"sha512-lthLq4BRBG32KYDBfq+kMx0N9KiI9TU5bYZeWyWUeSX6M6ywTVqUj21UHeoxq+JOLu7yhYPJds7XZxNxrPoIuw==","repository":{"url":"git+https://github.com/Dugyu/lunarium.git","type":"git","directory":"packages/reactlynx"},"_npmVersion":"11.9.0","description":"Reactlynx theming primitives (provider/hooks) and optional runtime wrappers for the L.U.N.A project","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","dependencies":{"@dugyu/luna-core":"0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.2","@rslib/core":"0.17.1","@types/react":"18.3.24","@lynx-js/react":"0.114.4","@lynx-js/types":"3.4.11","@rsbuild/plugin-react":"1.4.2","@typescript/native-preview":"7.0.0-dev.20251103.1"},"peerDependencies":{"@types/react":"^18","@lynx-js/react":">=0.100.0","@lynx-js/types":"*"},"_npmOperationalInternal":{"tmp":"tmp/luna-reactlynx_0.3.0_1775114653668_0.4182888531252853","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@dugyu/luna-reactlynx","version":"0.3.1","keywords":["luna","theme","theming","reactlynx","lynx-ui","react","lynx"],"author":{"name":"The Lynx Authors"},"license":"Apache-2.0","_id":"@dugyu/luna-reactlynx@0.3.1","maintainers":[{"name":"sevensever","email":"dugy.guangyu@gmail.com"}],"homepage":"https://github.com/Dugyu/lunarium/tree/main/packages/reactlynx#readme","bugs":{"url":"https://github.com/Dugyu/lunarium/issues"},"dist":{"shasum":"88084228ea78d122a05cf0fbec4f73b8200e8c56","tarball":"https://registry.npmjs.org/@dugyu/luna-reactlynx/-/luna-reactlynx-0.3.1.tgz","fileCount":58,"integrity":"sha512-+Scqzz7escKWCPxap15x7OYUmo+15Hn3IKX3AYC0He8y6Bs5ePpKFlqIk1HX2Xu7HSj4uyU4Q1PhCVUojI9Ovg==","signatures":[{"sig":"MEUCIQDiL2zwMI4wB3Mkc8/PD1NrRC3hHSX098A1Pu4dzl2Q8QIgD6JTuXVYGwsaetL58q+ezJjq4psiZ7ZR43BdW/RUCr0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dugyu%2fluna-reactlynx@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":89629},"main":"./dist/index.jsx","type":"module","_from":"file:dugyu-luna-reactlynx-0.3.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.jsx","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.jsx"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.jsx"},"./theming":{"types":"./dist/theming/index.d.ts","import":"./dist/theming/index.jsx"},"./runtime/global-props":{"types":"./dist/runtime/global-props.d.ts","import":"./dist/runtime/global-props.jsx"}},"scripts":{"build":"rslib build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be57e2a3-b0d0-4897-9c3a-6b82124414dd"}},"_resolved":"/tmp/0d55039e7a86a80300752a24983a669b/dugyu-luna-reactlynx-0.3.1.tgz","_integrity":"sha512-+Scqzz7escKWCPxap15x7OYUmo+15Hn3IKX3AYC0He8y6Bs5ePpKFlqIk1HX2Xu7HSj4uyU4Q1PhCVUojI9Ovg==","repository":{"url":"git+https://github.com/Dugyu/lunarium.git","type":"git","directory":"packages/reactlynx"},"_npmVersion":"11.9.0","description":"Reactlynx theming primitives (provider/hooks) and optional runtime wrappers for the L.U.N.A project","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","dependencies":{"@dugyu/luna-core":"0.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.2","@rslib/core":"0.17.1","@types/react":"18.3.24","@lynx-js/react":"0.114.4","@lynx-js/types":"3.4.11","@rsbuild/plugin-react":"1.4.2","@typescript/native-preview":"7.0.0-dev.20251103.1"},"peerDependencies":{"@types/react":"^18","@lynx-js/react":">=0.100.0","@lynx-js/types":"*"},"_npmOperationalInternal":{"tmp":"tmp/luna-reactlynx_0.3.1_1775140464863_0.6244488872437581","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@dugyu/luna-reactlynx","version":"0.4.0","keywords":["luna","theme","theming","reactlynx","lynx-ui","react","lynx"],"author":{"name":"The Lynx Authors"},"license":"Apache-2.0","_id":"@dugyu/luna-reactlynx@0.4.0","maintainers":[{"name":"sevensever","email":"dugy.guangyu@gmail.com"}],"homepage":"https://github.com/Dugyu/lunarium/tree/main/packages/reactlynx#readme","bugs":{"url":"https://github.com/Dugyu/lunarium/issues"},"dist":{"shasum":"1ca633368ed046d4add57c19bc3b685c0f2fa13a","tarball":"https://registry.npmjs.org/@dugyu/luna-reactlynx/-/luna-reactlynx-0.4.0.tgz","fileCount":58,"integrity":"sha512-xGFPl5+PsFBQJM0dl+MuXsDF6Y0gdsq4CQ33DXuE8It7rt5xXIOlj9NUKCHsCG/1Pi/WAzms5j1B5SbHT5qZJg==","signatures":[{"sig":"MEUCIQCv/LGj3Mt8ntffv7IJF5hmHtLVCoVXEbdrYkN3YqAZXgIgeI0eE9Js0mtZKcwL6F2aXzWi4rQpVf7fwBrTQ02fgiM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dugyu%2fluna-reactlynx@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":89478},"main":"./dist/index.jsx","type":"module","_from":"file:dugyu-luna-reactlynx-0.4.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.jsx","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.jsx"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.jsx"},"./theming":{"types":"./dist/theming/index.d.ts","import":"./dist/theming/index.jsx"},"./runtime/global-props":{"types":"./dist/runtime/global-props.d.ts","import":"./dist/runtime/global-props.jsx"}},"scripts":{"build":"rslib build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be57e2a3-b0d0-4897-9c3a-6b82124414dd"}},"_resolved":"/tmp/088dd970b9fe618bc7d16e6b85dca796/dugyu-luna-reactlynx-0.4.0.tgz","_integrity":"sha512-xGFPl5+PsFBQJM0dl+MuXsDF6Y0gdsq4CQ33DXuE8It7rt5xXIOlj9NUKCHsCG/1Pi/WAzms5j1B5SbHT5qZJg==","repository":{"url":"git+https://github.com/Dugyu/lunarium.git","type":"git","directory":"packages/reactlynx"},"_npmVersion":"11.11.0","description":"Reactlynx theming primitives (provider/hooks) and optional runtime wrappers for the L.U.N.A project","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","dependencies":{"@dugyu/luna-core":"0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.2","@rslib/core":"0.21.1","@types/react":"18.3.24","@lynx-js/react":"0.120.0","@lynx-js/types":"3.7.0","@rsbuild/plugin-react":"1.4.6","@typescript/native-preview":"7.0.0-dev.20260501.1"},"peerDependencies":{"@types/react":"^18","@lynx-js/react":">=0.100.0","@lynx-js/types":"*"},"_npmOperationalInternal":{"tmp":"tmp/luna-reactlynx_0.4.0_1778078613304_0.36125294657469187","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@dugyu/luna-reactlynx","version":"0.5.0","description":"Reactlynx theming primitives (provider/hooks) and optional runtime wrappers for the L.U.N.A project","keywords":["luna","theme","theming","reactlynx","lynx-ui","react","lynx"],"homepage":"https://github.com/Dugyu/lunarium/tree/main/packages/reactlynx#readme","repository":{"type":"git","url":"git+https://github.com/Dugyu/lunarium.git","directory":"packages/reactlynx"},"license":"Apache-2.0","author":{"name":"The Lynx Authors"},"sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.jsx"},"./theming":{"types":"./dist/theming/index.d.ts","import":"./dist/theming/index.jsx"},"./runtime":{"types":"./dist/runtime/index.d.ts","import":"./dist/runtime/index.jsx"},"./runtime/global-props":{"types":"./dist/runtime/global-props.d.ts","import":"./dist/runtime/global-props.jsx"}},"main":"./dist/index.jsx","module":"./dist/index.jsx","types":"./dist/index.d.ts","dependencies":{"@dugyu/luna-core":"0.5.0"},"devDependencies":{"@lynx-js/react":"0.120.0","@lynx-js/types":"3.7.0","@rsbuild/plugin-react":"1.4.6","@rslib/core":"0.21.1","@types/react":"18.3.24","@typescript/native-preview":"7.0.0-dev.20260501.1","typescript":"5.9.2"},"peerDependencies":{"@lynx-js/react":">=0.100.0","@lynx-js/types":"*","@types/react":"^18"},"publishConfig":{"access":"public"},"scripts":{"build":"rslib build"},"_id":"@dugyu/luna-reactlynx@0.5.0","bugs":{"url":"https://github.com/Dugyu/lunarium/issues"},"_integrity":"sha512-LhOCPjjJXckPN6i0d5Bk/LF+twB7YDAfR/H3UjKluRzwMFpUVGkMAxu5YoRXHHDwSHFqxDEWluSO3sJrVvNYzA==","_resolved":"/tmp/bf87550ddaa2d44e72080dc223de09ce/dugyu-luna-reactlynx-0.5.0.tgz","_from":"file:dugyu-luna-reactlynx-0.5.0.tgz","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-LhOCPjjJXckPN6i0d5Bk/LF+twB7YDAfR/H3UjKluRzwMFpUVGkMAxu5YoRXHHDwSHFqxDEWluSO3sJrVvNYzA==","shasum":"8ac0958ce7a72ef4c475e0a623f8c97160349650","tarball":"https://registry.npmjs.org/@dugyu/luna-reactlynx/-/luna-reactlynx-0.5.0.tgz","fileCount":58,"unpackedSize":85840,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dugyu%2fluna-reactlynx@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDvU9JrDRo5uauT8wuCTvXj7D+BlJz2p0iHY4ylqssMaAiEAxwyqF/rDoykNyMjW8JSXGdq5VoYrCYjl88TAoSE3OIE="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be57e2a3-b0d0-4897-9c3a-6b82124414dd"}},"directories":{},"maintainers":[{"name":"sevensever","email":"dugy.guangyu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/luna-reactlynx_0.5.0_1779032388859_0.8869671558359205"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-03T15:08:04.208Z","modified":"2026-05-17T15:39:49.273Z","0.0.0-oidc-bootstrap.0":"2026-03-03T15:08:04.479Z","0.2.0":"2026-04-01T12:10:02.764Z","0.3.0":"2026-04-02T07:24:13.803Z","0.3.1":"2026-04-02T14:34:25.024Z","0.4.0":"2026-05-06T14:43:33.519Z","0.5.0":"2026-05-17T15:39:48.995Z"},"bugs":{"url":"https://github.com/Dugyu/lunarium/issues"},"author":{"name":"The Lynx Authors"},"license":"Apache-2.0","homepage":"https://github.com/Dugyu/lunarium/tree/main/packages/reactlynx#readme","keywords":["luna","theme","theming","reactlynx","lynx-ui","react","lynx"],"repository":{"type":"git","url":"git+https://github.com/Dugyu/lunarium.git","directory":"packages/reactlynx"},"description":"Reactlynx theming primitives (provider/hooks) and optional runtime wrappers for the L.U.N.A project","maintainers":[{"name":"sevensever","email":"dugy.guangyu@gmail.com"}],"readme":"# luna-reactlynx\n\n> ⚠️ This package is under active development. APIs may change without notice.\n\nLUNA theming utilities for ReactLynx — theme context, provider, color consumption hooks, and an optional runtime shell component.\n\nTwo integration styles are supported:\n\n- **JS Tokens** — use `createLunaTheme()` + `LunaThemeProvider` + `useLunaColor(s)` to consume theme values from JS. Hooks can return either raw values or `var(...)` references, but returning `var(...)` does not create CSS variables by itself.\n- **CSS Variables** — use theme classes from `@dugyu/luna-styles` (e.g. `lunaris-light`) with `LunaTheme` (or your own root `className`) to scope real CSS variables. Components consume via `var(--xxx)` or Tailwind semantic utilities.\n\n## Installation\n\n**JS Tokens style:**\n\n```bash\npnpm add @dugyu/luna-reactlynx @dugyu/luna-tokens\n```\n\n**CSS Variables style:**\n\n```bash\npnpm add @dugyu/luna-reactlynx @dugyu/luna-styles\n```\n\n## Entry points\n\n| Entry                                        | Contents                                                |\n| -------------------------------------------- | ------------------------------------------------------- |\n| `@dugyu/luna-reactlynx`                      | Provider, hooks, `createLunaTheme`, type re-exports     |\n| `@dugyu/luna-reactlynx/theming`              | Theming-only subpath                                    |\n| `@dugyu/luna-reactlynx/runtime`              | Runtime shell (`LunaTheme`)                             |\n| `@dugyu/luna-reactlynx/runtime/global-props` | TS type augmentation for `lynx.__globalProps.lunaTheme` |\n\n## Usage: JS Tokens\n\n`createLunaTheme(tokens)` converts a token input into a `LunaRuntimeTheme`. Pass one or more themes to `LunaThemeProvider` and consume colors with hooks. Use this style when you need theme values accessible in JS — for animation, computation, or non-CSS color usage.\n\nIf you want to switch themes by toggling a class, use the CSS Variables style section. If you want a theme object in JS (animation, computations, non-CSS color usage), use JS Tokens.\n\n```tsx\nimport {\n  LunaThemeProvider,\n  createLunaTheme,\n  useLunaColors,\n} from '@dugyu/luna-reactlynx';\nimport { lunarisDarkTokens, lunarisLightTokens } from '@dugyu/luna-tokens';\n\nconst themes = [\n  createLunaTheme(lunarisLightTokens),\n  createLunaTheme(lunarisDarkTokens),\n];\n\nexport function App() {\n  return (\n    <LunaThemeProvider\n      themes={themes}\n      themeKey={lynx.__globalProps.lunaTheme ?? 'lunaris-light'}\n    >\n      <Demo />\n    </LunaThemeProvider>\n  );\n}\n\nfunction Demo() {\n  const colors = useLunaColors();\n  return <view style={{ backgroundColor: colors.canvas }} />;\n}\n```\n\n**Single theme:** pass `theme` instead of `themes`.\n\n```tsx\n<LunaThemeProvider theme={createLunaTheme(lunarisLightTokens)}>\n  {children}\n</LunaThemeProvider>;\n```\n\n### Color consumption format\n\n`theme.colors` always stores canonical raw values (e.g. `#ff1a6e`, `rgba(...)`). The `consumptionFormat` on the runtime theme controls what hooks return by default, and hooks can also override it per call.\n\n| What you want     | Hook options            | Example output   |\n| ----------------- | ----------------------- | ---------------- |\n| Raw value         | `{ format: 'value' }`   | `#ff1a6e`        |\n| CSS var reference | `{ format: 'var-ref' }` | `var(--primary)` |\n| CSS var name      | `{ as: 'var-name' }`    | `--primary`      |\n\nSupported output shapes:\n\n- `format` chooses the _consumption result_ (`'value'` vs `'var-ref'`) when `as: 'result'` (default).\n- `as: 'var-name'` returns the bare CSS custom property name `--xxx` rather than a complete CSS value, useful for building expressions like `var(--xxx, fallback)` or `calc(...)`.\n\nExample:\n\n```tsx\nimport { useLunaColor } from '@dugyu/luna-reactlynx';\n\nconst getValue = useLunaColor({ format: 'value' });\nconst getVarRef = useLunaColor({ format: 'var-ref' });\nconst getVarName = useLunaColor({ as: 'var-name' });\n\ngetValue('primary'); // '#ff1a6e' (values-backed theme only)\ngetVarRef('primary'); // 'var(--primary)'\ngetVarName('primary'); // '--primary'\n```\n\n#### CSS var prefix\n\nIf your CSS variables are emitted with a prefix (e.g. `--luna-primary`), set `cssVarPrefix` either when creating the runtime theme (default for all hooks) or when consuming:\n\n```tsx\nimport {\n  LunaThemeProvider,\n  createLunaTheme,\n  useLunaColor,\n} from '@dugyu/luna-reactlynx';\nimport { lunarisLightTokens } from '@dugyu/luna-tokens';\n\nconst theme = createLunaTheme(lunarisLightTokens, {\n  consumptionFormat: 'var-ref',\n  cssVarPrefix: 'luna',\n});\n\n<LunaThemeProvider theme={theme}>\n  <Demo />\n</LunaThemeProvider>;\n\nfunction Demo() {\n  const getColor = useLunaColor();\n  getColor('primary'); // 'var(--luna-primary)'\n\n  const getUnprefixed = useLunaColor({ cssVarPrefix: '' });\n  getUnprefixed('primary'); // 'var(--primary)'\n}\n```\n\n> If you pass a meta-only theme input (no concrete values), only `consumptionFormat: 'var-ref'` is valid — `createLunaTheme()` will throw otherwise.\n\n## Usage: CSS Variables\n\nImport the LUNA stylesheet globally, then apply a theme class (e.g., `lunaris-light`) to scope variables under your app root. `LunaTheme` is an optional helper that reads the active theme key and attaches the resolved theme class to the root node.\n\nIf you prefer to manage the class yourself, you can skip `LunaTheme` entirely:\n\n```tsx\nimport '@dugyu/luna-styles/index.css';\nimport './app.css';\n\nexport function App() {\n  return (\n    <page className='lunaris-light'>\n      <view className='app' />\n    </page>\n  );\n}\n```\n\n> Note: To use `var(--xxx)` in inline `style={{ ... }}`, you need Lynx SDK version 3.6 or higher. For Lynx SDK versions below 3.6, use CSS variables through Tailwind utilities or with a stylesheet (Vanilla CSS), and apply theme classes directly on elements instead of using inline style.\n\n### Inline style (Lynx SDK >= 3.6)\n\n```tsx\nimport { LunaTheme } from '@dugyu/luna-reactlynx/runtime';\nimport '@dugyu/luna-styles/index.css';\n\nexport function App() {\n  return (\n    <LunaTheme>\n      <view style={{ backgroundColor: 'var(--canvas)' }} />\n    </LunaTheme>\n  );\n}\n```\n\n`LunaTheme` resolves the active theme key in this order:\n\n1. The explicit `themeKey` prop\n2. `lynx.__globalProps.lunaTheme`\n3. The built-in default\n\n**Optional:** for typed `lynx.__globalProps.lunaTheme`, import the augmentation once at your app entry:\n\n```ts\nimport '@dugyu/luna-reactlynx/runtime/global-props';\n```\n\n### Tailwind (Lynx SDK < 3.6 friendly)\n\nIf you use Tailwind, pair `@dugyu/luna-styles` (variables) with `@dugyu/luna-tailwind` (utilities). Then you can consume colors via semantic utilities like `bg-canvas` / `text-content` without relying on inline `var(...)`.\n\n```tsx\nimport { LunaTheme } from '@dugyu/luna-reactlynx/runtime';\nimport '@dugyu/luna-styles/index.css';\n\nexport function App() {\n  return (\n    <LunaTheme>\n      <view className='bg-canvas'>\n        <text className='text-content'>Hello</text>\n      </view>\n    </LunaTheme>\n  );\n}\n```\n\n### Vanilla CSS class (Lynx SDK < 3.6 friendly)\n\nConsume `var(--xxx)` in a stylesheet, then reference it by `className`:\n\n```css\n.app {\n  background-color: var(--canvas);\n  color: var(--content);\n}\n```\n\n```tsx\nimport { LunaTheme } from '@dugyu/luna-reactlynx/runtime';\nimport '@dugyu/luna-styles/index.css';\nimport './app.css';\n\nexport function App() {\n  return (\n    <LunaTheme>\n      <view className='app' />\n    </LunaTheme>\n  );\n}\n```\n\n## How to understand `LunaThemeProvider` vs `LunaTheme`\n\nThey are orthogonal and can be used independently:\n\n- `LunaTheme` (runtime shell): only toggles the theme class name on your root node, so the CSS variables from `@dugyu/luna-styles` become active in that subtree.\n- `LunaThemeProvider` (theming context): provides a resolved theme object to hooks like `useLunaColor(s)`. It does not inject any CSS variables into the runtime.\n\nIn other words, `LunaTheme` is a convenience for applying the theme class; if you already manage the root class yourself, you do not need it.\n\n## Which style to use\n\n|                                                        | JS Tokens        | CSS Variables                     |\n| ------------------------------------------------------ | ---------------- | --------------------------------- |\n| Color consumption                                      | Raw values in JS | `var(--xxx)` / Tailwind utilities |\n| Already using `@dugyu/luna-styles`                     | —                | ✓                                 |\n| Need theme object in JS (e.g. animation, inline style) | ✓                | —                                 |\n\n## LUNA Packages\n\n- `@dugyu/luna-tokens` — source of truth for token values\n- `@dugyu/luna-core` — token and theme type definitions\n- `@dugyu/luna-styles` — CSS variables output\n- `@dugyu/luna-tailwind` — Tailwind utilities output\n- `@dugyu/luna-reactlynx` — ReactLynx runtime integration (this package)\n","readmeFilename":"README.md"}