@oxyhq/bloom 0.35.8 → 0.37.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.
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.js +148 -0
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.web.js +166 -0
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.web.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/index.js +13 -0
- package/lib/commonjs/frosted-icon-button/index.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/index.web.js +13 -0
- package/lib/commonjs/frosted-icon-button/index.web.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/shared.js +112 -0
- package/lib/commonjs/frosted-icon-button/shared.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/types.js +6 -0
- package/lib/commonjs/frosted-icon-button/types.js.map +1 -0
- package/lib/commonjs/index.js +10 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +46 -37
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/theme/build-theme.js +31 -43
- package/lib/commonjs/theme/build-theme.js.map +1 -1
- package/lib/commonjs/theme/color-engine/cam16.js +161 -0
- package/lib/commonjs/theme/color-engine/cam16.js.map +1 -0
- package/lib/commonjs/theme/color-engine/color-role.js +183 -0
- package/lib/commonjs/theme/color-engine/color-role.js.map +1 -0
- package/lib/commonjs/theme/color-engine/color-roles.js +416 -0
- package/lib/commonjs/theme/color-engine/color-roles.js.map +1 -0
- package/lib/commonjs/theme/color-engine/color-utils.js +157 -0
- package/lib/commonjs/theme/color-engine/color-utils.js.map +1 -0
- package/lib/commonjs/theme/color-engine/contrast-curve.js +32 -0
- package/lib/commonjs/theme/color-engine/contrast-curve.js.map +1 -0
- package/lib/commonjs/theme/color-engine/contrast.js +70 -0
- package/lib/commonjs/theme/color-engine/contrast.js.map +1 -0
- package/lib/commonjs/theme/color-engine/dislike-analyzer.js +26 -0
- package/lib/commonjs/theme/color-engine/dislike-analyzer.js.map +1 -0
- package/lib/commonjs/theme/color-engine/dynamic-scheme.js +70 -0
- package/lib/commonjs/theme/color-engine/dynamic-scheme.js.map +1 -0
- package/lib/commonjs/theme/color-engine/hct-solver.js +236 -0
- package/lib/commonjs/theme/color-engine/hct-solver.js.map +1 -0
- package/lib/commonjs/theme/color-engine/hct.js +67 -0
- package/lib/commonjs/theme/color-engine/hct.js.map +1 -0
- package/lib/commonjs/theme/color-engine/index.js +173 -0
- package/lib/commonjs/theme/color-engine/index.js.map +1 -0
- package/lib/commonjs/theme/color-engine/lab-point-provider.js +32 -0
- package/lib/commonjs/theme/color-engine/lab-point-provider.js.map +1 -0
- package/lib/commonjs/theme/color-engine/math-utils.js +77 -0
- package/lib/commonjs/theme/color-engine/math-utils.js.map +1 -0
- package/lib/commonjs/theme/color-engine/quantizer-map.js +24 -0
- package/lib/commonjs/theme/color-engine/quantizer-map.js.map +1 -0
- package/lib/commonjs/theme/color-engine/quantizer-wu.js +266 -0
- package/lib/commonjs/theme/color-engine/quantizer-wu.js.map +1 -0
- package/lib/commonjs/theme/color-engine/scheme-variants.js +102 -0
- package/lib/commonjs/theme/color-engine/scheme-variants.js.map +1 -0
- package/lib/commonjs/theme/color-engine/score.js +80 -0
- package/lib/commonjs/theme/color-engine/score.js.map +1 -0
- package/lib/commonjs/theme/color-engine/seed-from-image.js +73 -0
- package/lib/commonjs/theme/color-engine/seed-from-image.js.map +1 -0
- package/lib/commonjs/theme/color-engine/tonal-palette.js +95 -0
- package/lib/commonjs/theme/color-engine/tonal-palette.js.map +1 -0
- package/lib/commonjs/theme/color-engine/tone-delta-pair.js +26 -0
- package/lib/commonjs/theme/color-engine/tone-delta-pair.js.map +1 -0
- package/lib/commonjs/theme/color-engine/variant.js +26 -0
- package/lib/commonjs/theme/color-engine/variant.js.map +1 -0
- package/lib/commonjs/theme/color-engine/viewing-conditions.js +61 -0
- package/lib/commonjs/theme/color-engine/viewing-conditions.js.map +1 -0
- package/lib/commonjs/theme/color-presets.js +44 -572
- package/lib/commonjs/theme/color-presets.js.map +1 -1
- package/lib/commonjs/theme/preset-vars.js +64 -47
- package/lib/commonjs/theme/preset-vars.js.map +1 -1
- package/lib/module/frosted-icon-button/FrostedIconButton.js +143 -0
- package/lib/module/frosted-icon-button/FrostedIconButton.js.map +1 -0
- package/lib/module/frosted-icon-button/FrostedIconButton.web.js +161 -0
- package/lib/module/frosted-icon-button/FrostedIconButton.web.js.map +1 -0
- package/lib/module/frosted-icon-button/index.js +4 -0
- package/lib/module/frosted-icon-button/index.js.map +1 -0
- package/lib/module/frosted-icon-button/index.web.js +11 -0
- package/lib/module/frosted-icon-button/index.web.js.map +1 -0
- package/lib/module/frosted-icon-button/shared.js +107 -0
- package/lib/module/frosted-icon-button/shared.js.map +1 -0
- package/lib/module/frosted-icon-button/types.js +4 -0
- package/lib/module/frosted-icon-button/types.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/theme/build-theme.js +32 -44
- package/lib/module/theme/build-theme.js.map +1 -1
- package/lib/module/theme/color-engine/cam16.js +155 -0
- package/lib/module/theme/color-engine/cam16.js.map +1 -0
- package/lib/module/theme/color-engine/color-role.js +177 -0
- package/lib/module/theme/color-engine/color-role.js.map +1 -0
- package/lib/module/theme/color-engine/color-roles.js +411 -0
- package/lib/module/theme/color-engine/color-roles.js.map +1 -0
- package/lib/module/theme/color-engine/color-utils.js +135 -0
- package/lib/module/theme/color-engine/color-utils.js.map +1 -0
- package/lib/module/theme/color-engine/contrast-curve.js +26 -0
- package/lib/module/theme/color-engine/contrast-curve.js.map +1 -0
- package/lib/module/theme/color-engine/contrast.js +61 -0
- package/lib/module/theme/color-engine/contrast.js.map +1 -0
- package/lib/module/theme/color-engine/dislike-analyzer.js +20 -0
- package/lib/module/theme/color-engine/dislike-analyzer.js.map +1 -0
- package/lib/module/theme/color-engine/dynamic-scheme.js +65 -0
- package/lib/module/theme/color-engine/dynamic-scheme.js.map +1 -0
- package/lib/module/theme/color-engine/hct-solver.js +231 -0
- package/lib/module/theme/color-engine/hct-solver.js.map +1 -0
- package/lib/module/theme/color-engine/hct.js +61 -0
- package/lib/module/theme/color-engine/hct.js.map +1 -0
- package/lib/module/theme/color-engine/index.js +57 -0
- package/lib/module/theme/color-engine/index.js.map +1 -0
- package/lib/module/theme/color-engine/lab-point-provider.js +25 -0
- package/lib/module/theme/color-engine/lab-point-provider.js.map +1 -0
- package/lib/module/theme/color-engine/math-utils.js +65 -0
- package/lib/module/theme/color-engine/math-utils.js.map +1 -0
- package/lib/module/theme/color-engine/quantizer-map.js +20 -0
- package/lib/module/theme/color-engine/quantizer-map.js.map +1 -0
- package/lib/module/theme/color-engine/quantizer-wu.js +261 -0
- package/lib/module/theme/color-engine/quantizer-wu.js.map +1 -0
- package/lib/module/theme/color-engine/scheme-variants.js +93 -0
- package/lib/module/theme/color-engine/scheme-variants.js.map +1 -0
- package/lib/module/theme/color-engine/score.js +75 -0
- package/lib/module/theme/color-engine/score.js.map +1 -0
- package/lib/module/theme/color-engine/seed-from-image.js +67 -0
- package/lib/module/theme/color-engine/seed-from-image.js.map +1 -0
- package/lib/module/theme/color-engine/tonal-palette.js +89 -0
- package/lib/module/theme/color-engine/tonal-palette.js.map +1 -0
- package/lib/module/theme/color-engine/tone-delta-pair.js +21 -0
- package/lib/module/theme/color-engine/tone-delta-pair.js.map +1 -0
- package/lib/module/theme/color-engine/variant.js +22 -0
- package/lib/module/theme/color-engine/variant.js.map +1 -0
- package/lib/module/theme/color-engine/viewing-conditions.js +55 -0
- package/lib/module/theme/color-engine/viewing-conditions.js.map +1 -0
- package/lib/module/theme/color-presets.js +44 -572
- package/lib/module/theme/color-presets.js.map +1 -1
- package/lib/module/theme/preset-vars.js +64 -46
- package/lib/module/theme/preset-vars.js.map +1 -1
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.d.ts +5 -0
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.web.d.ts +5 -0
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/index.d.ts +3 -0
- package/lib/typescript/commonjs/frosted-icon-button/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/index.web.d.ts +3 -0
- package/lib/typescript/commonjs/frosted-icon-button/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/shared.d.ts +60 -0
- package/lib/typescript/commonjs/frosted-icon-button/shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/types.d.ts +69 -0
- package/lib/typescript/commonjs/frosted-icon-button/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -0
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-engine/cam16.d.ts +26 -0
- package/lib/typescript/commonjs/theme/color-engine/cam16.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/color-role.d.ts +36 -0
- package/lib/typescript/commonjs/theme/color-engine/color-role.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/color-roles.d.ts +58 -0
- package/lib/typescript/commonjs/theme/color-engine/color-roles.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/color-utils.d.ts +32 -0
- package/lib/typescript/commonjs/theme/color-engine/color-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/contrast-curve.d.ts +9 -0
- package/lib/typescript/commonjs/theme/color-engine/contrast-curve.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/contrast.d.ts +12 -0
- package/lib/typescript/commonjs/theme/color-engine/contrast.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/dislike-analyzer.d.ts +11 -0
- package/lib/typescript/commonjs/theme/color-engine/dislike-analyzer.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/dynamic-scheme.d.ts +47 -0
- package/lib/typescript/commonjs/theme/color-engine/dynamic-scheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/hct-solver.d.ts +6 -0
- package/lib/typescript/commonjs/theme/color-engine/hct-solver.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/hct.d.ts +20 -0
- package/lib/typescript/commonjs/theme/color-engine/hct.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/index.d.ts +44 -0
- package/lib/typescript/commonjs/theme/color-engine/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/lab-point-provider.d.ts +6 -0
- package/lib/typescript/commonjs/theme/color-engine/lab-point-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/math-utils.d.ts +46 -0
- package/lib/typescript/commonjs/theme/color-engine/math-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/quantizer-map.d.ts +3 -0
- package/lib/typescript/commonjs/theme/color-engine/quantizer-map.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/quantizer-wu.d.ts +3 -0
- package/lib/typescript/commonjs/theme/color-engine/quantizer-wu.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/scheme-variants.d.ts +23 -0
- package/lib/typescript/commonjs/theme/color-engine/scheme-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/score.d.ts +8 -0
- package/lib/typescript/commonjs/theme/color-engine/score.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/seed-from-image.d.ts +13 -0
- package/lib/typescript/commonjs/theme/color-engine/seed-from-image.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/tonal-palette.d.ts +24 -0
- package/lib/typescript/commonjs/theme/color-engine/tonal-palette.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/tone-delta-pair.d.ts +19 -0
- package/lib/typescript/commonjs/theme/color-engine/tone-delta-pair.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/variant.d.ts +19 -0
- package/lib/typescript/commonjs/theme/color-engine/variant.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/viewing-conditions.d.ts +18 -0
- package/lib/typescript/commonjs/theme/color-engine/viewing-conditions.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-presets.d.ts +25 -20
- package/lib/typescript/commonjs/theme/color-presets.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/preset-vars.d.ts +16 -12
- package/lib/typescript/commonjs/theme/preset-vars.d.ts.map +1 -1
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.d.ts +5 -0
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.web.d.ts +5 -0
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.web.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/index.d.ts +3 -0
- package/lib/typescript/module/frosted-icon-button/index.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/index.web.d.ts +3 -0
- package/lib/typescript/module/frosted-icon-button/index.web.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/shared.d.ts +60 -0
- package/lib/typescript/module/frosted-icon-button/shared.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/types.d.ts +69 -0
- package/lib/typescript/module/frosted-icon-button/types.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -0
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-engine/cam16.d.ts +26 -0
- package/lib/typescript/module/theme/color-engine/cam16.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/color-role.d.ts +36 -0
- package/lib/typescript/module/theme/color-engine/color-role.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/color-roles.d.ts +58 -0
- package/lib/typescript/module/theme/color-engine/color-roles.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/color-utils.d.ts +32 -0
- package/lib/typescript/module/theme/color-engine/color-utils.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/contrast-curve.d.ts +9 -0
- package/lib/typescript/module/theme/color-engine/contrast-curve.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/contrast.d.ts +12 -0
- package/lib/typescript/module/theme/color-engine/contrast.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/dislike-analyzer.d.ts +11 -0
- package/lib/typescript/module/theme/color-engine/dislike-analyzer.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/dynamic-scheme.d.ts +47 -0
- package/lib/typescript/module/theme/color-engine/dynamic-scheme.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/hct-solver.d.ts +6 -0
- package/lib/typescript/module/theme/color-engine/hct-solver.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/hct.d.ts +20 -0
- package/lib/typescript/module/theme/color-engine/hct.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/index.d.ts +44 -0
- package/lib/typescript/module/theme/color-engine/index.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/lab-point-provider.d.ts +6 -0
- package/lib/typescript/module/theme/color-engine/lab-point-provider.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/math-utils.d.ts +46 -0
- package/lib/typescript/module/theme/color-engine/math-utils.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/quantizer-map.d.ts +3 -0
- package/lib/typescript/module/theme/color-engine/quantizer-map.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/quantizer-wu.d.ts +3 -0
- package/lib/typescript/module/theme/color-engine/quantizer-wu.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/scheme-variants.d.ts +23 -0
- package/lib/typescript/module/theme/color-engine/scheme-variants.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/score.d.ts +8 -0
- package/lib/typescript/module/theme/color-engine/score.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/seed-from-image.d.ts +13 -0
- package/lib/typescript/module/theme/color-engine/seed-from-image.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/tonal-palette.d.ts +24 -0
- package/lib/typescript/module/theme/color-engine/tonal-palette.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/tone-delta-pair.d.ts +19 -0
- package/lib/typescript/module/theme/color-engine/tone-delta-pair.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/variant.d.ts +19 -0
- package/lib/typescript/module/theme/color-engine/variant.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/viewing-conditions.d.ts +18 -0
- package/lib/typescript/module/theme/color-engine/viewing-conditions.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-presets.d.ts +25 -20
- package/lib/typescript/module/theme/color-presets.d.ts.map +1 -1
- package/lib/typescript/module/theme/preset-vars.d.ts +16 -12
- package/lib/typescript/module/theme/preset-vars.d.ts.map +1 -1
- package/package.json +17 -1
- package/src/__tests__/BloomThemeProvider.test.tsx +9 -4
- package/src/__tests__/FrostedIconButton.test.tsx +137 -0
- package/src/__tests__/FrostedIconButton.web.test.tsx +246 -0
- package/src/__tests__/native-root-vars.test.ts +8 -4
- package/src/__tests__/preset-vars.test.ts +66 -37
- package/src/__tests__/theme.test.ts +20 -12
- package/src/frosted-icon-button/FrostedIconButton.stories.tsx +65 -0
- package/src/frosted-icon-button/FrostedIconButton.tsx +156 -0
- package/src/frosted-icon-button/FrostedIconButton.web.tsx +207 -0
- package/src/frosted-icon-button/index.ts +2 -0
- package/src/frosted-icon-button/index.web.ts +9 -0
- package/src/frosted-icon-button/shared.ts +118 -0
- package/src/frosted-icon-button/types.ts +81 -0
- package/src/index.ts +2 -0
- package/src/index.web.ts +2 -0
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +509 -509
- package/src/theme/__tests__/__snapshots__/visual-gallery.test.tsx.snap +613 -613
- package/src/theme/__tests__/color-engine-golden.test.ts +81 -0
- package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
- package/src/theme/__tests__/golden-tokens.test.ts +6 -7
- package/src/theme/__tests__/runtime-contract.test.ts +8 -8
- package/src/theme/__tests__/theme-colors-parity.test.ts +44 -88
- package/src/theme/build-theme.ts +32 -44
- package/src/theme/color-engine/cam16.ts +179 -0
- package/src/theme/color-engine/color-role.ts +217 -0
- package/src/theme/color-engine/color-roles.ts +435 -0
- package/src/theme/color-engine/color-utils.ts +157 -0
- package/src/theme/color-engine/contrast-curve.ts +25 -0
- package/src/theme/color-engine/contrast.ts +59 -0
- package/src/theme/color-engine/dislike-analyzer.ts +19 -0
- package/src/theme/color-engine/dynamic-scheme.ts +90 -0
- package/src/theme/color-engine/hct-solver.ts +263 -0
- package/src/theme/color-engine/hct.ts +69 -0
- package/src/theme/color-engine/index.ts +73 -0
- package/src/theme/color-engine/lab-point-provider.ts +26 -0
- package/src/theme/color-engine/math-utils.ts +69 -0
- package/src/theme/color-engine/quantizer-map.ts +17 -0
- package/src/theme/color-engine/quantizer-wu.ts +320 -0
- package/src/theme/color-engine/scheme-variants.ts +113 -0
- package/src/theme/color-engine/score.ts +82 -0
- package/src/theme/color-engine/seed-from-image.ts +64 -0
- package/src/theme/color-engine/tonal-palette.ts +94 -0
- package/src/theme/color-engine/tone-delta-pair.ts +21 -0
- package/src/theme/color-engine/variant.ts +18 -0
- package/src/theme/color-engine/viewing-conditions.ts +77 -0
- package/src/theme/color-presets.ts +54 -631
- package/src/theme/preset-vars.ts +65 -49
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FrostedIconButtonProps } from './types';
|
|
3
|
+
export type { FrostedIconButtonProps, FrostedIconButtonSize } from './types';
|
|
4
|
+
export declare const FrostedIconButton: React.NamedExoticComponent<FrostedIconButtonProps>;
|
|
5
|
+
//# sourceMappingURL=FrostedIconButton.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrostedIconButton.web.d.ts","sourceRoot":"","sources":["../../../../src/frosted-icon-button/FrostedIconButton.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA0L7E,eAAO,MAAM,iBAAiB,oDAAsC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/frosted-icon-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/frosted-icon-button/index.web.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,YAAY,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ThemeColors } from '../theme/types';
|
|
3
|
+
import type { FrostedIconButtonSize } from './types';
|
|
4
|
+
/** Resolved pixel geometry for a given size prop. */
|
|
5
|
+
export interface FrostedGeometry {
|
|
6
|
+
/** Circle diameter (width === height). */
|
|
7
|
+
diameter: number;
|
|
8
|
+
/** Centered box the icon renders inside. */
|
|
9
|
+
iconBox: number;
|
|
10
|
+
/** Backdrop-blur radius in px (web) — scaled for BlurView intensity on native. */
|
|
11
|
+
blur: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Resolve a `size` prop (preset name or raw pixel diameter) to concrete pixel
|
|
15
|
+
* geometry. A numeric size sets the diameter directly, derives the icon box as
|
|
16
|
+
* `round(size * 0.56)` (min 16px) and scales the blur radius with the diameter.
|
|
17
|
+
* Mirrored byte-for-byte between the native and web forks via this one module.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveFrostedSize(size: FrostedIconButtonSize | number): FrostedGeometry;
|
|
20
|
+
/** Theme-aware colors for every frosted-button surface state. */
|
|
21
|
+
export interface FrostedPalette {
|
|
22
|
+
/** Translucent surface at rest. */
|
|
23
|
+
surface: string;
|
|
24
|
+
/** Translucent surface on hover / press (slightly lighter). */
|
|
25
|
+
surfaceHover: string;
|
|
26
|
+
/** Hairline ring/border at rest. */
|
|
27
|
+
ring: string;
|
|
28
|
+
/** Hairline ring/border on hover / press. */
|
|
29
|
+
ringHover: string;
|
|
30
|
+
/** Icon color when frosted (rest). */
|
|
31
|
+
icon: string;
|
|
32
|
+
/** Opaque surface for the solid `active` state. */
|
|
33
|
+
activeSurface: string;
|
|
34
|
+
/** Icon color when `active`. */
|
|
35
|
+
activeIcon: string;
|
|
36
|
+
/** Focus-ring color (web `:focus-visible` outline). */
|
|
37
|
+
focusRing: string;
|
|
38
|
+
/**
|
|
39
|
+
* Soft drop shadow color. Intentionally kept in BOTH modes (never
|
|
40
|
+
* `dark:shadow-none`) so the chip has an edge over an image and reads as a
|
|
41
|
+
* distinct button. The token already carries its own alpha.
|
|
42
|
+
*/
|
|
43
|
+
shadow: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Build the frosted palette from the resolved theme colors. Everything is
|
|
47
|
+
* derived from Bloom tokens (`text`/foreground, `primary`, `shadow`) so it is
|
|
48
|
+
* fully theme-aware and Oxy-agnostic — no hardcoded colors.
|
|
49
|
+
*/
|
|
50
|
+
export declare function resolveFrostedPalette(colors: ThemeColors, isDark: boolean): FrostedPalette;
|
|
51
|
+
/**
|
|
52
|
+
* Inject `color` as the icon's `fill` — but only as a FALLBACK: if the caller
|
|
53
|
+
* already set an explicit `fill` on the icon element, it wins and the node is
|
|
54
|
+
* returned untouched. Bloom icons resolve their paint as `fill ?? style.color`,
|
|
55
|
+
* so a bare `<Icons.X />` gets the theme-aware color for free while an
|
|
56
|
+
* explicitly-colored icon is never overridden. Non-element children (plain
|
|
57
|
+
* text/strings) pass through unchanged.
|
|
58
|
+
*/
|
|
59
|
+
export declare function applyIconColor(node: ReactNode, color: string): ReactNode;
|
|
60
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/frosted-icon-button/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAGxF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,qDAAqD;AACrD,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;CACd;AASD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,GAAG,eAAe,CASxF;AAiBD,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,aAAa,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,cAAc,CAa1F;AAKD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAKxE"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Size of the {@link FrostedIconButton}.
|
|
4
|
+
*
|
|
5
|
+
* - `sm` — 32px circle (`h-8`), 18px icon box. Dense toolbars / stacked chips.
|
|
6
|
+
* - `md` — 36px circle (`h-9`), 20px icon box. The default; a comfortable
|
|
7
|
+
* header/overlay action.
|
|
8
|
+
*
|
|
9
|
+
* A raw pixel `number` is also accepted for an exact diameter; the icon box is
|
|
10
|
+
* derived as `round(size * 0.56)` (min 16px) and the blur radius scales with it.
|
|
11
|
+
*/
|
|
12
|
+
export type FrostedIconButtonSize = 'sm' | 'md';
|
|
13
|
+
export interface FrostedIconButtonProps {
|
|
14
|
+
/** Press handler. */
|
|
15
|
+
onPress?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* The icon to render, centered inside the circle. Typically a Bloom icon
|
|
18
|
+
* element (`<Icons.ArrowLeft… />`). If the icon does not set its own `fill`,
|
|
19
|
+
* the button injects the theme-aware icon color (foreground when frosted,
|
|
20
|
+
* `primaryForeground` when `active`) as a fallback so a bare icon is colored
|
|
21
|
+
* correctly out of the box; an explicit `fill` on the icon always wins.
|
|
22
|
+
*
|
|
23
|
+
* `children` is accepted as an alias — if both are given, `icon` wins.
|
|
24
|
+
*/
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Solid "on" state for toggles. When true the button drops its translucency
|
|
29
|
+
* and backdrop blur and fills with the brand `primary` token (icon tinted
|
|
30
|
+
* `primaryForeground`), so an enabled toggle reads unmistakably as active.
|
|
31
|
+
* Exposed to assistive tech as `aria-pressed` (web) / the selected a11y state.
|
|
32
|
+
*/
|
|
33
|
+
active?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* A preset (`'sm' | 'md'`) or a raw pixel diameter (`number`). Defaults to
|
|
37
|
+
* `'md'` (36px). See {@link FrostedIconButtonSize}.
|
|
38
|
+
*/
|
|
39
|
+
size?: FrostedIconButtonSize | number;
|
|
40
|
+
/** Required for icon-only buttons so screen readers announce the action. */
|
|
41
|
+
accessibilityLabel?: string;
|
|
42
|
+
accessibilityHint?: string;
|
|
43
|
+
/** Container style override (merged last). */
|
|
44
|
+
style?: StyleProp<ViewStyle>;
|
|
45
|
+
/** NativeWind / DOM className passthrough. */
|
|
46
|
+
className?: string;
|
|
47
|
+
testID?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Native press hit target padding. Defaults to a generous slop so the compact
|
|
50
|
+
* circle is comfortable to tap. No-op on web.
|
|
51
|
+
*/
|
|
52
|
+
hitSlop?: {
|
|
53
|
+
top: number;
|
|
54
|
+
bottom: number;
|
|
55
|
+
left: number;
|
|
56
|
+
right: number;
|
|
57
|
+
};
|
|
58
|
+
/** Web click handler. Fires together with `onPress`. */
|
|
59
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
60
|
+
/** `aria-label` (web only). Falls back to `accessibilityLabel`. */
|
|
61
|
+
'aria-label'?: string;
|
|
62
|
+
/** `title` tooltip attribute (web only). */
|
|
63
|
+
title?: string;
|
|
64
|
+
/** Inline DOM `id` (web only). */
|
|
65
|
+
id?: string;
|
|
66
|
+
/** HTML button `type` (web only). Defaults to `'button'`. */
|
|
67
|
+
type?: 'button' | 'submit' | 'reset';
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/frosted-icon-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC;IAEtC,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAUvE,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC"}
|
|
@@ -21,6 +21,8 @@ export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, Di
|
|
|
21
21
|
export * from './button';
|
|
22
22
|
export { Fab } from './fab';
|
|
23
23
|
export type { FabProps, FabVariant, FabSize, FabPlacement } from './fab';
|
|
24
|
+
export { FrostedIconButton } from './frosted-icon-button';
|
|
25
|
+
export type { FrostedIconButtonProps, FrostedIconButtonSize } from './frosted-icon-button';
|
|
24
26
|
export * from './grouped-buttons';
|
|
25
27
|
export * from './divider';
|
|
26
28
|
export * from './radio-indicator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf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,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvE,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
|
@@ -21,6 +21,8 @@ export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, Di
|
|
|
21
21
|
export * from './button/index.web';
|
|
22
22
|
export { Fab } from './fab/index.web';
|
|
23
23
|
export type { FabProps, FabVariant, FabSize, FabPlacement } from './fab/index.web';
|
|
24
|
+
export { FrostedIconButton } from './frosted-icon-button/index.web';
|
|
25
|
+
export type { FrostedIconButtonProps, FrostedIconButtonSize } from './frosted-icon-button/index.web';
|
|
24
26
|
export * from './grouped-buttons';
|
|
25
27
|
export * from './divider';
|
|
26
28
|
export * from './radio-indicator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,M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B,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAGxB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACjF,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/build-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"build-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/build-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKvE,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AA4EX;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,OAAO,GAAG,MAAM,EAC1B,UAAU,GAAE,OAAe,GAC1B,KAAK,CAWP"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ViewingConditions } from './viewing-conditions';
|
|
2
|
+
export declare class Cam16 {
|
|
3
|
+
readonly hue: number;
|
|
4
|
+
readonly chroma: number;
|
|
5
|
+
readonly j: number;
|
|
6
|
+
readonly q: number;
|
|
7
|
+
readonly m: number;
|
|
8
|
+
readonly s: number;
|
|
9
|
+
readonly jstar: number;
|
|
10
|
+
readonly astar: number;
|
|
11
|
+
readonly bstar: number;
|
|
12
|
+
constructor(hue: number, chroma: number, j: number, q: number, m: number, s: number, jstar: number, astar: number, bstar: number);
|
|
13
|
+
/** CAM16-UCS perceptual distance to another colour. */
|
|
14
|
+
distance(other: Cam16): number;
|
|
15
|
+
static fromInt(argb: number): Cam16;
|
|
16
|
+
static fromIntInViewingConditions(argb: number, vc: ViewingConditions): Cam16;
|
|
17
|
+
static fromXyzInViewingConditions(x: number, y: number, z: number, vc: ViewingConditions): Cam16;
|
|
18
|
+
static fromJch(j: number, c: number, h: number): Cam16;
|
|
19
|
+
static fromJchInViewingConditions(j: number, c: number, h: number, vc: ViewingConditions): Cam16;
|
|
20
|
+
static fromUcs(jstar: number, astar: number, bstar: number): Cam16;
|
|
21
|
+
static fromUcsInViewingConditions(jstar: number, astar: number, bstar: number, vc: ViewingConditions): Cam16;
|
|
22
|
+
toInt(): number;
|
|
23
|
+
viewed(vc: ViewingConditions): number;
|
|
24
|
+
xyzInViewingConditions(vc: ViewingConditions): [number, number, number];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=cam16.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cam16.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/cam16.ts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R,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK;IAIlE,MAAM,CAAC,0BAA0B,CAC/B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,iBAAiB,GACpB,KAAK;IAYR,KAAK,IAAI,MAAM;IAIf,MAAM,CAAC,EAAE,EAAE,iBAAiB,GAAG,MAAM;IAKrC,sBAAsB,CAAC,EAAE,EAAE,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;CA8BxE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ContrastCurve } from './contrast-curve';
|
|
2
|
+
import type { DynamicScheme } from './dynamic-scheme';
|
|
3
|
+
import { Hct } from './hct';
|
|
4
|
+
import type { TonalPalette } from './tonal-palette';
|
|
5
|
+
import type { ToneDeltaPair } from './tone-delta-pair';
|
|
6
|
+
export interface ColorRoleArgs {
|
|
7
|
+
name?: string;
|
|
8
|
+
palette: (scheme: DynamicScheme) => TonalPalette;
|
|
9
|
+
tone: (scheme: DynamicScheme) => number;
|
|
10
|
+
isBackground?: boolean;
|
|
11
|
+
background?: (scheme: DynamicScheme) => ColorRole | undefined;
|
|
12
|
+
secondBackground?: (scheme: DynamicScheme) => ColorRole | undefined;
|
|
13
|
+
contrastCurve?: ContrastCurve;
|
|
14
|
+
toneDeltaPair?: (scheme: DynamicScheme) => ToneDeltaPair;
|
|
15
|
+
}
|
|
16
|
+
export declare class ColorRole {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly palette: (scheme: DynamicScheme) => TonalPalette;
|
|
19
|
+
readonly tone: (scheme: DynamicScheme) => number;
|
|
20
|
+
readonly isBackground: boolean;
|
|
21
|
+
readonly background?: (scheme: DynamicScheme) => ColorRole | undefined;
|
|
22
|
+
readonly secondBackground?: (scheme: DynamicScheme) => ColorRole | undefined;
|
|
23
|
+
readonly contrastCurve?: ContrastCurve;
|
|
24
|
+
readonly toneDeltaPair?: (scheme: DynamicScheme) => ToneDeltaPair;
|
|
25
|
+
private readonly hctCache;
|
|
26
|
+
static fromPalette(args: ColorRoleArgs): ColorRole;
|
|
27
|
+
constructor(args: ColorRoleArgs);
|
|
28
|
+
getArgb(scheme: DynamicScheme): number;
|
|
29
|
+
getHct(scheme: DynamicScheme): Hct;
|
|
30
|
+
getTone(scheme: DynamicScheme): number;
|
|
31
|
+
static foregroundTone(bgTone: number, ratio: number): number;
|
|
32
|
+
static tonePrefersLightForeground(tone: number): boolean;
|
|
33
|
+
static toneAllowsLightForeground(tone: number): boolean;
|
|
34
|
+
static enableLightForeground(tone: number): number;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=color-role.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-role.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/color-role.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,YAAY,CAAC;IACjD,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,MAAM,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,SAAS,GAAG,SAAS,CAAC;IAC9D,gBAAgB,CAAC,EAAE,CAAC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MAAM,CAAC,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAMnD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bloom colour engine — the colour roles.
|
|
3
|
+
*
|
|
4
|
+
* Faithful port of Material Color Utilities' `MaterialDynamicColors` (Apache-2.0),
|
|
5
|
+
* renamed to Bloom's own `Roles`. Each role is a {@link ColorRole} recipe over
|
|
6
|
+
* the scheme's palettes: surfaces, on-surfaces, the accent trio + their
|
|
7
|
+
* containers, outlines and error. Resolving a role against a scheme yields the
|
|
8
|
+
* final colour. The 12 "*Fixed" roles the reference ships are omitted — Bloom's
|
|
9
|
+
* token contract doesn't use them.
|
|
10
|
+
*/
|
|
11
|
+
import { ColorRole } from './color-role';
|
|
12
|
+
/** The full set of Bloom colour roles, keyed by name. Resolve via `.getArgb(scheme)`. */
|
|
13
|
+
export declare const Roles: {
|
|
14
|
+
readonly primaryPaletteKeyColor: ColorRole;
|
|
15
|
+
readonly secondaryPaletteKeyColor: ColorRole;
|
|
16
|
+
readonly tertiaryPaletteKeyColor: ColorRole;
|
|
17
|
+
readonly neutralPaletteKeyColor: ColorRole;
|
|
18
|
+
readonly neutralVariantPaletteKeyColor: ColorRole;
|
|
19
|
+
readonly background: ColorRole;
|
|
20
|
+
readonly onBackground: ColorRole;
|
|
21
|
+
readonly surface: ColorRole;
|
|
22
|
+
readonly surfaceDim: ColorRole;
|
|
23
|
+
readonly surfaceBright: ColorRole;
|
|
24
|
+
readonly surfaceContainerLowest: ColorRole;
|
|
25
|
+
readonly surfaceContainerLow: ColorRole;
|
|
26
|
+
readonly surfaceContainer: ColorRole;
|
|
27
|
+
readonly surfaceContainerHigh: ColorRole;
|
|
28
|
+
readonly surfaceContainerHighest: ColorRole;
|
|
29
|
+
readonly onSurface: ColorRole;
|
|
30
|
+
readonly surfaceVariant: ColorRole;
|
|
31
|
+
readonly onSurfaceVariant: ColorRole;
|
|
32
|
+
readonly inverseSurface: ColorRole;
|
|
33
|
+
readonly inverseOnSurface: ColorRole;
|
|
34
|
+
readonly outline: ColorRole;
|
|
35
|
+
readonly outlineVariant: ColorRole;
|
|
36
|
+
readonly shadow: ColorRole;
|
|
37
|
+
readonly scrim: ColorRole;
|
|
38
|
+
readonly surfaceTint: ColorRole;
|
|
39
|
+
readonly primary: ColorRole;
|
|
40
|
+
readonly onPrimary: ColorRole;
|
|
41
|
+
readonly primaryContainer: ColorRole;
|
|
42
|
+
readonly onPrimaryContainer: ColorRole;
|
|
43
|
+
readonly inversePrimary: ColorRole;
|
|
44
|
+
readonly secondary: ColorRole;
|
|
45
|
+
readonly onSecondary: ColorRole;
|
|
46
|
+
readonly secondaryContainer: ColorRole;
|
|
47
|
+
readonly onSecondaryContainer: ColorRole;
|
|
48
|
+
readonly tertiary: ColorRole;
|
|
49
|
+
readonly onTertiary: ColorRole;
|
|
50
|
+
readonly tertiaryContainer: ColorRole;
|
|
51
|
+
readonly onTertiaryContainer: ColorRole;
|
|
52
|
+
readonly error: ColorRole;
|
|
53
|
+
readonly onError: ColorRole;
|
|
54
|
+
readonly errorContainer: ColorRole;
|
|
55
|
+
readonly onErrorContainer: ColorRole;
|
|
56
|
+
};
|
|
57
|
+
export type RoleName = keyof typeof Roles;
|
|
58
|
+
//# sourceMappingURL=color-roles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-roles.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/color-roles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA0XzC,yFAAyF;AACzF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CR,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Pack 0–255 R/G/B into an opaque ARGB int. */
|
|
2
|
+
export declare function argbFromRgb(red: number, green: number, blue: number): number;
|
|
3
|
+
/** Pack linear-RGB (0–100 per channel) into an opaque ARGB int. */
|
|
4
|
+
export declare function argbFromLinrgb(linrgb: [number, number, number]): number;
|
|
5
|
+
export declare function alphaFromArgb(argb: number): number;
|
|
6
|
+
export declare function redFromArgb(argb: number): number;
|
|
7
|
+
export declare function greenFromArgb(argb: number): number;
|
|
8
|
+
export declare function blueFromArgb(argb: number): number;
|
|
9
|
+
export declare function isOpaque(argb: number): boolean;
|
|
10
|
+
/** XYZ → ARGB. */
|
|
11
|
+
export declare function argbFromXyz(x: number, y: number, z: number): number;
|
|
12
|
+
/** ARGB → XYZ. */
|
|
13
|
+
export declare function xyzFromArgb(argb: number): [number, number, number];
|
|
14
|
+
/** L*a*b* → ARGB. */
|
|
15
|
+
export declare function argbFromLab(l: number, a: number, b: number): number;
|
|
16
|
+
/** ARGB → L*a*b*. */
|
|
17
|
+
export declare function labFromArgb(argb: number): [number, number, number];
|
|
18
|
+
/** L* → ARGB (a grayscale color with that lightness). */
|
|
19
|
+
export declare function argbFromLstar(lstar: number): number;
|
|
20
|
+
/** ARGB → L*. */
|
|
21
|
+
export declare function lstarFromArgb(argb: number): number;
|
|
22
|
+
/** L* → Y (XYZ luminance). */
|
|
23
|
+
export declare function yFromLstar(lstar: number): number;
|
|
24
|
+
/** Y (XYZ luminance) → L*. */
|
|
25
|
+
export declare function lstarFromY(y: number): number;
|
|
26
|
+
/** sRGB component (0–255) → linear (0–100). */
|
|
27
|
+
export declare function linearized(rgbComponent: number): number;
|
|
28
|
+
/** Linear component (0–100) → sRGB (0–255). */
|
|
29
|
+
export declare function delinearized(rgbComponent: number): number;
|
|
30
|
+
/** The D65 white point. */
|
|
31
|
+
export declare function whitePointD65(): [number, number, number];
|
|
32
|
+
//# sourceMappingURL=color-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-utils.d.ts","sourceRoot":"","s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BAA8B;AAC9B,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,8BAA8B;AAC9B,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAOzD;AAED,2BAA2B;AAC3B,wBAAgB,aAAa,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAExD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class ContrastCurve {
|
|
2
|
+
readonly low: number;
|
|
3
|
+
readonly normal: number;
|
|
4
|
+
readonly medium: number;
|
|
5
|
+
readonly high: number;
|
|
6
|
+
constructor(low: number, normal: number, medium: number, high: number);
|
|
7
|
+
get(contrastLevel: number): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=contrast-curve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contrast-curve.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/contrast-curve.ts"],"names":[],"mappings":"AASA,qBAAa,aAAa;IAEtB,QAAQ,CAAC,GAAG,EAAE,MAAM;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM;gBAHZ,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM;IAGvB,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;CAOnC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** WCAG contrast ratio between two tones (L*). */
|
|
2
|
+
export declare function ratioOfTones(toneA: number, toneB: number): number;
|
|
3
|
+
export declare function ratioOfYs(y1: number, y2: number): number;
|
|
4
|
+
/** Lightest tone that hits `ratio` against `tone`, or -1 if impossible. */
|
|
5
|
+
export declare function lighter(tone: number, ratio: number): number;
|
|
6
|
+
/** Darkest tone that hits `ratio` against `tone`, or -1 if impossible. */
|
|
7
|
+
export declare function darker(tone: number, ratio: number): number;
|
|
8
|
+
/** Like {@link lighter} but returns 100 instead of -1 when unattainable. */
|
|
9
|
+
export declare function lighterUnsafe(tone: number, ratio: number): number;
|
|
10
|
+
/** Like {@link darker} but returns 0 instead of -1 when unattainable. */
|
|
11
|
+
export declare function darkerUnsafe(tone: number, ratio: number): number;
|
|
12
|
+
//# sourceMappingURL=contrast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contrast.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/contrast.ts"],"names":[],"mappings":"AAWA,kDAAkD;AAClD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIjE;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED,2EAA2E;AAC3E,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS3D;AAED,0EAA0E;AAC1E,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS1D;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjE;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bloom colour engine — dislike analyzer.
|
|
3
|
+
*
|
|
4
|
+
* Faithful port of Material Color Utilities' `DislikeAnalyzer` (Apache-2.0).
|
|
5
|
+
* Certain dark-yellow-green HCT colours read as "bile"; this nudges their tone
|
|
6
|
+
* up to 70 so generated palettes never land on a universally-disliked colour.
|
|
7
|
+
*/
|
|
8
|
+
import { Hct } from './hct';
|
|
9
|
+
export declare function isDisliked(hct: Hct): boolean;
|
|
10
|
+
export declare function fixIfDisliked(hct: Hct): Hct;
|
|
11
|
+
//# sourceMappingURL=dislike-analyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dislike-analyzer.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/dislike-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAK5C;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAE3C"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bloom colour engine — dynamic scheme.
|
|
3
|
+
*
|
|
4
|
+
* Faithful port of Material Color Utilities' `DynamicScheme` core (Apache-2.0).
|
|
5
|
+
* Holds the five tonal palettes (primary/secondary/tertiary/neutral/
|
|
6
|
+
* neutralVariant) + error that a scheme variant derives from the seed, plus the
|
|
7
|
+
* dark/contrast state a `DynamicColor` role reads to resolve into an ARGB. The
|
|
8
|
+
* ~50 convenience role getters from the reference are omitted — Bloom reads
|
|
9
|
+
* roles directly through `materialRoles`.
|
|
10
|
+
*/
|
|
11
|
+
import type { ColorRole } from './color-role';
|
|
12
|
+
import { Hct } from './hct';
|
|
13
|
+
import { TonalPalette } from './tonal-palette';
|
|
14
|
+
import { Variant } from './variant';
|
|
15
|
+
export interface DynamicSchemeArgs {
|
|
16
|
+
sourceColorArgb: number;
|
|
17
|
+
variant: Variant;
|
|
18
|
+
contrastLevel: number;
|
|
19
|
+
isDark: boolean;
|
|
20
|
+
primaryPalette: TonalPalette;
|
|
21
|
+
secondaryPalette: TonalPalette;
|
|
22
|
+
tertiaryPalette: TonalPalette;
|
|
23
|
+
neutralPalette: TonalPalette;
|
|
24
|
+
neutralVariantPalette: TonalPalette;
|
|
25
|
+
}
|
|
26
|
+
export declare class DynamicScheme {
|
|
27
|
+
readonly sourceColorArgb: number;
|
|
28
|
+
readonly variant: Variant;
|
|
29
|
+
readonly contrastLevel: number;
|
|
30
|
+
readonly isDark: boolean;
|
|
31
|
+
readonly sourceColorHct: Hct;
|
|
32
|
+
readonly primaryPalette: TonalPalette;
|
|
33
|
+
readonly secondaryPalette: TonalPalette;
|
|
34
|
+
readonly tertiaryPalette: TonalPalette;
|
|
35
|
+
readonly neutralPalette: TonalPalette;
|
|
36
|
+
readonly neutralVariantPalette: TonalPalette;
|
|
37
|
+
readonly errorPalette: TonalPalette;
|
|
38
|
+
constructor(args: DynamicSchemeArgs);
|
|
39
|
+
/**
|
|
40
|
+
* Rotate the seed hue by a designer-specified amount that depends on which
|
|
41
|
+
* hue "breakpoint" band the seed falls in.
|
|
42
|
+
*/
|
|
43
|
+
static getRotatedHue(sourceColor: Hct, hues: number[], rotations: number[]): number;
|
|
44
|
+
getArgb(role: ColorRole): number;
|
|
45
|
+
getHct(role: ColorRole): Hct;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=dynamic-scheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/dynamic-scheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,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
* colour is out of gamut, hue + L* are preserved and chroma is maximised.
|
|
4
|
+
*/
|
|
5
|
+
export declare function solveToInt(hueDegrees: number, chroma: number, lstar: number): number;
|
|
6
|
+
//# sourceMappingURL=hct-solver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hct-solver.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/hct-solver.ts"],"names":[],"mappings":"AAuPA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAWpF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class Hct {
|
|
2
|
+
private argb;
|
|
3
|
+
private internalHue;
|
|
4
|
+
private internalChroma;
|
|
5
|
+
private internalTone;
|
|
6
|
+
private constructor();
|
|
7
|
+
/** Build an HCT colour from hue (deg), chroma, and tone (L*, 0–100). */
|
|
8
|
+
static from(hue: number, chroma: number, tone: number): Hct;
|
|
9
|
+
/** Wrap an existing ARGB colour as HCT. */
|
|
10
|
+
static fromInt(argb: number): Hct;
|
|
11
|
+
toInt(): number;
|
|
12
|
+
get hue(): number;
|
|
13
|
+
set hue(newHue: number);
|
|
14
|
+
get chroma(): number;
|
|
15
|
+
set chroma(newChroma: number);
|
|
16
|
+
get tone(): number;
|
|
17
|
+
set tone(newTone: number);
|
|
18
|
+
private setInternalState;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=hct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hct.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/hct.ts"],"names":[],"mappings":"AAYA,qBAAa,GAAG;IACd,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO;IAQP,wEAAwE;IACxE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG;IAI3D,2CAA2C;IAC3C,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAIjC,KAAK,IAAI,MAAM;IAIf,IAAI,GAAG,IAAI,MAAM,CAEhB;IACD,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAErB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IACD,IAAI,MAAM,CAAC,SAAS,EAAE,MAAM,EAE3B;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,IAAI,CAAC,OAAO,EAAE,MAAM,EAEvB;IAED,OAAO,CAAC,gBAAgB;CAOzB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bloom colour engine — public surface.
|
|
3
|
+
*
|
|
4
|
+
* A dependency-free tonal colour system (HCT + tonal palettes + dynamic roles)
|
|
5
|
+
* reimplemented in Bloom from the Material Color Utilities algorithm (Apache-2.0)
|
|
6
|
+
* and verified byte-for-byte against it. Give it ANY seed colour and it derives a
|
|
7
|
+
* full, self-consistent, WCAG-legible set of roles for light and dark at any
|
|
8
|
+
* contrast level — the same dynamic theming MaterialKolor does, but ours.
|
|
9
|
+
*/
|
|
10
|
+
export { Hct } from './hct';
|
|
11
|
+
export { TonalPalette } from './tonal-palette';
|
|
12
|
+
export { DynamicScheme } from './dynamic-scheme';
|
|
13
|
+
export { buildScheme, schemeVibrant, schemeExpressive, schemeTonalSpot, schemeNeutral } from './scheme-variants';
|
|
14
|
+
export type { SchemeVariant } from './scheme-variants';
|
|
15
|
+
export { Roles } from './color-roles';
|
|
16
|
+
export type { RoleName } from './color-roles';
|
|
17
|
+
export { ColorRole } from './color-role';
|
|
18
|
+
export { quantizeWu } from './quantizer-wu';
|
|
19
|
+
export { score } from './score';
|
|
20
|
+
export type { ScoreOptions } from './score';
|
|
21
|
+
export { quantizeImage, seedsFromImagePixels, seedHexFromImagePixels } from './seed-from-image';
|
|
22
|
+
export { argbFromRgb, redFromArgb, greenFromArgb, blueFromArgb } from './color-utils';
|
|
23
|
+
import { type RoleName } from './color-roles';
|
|
24
|
+
import { type SchemeVariant } from './scheme-variants';
|
|
25
|
+
/** Parse a `#rrggbb` (or `#aarrggbb`) hex string into an ARGB int. */
|
|
26
|
+
export declare function argbFromHex(hex: string): number;
|
|
27
|
+
/** Format an ARGB int as `#rrggbb`. */
|
|
28
|
+
export declare function hexFromArgb(argb: number): string;
|
|
29
|
+
/** Every colour role as a modern `rgb(r g b)` string. */
|
|
30
|
+
export type RoleColors = Record<RoleName, string>;
|
|
31
|
+
export interface GenerateOptions {
|
|
32
|
+
/** The brand/seed colour, `#rrggbb`. */
|
|
33
|
+
seed: string;
|
|
34
|
+
variant?: SchemeVariant;
|
|
35
|
+
isDark?: boolean;
|
|
36
|
+
/** −1 (low) … 0 (normal) … 1 (high). */
|
|
37
|
+
contrastLevel?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Generate the full role set from ANY seed colour — the dynamic-theming entry
|
|
41
|
+
* point. Presets are just fixed seeds; a user-picked colour works identically.
|
|
42
|
+
*/
|
|
43
|
+
export declare function generateRoleColors(opts: GenerateOptions): RoleColors;
|
|
44
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-engine/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,MAA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