@kimdw-rtk/ui 0.0.18 → 0.0.21
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/dist/_virtual/cjs.js +5 -0
- package/dist/_virtual/cssesc.js +5 -0
- package/dist/_virtual/jsx-runtime.js +5 -0
- package/dist/_virtual/jsx-runtime2.js +3 -0
- package/dist/_virtual/react-jsx-runtime.development.js +3 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +3 -0
- package/dist/components/Accordion/Accordion.css.d.ts +3 -6
- package/dist/components/Accordion/Accordion.css.d.ts.map +1 -0
- package/dist/components/Accordion/Accordion.css.js +27 -0
- package/dist/components/Accordion/Accordion.d.ts +6 -11
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion/Accordion.js +14 -0
- package/dist/components/Accordion/Accordion.spec.d.ts +2 -2
- package/dist/components/Accordion/Accordion.spec.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContent.css.d.ts +3 -6
- package/dist/components/Accordion/AccordionContent.css.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContent.css.js +25 -0
- package/dist/components/Accordion/AccordionContent.d.ts +4 -6
- package/dist/components/Accordion/AccordionContent.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContent.js +56 -0
- package/dist/components/Accordion/AccordionContext.d.ts +4 -7
- package/dist/components/Accordion/AccordionContext.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContext.js +8 -0
- package/dist/components/Accordion/AccordionTrigger.css.d.ts +3 -6
- package/dist/components/Accordion/AccordionTrigger.css.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionTrigger.css.js +42 -0
- package/dist/components/Accordion/AccordionTrigger.d.ts +4 -6
- package/dist/components/Accordion/AccordionTrigger.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionTrigger.js +16 -0
- package/dist/components/Accordion/index.d.ts +4 -10
- package/dist/components/Accordion/index.d.ts.map +1 -0
- package/dist/components/Alert/index.d.ts +4 -6
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Alert/index.js +14 -0
- package/dist/components/Box/Box.css.d.ts +2 -5
- package/dist/components/Box/Box.css.d.ts.map +1 -0
- package/dist/components/Box/Box.css.js +19 -0
- package/dist/components/Box/Box.spec.d.ts +2 -2
- package/dist/components/Box/Box.spec.d.ts.map +1 -0
- package/dist/components/Box/index.d.ts +7 -11
- package/dist/components/Box/index.d.ts.map +1 -0
- package/dist/components/Box/index.js +14 -0
- package/dist/components/Button/Button.css.d.ts +146 -2
- package/dist/components/Button/Button.css.d.ts.map +1 -0
- package/dist/components/Button/Button.css.js +185 -0
- package/dist/components/Button/Button.spec.d.ts +2 -2
- package/dist/components/Button/Button.spec.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +7 -13
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +22 -0
- package/dist/components/Card/Card.css.d.ts +61 -2
- package/dist/components/Card/Card.css.d.ts.map +1 -0
- package/dist/components/Card/Card.css.js +71 -0
- package/dist/components/Card/Card.d.ts +7 -13
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.js +14 -0
- package/dist/components/Card/Card.spec.d.ts +2 -2
- package/dist/components/Card/Card.spec.d.ts.map +1 -0
- package/dist/components/Card/CardContent.css.d.ts +2 -3
- package/dist/components/Card/CardContent.css.d.ts.map +1 -0
- package/dist/components/Card/CardContent.css.js +9 -0
- package/dist/components/Card/CardContent.d.ts +4 -9
- package/dist/components/Card/CardContent.d.ts.map +1 -0
- package/dist/components/Card/CardContent.js +12 -0
- package/dist/components/Card/CardInteraction.css.d.ts +2 -3
- package/dist/components/Card/CardInteraction.css.d.ts.map +1 -0
- package/dist/components/Card/CardInteraction.css.js +11 -0
- package/dist/components/Card/CardInteraction.d.ts +4 -9
- package/dist/components/Card/CardInteraction.d.ts.map +1 -0
- package/dist/components/Card/CardInteraction.js +14 -0
- package/dist/components/Card/CardThumbnail.css.d.ts +2 -3
- package/dist/components/Card/CardThumbnail.css.d.ts.map +1 -0
- package/dist/components/Card/CardThumbnail.css.js +8 -0
- package/dist/components/Card/CardThumbnail.d.ts +4 -9
- package/dist/components/Card/CardThumbnail.d.ts.map +1 -0
- package/dist/components/Card/CardThumbnail.js +12 -0
- package/dist/components/Card/index.d.ts +5 -10
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Chip/Chip.css.d.ts +46 -2
- package/dist/components/Chip/Chip.css.d.ts.map +1 -0
- package/dist/components/Chip/Chip.css.js +59 -0
- package/dist/components/Chip/Chip.d.ts +6 -12
- package/dist/components/Chip/Chip.d.ts.map +1 -0
- package/dist/components/Chip/Chip.js +14 -0
- package/dist/components/Chip/Chip.spec.d.ts +2 -2
- package/dist/components/Chip/Chip.spec.d.ts.map +1 -0
- package/dist/components/Chip/index.d.ts +2 -7
- package/dist/components/Chip/index.d.ts.map +1 -0
- package/dist/components/Confirm/index.d.ts +4 -6
- package/dist/components/Confirm/index.d.ts.map +1 -0
- package/dist/components/Confirm/index.js +19 -0
- package/dist/components/Dialog/Dialog.css.d.ts +3 -4
- package/dist/components/Dialog/Dialog.css.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.css.js +22 -0
- package/dist/components/Dialog/Dialog.d.ts +4 -9
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.js +13 -0
- package/dist/components/Dialog/Dialog.spec.d.ts +2 -2
- package/dist/components/Dialog/Dialog.spec.d.ts.map +1 -0
- package/dist/components/Dialog/DialogContent.css.d.ts +2 -3
- package/dist/components/Dialog/DialogContent.css.d.ts.map +1 -0
- package/dist/components/Dialog/DialogContent.css.js +15 -0
- package/dist/components/Dialog/DialogContent.d.ts +4 -9
- package/dist/components/Dialog/DialogContent.d.ts.map +1 -0
- package/dist/components/Dialog/DialogContent.js +13 -0
- package/dist/components/Dialog/DialogFooter.css.d.ts +3 -4
- package/dist/components/Dialog/DialogFooter.css.d.ts.map +1 -0
- package/dist/components/Dialog/DialogFooter.d.ts +4 -9
- package/dist/components/Dialog/DialogFooter.d.ts.map +1 -0
- package/dist/components/Dialog/DialogFooter.js +12 -0
- package/dist/components/Dialog/DialogHeader.css.d.ts +3 -4
- package/dist/components/Dialog/DialogHeader.css.d.ts.map +1 -0
- package/dist/components/Dialog/DialogHeader.css.js +26 -0
- package/dist/components/Dialog/DialogHeader.d.ts +4 -9
- package/dist/components/Dialog/DialogHeader.d.ts.map +1 -0
- package/dist/components/Dialog/DialogHeader.js +14 -0
- package/dist/components/Dialog/index.d.ts +5 -9
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Navigation/Navigation.spec.d.ts +2 -2
- package/dist/components/Navigation/Navigation.spec.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationAside.css.d.ts +2 -3
- package/dist/components/Navigation/NavigationAside.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationAside.css.js +9 -0
- package/dist/components/Navigation/NavigationAside.d.ts +4 -9
- package/dist/components/Navigation/NavigationAside.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationAside.js +12 -0
- package/dist/components/Navigation/NavigationBar.css.d.ts +15 -2
- package/dist/components/Navigation/NavigationBar.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationBar.css.js +35 -0
- package/dist/components/Navigation/NavigationBar.d.ts +6 -12
- package/dist/components/Navigation/NavigationBar.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationBar.js +14 -0
- package/dist/components/Navigation/NavigationContainer.css.d.ts +2 -3
- package/dist/components/Navigation/NavigationContainer.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationContainer.css.js +12 -0
- package/dist/components/Navigation/NavigationContainer.d.ts +4 -9
- package/dist/components/Navigation/NavigationContainer.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationContainer.js +12 -0
- package/dist/components/Navigation/NavigationDrawer.css.d.ts +4 -7
- package/dist/components/Navigation/NavigationDrawer.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationDrawer.css.js +52 -0
- package/dist/components/Navigation/NavigationDrawer.d.ts +4 -6
- package/dist/components/Navigation/NavigationDrawer.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationDrawer.js +27 -0
- package/dist/components/Navigation/NavigationItem.css.d.ts +2 -5
- package/dist/components/Navigation/NavigationItem.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationItem.css.js +38 -0
- package/dist/components/Navigation/NavigationItem.d.ts +6 -11
- package/dist/components/Navigation/NavigationItem.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationItem.js +12 -0
- package/dist/components/Navigation/NavigationLogo.css.d.ts +2 -3
- package/dist/components/Navigation/NavigationLogo.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationLogo.css.js +7 -0
- package/dist/components/Navigation/NavigationLogo.d.ts +4 -9
- package/dist/components/Navigation/NavigationLogo.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationLogo.js +12 -0
- package/dist/components/Navigation/NavigationMenu.css.d.ts +2 -1
- package/dist/components/Navigation/NavigationMenu.css.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationMenu.css.js +22 -0
- package/dist/components/Navigation/NavigationMenu.d.ts +5 -10
- package/dist/components/Navigation/NavigationMenu.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationMenu.js +14 -0
- package/dist/components/Navigation/index.d.ts +8 -16
- package/dist/components/Navigation/index.d.ts.map +1 -0
- package/dist/components/Range/Range.css.d.ts +49 -2
- package/dist/components/Range/Range.css.d.ts.map +1 -0
- package/dist/components/Range/Range.css.js +96 -0
- package/dist/components/Range/Range.d.ts +6 -12
- package/dist/components/Range/Range.d.ts.map +1 -0
- package/dist/components/Range/Range.js +40 -0
- package/dist/components/Range/Range.spec.d.ts +2 -2
- package/dist/components/Range/Range.spec.d.ts.map +1 -0
- package/dist/components/Range/index.d.ts +2 -7
- package/dist/components/Range/index.d.ts.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.css.d.ts +6 -1
- package/dist/components/ScrollArea/ScrollArea.css.d.ts.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.css.js +35 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +5 -10
- package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.js +37 -0
- package/dist/components/ScrollArea/ScrollArea.spec.d.ts +2 -2
- package/dist/components/ScrollArea/ScrollArea.spec.d.ts.map +1 -0
- package/dist/components/ScrollArea/index.d.ts +2 -7
- package/dist/components/ScrollArea/index.d.ts.map +1 -0
- package/dist/components/Select/Select.css.d.ts +14 -2
- package/dist/components/Select/Select.css.d.ts.map +1 -0
- package/dist/components/Select/Select.css.js +23 -0
- package/dist/components/Select/Select.d.ts +8 -16
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/Select.js +49 -0
- package/dist/components/Select/Select.spec.d.ts +2 -2
- package/dist/components/Select/Select.spec.d.ts.map +1 -0
- package/dist/components/Select/SelectContext.d.ts +5 -7
- package/dist/components/Select/SelectContext.d.ts.map +1 -0
- package/dist/components/Select/SelectContext.js +33 -0
- package/dist/components/Select/SelectOption.css.d.ts +2 -3
- package/dist/components/Select/SelectOption.css.d.ts.map +1 -0
- package/dist/components/Select/SelectOption.css.js +13 -0
- package/dist/components/Select/SelectOption.d.ts +4 -6
- package/dist/components/Select/SelectOption.d.ts.map +1 -0
- package/dist/components/Select/SelectOption.js +25 -0
- package/dist/components/Select/SelectOptionList.css.d.ts +2 -5
- package/dist/components/Select/SelectOptionList.css.d.ts.map +1 -0
- package/dist/components/Select/SelectOptionList.css.js +58 -0
- package/dist/components/Select/SelectOptionList.d.ts +4 -6
- package/dist/components/Select/SelectOptionList.d.ts.map +1 -0
- package/dist/components/Select/SelectOptionList.js +35 -0
- package/dist/components/Select/SelectTrigger.css.d.ts +4 -7
- package/dist/components/Select/SelectTrigger.css.d.ts.map +1 -0
- package/dist/components/Select/SelectTrigger.css.js +62 -0
- package/dist/components/Select/SelectTrigger.d.ts +6 -12
- package/dist/components/Select/SelectTrigger.d.ts.map +1 -0
- package/dist/components/Select/SelectTrigger.js +21 -0
- package/dist/components/Select/index.d.ts +3 -11
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.css.d.ts +2 -3
- package/dist/components/Skeleton/Skeleton.css.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.css.js +22 -0
- package/dist/components/Skeleton/Skeleton.spec.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.spec.d.ts.map +1 -0
- package/dist/components/Skeleton/index.d.ts +5 -10
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Skeleton/index.js +12 -0
- package/dist/components/Table/Table.css.d.ts +3 -1
- package/dist/components/Table/Table.css.d.ts.map +1 -0
- package/dist/components/Table/Table.css.js +10 -0
- package/dist/components/Table/Table.d.ts +5 -10
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/Table.js +14 -0
- package/dist/components/Table/Table.spec.d.ts +2 -2
- package/dist/components/Table/Table.spec.d.ts.map +1 -0
- package/dist/components/Table/TableBody.d.ts +4 -10
- package/dist/components/Table/TableBody.d.ts.map +1 -0
- package/dist/components/Table/TableBody.js +9 -0
- package/dist/components/Table/TableCell.css.d.ts +2 -3
- package/dist/components/Table/TableCell.css.d.ts.map +1 -0
- package/dist/components/Table/TableCell.css.js +35 -0
- package/dist/components/Table/TableCell.d.ts +5 -10
- package/dist/components/Table/TableCell.d.ts.map +1 -0
- package/dist/components/Table/TableCell.js +10 -0
- package/dist/components/Table/TableHead.css.d.ts +2 -3
- package/dist/components/Table/TableHead.css.d.ts.map +1 -0
- package/dist/components/Table/TableHead.css.js +11 -0
- package/dist/components/Table/TableHead.d.ts +5 -10
- package/dist/components/Table/TableHead.d.ts.map +1 -0
- package/dist/components/Table/TableHead.js +10 -0
- package/dist/components/Table/TableHeader.d.ts +4 -10
- package/dist/components/Table/TableHeader.d.ts.map +1 -0
- package/dist/components/Table/TableHeader.js +9 -0
- package/dist/components/Table/TableRow.css.d.ts +2 -3
- package/dist/components/Table/TableRow.css.d.ts.map +1 -0
- package/dist/components/Table/TableRow.css.js +5 -0
- package/dist/components/Table/TableRow.d.ts +4 -10
- package/dist/components/Table/TableRow.d.ts.map +1 -0
- package/dist/components/Table/TableRow.js +10 -0
- package/dist/components/Table/index.d.ts +7 -13
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +4 -9
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.js +13 -0
- package/dist/components/Tabs/Tabs.spec.d.ts +2 -2
- package/dist/components/Tabs/Tabs.spec.d.ts.map +1 -0
- package/dist/components/Tabs/TabsContent.d.ts +5 -10
- package/dist/components/Tabs/TabsContent.d.ts.map +1 -0
- package/dist/components/Tabs/TabsContent.js +19 -0
- package/dist/components/Tabs/TabsList.css.d.ts +2 -3
- package/dist/components/Tabs/TabsList.css.d.ts.map +1 -0
- package/dist/components/Tabs/TabsList.css.js +11 -0
- package/dist/components/Tabs/TabsList.d.ts +4 -9
- package/dist/components/Tabs/TabsList.d.ts.map +1 -0
- package/dist/components/Tabs/TabsList.js +12 -0
- package/dist/components/Tabs/TabsProvider.d.ts +5 -7
- package/dist/components/Tabs/TabsProvider.d.ts.map +1 -0
- package/dist/components/Tabs/TabsProvider.js +8 -0
- package/dist/components/Tabs/TabsTrigger.css.d.ts +2 -5
- package/dist/components/Tabs/TabsTrigger.css.d.ts.map +1 -0
- package/dist/components/Tabs/TabsTrigger.css.js +32 -0
- package/dist/components/Tabs/TabsTrigger.d.ts +4 -9
- package/dist/components/Tabs/TabsTrigger.d.ts.map +1 -0
- package/dist/components/Tabs/TabsTrigger.js +21 -0
- package/dist/components/Tabs/index.d.ts +5 -9
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/TextField/TextField.css.d.ts +49 -2
- package/dist/components/TextField/TextField.css.d.ts.map +1 -0
- package/dist/components/TextField/TextField.css.js +62 -0
- package/dist/components/TextField/TextField.spec.d.ts +2 -2
- package/dist/components/TextField/TextField.spec.d.ts.map +1 -0
- package/dist/components/TextField/index.d.ts +6 -12
- package/dist/components/TextField/index.d.ts.map +1 -0
- package/dist/components/TextField/index.js +14 -0
- package/dist/components/Toast/Toast.css.d.ts +26 -2
- package/dist/components/Toast/Toast.css.d.ts.map +1 -0
- package/dist/components/Toast/Toast.css.js +65 -0
- package/dist/components/Toast/Toast.spec.d.ts +2 -2
- package/dist/components/Toast/Toast.spec.d.ts.map +1 -0
- package/dist/components/Toast/index.d.ts +6 -12
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +17 -0
- package/dist/components/Typography/Typography.css.d.ts +10 -2
- package/dist/components/Typography/Typography.css.d.ts.map +1 -0
- package/dist/components/Typography/Typography.css.js +18 -0
- package/dist/components/Typography/Typography.spec.d.ts +2 -2
- package/dist/components/Typography/Typography.spec.d.ts.map +1 -0
- package/dist/components/Typography/index.d.ts +7 -12
- package/dist/components/Typography/index.d.ts.map +1 -0
- package/dist/components/Typography/index.js +14 -0
- package/dist/components/index.d.ts +19 -64
- package/dist/components/index.d.ts.map +1 -0
- package/dist/contexts/UIProvider.d.ts +5 -7
- package/dist/contexts/UIProvider.d.ts.map +1 -0
- package/dist/contexts/UIProvider.js +10 -0
- package/dist/contexts/index.d.ts +2 -4
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +6 -13
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useDialog/index.d.ts +3 -5
- package/dist/hooks/useDialog/index.d.ts.map +1 -0
- package/dist/hooks/useDialog/index.js +31 -0
- package/dist/hooks/useDialog/useDialog.spec.d.ts +2 -2
- package/dist/hooks/useDialog/useDialog.spec.d.ts.map +1 -0
- package/dist/hooks/useMouseScroll/index.d.ts +2 -3
- package/dist/hooks/useMouseScroll/index.d.ts.map +1 -0
- package/dist/hooks/useMouseScroll/index.js +49 -0
- package/dist/hooks/usePointerSlider/index.d.ts +2 -3
- package/dist/hooks/usePointerSlider/index.d.ts.map +1 -0
- package/dist/hooks/usePointerSlider/index.js +46 -0
- package/dist/hooks/useRipple/index.d.ts +3 -6
- package/dist/hooks/useRipple/index.d.ts.map +1 -0
- package/dist/hooks/useRipple/index.js +111 -0
- package/dist/hooks/useRipple/ripple.css.d.ts +3 -6
- package/dist/hooks/useRipple/ripple.css.d.ts.map +1 -0
- package/dist/hooks/useRipple/ripple.css.js +33 -0
- package/dist/hooks/useToast/ToastContainer.css.d.ts +2 -3
- package/dist/hooks/useToast/ToastContainer.css.d.ts.map +1 -0
- package/dist/hooks/useToast/ToastContainer.css.js +13 -0
- package/dist/hooks/useToast/ToastContainer.d.ts +4 -6
- package/dist/hooks/useToast/ToastContainer.d.ts.map +1 -0
- package/dist/hooks/useToast/ToastContainer.js +8 -0
- package/dist/hooks/useToast/ToastProvider.d.ts +7 -15
- package/dist/hooks/useToast/ToastProvider.d.ts.map +1 -0
- package/dist/hooks/useToast/ToastProvider.js +49 -0
- package/dist/hooks/useToast/index.d.ts +3 -14
- package/dist/hooks/useToast/index.d.ts.map +1 -0
- package/dist/hooks/useToast/index.js +13 -0
- package/dist/index.d.ts +9 -77
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +78 -0
- package/dist/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +55 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/adapter/dist/vanilla-extract-css-adapter.esm.js +51 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/taggedTemplateLiteral-10998315.esm.js +12 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/transformCss-0dba36bf.esm.js +955 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js +325 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.esm.js +20 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/functionSerializer/dist/vanilla-extract-css-functionSerializer.esm.js +11 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0/node_modules/@vanilla-extract/css/injectStyles/dist/vanilla-extract-css-injectStyles.esm.js +22 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_private@1.0.9/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js +26 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js +111 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_recipes@0.5.7_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/recipes/dist/vanilla-extract-recipes.esm.js +43 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_sprinkles@1.6.5_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/sprinkles/dist/createSprinkles-74286718.esm.js +190 -0
- package/dist/node_modules/.pnpm/@vanilla-extract_sprinkles@1.6.5_@vanilla-extract_css@1.17.4_babel-plugin-macros@3.1.0_/node_modules/@vanilla-extract/sprinkles/dist/vanilla-extract-sprinkles.esm.js +146 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +3 -0
- package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/parse.js +423 -0
- package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/types.js +28 -0
- package/dist/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js +119 -0
- package/dist/node_modules/.pnpm/dedent@1.6.0_babel-plugin-macros@3.1.0/node_modules/dedent/dist/dedent.js +68 -0
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js +142 -0
- package/dist/node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/esm/index.js +1542 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js +45 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js +30 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/align-justify.js +18 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js +14 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js +17 -0
- package/dist/node_modules/.pnpm/lucide-react@0.503.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js +28 -0
- package/dist/node_modules/.pnpm/media-query-parser@2.0.2/node_modules/media-query-parser/dist/media-query-parser.esm.js +1378 -0
- package/dist/node_modules/.pnpm/modern-ahocorasick@1.1.0/node_modules/modern-ahocorasick/dist/index.js +101 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js +1315 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js +24 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js +19 -0
- package/dist/styles/globalStyle.css.d.ts +2 -2
- package/dist/styles/globalStyle.css.d.ts.map +1 -0
- package/dist/styles/index.d.ts +5 -3
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/layers.css.d.ts +3 -4
- package/dist/styles/layers.css.d.ts.map +1 -0
- package/dist/styles/layers.css.js +6 -0
- package/dist/styles/overlay.css.d.ts +4 -5
- package/dist/styles/overlay.css.d.ts.map +1 -0
- package/dist/styles/overlay.css.js +34 -0
- package/dist/styles/sprinkles.css.d.ts +7 -8
- package/dist/styles/sprinkles.css.d.ts.map +1 -0
- package/dist/styles/sprinkles.css.js +124 -0
- package/dist/styles/sx.d.ts +3 -5
- package/dist/styles/sx.d.ts.map +1 -0
- package/dist/styles/sx.js +13 -0
- package/dist/tests/uiTest.d.ts +3 -5
- package/dist/tests/uiTest.d.ts.map +1 -0
- package/dist/themes/darkTheme.css.d.ts +2 -3
- package/dist/themes/darkTheme.css.d.ts.map +1 -0
- package/dist/themes/darkTheme.css.js +32 -0
- package/dist/themes/index.d.ts +4 -3
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/lightTheme.css.d.ts +2 -3
- package/dist/themes/lightTheme.css.d.ts.map +1 -0
- package/dist/themes/lightTheme.css.js +32 -0
- package/dist/themes/theme.css.d.ts +2 -3
- package/dist/themes/theme.css.d.ts.map +1 -0
- package/dist/themes/theme.css.js +24 -0
- package/dist/tokens/index.d.ts +6 -5
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/scale/color.d.ts +5 -6
- package/dist/tokens/scale/color.d.ts.map +1 -0
- package/dist/tokens/scale/color.js +602 -0
- package/dist/tokens/semantic/breakpoint.d.ts +2 -3
- package/dist/tokens/semantic/breakpoint.d.ts.map +1 -0
- package/dist/tokens/semantic/breakpoint.js +4 -0
- package/dist/tokens/semantic/color.d.ts +2 -3
- package/dist/tokens/semantic/color.d.ts.map +1 -0
- package/dist/tokens/semantic/color.js +12 -0
- package/dist/tokens/semantic/spacing.d.ts +2 -3
- package/dist/tokens/semantic/spacing.d.ts.map +1 -0
- package/dist/tokens/semantic/spacing.js +11 -0
- package/dist/tokens/semantic/typography.d.ts +2 -3
- package/dist/tokens/semantic/typography.d.ts.map +1 -0
- package/dist/tokens/semantic/typography.js +34 -0
- package/dist/types/index.d.ts +2 -5
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/ui.types.d.ts +8 -9
- package/dist/types/ui.types.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/sprinklesUtils.d.ts +4 -6
- package/dist/utils/sprinklesUtils.d.ts.map +1 -0
- package/dist/utils/sprinklesUtils.js +22 -0
- package/dist/utils/styleUtils.css.d.ts +5 -7
- package/dist/utils/styleUtils.css.d.ts.map +1 -0
- package/dist/utils/styleUtils.css.js +64 -0
- package/package.json +8 -2
- package/dist/Button.css-CzeAAfQg.d.ts +0 -156
- package/dist/Card.css-CotPlKu4.d.ts +0 -69
- package/dist/Chip.css-lxhSCCWQ.d.ts +0 -54
- package/dist/NavigationBar.css-Dryo_NT0.d.ts +0 -24
- package/dist/NavigationMenu.css-B_dOkuGn.d.ts +0 -8
- package/dist/Range.css-DcxHoAAm.d.ts +0 -60
- package/dist/ScrollArea.css-CNx8Yliu.d.ts +0 -16
- package/dist/Select.css-BlJORB-N.d.ts +0 -22
- package/dist/Table.css-5Pm2Q-3j.d.ts +0 -10
- package/dist/TextField.css-DmXBuD66.d.ts +0 -57
- package/dist/Toast.css-Bm98ZkjT.d.ts +0 -35
- package/dist/Typography.css-Fgk6uUbK.d.ts +0 -18
- package/dist/components/Accordion/Accordion.css.mjs +0 -29
- package/dist/components/Accordion/Accordion.css.mjs.map +0 -1
- package/dist/components/Accordion/Accordion.mjs +0 -33
- package/dist/components/Accordion/Accordion.mjs.map +0 -1
- package/dist/components/Accordion/Accordion.spec.mjs +0 -6
- package/dist/components/Accordion/Accordion.spec.mjs.map +0 -1
- package/dist/components/Accordion/AccordionContent.css.mjs +0 -27
- package/dist/components/Accordion/AccordionContent.css.mjs.map +0 -1
- package/dist/components/Accordion/AccordionContent.mjs +0 -63
- package/dist/components/Accordion/AccordionContent.mjs.map +0 -1
- package/dist/components/Accordion/AccordionContext.mjs +0 -10
- package/dist/components/Accordion/AccordionContext.mjs.map +0 -1
- package/dist/components/Accordion/AccordionTrigger.css.mjs +0 -44
- package/dist/components/Accordion/AccordionTrigger.css.mjs.map +0 -1
- package/dist/components/Accordion/AccordionTrigger.mjs +0 -34
- package/dist/components/Accordion/AccordionTrigger.mjs.map +0 -1
- package/dist/components/Accordion/index.mjs +0 -4
- package/dist/components/Accordion/index.mjs.map +0 -1
- package/dist/components/Alert/index.mjs +0 -16
- package/dist/components/Alert/index.mjs.map +0 -1
- package/dist/components/Box/Box.css.mjs +0 -20
- package/dist/components/Box/Box.css.mjs.map +0 -1
- package/dist/components/Box/Box.spec.mjs +0 -6
- package/dist/components/Box/Box.spec.mjs.map +0 -1
- package/dist/components/Box/index.mjs +0 -36
- package/dist/components/Box/index.mjs.map +0 -1
- package/dist/components/Button/Button.css.mjs +0 -194
- package/dist/components/Button/Button.css.mjs.map +0 -1
- package/dist/components/Button/Button.spec.mjs +0 -22
- package/dist/components/Button/Button.spec.mjs.map +0 -1
- package/dist/components/Button/index.mjs +0 -51
- package/dist/components/Button/index.mjs.map +0 -1
- package/dist/components/Card/Card.css.mjs +0 -78
- package/dist/components/Card/Card.css.mjs.map +0 -1
- package/dist/components/Card/Card.mjs +0 -33
- package/dist/components/Card/Card.mjs.map +0 -1
- package/dist/components/Card/Card.spec.mjs +0 -19
- package/dist/components/Card/Card.spec.mjs.map +0 -1
- package/dist/components/Card/CardContent.css.mjs +0 -10
- package/dist/components/Card/CardContent.css.mjs.map +0 -1
- package/dist/components/Card/CardContent.mjs +0 -22
- package/dist/components/Card/CardContent.mjs.map +0 -1
- package/dist/components/Card/CardInteraction.css.mjs +0 -12
- package/dist/components/Card/CardInteraction.css.mjs.map +0 -1
- package/dist/components/Card/CardInteraction.mjs +0 -34
- package/dist/components/Card/CardInteraction.mjs.map +0 -1
- package/dist/components/Card/CardThumbnail.css.mjs +0 -9
- package/dist/components/Card/CardThumbnail.css.mjs.map +0 -1
- package/dist/components/Card/CardThumbnail.mjs +0 -22
- package/dist/components/Card/CardThumbnail.mjs.map +0 -1
- package/dist/components/Card/index.mjs +0 -5
- package/dist/components/Card/index.mjs.map +0 -1
- package/dist/components/Chip/Chip.css.mjs +0 -66
- package/dist/components/Chip/Chip.css.mjs.map +0 -1
- package/dist/components/Chip/Chip.mjs +0 -31
- package/dist/components/Chip/Chip.mjs.map +0 -1
- package/dist/components/Chip/Chip.spec.mjs +0 -6
- package/dist/components/Chip/Chip.spec.mjs.map +0 -1
- package/dist/components/Chip/index.mjs +0 -2
- package/dist/components/Chip/index.mjs.map +0 -1
- package/dist/components/Confirm/index.mjs +0 -28
- package/dist/components/Confirm/index.mjs.map +0 -1
- package/dist/components/Dialog/Dialog.css.mjs +0 -24
- package/dist/components/Dialog/Dialog.css.mjs.map +0 -1
- package/dist/components/Dialog/Dialog.mjs +0 -28
- package/dist/components/Dialog/Dialog.mjs.map +0 -1
- package/dist/components/Dialog/Dialog.spec.mjs +0 -22
- package/dist/components/Dialog/Dialog.spec.mjs.map +0 -1
- package/dist/components/Dialog/DialogContent.css.mjs +0 -16
- package/dist/components/Dialog/DialogContent.css.mjs.map +0 -1
- package/dist/components/Dialog/DialogContent.mjs +0 -24
- package/dist/components/Dialog/DialogContent.mjs.map +0 -1
- package/dist/components/Dialog/DialogFooter.css.mjs +0 -20
- package/dist/components/Dialog/DialogFooter.css.mjs.map +0 -1
- package/dist/components/Dialog/DialogFooter.mjs +0 -25
- package/dist/components/Dialog/DialogFooter.mjs.map +0 -1
- package/dist/components/Dialog/DialogHeader.css.mjs +0 -28
- package/dist/components/Dialog/DialogHeader.css.mjs.map +0 -1
- package/dist/components/Dialog/DialogHeader.mjs +0 -33
- package/dist/components/Dialog/DialogHeader.mjs.map +0 -1
- package/dist/components/Dialog/index.mjs +0 -5
- package/dist/components/Dialog/index.mjs.map +0 -1
- package/dist/components/Navigation/Navigation.spec.mjs +0 -18
- package/dist/components/Navigation/Navigation.spec.mjs.map +0 -1
- package/dist/components/Navigation/NavigationAside.css.mjs +0 -10
- package/dist/components/Navigation/NavigationAside.css.mjs.map +0 -1
- package/dist/components/Navigation/NavigationAside.mjs +0 -16
- package/dist/components/Navigation/NavigationAside.mjs.map +0 -1
- package/dist/components/Navigation/NavigationBar.css.mjs +0 -37
- package/dist/components/Navigation/NavigationBar.css.mjs.map +0 -1
- package/dist/components/Navigation/NavigationBar.mjs +0 -23
- package/dist/components/Navigation/NavigationBar.mjs.map +0 -1
- package/dist/components/Navigation/NavigationContainer.css.mjs +0 -13
- package/dist/components/Navigation/NavigationContainer.css.mjs.map +0 -1
- package/dist/components/Navigation/NavigationContainer.mjs +0 -21
- package/dist/components/Navigation/NavigationContainer.mjs.map +0 -1
- package/dist/components/Navigation/NavigationDrawer.css.mjs +0 -55
- package/dist/components/Navigation/NavigationDrawer.css.mjs.map +0 -1
- package/dist/components/Navigation/NavigationDrawer.mjs +0 -58
- package/dist/components/Navigation/NavigationDrawer.mjs.map +0 -1
- package/dist/components/Navigation/NavigationItem.css.mjs +0 -38
- package/dist/components/Navigation/NavigationItem.css.mjs.map +0 -1
- package/dist/components/Navigation/NavigationItem.mjs +0 -23
- package/dist/components/Navigation/NavigationItem.mjs.map +0 -1
- package/dist/components/Navigation/NavigationLogo.css.mjs +0 -8
- package/dist/components/Navigation/NavigationLogo.css.mjs.map +0 -1
- package/dist/components/Navigation/NavigationLogo.mjs +0 -27
- package/dist/components/Navigation/NavigationLogo.mjs.map +0 -1
- package/dist/components/Navigation/NavigationMenu.css.mjs +0 -23
- package/dist/components/Navigation/NavigationMenu.css.mjs.map +0 -1
- package/dist/components/Navigation/NavigationMenu.mjs +0 -23
- package/dist/components/Navigation/NavigationMenu.mjs.map +0 -1
- package/dist/components/Navigation/index.mjs +0 -8
- package/dist/components/Navigation/index.mjs.map +0 -1
- package/dist/components/Range/Range.css.mjs +0 -106
- package/dist/components/Range/Range.css.mjs.map +0 -1
- package/dist/components/Range/Range.mjs +0 -72
- package/dist/components/Range/Range.mjs.map +0 -1
- package/dist/components/Range/Range.spec.mjs +0 -6
- package/dist/components/Range/Range.spec.mjs.map +0 -1
- package/dist/components/Range/index.mjs +0 -2
- package/dist/components/Range/index.mjs.map +0 -1
- package/dist/components/ScrollArea/ScrollArea.css.mjs +0 -40
- package/dist/components/ScrollArea/ScrollArea.css.mjs.map +0 -1
- package/dist/components/ScrollArea/ScrollArea.mjs +0 -56
- package/dist/components/ScrollArea/ScrollArea.mjs.map +0 -1
- package/dist/components/ScrollArea/ScrollArea.spec.mjs +0 -6
- package/dist/components/ScrollArea/ScrollArea.spec.mjs.map +0 -1
- package/dist/components/ScrollArea/index.mjs +0 -2
- package/dist/components/ScrollArea/index.mjs.map +0 -1
- package/dist/components/Select/Select.css.mjs +0 -24
- package/dist/components/Select/Select.css.mjs.map +0 -1
- package/dist/components/Select/Select.mjs +0 -81
- package/dist/components/Select/Select.mjs.map +0 -1
- package/dist/components/Select/Select.spec.mjs +0 -51
- package/dist/components/Select/Select.spec.mjs.map +0 -1
- package/dist/components/Select/SelectContext.mjs +0 -39
- package/dist/components/Select/SelectContext.mjs.map +0 -1
- package/dist/components/Select/SelectOption.css.mjs +0 -14
- package/dist/components/Select/SelectOption.css.mjs.map +0 -1
- package/dist/components/Select/SelectOption.mjs +0 -26
- package/dist/components/Select/SelectOption.mjs.map +0 -1
- package/dist/components/Select/SelectOptionList.css.mjs +0 -59
- package/dist/components/Select/SelectOptionList.css.mjs.map +0 -1
- package/dist/components/Select/SelectOptionList.mjs +0 -45
- package/dist/components/Select/SelectOptionList.mjs.map +0 -1
- package/dist/components/Select/SelectTrigger.css.mjs +0 -65
- package/dist/components/Select/SelectTrigger.css.mjs.map +0 -1
- package/dist/components/Select/SelectTrigger.mjs +0 -42
- package/dist/components/Select/SelectTrigger.mjs.map +0 -1
- package/dist/components/Select/index.mjs +0 -3
- package/dist/components/Select/index.mjs.map +0 -1
- package/dist/components/Skeleton/Skeleton.css.mjs +0 -23
- package/dist/components/Skeleton/Skeleton.css.mjs.map +0 -1
- package/dist/components/Skeleton/Skeleton.spec.mjs +0 -6
- package/dist/components/Skeleton/Skeleton.spec.mjs.map +0 -1
- package/dist/components/Skeleton/index.mjs +0 -23
- package/dist/components/Skeleton/index.mjs.map +0 -1
- package/dist/components/Table/Table.css.mjs +0 -12
- package/dist/components/Table/Table.css.mjs.map +0 -1
- package/dist/components/Table/Table.mjs +0 -23
- package/dist/components/Table/Table.mjs.map +0 -1
- package/dist/components/Table/Table.spec.mjs +0 -6
- package/dist/components/Table/Table.spec.mjs.map +0 -1
- package/dist/components/Table/TableBody.mjs +0 -14
- package/dist/components/Table/TableBody.mjs.map +0 -1
- package/dist/components/Table/TableCell.css.mjs +0 -36
- package/dist/components/Table/TableCell.css.mjs.map +0 -1
- package/dist/components/Table/TableCell.mjs +0 -26
- package/dist/components/Table/TableCell.mjs.map +0 -1
- package/dist/components/Table/TableHead.css.mjs +0 -12
- package/dist/components/Table/TableHead.css.mjs.map +0 -1
- package/dist/components/Table/TableHead.mjs +0 -26
- package/dist/components/Table/TableHead.mjs.map +0 -1
- package/dist/components/Table/TableHeader.mjs +0 -14
- package/dist/components/Table/TableHeader.mjs.map +0 -1
- package/dist/components/Table/TableRow.css.mjs +0 -6
- package/dist/components/Table/TableRow.css.mjs.map +0 -1
- package/dist/components/Table/TableRow.mjs +0 -22
- package/dist/components/Table/TableRow.mjs.map +0 -1
- package/dist/components/Table/index.mjs +0 -7
- package/dist/components/Table/index.mjs.map +0 -1
- package/dist/components/Tabs/Tabs.mjs +0 -26
- package/dist/components/Tabs/Tabs.mjs.map +0 -1
- package/dist/components/Tabs/Tabs.spec.mjs +0 -41
- package/dist/components/Tabs/Tabs.spec.mjs.map +0 -1
- package/dist/components/Tabs/TabsContent.mjs +0 -23
- package/dist/components/Tabs/TabsContent.mjs.map +0 -1
- package/dist/components/Tabs/TabsList.css.mjs +0 -12
- package/dist/components/Tabs/TabsList.css.mjs.map +0 -1
- package/dist/components/Tabs/TabsList.mjs +0 -23
- package/dist/components/Tabs/TabsList.mjs.map +0 -1
- package/dist/components/Tabs/TabsProvider.mjs +0 -11
- package/dist/components/Tabs/TabsProvider.mjs.map +0 -1
- package/dist/components/Tabs/TabsTrigger.css.mjs +0 -33
- package/dist/components/Tabs/TabsTrigger.css.mjs.map +0 -1
- package/dist/components/Tabs/TabsTrigger.mjs +0 -34
- package/dist/components/Tabs/TabsTrigger.mjs.map +0 -1
- package/dist/components/Tabs/index.mjs +0 -5
- package/dist/components/Tabs/index.mjs.map +0 -1
- package/dist/components/TextField/TextField.css.mjs +0 -69
- package/dist/components/TextField/TextField.css.mjs.map +0 -1
- package/dist/components/TextField/TextField.spec.mjs +0 -6
- package/dist/components/TextField/TextField.spec.mjs.map +0 -1
- package/dist/components/TextField/index.mjs +0 -31
- package/dist/components/TextField/index.mjs.map +0 -1
- package/dist/components/Toast/Toast.css.mjs +0 -70
- package/dist/components/Toast/Toast.css.mjs.map +0 -1
- package/dist/components/Toast/Toast.spec.mjs +0 -6
- package/dist/components/Toast/Toast.spec.mjs.map +0 -1
- package/dist/components/Toast/index.mjs +0 -45
- package/dist/components/Toast/index.mjs.map +0 -1
- package/dist/components/Typography/Typography.css.mjs +0 -19
- package/dist/components/Typography/Typography.css.mjs.map +0 -1
- package/dist/components/Typography/Typography.spec.mjs +0 -29
- package/dist/components/Typography/Typography.spec.mjs.map +0 -1
- package/dist/components/Typography/index.mjs +0 -41
- package/dist/components/Typography/index.mjs.map +0 -1
- package/dist/components/index.mjs +0 -19
- package/dist/components/index.mjs.map +0 -1
- package/dist/contexts/UIProvider.mjs +0 -22
- package/dist/contexts/UIProvider.mjs.map +0 -1
- package/dist/contexts/index.mjs +0 -2
- package/dist/contexts/index.mjs.map +0 -1
- package/dist/hooks/index.mjs +0 -6
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/hooks/useDialog/index.mjs +0 -49
- package/dist/hooks/useDialog/index.mjs.map +0 -1
- package/dist/hooks/useDialog/useDialog.spec.mjs +0 -59
- package/dist/hooks/useDialog/useDialog.spec.mjs.map +0 -1
- package/dist/hooks/useMouseScroll/index.mjs +0 -48
- package/dist/hooks/useMouseScroll/index.mjs.map +0 -1
- package/dist/hooks/usePointerSlider/index.mjs +0 -58
- package/dist/hooks/usePointerSlider/index.mjs.map +0 -1
- package/dist/hooks/useRipple/index.mjs +0 -116
- package/dist/hooks/useRipple/index.mjs.map +0 -1
- package/dist/hooks/useRipple/ripple.css.mjs +0 -35
- package/dist/hooks/useRipple/ripple.css.mjs.map +0 -1
- package/dist/hooks/useToast/ToastContainer.css.mjs +0 -14
- package/dist/hooks/useToast/ToastContainer.css.mjs.map +0 -1
- package/dist/hooks/useToast/ToastContainer.mjs +0 -9
- package/dist/hooks/useToast/ToastContainer.mjs.map +0 -1
- package/dist/hooks/useToast/ToastProvider.mjs +0 -99
- package/dist/hooks/useToast/ToastProvider.mjs.map +0 -1
- package/dist/hooks/useToast/index.mjs +0 -14
- package/dist/hooks/useToast/index.mjs.map +0 -1
- package/dist/index.mjs +0 -9
- package/dist/index.mjs.map +0 -1
- package/dist/styles/globalStyle.css.mjs +0 -27
- package/dist/styles/globalStyle.css.mjs.map +0 -1
- package/dist/styles/index.mjs +0 -5
- package/dist/styles/index.mjs.map +0 -1
- package/dist/styles/layers.css.mjs +0 -8
- package/dist/styles/layers.css.mjs.map +0 -1
- package/dist/styles/overlay.css.mjs +0 -37
- package/dist/styles/overlay.css.mjs.map +0 -1
- package/dist/styles/sprinkles.css.mjs +0 -141
- package/dist/styles/sprinkles.css.mjs.map +0 -1
- package/dist/styles/sx.mjs +0 -14
- package/dist/styles/sx.mjs.map +0 -1
- package/dist/tests/uiTest.mjs +0 -49
- package/dist/tests/uiTest.mjs.map +0 -1
- package/dist/themes/darkTheme.css.mjs +0 -33
- package/dist/themes/darkTheme.css.mjs.map +0 -1
- package/dist/themes/index.mjs +0 -7
- package/dist/themes/index.mjs.map +0 -1
- package/dist/themes/lightTheme.css.mjs +0 -33
- package/dist/themes/lightTheme.css.mjs.map +0 -1
- package/dist/themes/theme.css.mjs +0 -28
- package/dist/themes/theme.css.mjs.map +0 -1
- package/dist/tokens/index.mjs +0 -14
- package/dist/tokens/index.mjs.map +0 -1
- package/dist/tokens/scale/color.mjs +0 -606
- package/dist/tokens/scale/color.mjs.map +0 -1
- package/dist/tokens/semantic/breakpoint.mjs +0 -10
- package/dist/tokens/semantic/breakpoint.mjs.map +0 -1
- package/dist/tokens/semantic/color.mjs +0 -14
- package/dist/tokens/semantic/color.mjs.map +0 -1
- package/dist/tokens/semantic/spacing.mjs +0 -13
- package/dist/tokens/semantic/spacing.mjs.map +0 -1
- package/dist/tokens/semantic/typography.mjs +0 -36
- package/dist/tokens/semantic/typography.mjs.map +0 -1
- package/dist/types/index.mjs +0 -2
- package/dist/types/index.mjs.map +0 -1
- package/dist/types/ui.types.mjs +0 -1
- package/dist/types/ui.types.mjs.map +0 -1
- package/dist/utils/index.mjs +0 -2
- package/dist/utils/index.mjs.map +0 -1
- package/dist/utils/sprinklesUtils.mjs +0 -24
- package/dist/utils/sprinklesUtils.mjs.map +0 -1
- package/dist/utils/styleUtils.css.mjs +0 -65
- package/dist/utils/styleUtils.css.mjs.map +0 -1
|
@@ -0,0 +1,1378 @@
|
|
|
1
|
+
/*! @license MediaQueryParser - MIT License - Tom Golden (github@tbjgolden.com) */
|
|
2
|
+
|
|
3
|
+
/*! *****************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
purpose with or without fee is hereby granted.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
***************************************************************************** */
|
|
17
|
+
|
|
18
|
+
var __assign = function() {
|
|
19
|
+
__assign = Object.assign || function __assign(t) {
|
|
20
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21
|
+
s = arguments[i];
|
|
22
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
function __rest(s, e) {
|
|
30
|
+
var t = {};
|
|
31
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
32
|
+
t[p] = s[p];
|
|
33
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
34
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
35
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
36
|
+
t[p[i]] = s[p[i]];
|
|
37
|
+
}
|
|
38
|
+
return t;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function __values(o) {
|
|
42
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
43
|
+
if (m) return m.call(o);
|
|
44
|
+
if (o && typeof o.length === "number") return {
|
|
45
|
+
next: function () {
|
|
46
|
+
if (o && i >= o.length) o = void 0;
|
|
47
|
+
return { value: o && o[i++], done: !o };
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function __read(o, n) {
|
|
54
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
55
|
+
if (!m) return o;
|
|
56
|
+
var i = m.call(o), r, ar = [], e;
|
|
57
|
+
try {
|
|
58
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
59
|
+
}
|
|
60
|
+
catch (error) { e = { error: error }; }
|
|
61
|
+
finally {
|
|
62
|
+
try {
|
|
63
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
64
|
+
}
|
|
65
|
+
finally { if (e) throw e.error; }
|
|
66
|
+
}
|
|
67
|
+
return ar;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
var weirdNewlines = /(\u000D|\u000C|\u000D\u000A)/g;
|
|
71
|
+
var nullOrSurrogates = /[\u0000\uD800-\uDFFF]/g;
|
|
72
|
+
var commentRegex = /(\/\*)[\s\S]*?(\*\/)/g;
|
|
73
|
+
var lexicalAnalysis = function lexicalAnalysis(str, index) {
|
|
74
|
+
if (index === void 0) {
|
|
75
|
+
index = 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
str = str.replace(weirdNewlines, '\n').replace(nullOrSurrogates, "\uFFFD");
|
|
79
|
+
str = str.replace(commentRegex, '');
|
|
80
|
+
var tokens = [];
|
|
81
|
+
|
|
82
|
+
for (; index < str.length; index += 1) {
|
|
83
|
+
var code = str.charCodeAt(index);
|
|
84
|
+
|
|
85
|
+
if (code === 0x0009 || code === 0x0020 || code === 0x000a) {
|
|
86
|
+
var code_1 = str.charCodeAt(++index);
|
|
87
|
+
|
|
88
|
+
while (code_1 === 0x0009 || code_1 === 0x0020 || code_1 === 0x000a) {
|
|
89
|
+
code_1 = str.charCodeAt(++index);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
index -= 1;
|
|
93
|
+
tokens.push({
|
|
94
|
+
type: '<whitespace-token>'
|
|
95
|
+
});
|
|
96
|
+
} else if (code === 0x0022) {
|
|
97
|
+
var result = consumeString(str, index);
|
|
98
|
+
|
|
99
|
+
if (result === null) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var _a = __read(result, 2),
|
|
104
|
+
lastIndex = _a[0],
|
|
105
|
+
value = _a[1];
|
|
106
|
+
|
|
107
|
+
tokens.push({
|
|
108
|
+
type: '<string-token>',
|
|
109
|
+
value: value
|
|
110
|
+
});
|
|
111
|
+
index = lastIndex;
|
|
112
|
+
} else if (code === 0x0023) {
|
|
113
|
+
if (index + 1 < str.length) {
|
|
114
|
+
var nextCode = str.charCodeAt(index + 1);
|
|
115
|
+
|
|
116
|
+
if (nextCode === 0x005f || nextCode >= 0x0041 && nextCode <= 0x005a || nextCode >= 0x0061 && nextCode <= 0x007a || nextCode >= 0x0080 || nextCode >= 0x0030 && nextCode <= 0x0039 || nextCode === 0x005c && index + 2 < str.length && str.charCodeAt(index + 2) !== 0x000a) {
|
|
117
|
+
var flag = wouldStartIdentifier(str, index + 1) ? 'id' : 'unrestricted';
|
|
118
|
+
var result = consumeIdentUnsafe(str, index + 1);
|
|
119
|
+
|
|
120
|
+
if (result !== null) {
|
|
121
|
+
var _b = __read(result, 2),
|
|
122
|
+
lastIndex = _b[0],
|
|
123
|
+
value = _b[1];
|
|
124
|
+
|
|
125
|
+
tokens.push({
|
|
126
|
+
type: '<hash-token>',
|
|
127
|
+
value: value.toLowerCase(),
|
|
128
|
+
flag: flag
|
|
129
|
+
});
|
|
130
|
+
index = lastIndex;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
tokens.push({
|
|
137
|
+
type: '<delim-token>',
|
|
138
|
+
value: code
|
|
139
|
+
});
|
|
140
|
+
} else if (code === 0x0027) {
|
|
141
|
+
var result = consumeString(str, index);
|
|
142
|
+
|
|
143
|
+
if (result === null) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
var _c = __read(result, 2),
|
|
148
|
+
lastIndex = _c[0],
|
|
149
|
+
value = _c[1];
|
|
150
|
+
|
|
151
|
+
tokens.push({
|
|
152
|
+
type: '<string-token>',
|
|
153
|
+
value: value
|
|
154
|
+
});
|
|
155
|
+
index = lastIndex;
|
|
156
|
+
} else if (code === 0x0028) {
|
|
157
|
+
tokens.push({
|
|
158
|
+
type: '<(-token>'
|
|
159
|
+
});
|
|
160
|
+
} else if (code === 0x0029) {
|
|
161
|
+
tokens.push({
|
|
162
|
+
type: '<)-token>'
|
|
163
|
+
});
|
|
164
|
+
} else if (code === 0x002b) {
|
|
165
|
+
var plusNumeric = consumeNumeric(str, index);
|
|
166
|
+
|
|
167
|
+
if (plusNumeric === null) {
|
|
168
|
+
tokens.push({
|
|
169
|
+
type: '<delim-token>',
|
|
170
|
+
value: code
|
|
171
|
+
});
|
|
172
|
+
} else {
|
|
173
|
+
var _d = __read(plusNumeric, 2),
|
|
174
|
+
lastIndex = _d[0],
|
|
175
|
+
tokenTuple = _d[1];
|
|
176
|
+
|
|
177
|
+
if (tokenTuple[0] === '<dimension-token>') {
|
|
178
|
+
tokens.push({
|
|
179
|
+
type: '<dimension-token>',
|
|
180
|
+
value: tokenTuple[1],
|
|
181
|
+
unit: tokenTuple[2].toLowerCase(),
|
|
182
|
+
flag: 'number'
|
|
183
|
+
});
|
|
184
|
+
} else if (tokenTuple[0] === '<number-token>') {
|
|
185
|
+
tokens.push({
|
|
186
|
+
type: tokenTuple[0],
|
|
187
|
+
value: tokenTuple[1],
|
|
188
|
+
flag: tokenTuple[2]
|
|
189
|
+
});
|
|
190
|
+
} else {
|
|
191
|
+
tokens.push({
|
|
192
|
+
type: tokenTuple[0],
|
|
193
|
+
value: tokenTuple[1],
|
|
194
|
+
flag: 'number'
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
index = lastIndex;
|
|
199
|
+
}
|
|
200
|
+
} else if (code === 0x002c) {
|
|
201
|
+
tokens.push({
|
|
202
|
+
type: '<comma-token>'
|
|
203
|
+
});
|
|
204
|
+
} else if (code === 0x002d) {
|
|
205
|
+
var minusNumeric = consumeNumeric(str, index);
|
|
206
|
+
|
|
207
|
+
if (minusNumeric !== null) {
|
|
208
|
+
var _e = __read(minusNumeric, 2),
|
|
209
|
+
lastIndex = _e[0],
|
|
210
|
+
tokenTuple = _e[1];
|
|
211
|
+
|
|
212
|
+
if (tokenTuple[0] === '<dimension-token>') {
|
|
213
|
+
tokens.push({
|
|
214
|
+
type: '<dimension-token>',
|
|
215
|
+
value: tokenTuple[1],
|
|
216
|
+
unit: tokenTuple[2].toLowerCase(),
|
|
217
|
+
flag: 'number'
|
|
218
|
+
});
|
|
219
|
+
} else if (tokenTuple[0] === '<number-token>') {
|
|
220
|
+
tokens.push({
|
|
221
|
+
type: tokenTuple[0],
|
|
222
|
+
value: tokenTuple[1],
|
|
223
|
+
flag: tokenTuple[2]
|
|
224
|
+
});
|
|
225
|
+
} else {
|
|
226
|
+
tokens.push({
|
|
227
|
+
type: tokenTuple[0],
|
|
228
|
+
value: tokenTuple[1],
|
|
229
|
+
flag: 'number'
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
index = lastIndex;
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (index + 2 < str.length) {
|
|
238
|
+
var nextCode = str.charCodeAt(index + 1);
|
|
239
|
+
var nextNextCode = str.charCodeAt(index + 2);
|
|
240
|
+
|
|
241
|
+
if (nextCode === 0x002d && nextNextCode === 0x003e) {
|
|
242
|
+
tokens.push({
|
|
243
|
+
type: '<CDC-token>'
|
|
244
|
+
});
|
|
245
|
+
index += 2;
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
var result = consumeIdentLike(str, index);
|
|
251
|
+
|
|
252
|
+
if (result !== null) {
|
|
253
|
+
var _f = __read(result, 3),
|
|
254
|
+
lastIndex = _f[0],
|
|
255
|
+
value = _f[1],
|
|
256
|
+
type = _f[2];
|
|
257
|
+
|
|
258
|
+
tokens.push({
|
|
259
|
+
type: type,
|
|
260
|
+
value: value
|
|
261
|
+
});
|
|
262
|
+
index = lastIndex;
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
tokens.push({
|
|
267
|
+
type: '<delim-token>',
|
|
268
|
+
value: code
|
|
269
|
+
});
|
|
270
|
+
} else if (code === 0x002e) {
|
|
271
|
+
var minusNumeric = consumeNumeric(str, index);
|
|
272
|
+
|
|
273
|
+
if (minusNumeric === null) {
|
|
274
|
+
tokens.push({
|
|
275
|
+
type: '<delim-token>',
|
|
276
|
+
value: code
|
|
277
|
+
});
|
|
278
|
+
} else {
|
|
279
|
+
var _g = __read(minusNumeric, 2),
|
|
280
|
+
lastIndex = _g[0],
|
|
281
|
+
tokenTuple = _g[1];
|
|
282
|
+
|
|
283
|
+
if (tokenTuple[0] === '<dimension-token>') {
|
|
284
|
+
tokens.push({
|
|
285
|
+
type: '<dimension-token>',
|
|
286
|
+
value: tokenTuple[1],
|
|
287
|
+
unit: tokenTuple[2].toLowerCase(),
|
|
288
|
+
flag: 'number'
|
|
289
|
+
});
|
|
290
|
+
} else if (tokenTuple[0] === '<number-token>') {
|
|
291
|
+
tokens.push({
|
|
292
|
+
type: tokenTuple[0],
|
|
293
|
+
value: tokenTuple[1],
|
|
294
|
+
flag: tokenTuple[2]
|
|
295
|
+
});
|
|
296
|
+
} else {
|
|
297
|
+
tokens.push({
|
|
298
|
+
type: tokenTuple[0],
|
|
299
|
+
value: tokenTuple[1],
|
|
300
|
+
flag: 'number'
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
index = lastIndex;
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
} else if (code === 0x003a) {
|
|
308
|
+
tokens.push({
|
|
309
|
+
type: '<colon-token>'
|
|
310
|
+
});
|
|
311
|
+
} else if (code === 0x003b) {
|
|
312
|
+
tokens.push({
|
|
313
|
+
type: '<semicolon-token>'
|
|
314
|
+
});
|
|
315
|
+
} else if (code === 0x003c) {
|
|
316
|
+
if (index + 3 < str.length) {
|
|
317
|
+
var nextCode = str.charCodeAt(index + 1);
|
|
318
|
+
var nextNextCode = str.charCodeAt(index + 2);
|
|
319
|
+
var nextNextNextCode = str.charCodeAt(index + 3);
|
|
320
|
+
|
|
321
|
+
if (nextCode === 0x0021 && nextNextCode === 0x002d && nextNextNextCode === 0x002d) {
|
|
322
|
+
tokens.push({
|
|
323
|
+
type: '<CDO-token>'
|
|
324
|
+
});
|
|
325
|
+
index += 3;
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
tokens.push({
|
|
331
|
+
type: '<delim-token>',
|
|
332
|
+
value: code
|
|
333
|
+
});
|
|
334
|
+
} else if (code === 0x0040) {
|
|
335
|
+
var result = consumeIdent(str, index + 1);
|
|
336
|
+
|
|
337
|
+
if (result !== null) {
|
|
338
|
+
var _h = __read(result, 2),
|
|
339
|
+
lastIndex = _h[0],
|
|
340
|
+
value = _h[1];
|
|
341
|
+
|
|
342
|
+
tokens.push({
|
|
343
|
+
type: '<at-keyword-token>',
|
|
344
|
+
value: value.toLowerCase()
|
|
345
|
+
});
|
|
346
|
+
index = lastIndex;
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
tokens.push({
|
|
351
|
+
type: '<delim-token>',
|
|
352
|
+
value: code
|
|
353
|
+
});
|
|
354
|
+
} else if (code === 0x005b) {
|
|
355
|
+
tokens.push({
|
|
356
|
+
type: '<[-token>'
|
|
357
|
+
});
|
|
358
|
+
} else if (code === 0x005c) {
|
|
359
|
+
var result = consumeEscape(str, index);
|
|
360
|
+
|
|
361
|
+
if (result === null) {
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
var _j = __read(result, 2),
|
|
366
|
+
lastIndex = _j[0],
|
|
367
|
+
value = _j[1];
|
|
368
|
+
|
|
369
|
+
str = str.slice(0, index) + value + str.slice(lastIndex + 1);
|
|
370
|
+
index -= 1;
|
|
371
|
+
} else if (code === 0x005d) {
|
|
372
|
+
tokens.push({
|
|
373
|
+
type: '<]-token>'
|
|
374
|
+
});
|
|
375
|
+
} else if (code === 0x007b) {
|
|
376
|
+
tokens.push({
|
|
377
|
+
type: '<{-token>'
|
|
378
|
+
});
|
|
379
|
+
} else if (code === 0x007d) {
|
|
380
|
+
tokens.push({
|
|
381
|
+
type: '<}-token>'
|
|
382
|
+
});
|
|
383
|
+
} else if (code >= 0x0030 && code <= 0x0039) {
|
|
384
|
+
var result = consumeNumeric(str, index);
|
|
385
|
+
|
|
386
|
+
var _k = __read(result, 2),
|
|
387
|
+
lastIndex = _k[0],
|
|
388
|
+
tokenTuple = _k[1];
|
|
389
|
+
|
|
390
|
+
if (tokenTuple[0] === '<dimension-token>') {
|
|
391
|
+
tokens.push({
|
|
392
|
+
type: '<dimension-token>',
|
|
393
|
+
value: tokenTuple[1],
|
|
394
|
+
unit: tokenTuple[2].toLowerCase(),
|
|
395
|
+
flag: 'number'
|
|
396
|
+
});
|
|
397
|
+
} else if (tokenTuple[0] === '<number-token>') {
|
|
398
|
+
tokens.push({
|
|
399
|
+
type: tokenTuple[0],
|
|
400
|
+
value: tokenTuple[1],
|
|
401
|
+
flag: tokenTuple[2]
|
|
402
|
+
});
|
|
403
|
+
} else {
|
|
404
|
+
tokens.push({
|
|
405
|
+
type: tokenTuple[0],
|
|
406
|
+
value: tokenTuple[1],
|
|
407
|
+
flag: 'number'
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
index = lastIndex;
|
|
412
|
+
} else if (code === 0x005f || code >= 0x0041 && code <= 0x005a || code >= 0x0061 && code <= 0x007a || code >= 0x0080) {
|
|
413
|
+
var result = consumeIdentLike(str, index);
|
|
414
|
+
|
|
415
|
+
if (result === null) {
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
var _l = __read(result, 3),
|
|
420
|
+
lastIndex = _l[0],
|
|
421
|
+
value = _l[1],
|
|
422
|
+
type = _l[2];
|
|
423
|
+
|
|
424
|
+
tokens.push({
|
|
425
|
+
type: type,
|
|
426
|
+
value: value
|
|
427
|
+
});
|
|
428
|
+
index = lastIndex;
|
|
429
|
+
} else {
|
|
430
|
+
tokens.push({
|
|
431
|
+
type: '<delim-token>',
|
|
432
|
+
value: code
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
tokens.push({
|
|
438
|
+
type: '<EOF-token>'
|
|
439
|
+
});
|
|
440
|
+
return tokens;
|
|
441
|
+
};
|
|
442
|
+
var consumeString = function consumeString(str, index) {
|
|
443
|
+
if (str.length <= index + 1) return null;
|
|
444
|
+
var firstCode = str.charCodeAt(index);
|
|
445
|
+
var charCodes = [];
|
|
446
|
+
|
|
447
|
+
for (var i = index + 1; i < str.length; i += 1) {
|
|
448
|
+
var code = str.charCodeAt(i);
|
|
449
|
+
|
|
450
|
+
if (code === firstCode) {
|
|
451
|
+
return [i, String.fromCharCode.apply(null, charCodes)];
|
|
452
|
+
} else if (code === 0x005c) {
|
|
453
|
+
var result = consumeEscape(str, i);
|
|
454
|
+
if (result === null) return null;
|
|
455
|
+
|
|
456
|
+
var _a = __read(result, 2),
|
|
457
|
+
lastIndex = _a[0],
|
|
458
|
+
charCode = _a[1];
|
|
459
|
+
|
|
460
|
+
charCodes.push(charCode);
|
|
461
|
+
i = lastIndex;
|
|
462
|
+
} else if (code === 0x000a) {
|
|
463
|
+
return null;
|
|
464
|
+
} else {
|
|
465
|
+
charCodes.push(code);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return null;
|
|
470
|
+
};
|
|
471
|
+
var wouldStartIdentifier = function wouldStartIdentifier(str, index) {
|
|
472
|
+
if (str.length <= index) return false;
|
|
473
|
+
var code = str.charCodeAt(index);
|
|
474
|
+
|
|
475
|
+
if (code === 0x002d) {
|
|
476
|
+
if (str.length <= index + 1) return false;
|
|
477
|
+
var nextCode = str.charCodeAt(index + 1);
|
|
478
|
+
|
|
479
|
+
if (nextCode === 0x002d || nextCode === 0x005f || nextCode >= 0x0041 && nextCode <= 0x005a || nextCode >= 0x0061 && nextCode <= 0x007a || nextCode >= 0x0080) {
|
|
480
|
+
return true;
|
|
481
|
+
} else if (nextCode === 0x005c) {
|
|
482
|
+
if (str.length <= index + 2) return false;
|
|
483
|
+
var nextNextCode = str.charCodeAt(index + 2);
|
|
484
|
+
return nextNextCode !== 0x000a;
|
|
485
|
+
} else {
|
|
486
|
+
return false;
|
|
487
|
+
}
|
|
488
|
+
} else if (code === 0x005f || code >= 0x0041 && code <= 0x005a || code >= 0x0061 && code <= 0x007a || code >= 0x0080) {
|
|
489
|
+
return true;
|
|
490
|
+
} else if (code === 0x005c) {
|
|
491
|
+
if (str.length <= index + 1) return false;
|
|
492
|
+
var nextCode = str.charCodeAt(index + 1);
|
|
493
|
+
return nextCode !== 0x000a;
|
|
494
|
+
} else {
|
|
495
|
+
return false;
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
var consumeEscape = function consumeEscape(str, index) {
|
|
499
|
+
if (str.length <= index + 1) return null;
|
|
500
|
+
if (str.charCodeAt(index) !== 0x005c) return null;
|
|
501
|
+
var code = str.charCodeAt(index + 1);
|
|
502
|
+
|
|
503
|
+
if (code === 0x000a) {
|
|
504
|
+
return null;
|
|
505
|
+
} else if (code >= 0x0030 && code <= 0x0039 || code >= 0x0041 && code <= 0x0046 || code >= 0x0061 && code <= 0x0066) {
|
|
506
|
+
var hexCharCodes = [code];
|
|
507
|
+
var min = Math.min(index + 7, str.length);
|
|
508
|
+
var i = index + 2;
|
|
509
|
+
|
|
510
|
+
for (; i < min; i += 1) {
|
|
511
|
+
var code_2 = str.charCodeAt(i);
|
|
512
|
+
|
|
513
|
+
if (code_2 >= 0x0030 && code_2 <= 0x0039 || code_2 >= 0x0041 && code_2 <= 0x0046 || code_2 >= 0x0061 && code_2 <= 0x0066) {
|
|
514
|
+
hexCharCodes.push(code_2);
|
|
515
|
+
} else {
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
if (i < str.length) {
|
|
521
|
+
var code_3 = str.charCodeAt(i);
|
|
522
|
+
|
|
523
|
+
if (code_3 === 0x0009 || code_3 === 0x0020 || code_3 === 0x000a) {
|
|
524
|
+
i += 1;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
return [i - 1, parseInt(String.fromCharCode.apply(null, hexCharCodes), 16)];
|
|
529
|
+
} else {
|
|
530
|
+
return [index + 1, code];
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
var consumeNumeric = function consumeNumeric(str, index) {
|
|
534
|
+
var numberResult = consumeNumber(str, index);
|
|
535
|
+
if (numberResult === null) return null;
|
|
536
|
+
|
|
537
|
+
var _a = __read(numberResult, 3),
|
|
538
|
+
numberEndIndex = _a[0],
|
|
539
|
+
numberValue = _a[1],
|
|
540
|
+
numberFlag = _a[2];
|
|
541
|
+
|
|
542
|
+
var identResult = consumeIdent(str, numberEndIndex + 1);
|
|
543
|
+
|
|
544
|
+
if (identResult !== null) {
|
|
545
|
+
var _b = __read(identResult, 2),
|
|
546
|
+
identEndIndex = _b[0],
|
|
547
|
+
identValue = _b[1];
|
|
548
|
+
|
|
549
|
+
return [identEndIndex, ['<dimension-token>', numberValue, identValue]];
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (numberEndIndex + 1 < str.length && str.charCodeAt(numberEndIndex + 1) === 0x0025) {
|
|
553
|
+
return [numberEndIndex + 1, ['<percentage-token>', numberValue]];
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
return [numberEndIndex, ['<number-token>', numberValue, numberFlag]];
|
|
557
|
+
};
|
|
558
|
+
var consumeNumber = function consumeNumber(str, index) {
|
|
559
|
+
if (str.length <= index) return null;
|
|
560
|
+
var flag = 'integer';
|
|
561
|
+
var numberChars = [];
|
|
562
|
+
var firstCode = str.charCodeAt(index);
|
|
563
|
+
|
|
564
|
+
if (firstCode === 0x002b || firstCode === 0x002d) {
|
|
565
|
+
index += 1;
|
|
566
|
+
if (firstCode === 0x002d) numberChars.push(0x002d);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
while (index < str.length) {
|
|
570
|
+
var code = str.charCodeAt(index);
|
|
571
|
+
|
|
572
|
+
if (code >= 0x0030 && code <= 0x0039) {
|
|
573
|
+
numberChars.push(code);
|
|
574
|
+
index += 1;
|
|
575
|
+
} else {
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
if (index + 1 < str.length) {
|
|
581
|
+
var nextCode = str.charCodeAt(index);
|
|
582
|
+
var nextNextCode = str.charCodeAt(index + 1);
|
|
583
|
+
|
|
584
|
+
if (nextCode === 0x002e && nextNextCode >= 0x0030 && nextNextCode <= 0x0039) {
|
|
585
|
+
numberChars.push(nextCode, nextNextCode);
|
|
586
|
+
flag = 'number';
|
|
587
|
+
index += 2;
|
|
588
|
+
|
|
589
|
+
while (index < str.length) {
|
|
590
|
+
var code = str.charCodeAt(index);
|
|
591
|
+
|
|
592
|
+
if (code >= 0x0030 && code <= 0x0039) {
|
|
593
|
+
numberChars.push(code);
|
|
594
|
+
index += 1;
|
|
595
|
+
} else {
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
if (index + 1 < str.length) {
|
|
603
|
+
var nextCode = str.charCodeAt(index);
|
|
604
|
+
var nextNextCode = str.charCodeAt(index + 1);
|
|
605
|
+
var nextNextNextCode = str.charCodeAt(index + 2);
|
|
606
|
+
|
|
607
|
+
if (nextCode === 0x0045 || nextCode === 0x0065) {
|
|
608
|
+
var nextNextIsDigit = nextNextCode >= 0x0030 && nextNextCode <= 0x0039;
|
|
609
|
+
|
|
610
|
+
if (nextNextIsDigit || (nextNextCode === 0x002b || nextNextCode === 0x002d) && nextNextNextCode >= 0x0030 && nextNextNextCode <= 0x0039) {
|
|
611
|
+
flag = 'number';
|
|
612
|
+
|
|
613
|
+
if (nextNextIsDigit) {
|
|
614
|
+
numberChars.push(0x0045, nextNextCode);
|
|
615
|
+
index += 2;
|
|
616
|
+
} else if (nextNextCode === 0x002d) {
|
|
617
|
+
numberChars.push(0x0045, 0x002d, nextNextNextCode);
|
|
618
|
+
index += 3;
|
|
619
|
+
} else {
|
|
620
|
+
numberChars.push(0x0045, nextNextNextCode);
|
|
621
|
+
index += 3;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
while (index < str.length) {
|
|
625
|
+
var code = str.charCodeAt(index);
|
|
626
|
+
|
|
627
|
+
if (code >= 0x0030 && code <= 0x0039) {
|
|
628
|
+
numberChars.push(code);
|
|
629
|
+
index += 1;
|
|
630
|
+
} else {
|
|
631
|
+
break;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
var numberString = String.fromCharCode.apply(null, numberChars);
|
|
639
|
+
var value = flag === 'number' ? parseFloat(numberString) : parseInt(numberString);
|
|
640
|
+
if (value === -0) value = 0;
|
|
641
|
+
return Number.isNaN(value) ? null : [index - 1, value, flag];
|
|
642
|
+
};
|
|
643
|
+
var consumeIdentUnsafe = function consumeIdentUnsafe(str, index) {
|
|
644
|
+
if (str.length <= index) {
|
|
645
|
+
return null;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
var identChars = [];
|
|
649
|
+
|
|
650
|
+
for (var code = str.charCodeAt(index); index < str.length; code = str.charCodeAt(++index)) {
|
|
651
|
+
if (code === 0x002d || code === 0x005f || code >= 0x0041 && code <= 0x005a || code >= 0x0061 && code <= 0x007a || code >= 0x0080 || code >= 0x0030 && code <= 0x0039) {
|
|
652
|
+
identChars.push(code);
|
|
653
|
+
continue;
|
|
654
|
+
} else {
|
|
655
|
+
var result = consumeEscape(str, index);
|
|
656
|
+
|
|
657
|
+
if (result !== null) {
|
|
658
|
+
var _a = __read(result, 2),
|
|
659
|
+
lastIndex = _a[0],
|
|
660
|
+
code_4 = _a[1];
|
|
661
|
+
|
|
662
|
+
identChars.push(code_4);
|
|
663
|
+
index = lastIndex;
|
|
664
|
+
continue;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
break;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
return index === 0 ? null : [index - 1, String.fromCharCode.apply(null, identChars)];
|
|
672
|
+
};
|
|
673
|
+
var consumeIdent = function consumeIdent(str, index) {
|
|
674
|
+
if (str.length <= index || !wouldStartIdentifier(str, index)) {
|
|
675
|
+
return null;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
var identChars = [];
|
|
679
|
+
|
|
680
|
+
for (var code = str.charCodeAt(index); index < str.length; code = str.charCodeAt(++index)) {
|
|
681
|
+
if (code === 0x002d || code === 0x005f || code >= 0x0041 && code <= 0x005a || code >= 0x0061 && code <= 0x007a || code >= 0x0080 || code >= 0x0030 && code <= 0x0039) {
|
|
682
|
+
identChars.push(code);
|
|
683
|
+
continue;
|
|
684
|
+
} else {
|
|
685
|
+
var result = consumeEscape(str, index);
|
|
686
|
+
|
|
687
|
+
if (result !== null) {
|
|
688
|
+
var _a = __read(result, 2),
|
|
689
|
+
lastIndex = _a[0],
|
|
690
|
+
code_5 = _a[1];
|
|
691
|
+
|
|
692
|
+
identChars.push(code_5);
|
|
693
|
+
index = lastIndex;
|
|
694
|
+
continue;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
break;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
return [index - 1, String.fromCharCode.apply(null, identChars)];
|
|
702
|
+
};
|
|
703
|
+
var consumeUrl = function consumeUrl(str, index) {
|
|
704
|
+
var code = str.charCodeAt(index);
|
|
705
|
+
|
|
706
|
+
while (code === 0x0009 || code === 0x0020 || code === 0x000a) {
|
|
707
|
+
code = str.charCodeAt(++index);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
var urlChars = [];
|
|
711
|
+
var hasFinishedWord = false;
|
|
712
|
+
|
|
713
|
+
while (index < str.length) {
|
|
714
|
+
if (code === 0x0029) {
|
|
715
|
+
return [index, String.fromCharCode.apply(null, urlChars)];
|
|
716
|
+
} else if (code === 0x0022 || code === 0x0027 || code === 0x0028) {
|
|
717
|
+
return null;
|
|
718
|
+
} else if (code === 0x0009 || code === 0x0020 || code === 0x000a) {
|
|
719
|
+
if (!hasFinishedWord && urlChars.length !== 0) hasFinishedWord = true;
|
|
720
|
+
} else if (code === 0x005c) {
|
|
721
|
+
var result = consumeEscape(str, index);
|
|
722
|
+
if (result === null || hasFinishedWord) return null;
|
|
723
|
+
|
|
724
|
+
var _a = __read(result, 2),
|
|
725
|
+
lastIndex = _a[0],
|
|
726
|
+
value = _a[1];
|
|
727
|
+
|
|
728
|
+
urlChars.push(value);
|
|
729
|
+
index = lastIndex;
|
|
730
|
+
} else {
|
|
731
|
+
if (hasFinishedWord) return null;
|
|
732
|
+
urlChars.push(code);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
code = str.charCodeAt(++index);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
return null;
|
|
739
|
+
};
|
|
740
|
+
var consumeIdentLike = function consumeIdentLike(str, index) {
|
|
741
|
+
var result = consumeIdent(str, index);
|
|
742
|
+
if (result === null) return null;
|
|
743
|
+
|
|
744
|
+
var _a = __read(result, 2),
|
|
745
|
+
lastIndex = _a[0],
|
|
746
|
+
value = _a[1];
|
|
747
|
+
|
|
748
|
+
if (value.toLowerCase() === 'url') {
|
|
749
|
+
if (str.length > lastIndex + 1) {
|
|
750
|
+
var nextCode = str.charCodeAt(lastIndex + 1);
|
|
751
|
+
|
|
752
|
+
if (nextCode === 0x0028) {
|
|
753
|
+
for (var offset = 2; lastIndex + offset < str.length; offset += 1) {
|
|
754
|
+
var nextNextCode = str.charCodeAt(lastIndex + offset);
|
|
755
|
+
|
|
756
|
+
if (nextNextCode === 0x0022 || nextNextCode === 0x0027) {
|
|
757
|
+
return [lastIndex + 1, value.toLowerCase(), '<function-token>'];
|
|
758
|
+
} else if (nextNextCode !== 0x0009 && nextNextCode !== 0x0020 && nextNextCode !== 0x000a) {
|
|
759
|
+
var result_1 = consumeUrl(str, lastIndex + offset);
|
|
760
|
+
if (result_1 === null) return null;
|
|
761
|
+
|
|
762
|
+
var _b = __read(result_1, 2),
|
|
763
|
+
lastUrlIndex = _b[0],
|
|
764
|
+
value_1 = _b[1];
|
|
765
|
+
|
|
766
|
+
return [lastUrlIndex, value_1, '<url-token>'];
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
return [lastIndex + 1, value.toLowerCase(), '<function-token>'];
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
} else if (str.length > lastIndex + 1) {
|
|
774
|
+
var nextCode = str.charCodeAt(lastIndex + 1);
|
|
775
|
+
|
|
776
|
+
if (nextCode === 0x0028) {
|
|
777
|
+
return [lastIndex + 1, value.toLowerCase(), '<function-token>'];
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
return [lastIndex, value.toLowerCase(), '<ident-token>'];
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
var simplifyAST = function simplifyAST(ast) {
|
|
785
|
+
for (var i = ast.length - 1; i >= 0; i--) {
|
|
786
|
+
ast[i] = simplifyMediaQuery(ast[i]);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
return ast;
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
var simplifyMediaQuery = function simplifyMediaQuery(mediaQuery) {
|
|
793
|
+
if (mediaQuery.mediaCondition === null) return mediaQuery;
|
|
794
|
+
var mediaCondition = simplifyMediaCondition(mediaQuery.mediaCondition);
|
|
795
|
+
|
|
796
|
+
if (mediaCondition.operator === null && mediaCondition.children.length === 1 && 'children' in mediaCondition.children[0]) {
|
|
797
|
+
mediaCondition = mediaCondition.children[0];
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
return {
|
|
801
|
+
mediaPrefix: mediaQuery.mediaPrefix,
|
|
802
|
+
mediaType: mediaQuery.mediaType,
|
|
803
|
+
mediaCondition: mediaCondition
|
|
804
|
+
};
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
var simplifyMediaCondition = function simplifyMediaCondition(mediaCondition) {
|
|
808
|
+
for (var i = mediaCondition.children.length - 1; i >= 0; i--) {
|
|
809
|
+
var unsimplifiedChild = mediaCondition.children[i];
|
|
810
|
+
|
|
811
|
+
if (!('context' in unsimplifiedChild)) {
|
|
812
|
+
var child = simplifyMediaCondition(unsimplifiedChild);
|
|
813
|
+
|
|
814
|
+
if (child.operator === null && child.children.length === 1) {
|
|
815
|
+
mediaCondition.children[i] = child.children[0];
|
|
816
|
+
} else if (child.operator === mediaCondition.operator && (child.operator === 'and' || child.operator === 'or')) {
|
|
817
|
+
var spliceArgs = [i, 1];
|
|
818
|
+
|
|
819
|
+
for (var i_1 = 0; i_1 < child.children.length; i_1++) {
|
|
820
|
+
spliceArgs.push(child.children[i_1]);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
mediaCondition.children.splice.apply(mediaCondition.children, spliceArgs);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
return mediaCondition;
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
var createError = function createError(message, err) {
|
|
832
|
+
if (err instanceof Error) {
|
|
833
|
+
return new Error("".concat(err.message.trim(), "\n").concat(message.trim()));
|
|
834
|
+
} else {
|
|
835
|
+
return new Error(message.trim());
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
var toAST = function toAST(str) {
|
|
840
|
+
return simplifyAST(toUnflattenedAST(str));
|
|
841
|
+
};
|
|
842
|
+
var toUnflattenedAST = function toUnflattenedAST(str) {
|
|
843
|
+
var tokenList = lexicalAnalysis(str.trim());
|
|
844
|
+
|
|
845
|
+
if (tokenList === null) {
|
|
846
|
+
throw createError('Failed tokenizing');
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
var startIndex = 0;
|
|
850
|
+
var endIndex = tokenList.length - 1;
|
|
851
|
+
|
|
852
|
+
if (tokenList[0].type === '<at-keyword-token>' && tokenList[0].value === 'media') {
|
|
853
|
+
if (tokenList[1].type !== '<whitespace-token>') {
|
|
854
|
+
throw createError('Expected whitespace after media');
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
startIndex = 2;
|
|
858
|
+
|
|
859
|
+
for (var i = 2; i < tokenList.length - 1; i++) {
|
|
860
|
+
var token = tokenList[i];
|
|
861
|
+
|
|
862
|
+
if (token.type === '<{-token>') {
|
|
863
|
+
endIndex = i;
|
|
864
|
+
break;
|
|
865
|
+
} else if (token.type === '<semicolon-token>') {
|
|
866
|
+
throw createError("Expected '{' in media query but found ';'");
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
tokenList = tokenList.slice(startIndex, endIndex);
|
|
872
|
+
return syntacticAnalysis(tokenList);
|
|
873
|
+
};
|
|
874
|
+
var removeWhitespace = function removeWhitespace(tokenList) {
|
|
875
|
+
var newTokenList = [];
|
|
876
|
+
var before = false;
|
|
877
|
+
|
|
878
|
+
for (var i = 0; i < tokenList.length; i++) {
|
|
879
|
+
if (tokenList[i].type === '<whitespace-token>') {
|
|
880
|
+
before = true;
|
|
881
|
+
|
|
882
|
+
if (newTokenList.length > 0) {
|
|
883
|
+
newTokenList[newTokenList.length - 1].wsAfter = true;
|
|
884
|
+
}
|
|
885
|
+
} else {
|
|
886
|
+
newTokenList.push(__assign(__assign({}, tokenList[i]), {
|
|
887
|
+
wsBefore: before,
|
|
888
|
+
wsAfter: false
|
|
889
|
+
}));
|
|
890
|
+
before = false;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
return newTokenList;
|
|
895
|
+
};
|
|
896
|
+
var syntacticAnalysis = function syntacticAnalysis(tokenList) {
|
|
897
|
+
var e_1, _a;
|
|
898
|
+
|
|
899
|
+
var mediaQueryList = [[]];
|
|
900
|
+
|
|
901
|
+
for (var i = 0; i < tokenList.length; i++) {
|
|
902
|
+
var token = tokenList[i];
|
|
903
|
+
|
|
904
|
+
if (token.type === '<comma-token>') {
|
|
905
|
+
mediaQueryList.push([]);
|
|
906
|
+
} else {
|
|
907
|
+
mediaQueryList[mediaQueryList.length - 1].push(token);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
var mediaQueries = mediaQueryList.map(removeWhitespace);
|
|
912
|
+
|
|
913
|
+
if (mediaQueries.length === 1 && mediaQueries[0].length === 0) {
|
|
914
|
+
return [{
|
|
915
|
+
mediaCondition: null,
|
|
916
|
+
mediaPrefix: null,
|
|
917
|
+
mediaType: 'all'
|
|
918
|
+
}];
|
|
919
|
+
} else {
|
|
920
|
+
var mediaQueryTokens = mediaQueries.map(function (mediaQueryTokens) {
|
|
921
|
+
if (mediaQueryTokens.length === 0) {
|
|
922
|
+
return null;
|
|
923
|
+
} else {
|
|
924
|
+
return tokenizeMediaQuery(mediaQueryTokens);
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
var nonNullMediaQueryTokens = [];
|
|
928
|
+
|
|
929
|
+
try {
|
|
930
|
+
for (var mediaQueryTokens_1 = __values(mediaQueryTokens), mediaQueryTokens_1_1 = mediaQueryTokens_1.next(); !mediaQueryTokens_1_1.done; mediaQueryTokens_1_1 = mediaQueryTokens_1.next()) {
|
|
931
|
+
var mediaQueryToken = mediaQueryTokens_1_1.value;
|
|
932
|
+
|
|
933
|
+
if (mediaQueryToken !== null) {
|
|
934
|
+
nonNullMediaQueryTokens.push(mediaQueryToken);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
} catch (e_1_1) {
|
|
938
|
+
e_1 = {
|
|
939
|
+
error: e_1_1
|
|
940
|
+
};
|
|
941
|
+
} finally {
|
|
942
|
+
try {
|
|
943
|
+
if (mediaQueryTokens_1_1 && !mediaQueryTokens_1_1.done && (_a = mediaQueryTokens_1["return"])) _a.call(mediaQueryTokens_1);
|
|
944
|
+
} finally {
|
|
945
|
+
if (e_1) throw e_1.error;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
if (nonNullMediaQueryTokens.length === 0) {
|
|
950
|
+
throw createError('No valid media queries');
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
return nonNullMediaQueryTokens;
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
var tokenizeMediaQuery = function tokenizeMediaQuery(tokens) {
|
|
957
|
+
var firstToken = tokens[0];
|
|
958
|
+
|
|
959
|
+
if (firstToken.type === '<(-token>') {
|
|
960
|
+
try {
|
|
961
|
+
return {
|
|
962
|
+
mediaPrefix: null,
|
|
963
|
+
mediaType: 'all',
|
|
964
|
+
mediaCondition: tokenizeMediaCondition(tokens, true)
|
|
965
|
+
};
|
|
966
|
+
} catch (err) {
|
|
967
|
+
throw createError("Expected media condition after '('", err);
|
|
968
|
+
}
|
|
969
|
+
} else if (firstToken.type === '<ident-token>') {
|
|
970
|
+
var mediaPrefix = null;
|
|
971
|
+
var mediaType = void 0;
|
|
972
|
+
var value = firstToken.value;
|
|
973
|
+
|
|
974
|
+
if (value === 'only' || value === 'not') {
|
|
975
|
+
mediaPrefix = value;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
var firstIndex = mediaPrefix === null ? 0 : 1;
|
|
979
|
+
|
|
980
|
+
if (tokens.length <= firstIndex) {
|
|
981
|
+
throw createError("Expected extra token in media query");
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
var firstNonUnaryToken = tokens[firstIndex];
|
|
985
|
+
|
|
986
|
+
if (firstNonUnaryToken.type === '<ident-token>') {
|
|
987
|
+
var value_1 = firstNonUnaryToken.value;
|
|
988
|
+
|
|
989
|
+
if (value_1 === 'all') {
|
|
990
|
+
mediaType = 'all';
|
|
991
|
+
} else if (value_1 === 'print' || value_1 === 'screen') {
|
|
992
|
+
mediaType = value_1;
|
|
993
|
+
} else if (value_1 === 'tty' || value_1 === 'tv' || value_1 === 'projection' || value_1 === 'handheld' || value_1 === 'braille' || value_1 === 'embossed' || value_1 === 'aural' || value_1 === 'speech') {
|
|
994
|
+
mediaPrefix = mediaPrefix === 'not' ? null : 'not';
|
|
995
|
+
mediaType = 'all';
|
|
996
|
+
} else {
|
|
997
|
+
throw createError("Unknown ident '".concat(value_1, "' in media query"));
|
|
998
|
+
}
|
|
999
|
+
} else if (mediaPrefix === 'not' && firstNonUnaryToken.type === '<(-token>') {
|
|
1000
|
+
var tokensWithParens = [{
|
|
1001
|
+
type: '<(-token>',
|
|
1002
|
+
wsBefore: false,
|
|
1003
|
+
wsAfter: false
|
|
1004
|
+
}];
|
|
1005
|
+
tokensWithParens.push.apply(tokensWithParens, tokens);
|
|
1006
|
+
tokensWithParens.push({
|
|
1007
|
+
type: '<)-token>',
|
|
1008
|
+
wsBefore: false,
|
|
1009
|
+
wsAfter: false
|
|
1010
|
+
});
|
|
1011
|
+
|
|
1012
|
+
try {
|
|
1013
|
+
return {
|
|
1014
|
+
mediaPrefix: null,
|
|
1015
|
+
mediaType: 'all',
|
|
1016
|
+
mediaCondition: tokenizeMediaCondition(tokensWithParens, true)
|
|
1017
|
+
};
|
|
1018
|
+
} catch (err) {
|
|
1019
|
+
throw createError("Expected media condition after '('", err);
|
|
1020
|
+
}
|
|
1021
|
+
} else {
|
|
1022
|
+
throw createError('Invalid media query');
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
if (firstIndex + 1 === tokens.length) {
|
|
1026
|
+
return {
|
|
1027
|
+
mediaPrefix: mediaPrefix,
|
|
1028
|
+
mediaType: mediaType,
|
|
1029
|
+
mediaCondition: null
|
|
1030
|
+
};
|
|
1031
|
+
} else if (firstIndex + 4 < tokens.length) {
|
|
1032
|
+
var secondNonUnaryToken = tokens[firstIndex + 1];
|
|
1033
|
+
|
|
1034
|
+
if (secondNonUnaryToken.type === '<ident-token>' && secondNonUnaryToken.value === 'and') {
|
|
1035
|
+
try {
|
|
1036
|
+
return {
|
|
1037
|
+
mediaPrefix: mediaPrefix,
|
|
1038
|
+
mediaType: mediaType,
|
|
1039
|
+
mediaCondition: tokenizeMediaCondition(tokens.slice(firstIndex + 2), false)
|
|
1040
|
+
};
|
|
1041
|
+
} catch (err) {
|
|
1042
|
+
throw createError("Expected media condition after 'and'", err);
|
|
1043
|
+
}
|
|
1044
|
+
} else {
|
|
1045
|
+
throw createError("Expected 'and' after media prefix");
|
|
1046
|
+
}
|
|
1047
|
+
} else {
|
|
1048
|
+
throw createError('Expected media condition after media prefix');
|
|
1049
|
+
}
|
|
1050
|
+
} else {
|
|
1051
|
+
throw createError('Expected media condition or media prefix');
|
|
1052
|
+
}
|
|
1053
|
+
};
|
|
1054
|
+
var tokenizeMediaCondition = function tokenizeMediaCondition(tokens, mayContainOr, previousOperator) {
|
|
1055
|
+
if (previousOperator === void 0) {
|
|
1056
|
+
previousOperator = null;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
if (tokens.length < 3 || tokens[0].type !== '<(-token>' || tokens[tokens.length - 1].type !== '<)-token>') {
|
|
1060
|
+
throw new Error('Invalid media condition');
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
var endIndexOfFirstFeature = tokens.length - 1;
|
|
1064
|
+
var maxDepth = 0;
|
|
1065
|
+
var count = 0;
|
|
1066
|
+
|
|
1067
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
1068
|
+
var token = tokens[i];
|
|
1069
|
+
|
|
1070
|
+
if (token.type === '<(-token>') {
|
|
1071
|
+
count += 1;
|
|
1072
|
+
maxDepth = Math.max(maxDepth, count);
|
|
1073
|
+
} else if (token.type === '<)-token>') {
|
|
1074
|
+
count -= 1;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
if (count === 0) {
|
|
1078
|
+
endIndexOfFirstFeature = i;
|
|
1079
|
+
break;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
if (count !== 0) {
|
|
1084
|
+
throw new Error('Mismatched parens\nInvalid media condition');
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
var child;
|
|
1088
|
+
var featureTokens = tokens.slice(0, endIndexOfFirstFeature + 1);
|
|
1089
|
+
|
|
1090
|
+
if (maxDepth === 1) {
|
|
1091
|
+
child = tokenizeMediaFeature(featureTokens);
|
|
1092
|
+
} else {
|
|
1093
|
+
if (featureTokens[1].type === '<ident-token>' && featureTokens[1].value === 'not') {
|
|
1094
|
+
child = tokenizeMediaCondition(featureTokens.slice(2, -1), true, 'not');
|
|
1095
|
+
} else {
|
|
1096
|
+
child = tokenizeMediaCondition(featureTokens.slice(1, -1), true);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
if (endIndexOfFirstFeature === tokens.length - 1) {
|
|
1101
|
+
return {
|
|
1102
|
+
operator: previousOperator,
|
|
1103
|
+
children: [child]
|
|
1104
|
+
};
|
|
1105
|
+
} else {
|
|
1106
|
+
var nextToken = tokens[endIndexOfFirstFeature + 1];
|
|
1107
|
+
|
|
1108
|
+
if (nextToken.type !== '<ident-token>') {
|
|
1109
|
+
throw new Error('Invalid operator\nInvalid media condition');
|
|
1110
|
+
} else if (previousOperator !== null && previousOperator !== nextToken.value) {
|
|
1111
|
+
throw new Error("'".concat(nextToken.value, "' and '").concat(previousOperator, "' must not be at same level\nInvalid media condition"));
|
|
1112
|
+
} else if (nextToken.value === 'or' && !mayContainOr) {
|
|
1113
|
+
throw new Error("Cannot use 'or' at top level of a media query\nInvalid media condition");
|
|
1114
|
+
} else if (nextToken.value !== 'and' && nextToken.value !== 'or') {
|
|
1115
|
+
throw new Error("Invalid operator: '".concat(nextToken.value, "'\nInvalid media condition"));
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
var siblings = tokenizeMediaCondition(tokens.slice(endIndexOfFirstFeature + 2), mayContainOr, nextToken.value);
|
|
1119
|
+
return {
|
|
1120
|
+
operator: nextToken.value,
|
|
1121
|
+
children: [child].concat(siblings.children)
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
var tokenizeMediaFeature = function tokenizeMediaFeature(rawTokens) {
|
|
1126
|
+
if (rawTokens.length < 3 || rawTokens[0].type !== '<(-token>' || rawTokens[rawTokens.length - 1].type !== '<)-token>') {
|
|
1127
|
+
throw new Error('Invalid media feature');
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
var tokens = [rawTokens[0]];
|
|
1131
|
+
|
|
1132
|
+
for (var i = 1; i < rawTokens.length; i++) {
|
|
1133
|
+
if (i < rawTokens.length - 2) {
|
|
1134
|
+
var a = rawTokens[i];
|
|
1135
|
+
var b = rawTokens[i + 1];
|
|
1136
|
+
var c = rawTokens[i + 2];
|
|
1137
|
+
|
|
1138
|
+
if (a.type === '<number-token>' && a.value > 0 && b.type === '<delim-token>' && b.value === 0x002f && c.type === '<number-token>' && c.value > 0) {
|
|
1139
|
+
tokens.push({
|
|
1140
|
+
type: '<ratio-token>',
|
|
1141
|
+
numerator: a.value,
|
|
1142
|
+
denominator: c.value,
|
|
1143
|
+
wsBefore: a.wsBefore,
|
|
1144
|
+
wsAfter: c.wsAfter
|
|
1145
|
+
});
|
|
1146
|
+
i += 2;
|
|
1147
|
+
continue;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
tokens.push(rawTokens[i]);
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
var nextToken = tokens[1];
|
|
1155
|
+
|
|
1156
|
+
if (nextToken.type === '<ident-token>' && tokens.length === 3) {
|
|
1157
|
+
return {
|
|
1158
|
+
context: 'boolean',
|
|
1159
|
+
feature: nextToken.value
|
|
1160
|
+
};
|
|
1161
|
+
} else if (tokens.length === 5 && tokens[1].type === '<ident-token>' && tokens[2].type === '<colon-token>') {
|
|
1162
|
+
var valueToken = tokens[3];
|
|
1163
|
+
|
|
1164
|
+
if (valueToken.type === '<number-token>' || valueToken.type === '<dimension-token>' || valueToken.type === '<ratio-token>' || valueToken.type === '<ident-token>') {
|
|
1165
|
+
var feature = tokens[1].value;
|
|
1166
|
+
var prefix = null;
|
|
1167
|
+
var slice = feature.slice(0, 4);
|
|
1168
|
+
|
|
1169
|
+
if (slice === 'min-') {
|
|
1170
|
+
prefix = 'min';
|
|
1171
|
+
feature = feature.slice(4);
|
|
1172
|
+
} else if (slice === 'max-') {
|
|
1173
|
+
prefix = 'max';
|
|
1174
|
+
feature = feature.slice(4);
|
|
1175
|
+
}
|
|
1176
|
+
var value = __rest(valueToken, ["wsBefore", "wsAfter"]);
|
|
1177
|
+
|
|
1178
|
+
return {
|
|
1179
|
+
context: 'value',
|
|
1180
|
+
prefix: prefix,
|
|
1181
|
+
feature: feature,
|
|
1182
|
+
value: value
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
} else if (tokens.length >= 5) {
|
|
1186
|
+
try {
|
|
1187
|
+
var range = tokenizeRange(tokens);
|
|
1188
|
+
return {
|
|
1189
|
+
context: 'range',
|
|
1190
|
+
feature: range.featureName,
|
|
1191
|
+
range: range
|
|
1192
|
+
};
|
|
1193
|
+
} catch (err) {
|
|
1194
|
+
throw createError('Invalid media feature', err);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
throw new Error('Invalid media feature');
|
|
1199
|
+
};
|
|
1200
|
+
var tokenizeRange = function tokenizeRange(tokens) {
|
|
1201
|
+
var _a, _b, _c, _d;
|
|
1202
|
+
|
|
1203
|
+
if (tokens.length < 5 || tokens[0].type !== '<(-token>' || tokens[tokens.length - 1].type !== '<)-token>') {
|
|
1204
|
+
throw new Error('Invalid range');
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
var range = {
|
|
1208
|
+
leftToken: null,
|
|
1209
|
+
leftOp: null,
|
|
1210
|
+
featureName: '',
|
|
1211
|
+
rightOp: null,
|
|
1212
|
+
rightToken: null
|
|
1213
|
+
};
|
|
1214
|
+
var hasLeft = tokens[1].type === '<number-token>' || tokens[1].type === '<dimension-token>' || tokens[1].type === '<ratio-token>' || tokens[1].type === '<ident-token>' && tokens[1].value === 'infinite';
|
|
1215
|
+
|
|
1216
|
+
if (tokens[2].type === '<delim-token>') {
|
|
1217
|
+
if (tokens[2].value === 0x003c) {
|
|
1218
|
+
if (tokens[3].type === '<delim-token>' && tokens[3].value === 0x003d && !tokens[3].wsBefore) {
|
|
1219
|
+
range[hasLeft ? 'leftOp' : 'rightOp'] = '<=';
|
|
1220
|
+
} else {
|
|
1221
|
+
range[hasLeft ? 'leftOp' : 'rightOp'] = '<';
|
|
1222
|
+
}
|
|
1223
|
+
} else if (tokens[2].value === 0x003e) {
|
|
1224
|
+
if (tokens[3].type === '<delim-token>' && tokens[3].value === 0x003d && !tokens[3].wsBefore) {
|
|
1225
|
+
range[hasLeft ? 'leftOp' : 'rightOp'] = '>=';
|
|
1226
|
+
} else {
|
|
1227
|
+
range[hasLeft ? 'leftOp' : 'rightOp'] = '>';
|
|
1228
|
+
}
|
|
1229
|
+
} else if (tokens[2].value === 0x003d) {
|
|
1230
|
+
range[hasLeft ? 'leftOp' : 'rightOp'] = '=';
|
|
1231
|
+
} else {
|
|
1232
|
+
throw new Error('Invalid range');
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
if (hasLeft) {
|
|
1236
|
+
range.leftToken = tokens[1];
|
|
1237
|
+
} else if (tokens[1].type === '<ident-token>') {
|
|
1238
|
+
range.featureName = tokens[1].value;
|
|
1239
|
+
} else {
|
|
1240
|
+
throw new Error('Invalid range');
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
var tokenIndexAfterFirstOp = 2 + ((_b = (_a = range[hasLeft ? 'leftOp' : 'rightOp']) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
1244
|
+
var tokenAfterFirstOp = tokens[tokenIndexAfterFirstOp];
|
|
1245
|
+
|
|
1246
|
+
if (hasLeft) {
|
|
1247
|
+
if (tokenAfterFirstOp.type === '<ident-token>') {
|
|
1248
|
+
range.featureName = tokenAfterFirstOp.value;
|
|
1249
|
+
|
|
1250
|
+
if (tokens.length >= 7) {
|
|
1251
|
+
var secondOpToken = tokens[tokenIndexAfterFirstOp + 1];
|
|
1252
|
+
var followingToken = tokens[tokenIndexAfterFirstOp + 2];
|
|
1253
|
+
|
|
1254
|
+
if (secondOpToken.type === '<delim-token>') {
|
|
1255
|
+
var charCode = secondOpToken.value;
|
|
1256
|
+
|
|
1257
|
+
if (charCode === 0x003c) {
|
|
1258
|
+
if (followingToken.type === '<delim-token>' && followingToken.value === 0x003d && !followingToken.wsBefore) {
|
|
1259
|
+
range.rightOp = '<=';
|
|
1260
|
+
} else {
|
|
1261
|
+
range.rightOp = '<';
|
|
1262
|
+
}
|
|
1263
|
+
} else if (charCode === 0x003e) {
|
|
1264
|
+
if (followingToken.type === '<delim-token>' && followingToken.value === 0x003d && !followingToken.wsBefore) {
|
|
1265
|
+
range.rightOp = '>=';
|
|
1266
|
+
} else {
|
|
1267
|
+
range.rightOp = '>';
|
|
1268
|
+
}
|
|
1269
|
+
} else {
|
|
1270
|
+
throw new Error('Invalid range');
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
var tokenAfterSecondOp = tokens[tokenIndexAfterFirstOp + 1 + ((_d = (_c = range.rightOp) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0)];
|
|
1274
|
+
range.rightToken = tokenAfterSecondOp;
|
|
1275
|
+
} else {
|
|
1276
|
+
throw new Error('Invalid range');
|
|
1277
|
+
}
|
|
1278
|
+
} else if (tokenIndexAfterFirstOp + 2 !== tokens.length) {
|
|
1279
|
+
throw new Error('Invalid range');
|
|
1280
|
+
}
|
|
1281
|
+
} else {
|
|
1282
|
+
throw new Error('Invalid range');
|
|
1283
|
+
}
|
|
1284
|
+
} else {
|
|
1285
|
+
range.rightToken = tokenAfterFirstOp;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
var validRange = null;
|
|
1289
|
+
var lt = range.leftToken,
|
|
1290
|
+
leftOp = range.leftOp,
|
|
1291
|
+
featureName = range.featureName,
|
|
1292
|
+
rightOp = range.rightOp,
|
|
1293
|
+
rt = range.rightToken;
|
|
1294
|
+
var leftToken = null;
|
|
1295
|
+
|
|
1296
|
+
if (lt !== null) {
|
|
1297
|
+
if (lt.type === '<ident-token>') {
|
|
1298
|
+
var type = lt.type,
|
|
1299
|
+
value = lt.value;
|
|
1300
|
+
|
|
1301
|
+
if (value === 'infinite') {
|
|
1302
|
+
leftToken = {
|
|
1303
|
+
type: type,
|
|
1304
|
+
value: value
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
} else if (lt.type === '<number-token>' || lt.type === '<dimension-token>' || lt.type === '<ratio-token>') {
|
|
1308
|
+
var ltNoWS = __rest(lt, ["wsBefore", "wsAfter"]);
|
|
1309
|
+
|
|
1310
|
+
leftToken = ltNoWS;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
var rightToken = null;
|
|
1315
|
+
|
|
1316
|
+
if (rt !== null) {
|
|
1317
|
+
if (rt.type === '<ident-token>') {
|
|
1318
|
+
var type = rt.type,
|
|
1319
|
+
value = rt.value;
|
|
1320
|
+
|
|
1321
|
+
if (value === 'infinite') {
|
|
1322
|
+
rightToken = {
|
|
1323
|
+
type: type,
|
|
1324
|
+
value: value
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
} else if (rt.type === '<number-token>' || rt.type === '<dimension-token>' || rt.type === '<ratio-token>') {
|
|
1328
|
+
var rtNoWS = __rest(rt, ["wsBefore", "wsAfter"]);
|
|
1329
|
+
|
|
1330
|
+
rightToken = rtNoWS;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
if (leftToken !== null && rightToken !== null) {
|
|
1335
|
+
if ((leftOp === '<' || leftOp === '<=') && (rightOp === '<' || rightOp === '<=')) {
|
|
1336
|
+
validRange = {
|
|
1337
|
+
leftToken: leftToken,
|
|
1338
|
+
leftOp: leftOp,
|
|
1339
|
+
featureName: featureName,
|
|
1340
|
+
rightOp: rightOp,
|
|
1341
|
+
rightToken: rightToken
|
|
1342
|
+
};
|
|
1343
|
+
} else if ((leftOp === '>' || leftOp === '>=') && (rightOp === '>' || rightOp === '>=')) {
|
|
1344
|
+
validRange = {
|
|
1345
|
+
leftToken: leftToken,
|
|
1346
|
+
leftOp: leftOp,
|
|
1347
|
+
featureName: featureName,
|
|
1348
|
+
rightOp: rightOp,
|
|
1349
|
+
rightToken: rightToken
|
|
1350
|
+
};
|
|
1351
|
+
} else {
|
|
1352
|
+
throw new Error('Invalid range');
|
|
1353
|
+
}
|
|
1354
|
+
} else if (leftToken === null && leftOp === null && rightOp !== null && rightToken !== null) {
|
|
1355
|
+
validRange = {
|
|
1356
|
+
leftToken: leftToken,
|
|
1357
|
+
leftOp: leftOp,
|
|
1358
|
+
featureName: featureName,
|
|
1359
|
+
rightOp: rightOp,
|
|
1360
|
+
rightToken: rightToken
|
|
1361
|
+
};
|
|
1362
|
+
} else if (leftToken !== null && leftOp !== null && rightOp === null && rightToken === null) {
|
|
1363
|
+
validRange = {
|
|
1364
|
+
leftToken: leftToken,
|
|
1365
|
+
leftOp: leftOp,
|
|
1366
|
+
featureName: featureName,
|
|
1367
|
+
rightOp: rightOp,
|
|
1368
|
+
rightToken: rightToken
|
|
1369
|
+
};
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
return validRange;
|
|
1373
|
+
} else {
|
|
1374
|
+
throw new Error('Invalid range');
|
|
1375
|
+
}
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
export { consumeEscape, consumeIdent, consumeIdentLike, consumeIdentUnsafe, consumeNumber, consumeNumeric, consumeString, consumeUrl, lexicalAnalysis, removeWhitespace, syntacticAnalysis, toAST, toUnflattenedAST, tokenizeMediaCondition, tokenizeMediaFeature, tokenizeMediaQuery, tokenizeRange, wouldStartIdentifier };
|