@apollion-dsi/core 5.6.0 → 5.7.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/README.md +18 -15
- package/lib/chunks/Notification.group-ZF3SWJ5I.esm.js +1 -0
- package/lib/chunks/chunk-2MP3CNPJ.esm.js +1 -0
- package/lib/chunks/{chunk-HMITYQV5.esm.js → chunk-2PGFD7DE.esm.js} +1 -1
- package/lib/chunks/chunk-2W7TWNOU.esm.js +1 -0
- package/lib/chunks/chunk-2X7VF3TI.esm.js +1 -0
- package/lib/chunks/chunk-2XF3K3FZ.esm.js +1 -0
- package/lib/chunks/chunk-2XTVIQMG.esm.js +1 -0
- package/lib/chunks/chunk-3CMIHWCC.esm.js +1 -0
- package/lib/chunks/{chunk-WGTBX72G.esm.js → chunk-3KOZ6RXR.esm.js} +1 -1
- package/lib/chunks/chunk-3KQYIALD.esm.js +1 -0
- package/lib/chunks/{chunk-FPUV6SIF.esm.js → chunk-3N5JOXGO.esm.js} +5 -5
- package/lib/chunks/chunk-3QLUKHRS.esm.js +1 -0
- package/lib/chunks/{chunk-TD4RVB2L.esm.js → chunk-3UAJX5A3.esm.js} +1 -1
- package/lib/chunks/chunk-4QAABEMF.esm.js +1 -0
- package/lib/chunks/chunk-4TYHZCWM.esm.js +43 -0
- package/lib/chunks/chunk-4YTEM7KN.esm.js +1 -0
- package/lib/chunks/{chunk-XGE6OOEJ.esm.js → chunk-4ZBUDHYB.esm.js} +1 -1
- package/lib/chunks/{chunk-7AFAO7ZS.esm.js → chunk-4ZHLV35P.esm.js} +1 -1
- package/lib/chunks/chunk-5HBSIYOZ.esm.js +1 -0
- package/lib/chunks/chunk-5QCS6IIT.esm.js +1 -0
- package/lib/chunks/chunk-5SOYAL34.esm.js +1 -0
- package/lib/chunks/{chunk-CZJF4EVQ.esm.js → chunk-63HDOW4T.esm.js} +1 -1
- package/lib/chunks/{chunk-WU5LSQM6.esm.js → chunk-63W4JKL2.esm.js} +1 -1
- package/lib/chunks/{chunk-SJ3MPBVM.esm.js → chunk-6VRD7OZA.esm.js} +1 -1
- package/lib/chunks/{chunk-4VEUQE23.esm.js → chunk-6X4ODRTI.esm.js} +1 -1
- package/lib/chunks/{chunk-EJ3VKFOX.esm.js → chunk-6X4XOO7T.esm.js} +1 -1
- package/lib/chunks/chunk-6XX3UO2Y.esm.js +1 -0
- package/lib/chunks/chunk-7JMXQ2U5.esm.js +1 -0
- package/lib/chunks/{chunk-WNCECFZT.esm.js → chunk-ACQRO3G2.esm.js} +1 -1
- package/lib/chunks/{chunk-UNM6DHPD.esm.js → chunk-AE6W4G34.esm.js} +1 -1
- package/lib/chunks/chunk-AWDMR4QM.esm.js +1 -0
- package/lib/chunks/chunk-AXUWC2WH.esm.js +1 -0
- package/lib/chunks/{chunk-7EGX7BMB.esm.js → chunk-BERIBF3O.esm.js} +1 -1
- package/lib/chunks/chunk-BES6F7LL.esm.js +1 -0
- package/lib/chunks/chunk-BFABFZI7.esm.js +1 -0
- package/lib/chunks/chunk-BFEEE3TE.esm.js +1 -0
- package/lib/chunks/chunk-BG3YCD4J.esm.js +1 -0
- package/lib/chunks/chunk-BL7NWDMQ.esm.js +1 -0
- package/lib/chunks/chunk-C2LSZ4Q2.esm.js +1 -0
- package/lib/chunks/chunk-CAMUSXB7.esm.js +1 -0
- package/lib/chunks/chunk-CCONLRLQ.esm.js +1 -0
- package/lib/chunks/chunk-CIEJ6VY7.esm.js +1 -0
- package/lib/chunks/chunk-EBOJSNZ5.esm.js +0 -0
- package/lib/chunks/chunk-EHFNO4GE.esm.js +1 -0
- package/lib/chunks/chunk-EXO45TTW.esm.js +1 -0
- package/lib/chunks/{chunk-CQK4PCNH.esm.js → chunk-FPHCXTB2.esm.js} +1 -1
- package/lib/chunks/chunk-GK5CN6U5.esm.js +1 -0
- package/lib/chunks/chunk-GNQ43LWP.esm.js +1 -0
- package/lib/chunks/chunk-HPM5AX5Z.esm.js +1 -0
- package/lib/chunks/chunk-IA234JY2.esm.js +0 -0
- package/lib/chunks/chunk-IPANNHV3.esm.js +1 -0
- package/lib/chunks/chunk-JQ66DKSQ.esm.js +1 -0
- package/lib/chunks/chunk-KK7GK3UF.esm.js +1 -0
- package/lib/chunks/{chunk-YKIFYIC5.esm.js → chunk-KLV4HLS3.esm.js} +1 -1
- package/lib/chunks/{chunk-RZGNPPLN.esm.js → chunk-KSXQYRLN.esm.js} +1 -1
- package/lib/chunks/chunk-LE3YEI3S.esm.js +1 -0
- package/lib/chunks/chunk-LO6YRTFI.esm.js +1 -0
- package/lib/chunks/chunk-LZBENVT6.esm.js +1 -0
- package/lib/chunks/{chunk-MS7WJXDX.esm.js → chunk-MOXCMGJA.esm.js} +1 -1
- package/lib/chunks/chunk-MPKFMMCD.esm.js +2 -0
- package/lib/chunks/chunk-MZWXZLXA.esm.js +1 -0
- package/lib/chunks/{chunk-HRMJR6TD.esm.js → chunk-N3JDQ7WS.esm.js} +1 -1
- package/lib/chunks/{chunk-ZZFLBPSO.esm.js → chunk-NK4FEDW6.esm.js} +5 -5
- package/lib/chunks/chunk-O3MMZ4I5.esm.js +35 -0
- package/lib/chunks/{chunk-I46TFDIX.esm.js → chunk-OAMOSU2N.esm.js} +2 -2
- package/lib/chunks/chunk-P7RR4ZHS.esm.js +1 -0
- package/lib/chunks/chunk-PFLBU7HG.esm.js +1 -0
- package/lib/chunks/chunk-PNTUEAD7.esm.js +1 -0
- package/lib/chunks/chunk-PRJYROUS.esm.js +1 -0
- package/lib/chunks/chunk-PZQFMIES.esm.js +4 -0
- package/lib/chunks/chunk-Q3ZUH3G6.esm.js +1 -0
- package/lib/chunks/chunk-QUUKURSV.esm.js +1 -0
- package/lib/chunks/chunk-QWSJCCTE.esm.js +1 -0
- package/lib/chunks/chunk-RLDFMPSZ.esm.js +1 -0
- package/lib/chunks/chunk-RNL7RFJK.esm.js +1 -0
- package/lib/chunks/{chunk-BMGVQBTB.esm.js → chunk-S5BG7T6G.esm.js} +1 -1
- package/lib/chunks/chunk-SHMDGM76.esm.js +1 -0
- package/lib/chunks/chunk-SJSFQ5J7.esm.js +1 -0
- package/lib/chunks/chunk-STEVHSEJ.esm.js +1 -0
- package/lib/chunks/chunk-STSRIPD6.esm.js +1 -0
- package/lib/chunks/chunk-T4H7YK3A.esm.js +1 -0
- package/lib/chunks/chunk-TLIKQFOT.esm.js +1 -0
- package/lib/chunks/chunk-U525YXTZ.esm.js +1 -0
- package/lib/chunks/chunk-UBIEAIXU.esm.js +1 -0
- package/lib/chunks/{chunk-MJUAYHOW.esm.js → chunk-UPA65UVZ.esm.js} +1 -1
- package/lib/chunks/{chunk-BVKAXW2H.esm.js → chunk-VEEBTN5T.esm.js} +1 -1
- package/lib/chunks/{chunk-XBLZJLBQ.esm.js → chunk-VLK46DIP.esm.js} +1 -1
- package/lib/chunks/chunk-VROT2JQQ.esm.js +1 -0
- package/lib/chunks/chunk-WAPNO2AB.esm.js +1 -0
- package/lib/chunks/{chunk-5SQH2W2J.esm.js → chunk-WGUXV3DS.esm.js} +1 -1
- package/lib/chunks/{chunk-D2T4FF27.esm.js → chunk-WY52IJK2.esm.js} +1 -1
- package/lib/chunks/{chunk-2CVIS37T.esm.js → chunk-XQJ4DROM.esm.js} +1 -1
- package/lib/chunks/chunk-XVPUSCK5.esm.js +1 -0
- package/lib/chunks/chunk-YC44Q5HI.esm.js +1 -0
- package/lib/chunks/chunk-YDPBVYZ5.esm.js +1 -0
- package/lib/chunks/{chunk-VHXSTTRG.esm.js → chunk-YNFKSFHM.esm.js} +2 -2
- package/lib/chunks/{chunk-OHOMOBIV.esm.js → chunk-YPR4N7VC.esm.js} +5 -5
- package/lib/chunks/chunk-YT6XBYTY.esm.js +1 -0
- package/lib/chunks/{chunk-OWMRURZT.esm.js → chunk-YZQXTNVA.esm.js} +1 -1
- package/lib/chunks/chunk-Z7GJDO5T.esm.js +0 -0
- package/lib/chunks/chunk-ZNVEDM3W.esm.js +1 -0
- package/lib/containers/Base/index.esm.js +1 -1
- package/lib/containers/Card/Card.d.ts +23 -13
- package/lib/containers/Card/Card.interface.d.ts +20 -8
- package/lib/containers/Card/Card.style.d.ts +28 -0
- package/lib/containers/Card/index.esm.js +1 -1
- package/lib/containers/Content/index.esm.js +1 -1
- package/lib/containers/Flex/index.esm.js +1 -1
- package/lib/containers/Grid/Grid.interface.d.ts +10 -2
- package/lib/containers/Grid/index.esm.js +1 -1
- package/lib/containers/Motion/Motion.style.d.ts +52 -22
- package/lib/containers/Motion/index.esm.js +1 -1
- package/lib/containers/Notification/Notification.interface.d.ts +8 -0
- package/lib/containers/Notification/Notification.style.d.ts +208 -88
- package/lib/containers/Notification/index.esm.js +1 -1
- package/lib/containers/Paper/Paper.style.d.ts +6 -5
- package/lib/containers/Paper/index.esm.js +1 -1
- package/lib/containers/Scroll/index.esm.js +1 -1
- package/lib/containers/index.esm.js +1 -1
- package/lib/dataDisplay/DataTable/DataTable.style.d.ts +8 -8
- package/lib/dataDisplay/DataTable/index.esm.js +1 -1
- package/lib/dataDisplay/DescriptionList/DescriptionList.interface.d.ts +8 -0
- package/lib/dataDisplay/DescriptionList/index.esm.js +1 -1
- package/lib/dataDisplay/Meter/index.esm.js +1 -1
- package/lib/dataDisplay/Steps/Steps.d.ts +43 -0
- package/lib/dataDisplay/Steps/Steps.interface.d.ts +99 -0
- package/lib/dataDisplay/Steps/Steps.style.d.ts +84 -0
- package/lib/dataDisplay/Steps/index.d.ts +10 -0
- package/lib/dataDisplay/Steps/index.esm.js +1 -0
- package/lib/dataDisplay/Table/Table/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableBody/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableCell/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableCheckboxCell/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableEmpty/TableEmpty.style.d.ts +5 -5
- package/lib/dataDisplay/Table/TableEmpty/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableFooter/TableFooter.style.d.ts +1 -1
- package/lib/dataDisplay/Table/TableFooter/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableHeader/TableHeader.style.d.ts +1 -1
- package/lib/dataDisplay/Table/TableHeader/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableHeaderCell/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableHeaderCheckboxCell/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TablePagination/index.esm.js +1 -1
- package/lib/dataDisplay/Table/TableRow/index.esm.js +1 -1
- package/lib/dataDisplay/Table/index.esm.js +1 -1
- package/lib/dataDisplay/Tabs/Tabs.style.d.ts +4 -4
- package/lib/dataDisplay/Tabs/index.esm.js +1 -1
- package/lib/dataDisplay/index.d.ts +1 -0
- package/lib/dataDisplay/index.esm.js +1 -1
- package/lib/elements/Avatar/index.esm.js +1 -1
- package/lib/elements/Button/Button.interface.d.ts +8 -4
- package/lib/elements/Button/Button.style.d.ts +11 -1
- package/lib/elements/Button/index.esm.js +1 -1
- package/lib/elements/Calendar/index.esm.js +1 -1
- package/lib/elements/Divider/Divider.d.ts +25 -0
- package/lib/elements/Divider/Divider.interface.d.ts +63 -0
- package/lib/elements/Divider/Divider.style.d.ts +49 -0
- package/lib/elements/Divider/index.d.ts +10 -0
- package/lib/elements/Divider/index.esm.js +1 -0
- package/lib/elements/Dropdown/index.esm.js +1 -1
- package/lib/elements/Icon/index.esm.js +1 -1
- package/lib/elements/IconButton/IconButton.style.d.ts +49 -8
- package/lib/elements/IconButton/index.esm.js +1 -1
- package/lib/elements/IconText/IconText.d.ts +22 -0
- package/lib/elements/IconText/IconText.interface.d.ts +46 -0
- package/lib/elements/IconText/IconText.style.d.ts +25 -0
- package/lib/elements/IconText/index.d.ts +10 -0
- package/lib/elements/IconText/index.esm.js +1 -0
- package/lib/elements/Image/index.esm.js +1 -1
- package/lib/elements/Label/index.esm.js +1 -1
- package/lib/elements/Link/Link.style.d.ts +8 -8
- package/lib/elements/Link/index.esm.js +1 -1
- package/lib/elements/List/List.d.ts +2 -1
- package/lib/elements/List/List.interface.d.ts +9 -0
- package/lib/elements/List/List.style.d.ts +1 -1
- package/lib/elements/List/index.esm.js +1 -1
- package/lib/elements/Modal/Modal.style.d.ts +790 -340
- package/lib/elements/Modal/index.esm.js +1 -1
- package/lib/elements/Popover/index.esm.js +1 -1
- package/lib/elements/ProgressBar/index.esm.js +1 -1
- package/lib/elements/Spinner/Spinner.d.ts +10 -4
- package/lib/elements/Spinner/Spinner.interface.d.ts +23 -2
- package/lib/elements/Spinner/Spinner.style.d.ts +36 -0
- package/lib/elements/Spinner/index.esm.js +1 -1
- package/lib/elements/Svg/Svg.style.d.ts +1 -1
- package/lib/elements/Svg/index.esm.js +1 -1
- package/lib/elements/Text/Text.interface.d.ts +12 -0
- package/lib/elements/Text/Text.props.d.ts +35 -17
- package/lib/elements/Text/Text.style.d.ts +24 -0
- package/lib/elements/Text/index.esm.js +1 -1
- package/lib/elements/Text/useTickFlash.d.ts +11 -0
- package/lib/elements/Tooltip/index.esm.js +1 -1
- package/lib/elements/index.d.ts +2 -0
- package/lib/elements/index.esm.js +1 -1
- package/lib/factory/BackgroundFactory/index.esm.js +1 -1
- package/lib/factory/ColorFactory/index.esm.js +1 -1
- package/lib/factory/DeepFactory/DeepFactory.d.ts +4 -0
- package/lib/factory/DeepFactory/index.esm.js +1 -1
- package/lib/factory/FlexFactory/FlexFactory.d.ts +12 -0
- package/lib/factory/FlexFactory/FlexFactory.interface.d.ts +16 -0
- package/lib/factory/FlexFactory/index.esm.js +1 -1
- package/lib/factory/ResponsiveFactory/index.esm.js +1 -1
- package/lib/factory/System/index.esm.js +1 -1
- package/lib/factory/index.esm.js +1 -1
- package/lib/form/Checkbox/Checkbox.d.ts +1 -1
- package/lib/form/Checkbox/Checkbox.interface.d.ts +12 -1
- package/lib/form/Checkbox/Checkbox.style.d.ts +22 -8
- package/lib/form/Checkbox/index.esm.js +1 -1
- package/lib/form/Field/Field.style.d.ts +5 -2
- package/lib/form/Field/index.esm.js +1 -1
- package/lib/form/FieldGroup/index.esm.js +1 -1
- package/lib/form/Form/index.esm.js +1 -1
- package/lib/form/Input/Input.style.d.ts +10 -10
- package/lib/form/Input/index.esm.js +1 -1
- package/lib/form/InputCurrency/InputCurrency.d.ts +10 -0
- package/lib/form/InputCurrency/InputCurrency.interface.d.ts +36 -0
- package/lib/form/InputCurrency/InputCurrency.style.d.ts +48 -0
- package/lib/form/InputCurrency/index.esm.js +1 -1
- package/lib/form/InputDate/index.esm.js +1 -1
- package/lib/form/InputMask/index.esm.js +1 -1
- package/lib/form/InputRange/InputRange.style.d.ts +8 -8
- package/lib/form/InputRange/index.esm.js +1 -1
- package/lib/form/InputSelect/index.esm.js +1 -1
- package/lib/form/Option/Option.d.ts +31 -0
- package/lib/form/Option/Option.interface.d.ts +62 -0
- package/lib/form/Option/Option.style.d.ts +38 -0
- package/lib/form/Option/index.d.ts +10 -0
- package/lib/form/Option/index.esm.js +1 -0
- package/lib/form/Radio/Radio.d.ts +1 -1
- package/lib/form/Radio/Radio.interface.d.ts +13 -2
- package/lib/form/Radio/Radio.style.d.ts +8 -6
- package/lib/form/Radio/index.esm.js +1 -1
- package/lib/form/Select/index.esm.js +1 -1
- package/lib/form/Switch/Switch.d.ts +1 -1
- package/lib/form/Switch/Switch.interface.d.ts +12 -1
- package/lib/form/Switch/Switch.style.d.ts +4 -2
- package/lib/form/Switch/index.esm.js +1 -1
- package/lib/form/TextArea/TextArea.style.d.ts +4 -4
- package/lib/form/TextArea/index.esm.js +1 -1
- package/lib/form/UploadCard/UploadCard.style.d.ts +8 -8
- package/lib/form/UploadCard/index.esm.js +1 -1
- package/lib/form/index.d.ts +1 -0
- package/lib/form/index.esm.js +1 -1
- package/lib/hooks/index.esm.js +1 -1
- package/lib/hooks/useMediaQuery/index.esm.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +1 -1
- package/lib/layouts/DefaultLayout/DefaultLayout.style.d.ts +2 -2
- package/lib/layouts/DefaultLayout/index.esm.js +1 -1
- package/lib/layouts/SideBarLayout/SideBarLayout.style.d.ts +2 -2
- package/lib/layouts/SideBarLayout/index.esm.js +1 -1
- package/lib/layouts/index.esm.js +1 -1
- package/lib/scenario/CircleComponent/index.esm.js +1 -1
- package/lib/scenario/RectComponent/index.esm.js +1 -1
- package/lib/scenario/index.esm.js +1 -1
- package/lib/skeleton/ComposedSkeleton/ComposedSkeleton.d.ts +1 -1
- package/lib/skeleton/ComposedSkeleton/ComposedSkeleton.interface.d.ts +1 -1
- package/lib/skeleton/ComposedSkeleton/index.esm.js +1 -1
- package/lib/skeleton/TextPreset/index.esm.js +1 -1
- package/lib/skeleton/index.esm.js +1 -1
- package/lib/themes/Animation/Animation.interface.d.ts +6 -0
- package/lib/themes/Animation/index.esm.js +1 -1
- package/lib/themes/Colors/Colors.helpers.d.ts +77 -0
- package/lib/themes/Colors/Colors.interface.d.ts +101 -2
- package/lib/themes/Colors/Colors.ladder.d.ts +98 -0
- package/lib/themes/Colors/index.d.ts +2 -0
- package/lib/themes/Colors/index.esm.js +1 -1
- package/lib/themes/Component/Component.interface.d.ts +19 -1
- package/lib/themes/Component/index.d.ts +1 -1
- package/lib/themes/Component/index.esm.js +1 -1
- package/lib/themes/Deep/index.esm.js +1 -1
- package/lib/themes/Depth/Depth.props.d.ts +14 -0
- package/lib/themes/Depth/index.esm.js +1 -1
- package/lib/themes/Font/Font.interface.d.ts +8 -0
- package/lib/themes/Font/Font.props.d.ts +9 -2
- package/lib/themes/Font/index.esm.js +1 -1
- package/lib/themes/Foundation/Foundation.interface.d.ts +27 -0
- package/lib/themes/Foundation/index.esm.js +1 -1
- package/lib/themes/GlobalStyle/GlobalStyle.d.ts +20 -2
- package/lib/themes/GlobalStyle/index.d.ts +5 -1
- package/lib/themes/GlobalStyle/index.esm.js +1 -1
- package/lib/themes/Ground/Ground.d.ts +28 -0
- package/lib/themes/Ground/Ground.helpers.d.ts +60 -0
- package/lib/themes/Ground/index.d.ts +7 -0
- package/lib/themes/Ground/index.esm.js +1 -0
- package/lib/themes/Mode/Mode.helpers.d.ts +64 -0
- package/lib/themes/Mode/Mode.interface.d.ts +54 -0
- package/lib/themes/Mode/ModeScript.d.ts +14 -0
- package/lib/themes/Mode/index.d.ts +9 -0
- package/lib/themes/Mode/index.esm.js +1 -0
- package/lib/themes/Semantic/Semantic.helpers.d.ts +9 -2
- package/lib/themes/Semantic/Semantic.interface.d.ts +28 -0
- package/lib/themes/Semantic/index.esm.js +1 -1
- package/lib/themes/Surface/index.esm.js +1 -1
- package/lib/themes/ThemeProvider/ThemeProvider.d.ts +10 -4
- package/lib/themes/ThemeProvider/ThemeProvider.interface.d.ts +114 -10
- package/lib/themes/ThemeProvider/ThemeProvider.modes.d.ts +52 -0
- package/lib/themes/ThemeProvider/index.esm.js +1 -1
- package/lib/themes/index.d.ts +2 -0
- package/lib/themes/index.esm.js +1 -1
- package/lib/utils/components/Breakpoints/index.esm.js +1 -1
- package/lib/utils/components/index.esm.js +1 -1
- package/lib/vendors/Culori/apca.d.ts +24 -0
- package/lib/vendors/Culori/index.d.ts +1 -0
- package/lib/vendors/StyledComponents/component.d.ts +3 -2
- package/lib/vendors/StyledComponents/index.d.ts +1 -1
- package/package.json +30 -3
- package/lib/chunks/Notification.group-GB62BMAL.esm.js +0 -1
- package/lib/chunks/chunk-2CW4G3UR.esm.js +0 -1
- package/lib/chunks/chunk-2R6XFFSQ.esm.js +0 -1
- package/lib/chunks/chunk-2WED4EVR.esm.js +0 -43
- package/lib/chunks/chunk-34QOWBI6.esm.js +0 -1
- package/lib/chunks/chunk-3EOSES4S.esm.js +0 -1
- package/lib/chunks/chunk-452VAAGY.esm.js +0 -1
- package/lib/chunks/chunk-4BMWIGG4.esm.js +0 -1
- package/lib/chunks/chunk-4V7LOS5Z.esm.js +0 -1
- package/lib/chunks/chunk-56NEPHUH.esm.js +0 -1
- package/lib/chunks/chunk-5HENHW73.esm.js +0 -1
- package/lib/chunks/chunk-5MWVBWXW.esm.js +0 -1
- package/lib/chunks/chunk-5NE62M4R.esm.js +0 -1
- package/lib/chunks/chunk-6N52NFPT.esm.js +0 -1
- package/lib/chunks/chunk-6OXVRDS2.esm.js +0 -1
- package/lib/chunks/chunk-6X6WKZ3Y.esm.js +0 -1
- package/lib/chunks/chunk-73MPQ5OY.esm.js +0 -1
- package/lib/chunks/chunk-A6Z2M2XU.esm.js +0 -1
- package/lib/chunks/chunk-APD22JEO.esm.js +0 -1
- package/lib/chunks/chunk-AYZYOY57.esm.js +0 -1
- package/lib/chunks/chunk-BC24WDTC.esm.js +0 -1
- package/lib/chunks/chunk-BRXIFPWB.esm.js +0 -1
- package/lib/chunks/chunk-CLDPV7NK.esm.js +0 -1
- package/lib/chunks/chunk-CZAUFZ45.esm.js +0 -1
- package/lib/chunks/chunk-DLVRDZRA.esm.js +0 -35
- package/lib/chunks/chunk-E3MSXQXV.esm.js +0 -1
- package/lib/chunks/chunk-G4IUG32B.esm.js +0 -1
- package/lib/chunks/chunk-IE4YNQFD.esm.js +0 -1
- package/lib/chunks/chunk-IWMEDT6U.esm.js +0 -1
- package/lib/chunks/chunk-K2BKOGDX.esm.js +0 -1
- package/lib/chunks/chunk-KASRN4X5.esm.js +0 -1
- package/lib/chunks/chunk-KHEBUAB4.esm.js +0 -1
- package/lib/chunks/chunk-KI5W6U4K.esm.js +0 -1
- package/lib/chunks/chunk-KYIPVR2T.esm.js +0 -1
- package/lib/chunks/chunk-LATE6DIA.esm.js +0 -1
- package/lib/chunks/chunk-LTTG3NIJ.esm.js +0 -1
- package/lib/chunks/chunk-M32CTX5Z.esm.js +0 -1
- package/lib/chunks/chunk-M33BYGAO.esm.js +0 -1
- package/lib/chunks/chunk-MBYC37CX.esm.js +0 -1
- package/lib/chunks/chunk-MLIU6MRT.esm.js +0 -1
- package/lib/chunks/chunk-NQBO2D7L.esm.js +0 -1
- package/lib/chunks/chunk-NYDXZB2D.esm.js +0 -1
- package/lib/chunks/chunk-OUHMU5PP.esm.js +0 -1
- package/lib/chunks/chunk-OZIEVLUR.esm.js +0 -1
- package/lib/chunks/chunk-P5PWDVWO.esm.js +0 -1
- package/lib/chunks/chunk-ROSLCQXL.esm.js +0 -1
- package/lib/chunks/chunk-RU6QRCR7.esm.js +0 -1
- package/lib/chunks/chunk-RUKCBNDS.esm.js +0 -1
- package/lib/chunks/chunk-RZDVS7AY.esm.js +0 -1
- package/lib/chunks/chunk-T6ZB656A.esm.js +0 -1
- package/lib/chunks/chunk-TISQZ6PQ.esm.js +0 -1
- package/lib/chunks/chunk-TLBV5OUM.esm.js +0 -1
- package/lib/chunks/chunk-TQJTHPA3.esm.js +0 -1
- package/lib/chunks/chunk-TUALAE4W.esm.js +0 -1
- package/lib/chunks/chunk-UHMYTFMU.esm.js +0 -1
- package/lib/chunks/chunk-VAJGIZNP.esm.js +0 -1
- package/lib/chunks/chunk-YRBM4WYM.esm.js +0 -1
- package/lib/chunks/chunk-ZLFQHCLE.esm.js +0 -1
- /package/lib/chunks/{chunk-KL3ATH64.esm.js → chunk-4L2KOZIQ.esm.js} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Theme } from '../ThemeProvider/ThemeProvider.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Ground channel (APOLLION-DARK-MODE-ENGINE, decision D7 — ADR-024 §ground).
|
|
4
|
+
*
|
|
5
|
+
* Every painted ground (`bgColor`, `<Ground>`, the page canvas) emits a set
|
|
6
|
+
* of CSS custom properties computed **in JS against the ground's literal**
|
|
7
|
+
* — in both modes (`light-dark()` pairs): the neutral ink hierarchy, the
|
|
8
|
+
* readable accent inks, the black/white contrast ink and the ink-alpha
|
|
9
|
+
* edges. Inks consume `var(--apollion-on-ground-…)` with a canvas-resolved
|
|
10
|
+
* fallback, so the CSS cascade resolves "the nearest painted ancestor" for
|
|
11
|
+
* free — no React context, no wrappers, works for consumer containers too.
|
|
12
|
+
*
|
|
13
|
+
* Contract: every value is AA (4.5) over the ground it was computed for
|
|
14
|
+
* (disabled excepted); `auditGroundVars` asserts it in tests.
|
|
15
|
+
*/
|
|
16
|
+
/** Prefix of every ground custom property. */
|
|
17
|
+
export declare const GROUND_VAR_PREFIX = "--apollion-on-ground";
|
|
18
|
+
/** Neutral ink roles published per ground. */
|
|
19
|
+
export declare const GROUND_INK_ROLES: readonly ["primary", "secondary", "muted", "disabled"];
|
|
20
|
+
export type GroundInkRole = (typeof GROUND_INK_ROLES)[number];
|
|
21
|
+
/** Token the root ground (page canvas) is computed from. */
|
|
22
|
+
export declare const ROOT_GROUND_TOKEN = "surface.canvas";
|
|
23
|
+
/** Builds a ground custom-property name: `groundVar('ink', 'primary')` → `--apollion-on-ground-ink-primary`. */
|
|
24
|
+
export declare function groundVar(...path: Array<string | number>): string;
|
|
25
|
+
/** `var(--apollion-on-ground-…, fallback)` reference. */
|
|
26
|
+
export declare function groundVarRef(fallback: string, ...path: Array<string | number>): string;
|
|
27
|
+
/**
|
|
28
|
+
* Maps an ink token to its ground-relative custom property path, or `null`
|
|
29
|
+
* when the token is not ground-relative (fills, borders, raw colors):
|
|
30
|
+
* - `ink.<role>` → `ink-<role>`
|
|
31
|
+
* - `<palette>` (base) → `tx-<palette>` (readable accent over the ground)
|
|
32
|
+
* - `neutral.<120..180>` → `neutral-<index>` (text side of the ramp)
|
|
33
|
+
*/
|
|
34
|
+
export declare function groundInkPath(token: string): string[] | null;
|
|
35
|
+
/**
|
|
36
|
+
* A translucent ground (`wash.*`, `rgba(…, 0.2)`, `transparent`) composites
|
|
37
|
+
* over whatever is behind it — its inks are the PARENT ground's inks. Such
|
|
38
|
+
* grounds must not publish the channel (the cascade keeps the ancestor's).
|
|
39
|
+
*/
|
|
40
|
+
export declare function isOpaqueGround(literalGround: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The ground custom properties for `ground` (a `theme.colors` dot-path token
|
|
43
|
+
* or a runtime CSS color), each side computed on the matching literal table
|
|
44
|
+
* and paired with `light-dark()`. Pure; memoize at the call site if hot.
|
|
45
|
+
*/
|
|
46
|
+
export declare function groundVars(theme: Theme, ground: string): Record<string, string>;
|
|
47
|
+
/** One failing pair found by {@link auditGroundVars}. */
|
|
48
|
+
export interface GroundAuditFailure {
|
|
49
|
+
ground: string;
|
|
50
|
+
mode: 'light' | 'dark';
|
|
51
|
+
variable: string;
|
|
52
|
+
ink: string;
|
|
53
|
+
ratio: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Test helper (D7 guarantee): for every ground token, computes the ground
|
|
57
|
+
* inks on both literal tables and reports every pair under the floor.
|
|
58
|
+
* `disabled` and `edge-*` are WCAG-exempt (non-text / disabled) and skipped.
|
|
59
|
+
*/
|
|
60
|
+
export declare function auditGroundVars(theme: Theme, grounds: readonly string[], minRatio?: number): GroundAuditFailure[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public barrel for the `Ground` module — the ground channel (D7, ADR-024):
|
|
3
|
+
* every painted ground publishes `--apollion-on-ground-*` custom properties
|
|
4
|
+
* computed against its own literal, in both modes.
|
|
5
|
+
*/
|
|
6
|
+
export * from './Ground.helpers';
|
|
7
|
+
export * from './Ground';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as j}from"../../chunks/chunk-HPM5AX5Z.esm.js";import{a,b,c,d,e,f,g,h,i}from"../../chunks/chunk-JQ66DKSQ.esm.js";import"../../chunks/chunk-YC44Q5HI.esm.js";import"../../chunks/chunk-BFABFZI7.esm.js";import"../../chunks/chunk-U525YXTZ.esm.js";import"../../chunks/chunk-STSRIPD6.esm.js";import"../../chunks/chunk-XVPUSCK5.esm.js";import"../../chunks/chunk-BV6GHAF7.esm.js";import"../../chunks/chunk-G5Z7USXC.esm.js";import"../../chunks/chunk-AXUWC2WH.esm.js";import"../../chunks/chunk-GZONWSRB.esm.js";export{b as GROUND_INK_ROLES,a as GROUND_VAR_PREFIX,j as Ground,c as ROOT_GROUND_TOKEN,i as auditGroundVars,f as groundInkPath,d as groundVar,e as groundVarRef,h as groundVars,g as isOpaqueGround};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { A11yMode, CookieAdapterOptions, ModeDocumentOptions, ModePreference, ModeScriptOptions, ModeStorage, PersistOption, ResolvedMode } from './Mode.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Mode engine primitives (APOLLION-DARK-MODE-ENGINE, ADR-024) — pure,
|
|
4
|
+
* dependency-free helpers shared by `ApollionProvider`, the pre-paint script
|
|
5
|
+
* and server-side recipes (importable from a Next.js `app/layout.tsx`).
|
|
6
|
+
*/
|
|
7
|
+
/** Default storage key of the mode preference; the a11y preset lives under `${key}-a11y`. */
|
|
8
|
+
export declare const MODE_STORAGE_KEY = "apollion-mode";
|
|
9
|
+
/** Default `<html>` attribute carrying the resolved mode. */
|
|
10
|
+
export declare const MODE_ATTRIBUTE = "data-apollion-mode";
|
|
11
|
+
/** Default `<html>` attribute carrying the a11y preset. */
|
|
12
|
+
export declare const A11Y_ATTRIBUTE = "data-apollion-a11y";
|
|
13
|
+
/** `prefers-color-scheme` query the engine follows for `'system'`. */
|
|
14
|
+
export declare const DARK_SCHEME_QUERY = "(prefers-color-scheme: dark)";
|
|
15
|
+
/** Storage key of the a11y preset for a given mode key. */
|
|
16
|
+
export declare function a11yStorageKey(storageKey?: string): string;
|
|
17
|
+
/** Type guard — a valid persisted/URL/cookie mode value. */
|
|
18
|
+
export declare function isModePreference(value: unknown): value is ModePreference;
|
|
19
|
+
/** Type guard — a valid a11y preset name. */
|
|
20
|
+
export declare function isA11yMode(value: unknown): value is Exclude<A11yMode, null>;
|
|
21
|
+
/** SSR-safe read of the OS preference (`false` without `window`/`matchMedia`). */
|
|
22
|
+
export declare function prefersDarkScheme(): boolean;
|
|
23
|
+
/** Resolves a preference into the mode that renders. */
|
|
24
|
+
export declare function resolveMode(preference: ModePreference, systemDark: boolean): ResolvedMode;
|
|
25
|
+
/** `localStorage`-backed adapter; silent on private mode / SSR. */
|
|
26
|
+
export declare function localStorageAdapter(): ModeStorage;
|
|
27
|
+
/** Parses a `Cookie` header / `document.cookie` string for one value. */
|
|
28
|
+
export declare function readCookieValue(cookieHeader: string | null | undefined, name: string): string | null;
|
|
29
|
+
/** `document.cookie`-backed adapter — the server can read the same cookie (`readModeFromCookie`). */
|
|
30
|
+
export declare function cookieAdapter(options?: CookieAdapterOptions): ModeStorage;
|
|
31
|
+
/** Maps the provider's `persist` prop to a storage adapter (`null` = off). */
|
|
32
|
+
export declare function resolveStorage(persist: PersistOption | undefined): ModeStorage | null;
|
|
33
|
+
/**
|
|
34
|
+
* Server-side read of the persisted mode preference from a `Cookie` header
|
|
35
|
+
* (App Router: `headers().get('cookie')`; Pages Router: `req.headers.cookie`).
|
|
36
|
+
* Invalid/missing → `null` (the caller falls back to `defaultMode`).
|
|
37
|
+
*/
|
|
38
|
+
export declare function readModeFromCookie(cookieHeader: string | null | undefined, name?: string): ModePreference | null;
|
|
39
|
+
/** Server-side read of the persisted a11y preset (see {@link readModeFromCookie}). */
|
|
40
|
+
export declare function readA11yFromCookie(cookieHeader: string | null | undefined, name?: string): A11yMode;
|
|
41
|
+
/**
|
|
42
|
+
* Writes the resolved mode + a11y preset on the document element
|
|
43
|
+
* (`data-apollion-mode`, `data-apollion-a11y`, `style.colorScheme`) so native
|
|
44
|
+
* controls, scrollbars and `light-dark()` follow the engine. No-op without an element.
|
|
45
|
+
*/
|
|
46
|
+
export declare function syncDocumentMode(element: HTMLElement | null | undefined, state: {
|
|
47
|
+
mode: ResolvedMode;
|
|
48
|
+
a11y: A11yMode;
|
|
49
|
+
}, options?: ModeDocumentOptions): void;
|
|
50
|
+
/** Removes what {@link syncDocumentMode} wrote (provider unmount). */
|
|
51
|
+
export declare function clearDocumentMode(element: HTMLElement | null | undefined, options?: ModeDocumentOptions): void;
|
|
52
|
+
/**
|
|
53
|
+
* Pre-paint inline script (no-flash): reads the persisted preference
|
|
54
|
+
* (localStorage or cookie), resolves `'system'` through `matchMedia`, and
|
|
55
|
+
* writes the same attributes the provider will write — before the first
|
|
56
|
+
* paint, outside React's tree (so hydration never sees a mismatch). Every
|
|
57
|
+
* option is JSON-escaped; the body is wrapped in `try/catch`.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```tsx
|
|
61
|
+
* <script dangerouslySetInnerHTML={{ __html: getModeScript({ persist: 'cookie' }) }} />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function getModeScript(options?: ModeScriptOptions): string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { AccessibilityPreset } from '../Colors/Colors.presets';
|
|
2
|
+
/**
|
|
3
|
+
* What the user asked for: a fixed mode or "follow the operating system".
|
|
4
|
+
* Persisted as-is (`'system'` stays `'system'`), resolved per render.
|
|
5
|
+
*/
|
|
6
|
+
export type ModePreference = 'light' | 'dark' | 'system';
|
|
7
|
+
/** What actually renders — the preference with `'system'` resolved. */
|
|
8
|
+
export type ResolvedMode = 'light' | 'dark';
|
|
9
|
+
/**
|
|
10
|
+
* Accessibility axis — orthogonal to the mode (decision D5): any preset
|
|
11
|
+
* composes with either polarity (`dark` + `colorblind`, `light` +
|
|
12
|
+
* `high-contrast`, …). `null` = the stock palette.
|
|
13
|
+
*/
|
|
14
|
+
export type A11yMode = AccessibilityPreset | null;
|
|
15
|
+
/**
|
|
16
|
+
* Minimal storage contract for the mode/a11y preferences. `write(key, null)`
|
|
17
|
+
* clears the entry. Implementations must never throw (private mode, SSR).
|
|
18
|
+
*/
|
|
19
|
+
export interface ModeStorage {
|
|
20
|
+
read(key: string): string | null;
|
|
21
|
+
write(key: string, value: string | null): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Persistence option of the provider: off, the two built-in adapters, or a
|
|
25
|
+
* custom {@link ModeStorage} (e.g. a server session).
|
|
26
|
+
*/
|
|
27
|
+
export type PersistOption = false | 'localStorage' | 'cookie' | ModeStorage;
|
|
28
|
+
/** Cookie adapter tuning (`cookieAdapter`). */
|
|
29
|
+
export interface CookieAdapterOptions {
|
|
30
|
+
/** Max-age in seconds. Default: one year. */
|
|
31
|
+
maxAge?: number;
|
|
32
|
+
/** Cookie path. Default `'/'`. */
|
|
33
|
+
path?: string;
|
|
34
|
+
/** SameSite policy. Default `'Lax'`. */
|
|
35
|
+
sameSite?: 'Lax' | 'Strict' | 'None';
|
|
36
|
+
/** Mark the cookie `Secure`. Default: `true` when `sameSite === 'None'`. */
|
|
37
|
+
secure?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** Attribute names the engine writes on `<html>` (`syncDocumentMode`). */
|
|
40
|
+
export interface ModeDocumentOptions {
|
|
41
|
+
/** Resolved-mode attribute. Default `data-apollion-mode`. */
|
|
42
|
+
attribute?: string;
|
|
43
|
+
/** A11y-preset attribute. Default `data-apollion-a11y`. */
|
|
44
|
+
a11yAttribute?: string;
|
|
45
|
+
}
|
|
46
|
+
/** Options of `getModeScript` — the pre-paint `<head>` script (no-flash). */
|
|
47
|
+
export interface ModeScriptOptions extends ModeDocumentOptions {
|
|
48
|
+
/** Storage key the provider persists under. Default `apollion-mode`. */
|
|
49
|
+
storageKey?: string;
|
|
50
|
+
/** Where the preference lives. Default `'localStorage'`. */
|
|
51
|
+
persist?: 'localStorage' | 'cookie';
|
|
52
|
+
/** Preference when nothing is stored. Default `'system'`. */
|
|
53
|
+
defaultMode?: ModePreference;
|
|
54
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ModeScriptOptions } from './Mode.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Pre-paint mode script as a `<head>` element — drop it before any stylesheet
|
|
5
|
+
* so the resolved mode (and the a11y preset) reach `<html>` before the first
|
|
6
|
+
* paint. Pair it with `ApollionProvider persist` using the same `storageKey`.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* // Next.js App Router — app/layout.tsx
|
|
11
|
+
* <head><ApollionModeScript persist="cookie" /></head>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function ApollionModeScript(props: ModeScriptOptions): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public barrel for the `Mode` module (APOLLION-DARK-MODE-ENGINE, ADR-024).
|
|
3
|
+
*
|
|
4
|
+
* Dependency-free: importable from server code (`app/layout.tsx`, loaders)
|
|
5
|
+
* for `readModeFromCookie` / `getModeScript`.
|
|
6
|
+
*/
|
|
7
|
+
export * from './Mode.interface';
|
|
8
|
+
export * from './Mode.helpers';
|
|
9
|
+
export * from './ModeScript';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"../../chunks/chunk-2XTVIQMG.esm.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}from"../../chunks/chunk-TLIKQFOT.esm.js";import"../../chunks/chunk-GZONWSRB.esm.js";export{c as A11Y_ATTRIBUTE,s as ApollionModeScript,d as DARK_SCHEME_QUERY,b as MODE_ATTRIBUTE,a as MODE_STORAGE_KEY,e as a11yStorageKey,q as clearDocumentMode,l as cookieAdapter,r as getModeScript,g as isA11yMode,f as isModePreference,j as localStorageAdapter,h as prefersDarkScheme,o as readA11yFromCookie,k as readCookieValue,n as readModeFromCookie,i as resolveMode,m as resolveStorage,p as syncDocumentMode};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SemanticLayer } from './Semantic.interface';
|
|
2
|
-
import type { ColorsThemeInterface } from '../Colors/Colors.interface';
|
|
1
|
+
import type { SemanticColor, SemanticLayer } from './Semantic.interface';
|
|
2
|
+
import type { ColorsThemeInterface, LadderGroups } from '../Colors/Colors.interface';
|
|
3
3
|
import type { SpacingThemeInterface } from '../Spacing/Spacing.interface';
|
|
4
4
|
/**
|
|
5
5
|
* Subset of the structural `Theme` needed to derive the Semantic layer.
|
|
@@ -48,4 +48,11 @@ export interface CreateSemanticInput {
|
|
|
48
48
|
* @see ../../docs/adr/ADR-002-layered-theme-aliases-and-surface.md §3, §5, §9
|
|
49
49
|
* @see ../../docs/CONCEPTS.md §2 Layer Cake
|
|
50
50
|
*/
|
|
51
|
+
/**
|
|
52
|
+
* Surface-ladder slice of Semantic (ADR-023): `surface.*` pairs + `ink.*` +
|
|
53
|
+
* `edge.*`, read from the structural groups assembled by `createColors` (or
|
|
54
|
+
* from an explicit ladder — `invertForSurface` passes the opposite polarity's).
|
|
55
|
+
* Falls back to the anchors for degenerate inputs (jsdom-unreachable paths).
|
|
56
|
+
*/
|
|
57
|
+
export declare function ladderSemantic(colors: CreateSemanticInput['colors'], ladder?: Pick<LadderGroups, 'surface' | 'ink' | 'edge'>): Pick<SemanticColor, 'surface' | 'ink' | 'edge'>;
|
|
51
58
|
export declare function createSemantic(theme: CreateSemanticInput): SemanticLayer;
|
|
@@ -86,6 +86,31 @@ export interface SemanticColorBrand {
|
|
|
86
86
|
second: SemanticBrandTokens;
|
|
87
87
|
third: SemanticBrandTokens;
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Surface ladder as bg/text-on pairs (ADR-023). `txtOn` is `ink.primary`,
|
|
91
|
+
* AA over every ground of the ladder by construction. Maps to
|
|
92
|
+
* `theme.colors.surface.*` at the structural level.
|
|
93
|
+
*/
|
|
94
|
+
export interface SemanticColorSurface {
|
|
95
|
+
canvas: SemanticBgPair;
|
|
96
|
+
sunken: SemanticBgPair;
|
|
97
|
+
paper: SemanticBgPair;
|
|
98
|
+
raised: SemanticBgPair;
|
|
99
|
+
overlay: SemanticBgPair;
|
|
100
|
+
}
|
|
101
|
+
/** Neutral text hierarchy (ADR-023). Maps to `theme.colors.ink.*`. */
|
|
102
|
+
export interface SemanticColorInk {
|
|
103
|
+
primary: string;
|
|
104
|
+
secondary: string;
|
|
105
|
+
muted: string;
|
|
106
|
+
disabled: string;
|
|
107
|
+
}
|
|
108
|
+
/** Ink-alpha lines (ADR-023). Maps to `theme.colors.edge.*`. */
|
|
109
|
+
export interface SemanticColorEdge {
|
|
110
|
+
hairline: string;
|
|
111
|
+
border: string;
|
|
112
|
+
strong: string;
|
|
113
|
+
}
|
|
89
114
|
/**
|
|
90
115
|
* Color layer of Semantic.
|
|
91
116
|
*/
|
|
@@ -93,6 +118,9 @@ export interface SemanticColor {
|
|
|
93
118
|
feedback: SemanticColorFeedback;
|
|
94
119
|
interface: SemanticColorInterface;
|
|
95
120
|
brand: SemanticColorBrand;
|
|
121
|
+
surface: SemanticColorSurface;
|
|
122
|
+
ink: SemanticColorInk;
|
|
123
|
+
edge: SemanticColorEdge;
|
|
96
124
|
}
|
|
97
125
|
/**
|
|
98
126
|
* Spacing pre-resolved into a CSS string (`'8px'`, `'1rem'`, etc.), generated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../chunks/chunk-IA234JY2.esm.js";import{b as a}from"../../chunks/chunk-6XX3UO2Y.esm.js";import"../../chunks/chunk-XVPUSCK5.esm.js";import"../../chunks/chunk-BV6GHAF7.esm.js";import"../../chunks/chunk-G5Z7USXC.esm.js";import"../../chunks/chunk-GZONWSRB.esm.js";export{a as createSemantic};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"../../chunks/chunk-
|
|
1
|
+
import{a as b}from"../../chunks/chunk-4ZHLV35P.esm.js";import{a}from"../../chunks/chunk-CCONLRLQ.esm.js";import"../../chunks/chunk-6XX3UO2Y.esm.js";import"../../chunks/chunk-PFLBU7HG.esm.js";import"../../chunks/chunk-STSRIPD6.esm.js";import"../../chunks/chunk-XVPUSCK5.esm.js";import"../../chunks/chunk-BV6GHAF7.esm.js";import"../../chunks/chunk-G5Z7USXC.esm.js";import"../../chunks/chunk-AXUWC2WH.esm.js";import"../../chunks/chunk-GZONWSRB.esm.js";export{b as SurfaceProvider,a as invertForSurface};
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ApollionProviderInterface, ApollionThemeContext } from './ThemeProvider.interface';
|
|
3
3
|
/**
|
|
4
|
-
* Reads the active theme and the
|
|
5
|
-
*
|
|
4
|
+
* Reads the active theme and the mode engine state, and drives both axes —
|
|
5
|
+
* `setMode` (light / dark / system) and `setA11y` (grayscale / high-contrast /
|
|
6
|
+
* colorblind / null) — from within any component under the `ApollionProvider`.
|
|
6
7
|
*
|
|
7
8
|
* @throws when used outside an `ApollionProvider`.
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
10
11
|
* ```tsx
|
|
11
|
-
* const {
|
|
12
|
-
* <Button text={`Mode: ${
|
|
12
|
+
* const { resolvedMode, setMode, a11y, setA11y } = useApollionTheme();
|
|
13
|
+
* <Button text={`Mode: ${resolvedMode}`} onClick={() => setMode(resolvedMode === 'dark' ? 'light' : 'dark')} />
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
16
|
export declare function useApollionTheme(): ApollionThemeContext;
|
|
17
|
+
/**
|
|
18
|
+
* Optional variant of {@link useApollionTheme} — `null` outside a provider.
|
|
19
|
+
* Used by `GlobalStyle` and the ground context, which must also render without one.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useApollionThemeOptional(): ApollionThemeContext | null;
|
|
16
22
|
export declare const ApollionProvider: React.FC<ApollionProviderInterface>;
|
|
@@ -7,8 +7,9 @@ import { ComponentTokensInput, ComponentTokensLayer } from '../Component';
|
|
|
7
7
|
import { DeepThemeInterface } from '../Deep';
|
|
8
8
|
import { DepthThemeInterface } from '../Depth';
|
|
9
9
|
import type { Dimension } from '../Dimension';
|
|
10
|
-
import { FontInput, FontThemeInterface } from '../Font';
|
|
10
|
+
import { FontInput, FontThemeInterface, TypeWeight } from '../Font';
|
|
11
11
|
import { FoundationLayer } from '../Foundation';
|
|
12
|
+
import type { A11yMode, ModePreference, PersistOption, ResolvedMode } from '../Mode/Mode.interface';
|
|
12
13
|
import { SemanticLayer } from '../Semantic';
|
|
13
14
|
import { SpacingInput, SpacingThemeInterface } from '../Spacing';
|
|
14
15
|
import type { SurfaceMode } from '../Surface';
|
|
@@ -27,6 +28,13 @@ export interface ThemeInputsInterface {
|
|
|
27
28
|
* @see ../Dimension/Dimension.props.ts (DIMENSION_MULTIPLIERS calibration)
|
|
28
29
|
*/
|
|
29
30
|
dimension?: Dimension;
|
|
31
|
+
/**
|
|
32
|
+
* Brand-level origin of the weight ladder (`light` / `regular` /
|
|
33
|
+
* `stronger`). Resolves `font.fontWeight` from a table instead of asking
|
|
34
|
+
* the consumer for raw 300/400/… numbers; `regular` is the stock ladder.
|
|
35
|
+
* Per-call-site `fontWeight` still overrides.
|
|
36
|
+
*/
|
|
37
|
+
typeWeight?: TypeWeight;
|
|
30
38
|
/**
|
|
31
39
|
* Component token tier overrides (ADR-020). Deep-merged over the
|
|
32
40
|
* defaults — override a single size of a single component without
|
|
@@ -82,6 +90,17 @@ export type Theme = {
|
|
|
82
90
|
* @see ../../docs/adr/ADR-020-component-token-tier.md
|
|
83
91
|
*/
|
|
84
92
|
component: ComponentTokensLayer;
|
|
93
|
+
/**
|
|
94
|
+
* Mode bridge (ADR-024): the literal light/dark pair behind a projected
|
|
95
|
+
* theme. Present on every theme the `ApollionProvider` hands out — the
|
|
96
|
+
* styled tree gets `light-dark()` pairs, `useApollionTheme().theme` gets the
|
|
97
|
+
* literal of the resolved mode, both tagged with the pair. Engine math
|
|
98
|
+
* uses `forModes(theme, fn)` to compute on both tables.
|
|
99
|
+
*/
|
|
100
|
+
modes?: {
|
|
101
|
+
light: Theme;
|
|
102
|
+
dark: Theme;
|
|
103
|
+
};
|
|
85
104
|
};
|
|
86
105
|
export type ThemeMode = 'light' | 'dark';
|
|
87
106
|
export interface ApollionProviderInterface {
|
|
@@ -135,23 +154,86 @@ export interface ApollionProviderInterface {
|
|
|
135
154
|
*/
|
|
136
155
|
colors?: ColorsInput;
|
|
137
156
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
157
|
+
* Mode preference — **controlled**. `'system'` follows `prefers-color-scheme`
|
|
158
|
+
* (and reacts to runtime changes); `'light'`/`'dark'` pin the mode. When set,
|
|
159
|
+
* the provider ignores its internal state: the parent is the source of truth
|
|
160
|
+
* and `setMode` only fires `onModeChange`. Added in 5.7.0 (ADR-024).
|
|
161
|
+
*/
|
|
162
|
+
mode?: ModePreference;
|
|
163
|
+
/**
|
|
164
|
+
* Initial mode preference — **uncontrolled**. Restored from `persist` when a
|
|
165
|
+
* value is stored. `'system'` = follow the OS.
|
|
166
|
+
*
|
|
167
|
+
* @default 'light' (`'system'` when the legacy `useSystemPreference` is on)
|
|
168
|
+
*/
|
|
169
|
+
defaultMode?: ModePreference;
|
|
170
|
+
/**
|
|
171
|
+
* SSR contract: the mode the server rendered with (e.g. from
|
|
172
|
+
* `readModeFromCookie`). The first client render uses the same value —
|
|
173
|
+
* hydration never mismatches — and a `'system'` preference is corrected
|
|
174
|
+
* from `matchMedia` before paint. Without it the client resolves the OS
|
|
175
|
+
* preference on the first render (fine for client-only apps).
|
|
176
|
+
*/
|
|
177
|
+
initialMode?: ResolvedMode;
|
|
178
|
+
/** Fires on every `setMode` with the new **preference** (`'system'` stays `'system'`). */
|
|
179
|
+
onModeChange?: (mode: ModePreference) => void;
|
|
180
|
+
/**
|
|
181
|
+
* Persist the preferences (`mode` under `storageKey`, `a11y` under
|
|
182
|
+
* `` `${storageKey}-a11y` ``): `'localStorage'`, `'cookie'` (readable by the
|
|
183
|
+
* server via `readModeFromCookie`), or a custom `ModeStorage` adapter.
|
|
184
|
+
* Pair with `<ApollionModeScript />` for a no-flash first paint.
|
|
141
185
|
*
|
|
142
186
|
* @default false
|
|
143
187
|
*/
|
|
188
|
+
persist?: PersistOption;
|
|
189
|
+
/**
|
|
190
|
+
* Storage key of the mode preference.
|
|
191
|
+
*
|
|
192
|
+
* @default 'apollion-mode'
|
|
193
|
+
*/
|
|
194
|
+
storageKey?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Mirror the resolved mode + a11y preset on `<html>` (`data-apollion-mode`,
|
|
197
|
+
* `data-apollion-a11y`, `style.colorScheme`) so native controls, scrollbars
|
|
198
|
+
* and `light-dark()` follow the engine. Removed on unmount.
|
|
199
|
+
*
|
|
200
|
+
* @default true
|
|
201
|
+
*/
|
|
202
|
+
syncDocument?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Attribute name written by `syncDocument` for the resolved mode.
|
|
205
|
+
*
|
|
206
|
+
* @default 'data-apollion-mode'
|
|
207
|
+
*/
|
|
208
|
+
attribute?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Accessibility preset — **controlled**. Orthogonal to the mode (D5): the
|
|
211
|
+
* preset remaps the brand/feedback seeds (`accessibilityPalettes`) and the
|
|
212
|
+
* engine still derives light + dark from the result, so `dark` +
|
|
213
|
+
* `colorblind` is a first-class combination. Only applies with `colors`.
|
|
214
|
+
*/
|
|
215
|
+
a11y?: A11yMode;
|
|
216
|
+
/**
|
|
217
|
+
* Initial accessibility preset — **uncontrolled**. Restored from `persist`.
|
|
218
|
+
*
|
|
219
|
+
* @default null
|
|
220
|
+
*/
|
|
221
|
+
defaultA11y?: A11yMode;
|
|
222
|
+
/** Fires on every `setA11y`. */
|
|
223
|
+
onA11yChange?: (a11y: A11yMode) => void;
|
|
224
|
+
/**
|
|
225
|
+
* @deprecated since 5.7.0 — use `defaultMode="system"` (uncontrolled) or
|
|
226
|
+
* `mode="system"` (controlled). Still honored: `true` ≡ `defaultMode: 'system'`.
|
|
227
|
+
*/
|
|
144
228
|
useSystemPreference?: boolean;
|
|
145
229
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* parent (e.g. a navbar toggle / `next-themes`). `toggleTheme` then only
|
|
149
|
-
* fires `onThemeModeChange`, without mutating local state.
|
|
230
|
+
* @deprecated since 5.7.0 — use `mode` (a controlled preference that also
|
|
231
|
+
* accepts `'system'`). Still honored as a controlled `'light' | 'dark'`.
|
|
150
232
|
*/
|
|
151
233
|
themeMode?: ThemeMode;
|
|
152
234
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
235
|
+
* @deprecated since 5.7.0 — use `onModeChange`. Still fired by `setMode`/
|
|
236
|
+
* `toggleTheme` with the **resolved** mode.
|
|
155
237
|
*/
|
|
156
238
|
onThemeModeChange?: (mode: ThemeMode) => void;
|
|
157
239
|
/**
|
|
@@ -188,11 +270,33 @@ export interface ApollionProviderInterface {
|
|
|
188
270
|
* @see ../Dimension/Dimension.interface.ts
|
|
189
271
|
*/
|
|
190
272
|
dimension?: Dimension;
|
|
273
|
+
/**
|
|
274
|
+
* Brand-level origin of the weight ladder (`light` / `regular` /
|
|
275
|
+
* `stronger`). Convenience prop equivalent to `createTheme({ typeWeight })`;
|
|
276
|
+
* like `dimension`, it only applies when the provider builds the theme.
|
|
277
|
+
*
|
|
278
|
+
* @default 'regular' (stock ladder)
|
|
279
|
+
*/
|
|
280
|
+
typeWeight?: TypeWeight;
|
|
191
281
|
children?: React.ReactNode;
|
|
192
282
|
}
|
|
193
283
|
export interface ApollionThemeContext {
|
|
194
284
|
theme: Theme;
|
|
285
|
+
/** Current mode preference (`'system'` when following the OS). */
|
|
286
|
+
mode: ModePreference;
|
|
287
|
+
/** The mode that renders (preference with `'system'` resolved). */
|
|
288
|
+
resolvedMode: ResolvedMode;
|
|
289
|
+
/** Sets the preference; persists it when `persist` is on. */
|
|
290
|
+
setMode: (mode: ModePreference) => void;
|
|
291
|
+
/** Current accessibility preset (`null` = stock palette). */
|
|
292
|
+
a11y: A11yMode;
|
|
293
|
+
/** Sets the preset; persists it when `persist` is on. */
|
|
294
|
+
setA11y: (a11y: A11yMode) => void;
|
|
295
|
+
/** `<html>` attribute carrying the resolved mode (`syncDocument`). */
|
|
296
|
+
attribute: string;
|
|
297
|
+
/** @deprecated since 5.7.0 — alias of `resolvedMode`. */
|
|
195
298
|
themeMode: ThemeMode;
|
|
299
|
+
/** @deprecated since 5.7.0 — use `setMode`. Flips the resolved mode (or sets the given one). */
|
|
196
300
|
toggleTheme: (mode?: ThemeMode) => void;
|
|
197
301
|
}
|
|
198
302
|
export type WithTheme<P> = P & {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Theme } from './ThemeProvider.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Mode bridge (APOLLION-DARK-MODE-ENGINE, ADR-024 — spike
|
|
4
|
+
* `2026-08-22-css-var-mode-bridge`): the styled tree receives ONE theme whose
|
|
5
|
+
* color leaves are `light-dark(<light>, <dark>)` pairs, so a mode flip is a
|
|
6
|
+
* `color-scheme` change on `<html>` — zero React re-render, identical class
|
|
7
|
+
* hashes in both modes, SSR-deterministic. Literal tables stay reachable as
|
|
8
|
+
* `theme.modes.{light,dark}` for engine math ({@link forModes}).
|
|
9
|
+
*/
|
|
10
|
+
/** The literal light/dark pair behind a projected theme. */
|
|
11
|
+
export interface ThemePair {
|
|
12
|
+
light: Theme;
|
|
13
|
+
dark: Theme;
|
|
14
|
+
}
|
|
15
|
+
/** `light-dark(a, b)` — collapsed to the literal when both sides agree (brand stops, runtime colors). */
|
|
16
|
+
export declare function lightDark(light: string, dark: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Runs color math on the literal tables of a projected theme and returns the
|
|
19
|
+
* `light-dark()` pair of the results. On a single (un-projected) theme it is
|
|
20
|
+
* just `fn(theme)`. Use it anywhere a literal is parsed at render time
|
|
21
|
+
* (`getContrastColor`, `readableColor`, `HextoRgb`) — those cannot parse a
|
|
22
|
+
* `light-dark()` string.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* color: forModes(theme, (t) => t.colors.getContrastColor(t.colors('primary')));
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function forModes<T extends string | undefined>(theme: Theme, fn: (literal: Theme) => T): T;
|
|
30
|
+
/**
|
|
31
|
+
* Projects a literal light/dark pair into the single theme the styled tree
|
|
32
|
+
* consumes. Only mode-varying color subtrees are paired (`colors`,
|
|
33
|
+
* `semantic.color`, `foundation.{bg,text,edge}`, `depth`); dimension-driven
|
|
34
|
+
* subtrees (spacing, font, border, component tokens) are shared by
|
|
35
|
+
* construction and keep the light references. Pure: a new object, inputs
|
|
36
|
+
* untouched; `theme.modes` carries the pair.
|
|
37
|
+
*/
|
|
38
|
+
export declare function projectModes(pair: ThemePair): Theme;
|
|
39
|
+
/** A single literal theme tagged with its pair — what `useApollionTheme().theme` hands to JS consumers. */
|
|
40
|
+
export declare function withModes(theme: Theme, pair: ThemePair): Theme;
|
|
41
|
+
/**
|
|
42
|
+
* Clears the bridge tag so an un-paired (single) theme carries an OWN
|
|
43
|
+
* `modes: undefined` key. Required because styled-components merges nested
|
|
44
|
+
* `<ThemeProvider>` themes shallowly (`{ ...outerTheme, ...innerTheme }`):
|
|
45
|
+
* a single-theme `ApollionProvider` nested under a mode-paired one would
|
|
46
|
+
* otherwise INHERIT the outer provider's `modes`, and {@link forModes}-based
|
|
47
|
+
* render math (Button/Link inks) would compute contrast against the outer
|
|
48
|
+
* seeds instead of the inner theme's — the "dark ink on a custom bg" bug
|
|
49
|
+
* (ADR-024). Always returns a fresh object with `modes` present-as-undefined
|
|
50
|
+
* so the shallow merge shadows any inherited pair.
|
|
51
|
+
*/
|
|
52
|
+
export declare function withoutModes(theme: Theme): Theme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,
|
|
1
|
+
import"../../chunks/chunk-4L2KOZIQ.esm.js";import{a,e as b,g as c}from"../../chunks/chunk-BFEEE3TE.esm.js";import"../../chunks/chunk-TLIKQFOT.esm.js";import"../../chunks/chunk-IA234JY2.esm.js";import"../../chunks/chunk-TG5BCBO4.esm.js";import"../../chunks/chunk-CCONLRLQ.esm.js";import"../../chunks/chunk-6XX3UO2Y.esm.js";import"../../chunks/chunk-BERIBF3O.esm.js";import"../../chunks/chunk-YZQXTNVA.esm.js";import"../../chunks/chunk-Z7GJDO5T.esm.js";import"../../chunks/chunk-P7RR4ZHS.esm.js";import"../../chunks/chunk-JOKVE3IX.esm.js";import"../../chunks/chunk-CWRWYU7D.esm.js";import"../../chunks/chunk-PFLBU7HG.esm.js";import"../../chunks/chunk-IPANNHV3.esm.js";import"../../chunks/chunk-3DUB5C4Z.esm.js";import"../../chunks/chunk-KT6QQ3UJ.esm.js";import"../../chunks/chunk-3KOZ6RXR.esm.js";import"../../chunks/chunk-VMIXRIQ2.esm.js";import"../../chunks/chunk-YC44Q5HI.esm.js";import"../../chunks/chunk-BFABFZI7.esm.js";import"../../chunks/chunk-U525YXTZ.esm.js";import"../../chunks/chunk-STSRIPD6.esm.js";import"../../chunks/chunk-XVPUSCK5.esm.js";import"../../chunks/chunk-BV6GHAF7.esm.js";import"../../chunks/chunk-G5Z7USXC.esm.js";import"../../chunks/chunk-AXUWC2WH.esm.js";import"../../chunks/chunk-GZONWSRB.esm.js";export{c as ApollionProvider,a as createTheme,b as useApollionTheme};
|
package/lib/themes/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export * from './Dimension';
|
|
|
9
9
|
export * from './Font';
|
|
10
10
|
export * from './Foundation';
|
|
11
11
|
export * from './GlobalStyle';
|
|
12
|
+
export * from './Ground';
|
|
13
|
+
export * from './Mode';
|
|
12
14
|
export * from './Semantic';
|
|
13
15
|
export * from './Spacing';
|
|
14
16
|
export * from './Surface';
|
package/lib/themes/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunks/chunk-
|
|
1
|
+
import"../chunks/chunk-EBOJSNZ5.esm.js";import{a as Wa}from"../chunks/chunk-HPM5AX5Z.esm.js";import{a as Xa}from"../chunks/chunk-2XTVIQMG.esm.js";import{a as Ya}from"../chunks/chunk-4ZHLV35P.esm.js";import"../chunks/chunk-4L2KOZIQ.esm.js";import{a as Ua,b as Va}from"../chunks/chunk-MPKFMMCD.esm.js";import{a as Qa,e as Sa,g as Ta}from"../chunks/chunk-BFEEE3TE.esm.js";import{a as va,b as wa,c as xa,d as ya,e as za,f as Aa,g as Ba,h as Ca,i as Da,j as Ea,k as Fa,l as Ga,m as Ha,n as Ia,o as Ja,p as Ka,q as La,r as Ma}from"../chunks/chunk-TLIKQFOT.esm.js";import"../chunks/chunk-IA234JY2.esm.js";import{a as Oa,b as Pa}from"../chunks/chunk-TG5BCBO4.esm.js";import{a as Ra}from"../chunks/chunk-CCONLRLQ.esm.js";import{b as Na}from"../chunks/chunk-6XX3UO2Y.esm.js";import{b as ma}from"../chunks/chunk-BERIBF3O.esm.js";import{a as na}from"../chunks/chunk-YZQXTNVA.esm.js";import"../chunks/chunk-Z7GJDO5T.esm.js";import{a as ra,b as sa,c as ta}from"../chunks/chunk-P7RR4ZHS.esm.js";import{a as oa,b as pa,c as qa}from"../chunks/chunk-JOKVE3IX.esm.js";import"../chunks/chunk-CWRWYU7D.esm.js";import{a as ua}from"../chunks/chunk-PFLBU7HG.esm.js";import{a as ha}from"../chunks/chunk-IPANNHV3.esm.js";import{a as ia}from"../chunks/chunk-3DUB5C4Z.esm.js";import{a as ja,b as ka,c as la}from"../chunks/chunk-KT6QQ3UJ.esm.js";import"../chunks/chunk-3KOZ6RXR.esm.js";import"../chunks/chunk-VMIXRIQ2.esm.js";import{a as _,b as $,c as aa,d as ba,e as ca,f as da,g as ea,h as fa,i as ga}from"../chunks/chunk-JQ66DKSQ.esm.js";import"../chunks/chunk-YC44Q5HI.esm.js";import{a as X,b as Y,c as Z}from"../chunks/chunk-BFABFZI7.esm.js";import{a as P,b as Q,c as R,d as S,e as T,f as U,g as V,h as W}from"../chunks/chunk-U525YXTZ.esm.js";import{a as F,b as G,c as H,d as I,e as J,f as K,g as L,h as M,i as N,j as O}from"../chunks/chunk-STSRIPD6.esm.js";import{A as y,B as z,C as A,D as B,E as C,F as D,G as E,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,v as t,w as u,x as v,y as w,z as x}from"../chunks/chunk-XVPUSCK5.esm.js";import"../chunks/chunk-BV6GHAF7.esm.js";import"../chunks/chunk-G5Z7USXC.esm.js";import"../chunks/chunk-AXUWC2WH.esm.js";import"../chunks/chunk-GZONWSRB.esm.js";export{xa as A11Y_ATTRIBUTE,Xa as ApollionModeScript,Ta as ApollionProvider,ya as DARK_SCHEME_QUERY,pa as DEFAULT_DIMENSION,Y as DEPTH_SHADOW,oa as DIMENSION_MULTIPLIERS,n as DISABLED_NEUTRAL_INDICES,J as EDGE_ALPHA,$ as GROUND_INK_ROLES,_ as GROUND_VAR_PREFIX,Va as GlobalStyle,Ua as GlobalStyleComponent,Wa as Ground,G as HALATION_FLOORS,d as HextoRgb,I as INK_APCA_MIN,H as INK_MIX,F as LADDER_DELTAS,f as MIN_CONTRAST_AA,t as MIN_STATE_CONTRAST,wa as MODE_ATTRIBUTE,va as MODE_STORAGE_KEY,l as NEUTRAL_TEXT_INDICES,T as OKABE_ITO,r as QUIET_NEUTRAL_INDICES,k as READABLE_TEXT_PALETTES,aa as ROOT_GROUND_TOKEN,u as STATE_DELTA_L_JND,o as STRUCTURAL_NEUTRAL_INDICES,Ya as SurfaceProvider,ra as TYPE_WEIGHT_LADDERS,K as WASH_ALPHA,za as a11yStorageKey,W as accessibilityPalettes,ha as animation,b as apcaContrast,a as apcaLuminance,ga as auditGroundVars,ja as breakpointsValues,x as clampLightness,La as clearDocumentMode,U as colorblindPalette,g as contrastRatio,Ga as cookieAdapter,la as createBreakpoints,Q as createColors,ma as createComponentTokens,na as createDeepTheme,Z as createDeth,ta as createFont,ua as createFoundation,m as createReadableTextLayer,Na as createSemantic,Pa as createSpacing,Qa as createTheme,ia as defaultInputBorder,ka as defaultInputBreakpoints,P as defaultInputColors,sa as defaultInputFont,Oa as defaultInputSpacing,i as getColor,j as getContrastColor,Ma as getModeScript,qa as getMultiplierForDimension,e as getOppositeColor,R as grayscalePalette,da as groundInkPath,ba as groundVar,ca as groundVarRef,fa as groundVars,S as highContrastPalette,Ra as invertForSurface,Ba as isA11yMode,v as isDarkSurface,Aa as isModePreference,ea as isOpaqueGround,X as levelValues,Ea as localStorageAdapter,c as mixOklch,D as mountActionColors,C as mountBaseColors,A as mountGreyscaleColors,E as mountMainColors,B as mountNeutralColors,z as mountSingleColor,M as oppositePolarity,Ca as prefersDarkScheme,Ja as readA11yFromCookie,Fa as readCookieValue,Ia as readModeFromCookie,h as readableColor,p as resolveDisabledNeutral,Da as resolveMode,O as resolveOppositeLadder,L as resolvePolarity,s as resolveQuietPalette,Ha as resolveStorage,q as resolveStructuralNeutrals,N as resolveSurfaceLadder,w as shiftLightness,Ka as syncDocumentMode,V as toDarkColors,y as toRgbaString,Sa as useApollionTheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../../chunks/chunk-
|
|
1
|
+
import{a,b}from"../../../chunks/chunk-3KOZ6RXR.esm.js";import"../../../chunks/chunk-G5Z7USXC.esm.js";import"../../../chunks/chunk-AXUWC2WH.esm.js";import"../../../chunks/chunk-GZONWSRB.esm.js";export{a as BreakpointsContext,b as BreakpointsProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o,b as r}from"../../chunks/chunk-
|
|
1
|
+
import{a as o,b as r}from"../../chunks/chunk-3KOZ6RXR.esm.js";import"../../chunks/chunk-G5Z7USXC.esm.js";import"../../chunks/chunk-AXUWC2WH.esm.js";import"../../chunks/chunk-GZONWSRB.esm.js";export{o as BreakpointsContext,r as BreakpointsProvider};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* APCA (Accessible Perceptual Contrast Algorithm) — `Lc` lightness contrast
|
|
3
|
+
* for self-illuminated displays, the WCAG 3 candidate metric. First-party port
|
|
4
|
+
* of the public apca-w3 0.1.9 reference constants (SAPC-4g), kept inside the
|
|
5
|
+
* in-house color engine (ADR-016) so the dark-polarity invariants of the mode
|
|
6
|
+
* engine (APOLLION-DARK-MODE-ENGINE) can be asserted without a dependency.
|
|
7
|
+
*
|
|
8
|
+
* Sign convention: positive `Lc` = dark text on a light ground; negative =
|
|
9
|
+
* light text on a dark ground. Magnitude is what the floors compare against
|
|
10
|
+
* (`|Lc| ≥ 75` body, `≥ 60` secondary, `≥ 45` large text).
|
|
11
|
+
*
|
|
12
|
+
* Input: 6- or 3-digit hex (with or without `#`). Anything else → `NaN`
|
|
13
|
+
* (callers treat `NaN` as "not measurable", never as a pass).
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/Myndex/apca-w3 (reference implementation + vectors)
|
|
16
|
+
*/
|
|
17
|
+
/** sRGB hex → APCA estimated screen luminance `Y` (simple 2.4 gamma, per SAPC-4g). */
|
|
18
|
+
export declare function apcaLuminance(hex: string): number;
|
|
19
|
+
/**
|
|
20
|
+
* APCA `Lc` for `text` over `background` (both hex). Polarity-aware: the
|
|
21
|
+
* exponents differ for dark-on-light vs light-on-dark, and the result is
|
|
22
|
+
* signed accordingly.
|
|
23
|
+
*/
|
|
24
|
+
export declare function apcaContrast(text: string, background: string): number;
|