@shavin/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/LICENSE +21 -0
- package/README.md +81 -2
- package/components.json +15771 -0
- package/dist/authoring/types.js +0 -0
- package/dist/icons.d.ts +20 -0
- package/dist/icons.js +6 -0
- package/dist/index.d.ts +3325 -0
- package/dist/index.js +531 -0
- package/dist/inspector/FindingPopover.js +252 -0
- package/dist/inspector/Highlight.js +76 -0
- package/dist/inspector/Inspector.js +420 -0
- package/dist/inspector/InspectorRoot.js +75 -0
- package/dist/inspector/IssuesLayer.js +134 -0
- package/dist/inspector/IssuesList.js +174 -0
- package/dist/inspector/SettingsPanel.js +89 -0
- package/dist/inspector/ShavinMark.js +22 -0
- package/dist/inspector/Toolbar.js +202 -0
- package/dist/inspector/barPlacement.js +117 -0
- package/dist/inspector/env.js +59 -0
- package/dist/inspector/geometry.js +44 -0
- package/dist/inspector/ignored.js +52 -0
- package/dist/inspector/index.js +7 -0
- package/dist/inspector/journalClient.js +57 -0
- package/dist/inspector/journalState.js +36 -0
- package/dist/inspector/pin.js +43 -0
- package/dist/inspector/placement.js +96 -0
- package/dist/inspector/prompt.js +63 -0
- package/dist/inspector/scheme.js +56 -0
- package/dist/inspector/settings.js +54 -0
- package/dist/inspector/strings.js +67 -0
- package/dist/inspector/targets.js +31 -0
- package/dist/inspector/theme/ThemeControls.js +351 -0
- package/dist/inspector/theme/ThemePanel.js +32 -0
- package/dist/inspector/theme/useThemeController.js +560 -0
- package/dist/inspector/usePhone.js +32 -0
- package/dist/inspector/useSelectTool.js +82 -0
- package/dist/inspector/useTimeouts.js +22 -0
- package/dist/inspector/useTrackedRect.js +39 -0
- package/dist/lib/announce.js +47 -0
- package/dist/lib/bridge.js +43 -0
- package/dist/lib/buttonState.js +81 -0
- package/dist/lib/chart-kit.js +226 -0
- package/dist/lib/cn.js +8 -0
- package/dist/lib/color-space.js +315 -0
- package/dist/lib/concentric.js +85 -0
- package/dist/lib/hit-area.js +25 -0
- package/dist/lib/inspector/collect.js +299 -0
- package/dist/lib/inspector/color.js +58 -0
- package/dist/lib/inspector/console-capture.js +96 -0
- package/dist/lib/inspector/index.js +8 -0
- package/dist/lib/inspector/rules.js +232 -0
- package/dist/lib/inspector/run.js +35 -0
- package/dist/lib/inspector/schema.js +110 -0
- package/dist/lib/inspector/selector.js +103 -0
- package/dist/lib/inspector/tokens.js +34 -0
- package/dist/lib/media-overlay-presets.js +284 -0
- package/dist/lib/media-overlays.js +381 -0
- package/dist/lib/meta.js +70 -0
- package/dist/lib/motion-gsap.js +25 -0
- package/dist/lib/motion-runtime.js +283 -0
- package/dist/lib/neutral-tint.js +108 -0
- package/dist/lib/portal-container.js +12 -0
- package/dist/lib/scroll-edges.js +41 -0
- package/dist/lib/surface.js +6 -0
- package/dist/lib/syntax.js +115 -0
- package/dist/lib/theme-presets.d.ts +1 -0
- package/dist/lib/theme-presets.js +759 -0
- package/dist/lib/useClientLocale.js +11 -0
- package/dist/lib/useFieldErrorAnnouncement.js +15 -0
- package/dist/lib/useReducedMotion.js +17 -0
- package/dist/lib/useResizable.js +313 -0
- package/dist/lib/useReturnFocus.js +24 -0
- package/dist/lib/useSlidingIndicator.js +56 -0
- package/dist/panels.d.ts +37 -0
- package/dist/panels.js +19 -0
- package/dist/primitives/Accordion/Accordion.doc.js +37 -0
- package/dist/primitives/Accordion/Accordion.js +87 -0
- package/dist/primitives/Accordion/index.js +2 -0
- package/dist/primitives/ActionBar/ActionBar.doc.js +37 -0
- package/dist/primitives/ActionBar/ActionBar.js +126 -0
- package/dist/primitives/ActionBar/index.js +2 -0
- package/dist/primitives/AlertDialog/AlertDialog.doc.js +54 -0
- package/dist/primitives/AlertDialog/AlertDialog.js +113 -0
- package/dist/primitives/AlertDialog/index.js +2 -0
- package/dist/primitives/AppShell/AppShell.doc.js +81 -0
- package/dist/primitives/AppShell/AppShell.js +178 -0
- package/dist/primitives/AppShell/frame-context.js +10 -0
- package/dist/primitives/AppShell/index.js +2 -0
- package/dist/primitives/AspectRatio/AspectRatio.doc.js +34 -0
- package/dist/primitives/AspectRatio/AspectRatio.js +5 -0
- package/dist/primitives/AspectRatio/index.js +2 -0
- package/dist/primitives/Avatar/Avatar.doc.js +40 -0
- package/dist/primitives/Avatar/Avatar.js +62 -0
- package/dist/primitives/Avatar/index.js +2 -0
- package/dist/primitives/Backdrop/Backdrop.doc.js +24 -0
- package/dist/primitives/Backdrop/Backdrop.js +42 -0
- package/dist/primitives/Backdrop/index.js +2 -0
- package/dist/primitives/Badge/Badge.doc.js +35 -0
- package/dist/primitives/Badge/Badge.js +95 -0
- package/dist/primitives/Badge/index.js +2 -0
- package/dist/primitives/BarChart/BarChart.doc.js +59 -0
- package/dist/primitives/BarChart/BarChart.js +154 -0
- package/dist/primitives/BarChart/index.js +2 -0
- package/dist/primitives/BlockPreview/BlockPreview.doc.js +51 -0
- package/dist/primitives/BlockPreview/BlockPreview.js +485 -0
- package/dist/primitives/BlockPreview/index.js +8 -0
- package/dist/primitives/Blockquote/Blockquote.doc.js +25 -0
- package/dist/primitives/Blockquote/Blockquote.js +19 -0
- package/dist/primitives/Blockquote/index.js +2 -0
- package/dist/primitives/BottomNav/BottomNav.doc.js +37 -0
- package/dist/primitives/BottomNav/BottomNav.js +54 -0
- package/dist/primitives/BottomNav/index.js +2 -0
- package/dist/primitives/Box/Box.doc.js +45 -0
- package/dist/primitives/Box/Box.js +51 -0
- package/dist/primitives/Box/index.js +2 -0
- package/dist/primitives/Breadcrumbs/Breadcrumbs.doc.js +35 -0
- package/dist/primitives/Breadcrumbs/Breadcrumbs.js +40 -0
- package/dist/primitives/Breadcrumbs/index.js +2 -0
- package/dist/primitives/Button/Button.doc.js +80 -0
- package/dist/primitives/Button/Button.js +132 -0
- package/dist/primitives/Button/index.js +2 -0
- package/dist/primitives/Calendar/Calendar.doc.js +36 -0
- package/dist/primitives/Calendar/Calendar.js +502 -0
- package/dist/primitives/Calendar/index.js +2 -0
- package/dist/primitives/Callout/Callout.doc.js +34 -0
- package/dist/primitives/Callout/Callout.js +63 -0
- package/dist/primitives/Callout/index.js +2 -0
- package/dist/primitives/Card/Card.doc.js +46 -0
- package/dist/primitives/Card/Card.js +159 -0
- package/dist/primitives/Card/index.js +2 -0
- package/dist/primitives/Carousel/Carousel.doc.js +61 -0
- package/dist/primitives/Carousel/Carousel.js +369 -0
- package/dist/primitives/Carousel/index.js +1 -0
- package/dist/primitives/ChatBubble/ChatBubble.doc.js +37 -0
- package/dist/primitives/ChatBubble/ChatBubble.js +120 -0
- package/dist/primitives/ChatBubble/index.js +2 -0
- package/dist/primitives/Checkbox/Checkbox.doc.js +36 -0
- package/dist/primitives/Checkbox/Checkbox.js +57 -0
- package/dist/primitives/Checkbox/index.js +2 -0
- package/dist/primitives/CheckboxCards/CheckboxCards.doc.js +35 -0
- package/dist/primitives/CheckboxCards/CheckboxCards.js +47 -0
- package/dist/primitives/CheckboxCards/index.js +2 -0
- package/dist/primitives/CheckboxGroup/CheckboxGroup.doc.js +35 -0
- package/dist/primitives/CheckboxGroup/CheckboxGroup.js +40 -0
- package/dist/primitives/CheckboxGroup/index.js +2 -0
- package/dist/primitives/Code/Code.doc.js +22 -0
- package/dist/primitives/Code/Code.js +17 -0
- package/dist/primitives/Code/index.js +2 -0
- package/dist/primitives/CodeBlock/CodeBlock.doc.js +36 -0
- package/dist/primitives/CodeBlock/CodeBlock.js +205 -0
- package/dist/primitives/CodeBlock/index.js +2 -0
- package/dist/primitives/CodeEditor/CodeEditor.doc.js +53 -0
- package/dist/primitives/CodeEditor/CodeEditor.js +204 -0
- package/dist/primitives/CodeEditor/index.js +4 -0
- package/dist/primitives/ColorPicker/ColorPicker.doc.js +37 -0
- package/dist/primitives/ColorPicker/ColorPicker.js +776 -0
- package/dist/primitives/ColorPicker/index.js +2 -0
- package/dist/primitives/Combobox/Combobox.doc.js +36 -0
- package/dist/primitives/Combobox/Combobox.js +199 -0
- package/dist/primitives/Combobox/index.js +2 -0
- package/dist/primitives/Container/Container.doc.js +46 -0
- package/dist/primitives/Container/Container.js +54 -0
- package/dist/primitives/Container/index.js +2 -0
- package/dist/primitives/ContextMenu/ContextMenu.doc.js +36 -0
- package/dist/primitives/ContextMenu/ContextMenu.js +59 -0
- package/dist/primitives/ContextMenu/index.js +2 -0
- package/dist/primitives/DataList/DataList.doc.js +34 -0
- package/dist/primitives/DataList/DataList.js +35 -0
- package/dist/primitives/DataList/index.js +2 -0
- package/dist/primitives/DatePicker/DatePicker.doc.js +36 -0
- package/dist/primitives/DatePicker/DatePicker.js +398 -0
- package/dist/primitives/DatePicker/index.js +2 -0
- package/dist/primitives/Dialog/Dialog.doc.js +107 -0
- package/dist/primitives/Dialog/Dialog.js +143 -0
- package/dist/primitives/Dialog/index.js +2 -0
- package/dist/primitives/DonutChart/DonutChart.doc.js +26 -0
- package/dist/primitives/DonutChart/DonutChart.js +71 -0
- package/dist/primitives/DonutChart/index.js +2 -0
- package/dist/primitives/Drawer/Drawer.doc.js +44 -0
- package/dist/primitives/Drawer/Drawer.js +158 -0
- package/dist/primitives/Drawer/index.js +2 -0
- package/dist/primitives/Dropdown/Dropdown.doc.js +40 -0
- package/dist/primitives/Dropdown/Dropdown.js +146 -0
- package/dist/primitives/Dropdown/index.js +2 -0
- package/dist/primitives/Emphasis/Emphasis.doc.js +28 -0
- package/dist/primitives/Emphasis/Emphasis.js +25 -0
- package/dist/primitives/Emphasis/index.js +2 -0
- package/dist/primitives/EmptyState/EmptyState.doc.js +76 -0
- package/dist/primitives/EmptyState/EmptyState.js +118 -0
- package/dist/primitives/EmptyState/index.js +2 -0
- package/dist/primitives/FileOutput/FileOutput.doc.js +26 -0
- package/dist/primitives/FileOutput/FileOutput.js +55 -0
- package/dist/primitives/FileOutput/index.js +2 -0
- package/dist/primitives/Flex/Flex.doc.js +58 -0
- package/dist/primitives/Flex/Flex.js +98 -0
- package/dist/primitives/Flex/index.js +2 -0
- package/dist/primitives/FormErrorSummary/FormErrorSummary.doc.js +39 -0
- package/dist/primitives/FormErrorSummary/FormErrorSummary.js +61 -0
- package/dist/primitives/FormErrorSummary/index.js +2 -0
- package/dist/primitives/FormField/FormField.doc.js +68 -0
- package/dist/primitives/FormField/FormField.js +149 -0
- package/dist/primitives/FormField/index.js +2 -0
- package/dist/primitives/FunnelChart/FunnelChart.doc.js +45 -0
- package/dist/primitives/FunnelChart/FunnelChart.js +54 -0
- package/dist/primitives/FunnelChart/index.js +2 -0
- package/dist/primitives/Grid/Grid.doc.js +57 -0
- package/dist/primitives/Grid/Grid.js +122 -0
- package/dist/primitives/Grid/index.js +2 -0
- package/dist/primitives/Heading/Heading.doc.js +46 -0
- package/dist/primitives/Heading/Heading.js +80 -0
- package/dist/primitives/Heading/index.js +2 -0
- package/dist/primitives/Heatmap/Heatmap.doc.js +49 -0
- package/dist/primitives/Heatmap/Heatmap.js +42 -0
- package/dist/primitives/Heatmap/index.js +2 -0
- package/dist/primitives/HoverCard/HoverCard.doc.js +36 -0
- package/dist/primitives/HoverCard/HoverCard.js +39 -0
- package/dist/primitives/HoverCard/index.js +2 -0
- package/dist/primitives/Icon/Icon.doc.js +49 -0
- package/dist/primitives/Icon/Icon.js +214 -0
- package/dist/primitives/Icon/buckets/lucide-a.js +214 -0
- package/dist/primitives/Icon/buckets/lucide-b.js +298 -0
- package/dist/primitives/Icon/buckets/lucide-c.js +524 -0
- package/dist/primitives/Icon/buckets/lucide-d.js +110 -0
- package/dist/primitives/Icon/buckets/lucide-e.js +50 -0
- package/dist/primitives/Icon/buckets/lucide-f.js +264 -0
- package/dist/primitives/Icon/buckets/lucide-g.js +108 -0
- package/dist/primitives/Icon/buckets/lucide-h.js +112 -0
- package/dist/primitives/Icon/buckets/lucide-i.js +46 -0
- package/dist/primitives/Icon/buckets/lucide-j.js +6 -0
- package/dist/primitives/Icon/buckets/lucide-k.js +18 -0
- package/dist/primitives/Icon/buckets/lucide-l.js +162 -0
- package/dist/primitives/Icon/buckets/lucide-m.js +266 -0
- package/dist/primitives/Icon/buckets/lucide-n.js +34 -0
- package/dist/primitives/Icon/buckets/lucide-o.js +20 -0
- package/dist/primitives/Icon/buckets/lucide-p.js +216 -0
- package/dist/primitives/Icon/buckets/lucide-q.js +6 -0
- package/dist/primitives/Icon/buckets/lucide-r.js +140 -0
- package/dist/primitives/Icon/buckets/lucide-s.js +490 -0
- package/dist/primitives/Icon/buckets/lucide-t.js +204 -0
- package/dist/primitives/Icon/buckets/lucide-u.js +84 -0
- package/dist/primitives/Icon/buckets/lucide-v.js +46 -0
- package/dist/primitives/Icon/buckets/lucide-w.js +82 -0
- package/dist/primitives/Icon/buckets/lucide-x.js +6 -0
- package/dist/primitives/Icon/buckets/lucide-z.js +36 -0
- package/dist/primitives/Icon/buckets/phosphor-a.js +250 -0
- package/dist/primitives/Icon/buckets/phosphor-b.js +158 -0
- package/dist/primitives/Icon/buckets/phosphor-c.js +320 -0
- package/dist/primitives/Icon/buckets/phosphor-d.js +90 -0
- package/dist/primitives/Icon/buckets/phosphor-e.js +52 -0
- package/dist/primitives/Icon/buckets/phosphor-f.js +162 -0
- package/dist/primitives/Icon/buckets/phosphor-g.js +92 -0
- package/dist/primitives/Icon/buckets/phosphor-h.js +88 -0
- package/dist/primitives/Icon/buckets/phosphor-i.js +26 -0
- package/dist/primitives/Icon/buckets/phosphor-j.js +8 -0
- package/dist/primitives/Icon/buckets/phosphor-k.js +8 -0
- package/dist/primitives/Icon/buckets/phosphor-l.js +84 -0
- package/dist/primitives/Icon/buckets/phosphor-m.js +110 -0
- package/dist/primitives/Icon/buckets/phosphor-n.js +100 -0
- package/dist/primitives/Icon/buckets/phosphor-o.js +14 -0
- package/dist/primitives/Icon/buckets/phosphor-p.js +166 -0
- package/dist/primitives/Icon/buckets/phosphor-q.js +10 -0
- package/dist/primitives/Icon/buckets/phosphor-r.js +46 -0
- package/dist/primitives/Icon/buckets/phosphor-s.js +254 -0
- package/dist/primitives/Icon/buckets/phosphor-t.js +152 -0
- package/dist/primitives/Icon/buckets/phosphor-u.js +38 -0
- package/dist/primitives/Icon/buckets/phosphor-v.js +22 -0
- package/dist/primitives/Icon/buckets/phosphor-w.js +48 -0
- package/dist/primitives/Icon/buckets/phosphor-x.js +4 -0
- package/dist/primitives/Icon/buckets/phosphor-y.js +8 -0
- package/dist/primitives/Icon/icon-display-names.generated.js +4 -0
- package/dist/primitives/Icon/icon-loaders.generated.js +70 -0
- package/dist/primitives/Icon/icon-names-material.generated.js +4 -0
- package/dist/primitives/Icon/icon-names.js +11 -0
- package/dist/primitives/Icon/index.js +7 -0
- package/dist/primitives/IconButton/IconButton.doc.js +43 -0
- package/dist/primitives/IconButton/IconButton.js +98 -0
- package/dist/primitives/IconButton/index.js +2 -0
- package/dist/primitives/IconPicker/IconPicker.doc.js +52 -0
- package/dist/primitives/IconPicker/IconPicker.js +193 -0
- package/dist/primitives/IconPicker/index.js +2 -0
- package/dist/primitives/IconPicker/registry.js +98 -0
- package/dist/primitives/Image/Image.doc.js +40 -0
- package/dist/primitives/Image/Image.js +76 -0
- package/dist/primitives/Image/index.js +2 -0
- package/dist/primitives/Inset/Inset.doc.js +34 -0
- package/dist/primitives/Inset/Inset.js +51 -0
- package/dist/primitives/Inset/index.js +2 -0
- package/dist/primitives/Kbd/Kbd.doc.js +22 -0
- package/dist/primitives/Kbd/Kbd.js +17 -0
- package/dist/primitives/Kbd/index.js +2 -0
- package/dist/primitives/LineChart/LineChart.doc.js +61 -0
- package/dist/primitives/LineChart/LineChart.js +146 -0
- package/dist/primitives/LineChart/index.js +2 -0
- package/dist/primitives/Link/Link.doc.js +45 -0
- package/dist/primitives/Link/Link.js +37 -0
- package/dist/primitives/Link/index.js +2 -0
- package/dist/primitives/List/List.doc.js +35 -0
- package/dist/primitives/List/List.js +35 -0
- package/dist/primitives/List/index.js +2 -0
- package/dist/primitives/Menu/Menu.doc.js +37 -0
- package/dist/primitives/Menu/Menu.js +117 -0
- package/dist/primitives/Menu/index.js +2 -0
- package/dist/primitives/Murmur/Murmur.doc.js +32 -0
- package/dist/primitives/Murmur/Murmur.js +85 -0
- package/dist/primitives/Murmur/engine.js +163 -0
- package/dist/primitives/Murmur/index.js +12 -0
- package/dist/primitives/Pagination/Pagination.doc.js +37 -0
- package/dist/primitives/Pagination/Pagination.js +183 -0
- package/dist/primitives/Pagination/index.js +2 -0
- package/dist/primitives/PanelGroup/PanelGroup.doc.js +41 -0
- package/dist/primitives/PanelGroup/PanelGroup.js +142 -0
- package/dist/primitives/PanelGroup/index.js +2 -0
- package/dist/primitives/Popover/Popover.doc.js +36 -0
- package/dist/primitives/Popover/Popover.js +41 -0
- package/dist/primitives/Popover/index.js +2 -0
- package/dist/primitives/Progress/Progress.doc.js +35 -0
- package/dist/primitives/Progress/Progress.js +77 -0
- package/dist/primitives/Progress/index.js +2 -0
- package/dist/primitives/RadioGroup/RadioGroup.doc.js +36 -0
- package/dist/primitives/RadioGroup/RadioGroup.js +132 -0
- package/dist/primitives/RadioGroup/index.js +2 -0
- package/dist/primitives/Rating/NpsScale.js +102 -0
- package/dist/primitives/Rating/Rating.doc.js +35 -0
- package/dist/primitives/Rating/Rating.js +116 -0
- package/dist/primitives/Rating/RatingSummary.js +50 -0
- package/dist/primitives/Rating/SentimentRating.js +81 -0
- package/dist/primitives/Rating/index.js +5 -0
- package/dist/primitives/Reasoning/Reasoning.doc.js +28 -0
- package/dist/primitives/Reasoning/Reasoning.js +73 -0
- package/dist/primitives/Reasoning/index.js +2 -0
- package/dist/primitives/Resizable/Resizable.doc.js +50 -0
- package/dist/primitives/Resizable/ResizeHandle.js +185 -0
- package/dist/primitives/Resizable/index.js +2 -0
- package/dist/primitives/Row/Row.doc.js +36 -0
- package/dist/primitives/Row/Row.js +53 -0
- package/dist/primitives/Row/index.js +2 -0
- package/dist/primitives/ScrollArea/ScrollArea.doc.js +35 -0
- package/dist/primitives/ScrollArea/ScrollArea.js +50 -0
- package/dist/primitives/ScrollArea/index.js +2 -0
- package/dist/primitives/Section/Section.doc.js +64 -0
- package/dist/primitives/Section/Section.js +76 -0
- package/dist/primitives/Section/index.js +2 -0
- package/dist/primitives/SegmentedControl/SegmentedControl.doc.js +75 -0
- package/dist/primitives/SegmentedControl/SegmentedControl.js +160 -0
- package/dist/primitives/SegmentedControl/index.js +2 -0
- package/dist/primitives/Select/Select.doc.js +42 -0
- package/dist/primitives/Select/Select.js +180 -0
- package/dist/primitives/Select/index.js +2 -0
- package/dist/primitives/Separator/Separator.doc.js +34 -0
- package/dist/primitives/Separator/Separator.js +84 -0
- package/dist/primitives/Separator/index.js +2 -0
- package/dist/primitives/ShavinDevTools/DevToolsPanel.js +2050 -0
- package/dist/primitives/ShavinDevTools/ShavinDevTools.doc.js +44 -0
- package/dist/primitives/ShavinDevTools/ShavinDevTools.js +15 -0
- package/dist/primitives/ShavinDevTools/index.js +8 -0
- package/dist/primitives/ShavinDevTools/types.js +0 -0
- package/dist/primitives/Sidebar/Sidebar.doc.js +39 -0
- package/dist/primitives/Sidebar/Sidebar.js +295 -0
- package/dist/primitives/Sidebar/index.js +2 -0
- package/dist/primitives/Skeleton/Skeleton.doc.js +38 -0
- package/dist/primitives/Skeleton/Skeleton.js +36 -0
- package/dist/primitives/Skeleton/index.js +2 -0
- package/dist/primitives/Slider/Slider.doc.js +45 -0
- package/dist/primitives/Slider/Slider.js +406 -0
- package/dist/primitives/Slider/index.js +2 -0
- package/dist/primitives/Sortable/Sortable.doc.js +35 -0
- package/dist/primitives/Sortable/Sortable.js +179 -0
- package/dist/primitives/Sortable/index.js +2 -0
- package/dist/primitives/Sparkline/Sparkline.doc.js +25 -0
- package/dist/primitives/Sparkline/Sparkline.js +46 -0
- package/dist/primitives/Sparkline/index.js +2 -0
- package/dist/primitives/Spinner/Spinner.doc.js +35 -0
- package/dist/primitives/Spinner/Spinner.js +162 -0
- package/dist/primitives/Spinner/index.js +2 -0
- package/dist/primitives/Spotlight/Spotlight.doc.js +36 -0
- package/dist/primitives/Spotlight/Spotlight.js +139 -0
- package/dist/primitives/Spotlight/index.js +2 -0
- package/dist/primitives/Stepper/Stepper.doc.js +46 -0
- package/dist/primitives/Stepper/Stepper.js +235 -0
- package/dist/primitives/Stepper/index.js +2 -0
- package/dist/primitives/Switch/Switch.doc.js +36 -0
- package/dist/primitives/Switch/Switch.js +54 -0
- package/dist/primitives/Switch/index.js +2 -0
- package/dist/primitives/Table/Table.doc.js +47 -0
- package/dist/primitives/Table/Table.js +63 -0
- package/dist/primitives/Table/index.js +2 -0
- package/dist/primitives/Tabs/Tabs.doc.js +53 -0
- package/dist/primitives/Tabs/Tabs.js +275 -0
- package/dist/primitives/Tabs/index.js +2 -0
- package/dist/primitives/Text/Text.doc.js +35 -0
- package/dist/primitives/Text/Text.js +67 -0
- package/dist/primitives/Text/index.js +2 -0
- package/dist/primitives/TextArea/TextArea.doc.js +35 -0
- package/dist/primitives/TextArea/TextArea.js +45 -0
- package/dist/primitives/TextArea/index.js +2 -0
- package/dist/primitives/TextField/TextField.doc.js +41 -0
- package/dist/primitives/TextField/TextField.js +290 -0
- package/dist/primitives/TextField/index.js +2 -0
- package/dist/primitives/ThemeProvider/ScopedThemeProvider.js +71 -0
- package/dist/primitives/ThemeProvider/ThemeProvider.doc.js +61 -0
- package/dist/primitives/ThemeProvider/ThemeProvider.js +143 -0
- package/dist/primitives/ThemeProvider/clientTheme.js +47 -0
- package/dist/primitives/ThemeProvider/index.js +3 -0
- package/dist/primitives/ThemeProvider/themeContext.js +11 -0
- package/dist/primitives/ThemeSwitcher/ThemeSwitcher.doc.js +49 -0
- package/dist/primitives/ThemeSwitcher/ThemeSwitcher.js +323 -0
- package/dist/primitives/ThemeSwitcher/index.js +2 -0
- package/dist/primitives/TimePicker/TimePicker.doc.js +36 -0
- package/dist/primitives/TimePicker/TimePicker.js +368 -0
- package/dist/primitives/TimePicker/index.js +2 -0
- package/dist/primitives/Toast/Toast.doc.js +65 -0
- package/dist/primitives/Toast/Toast.js +304 -0
- package/dist/primitives/Toast/index.js +2 -0
- package/dist/primitives/ToolCall/ToolCall.doc.js +29 -0
- package/dist/primitives/ToolCall/ToolCall.js +75 -0
- package/dist/primitives/ToolCall/index.js +2 -0
- package/dist/primitives/Tooltip/Tooltip.doc.js +37 -0
- package/dist/primitives/Tooltip/Tooltip.js +55 -0
- package/dist/primitives/Tooltip/index.js +2 -0
- package/dist/primitives/TopBar/TopBar.doc.js +34 -0
- package/dist/primitives/TopBar/TopBar.js +8 -0
- package/dist/primitives/TopBar/index.js +2 -0
- package/dist/primitives/Video/PauseToggle.js +49 -0
- package/dist/primitives/Video/Video.doc.js +47 -0
- package/dist/primitives/Video/Video.js +104 -0
- package/dist/primitives/Video/index.js +1 -0
- package/dist/primitives/VoiceInput/VoiceInput.doc.js +38 -0
- package/dist/primitives/VoiceInput/VoiceInput.js +96 -0
- package/dist/primitives/VoiceInput/index.js +2 -0
- package/dist/primitives/WiseOwlLogo/WiseOwlLogo.doc.js +38 -0
- package/dist/primitives/WiseOwlLogo/WiseOwlLogo.js +82 -0
- package/dist/primitives/WiseOwlLogo/index.js +2 -0
- package/dist/primitives/WiseOwlLogo/paths.js +10 -0
- package/dist/server.d.ts +256 -0
- package/dist/server.js +22 -0
- package/dist/styles/base-oklch.css +124 -0
- package/dist/styles/base-oklch.d.ts +2 -0
- package/dist/styles/base.css +124 -0
- package/dist/styles/base.d.ts +2 -0
- package/dist/styles/brand-preset.d.ts +22 -0
- package/dist/styles/brand-preset.js +13 -0
- package/dist/styles/brand-theme-v4-oklch.css +2 -0
- package/dist/styles/brand-theme-v4-oklch.d.ts +2 -0
- package/dist/styles/brand-theme-v4.css +2 -0
- package/dist/styles/brand-theme-v4.d.ts +2 -0
- package/dist/styles/brand-tokens-oklch.css +6 -0
- package/dist/styles/brand-tokens-oklch.d.ts +2 -0
- package/dist/styles/brand-tokens.css +6 -0
- package/dist/styles/brand-tokens.d.ts +2 -0
- package/dist/styles/global-oklch.css +1329 -0
- package/dist/styles/global-oklch.d.ts +2 -0
- package/dist/styles/global.css +1329 -0
- package/dist/styles/global.d.ts +2 -0
- package/dist/styles/theme-v4-oklch.css +22 -0
- package/dist/styles/theme-v4-oklch.d.ts +2 -0
- package/dist/styles/theme-v4.css +22 -0
- package/dist/styles/theme-v4.d.ts +2 -0
- package/dist/styles/tokens-oklch.css +1204 -0
- package/dist/styles/tokens-oklch.d.ts +2 -0
- package/dist/styles/tokens.css +1204 -0
- package/dist/styles/tokens.d.ts +2 -0
- package/dist/tailwind-preset.cjs +155 -0
- package/dist/tailwind-preset.d.ts +112 -0
- package/dist/tailwind-preset.js +133 -0
- package/dist/theme-presets-BVWZ_TxX.d.ts +514 -0
- package/global-oklch.css +3 -0
- package/package.json +169 -4
- package/styles.css +3 -0
- package/tailwind-preset.ts +140 -0
- package/tokens.json +423 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { over, parseColor } from "./color.js";
|
|
2
|
+
const INSPECTOR_SELECTOR = "[data-shavin-inspector], .shavin-dev-tools-root, #shavin-audit-focus-beacon, [data-radix-popper-content-wrapper]";
|
|
3
|
+
function defaultIsInspectorNode(el) {
|
|
4
|
+
try {
|
|
5
|
+
return !!el.closest(INSPECTOR_SELECTOR);
|
|
6
|
+
} catch {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const clips = (value) => value === "hidden" || value === "auto" || value === "scroll" || value === "clip";
|
|
11
|
+
const SKIP_TAGS = /* @__PURE__ */ new Set(["SCRIPT", "STYLE", "NOSCRIPT", "TEMPLATE"]);
|
|
12
|
+
const INTERACTIVE = "a[href],button,input,select,textarea,[role=button],[role=tab]";
|
|
13
|
+
const canvasCache = /* @__PURE__ */ new Map();
|
|
14
|
+
function toRgba(doc, css) {
|
|
15
|
+
const direct = parseColor(css);
|
|
16
|
+
if (direct) return direct;
|
|
17
|
+
if (!css || css === "none") return null;
|
|
18
|
+
if (canvasCache.has(css)) return canvasCache.get(css) ?? null;
|
|
19
|
+
if (typeof navigator !== "undefined" && /jsdom/i.test(navigator.userAgent)) return null;
|
|
20
|
+
let out = null;
|
|
21
|
+
try {
|
|
22
|
+
const canvas = doc.createElement("canvas");
|
|
23
|
+
canvas.width = canvas.height = 1;
|
|
24
|
+
const ctx = canvas.getContext("2d", { willReadFrequently: true });
|
|
25
|
+
if (ctx) {
|
|
26
|
+
ctx.clearRect(0, 0, 1, 1);
|
|
27
|
+
ctx.fillStyle = "black";
|
|
28
|
+
ctx.fillStyle = css;
|
|
29
|
+
ctx.fillRect(0, 0, 1, 1);
|
|
30
|
+
const d = ctx.getImageData(0, 0, 1, 1).data;
|
|
31
|
+
out = { rgb: [d[0] ?? 0, d[1] ?? 0, d[2] ?? 0], a: (d[3] ?? 255) / 255 };
|
|
32
|
+
}
|
|
33
|
+
} catch {
|
|
34
|
+
out = null;
|
|
35
|
+
}
|
|
36
|
+
if (canvasCache.size > 200) canvasCache.clear();
|
|
37
|
+
canvasCache.set(css, out);
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
function isHidden(el, win) {
|
|
41
|
+
for (let e = el; e && e.nodeType === 1; e = e.parentElement) {
|
|
42
|
+
if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return true;
|
|
43
|
+
if (e.disabled || e.getAttribute("aria-disabled") === "true") return true;
|
|
44
|
+
}
|
|
45
|
+
const cs = win.getComputedStyle(el);
|
|
46
|
+
return cs.display === "none" || cs.visibility === "hidden";
|
|
47
|
+
}
|
|
48
|
+
function inheritedOpacity(el, win) {
|
|
49
|
+
let op = 1;
|
|
50
|
+
for (let e = el; e && e.nodeType === 1; e = e.parentElement) {
|
|
51
|
+
const o = parseFloat(win.getComputedStyle(e).opacity);
|
|
52
|
+
if (Number.isFinite(o)) op *= o;
|
|
53
|
+
}
|
|
54
|
+
return op > 0.05 ? op : 0;
|
|
55
|
+
}
|
|
56
|
+
function motionState(el) {
|
|
57
|
+
let animating = false;
|
|
58
|
+
let looping = false;
|
|
59
|
+
for (let e = el; e && e.nodeType === 1 && !(animating && looping); e = e.parentElement) {
|
|
60
|
+
if (typeof e.getAnimations !== "function") continue;
|
|
61
|
+
for (const a of e.getAnimations()) {
|
|
62
|
+
if (a.playState !== "running" || !a.effect) continue;
|
|
63
|
+
if (a.effect.getComputedTiming().iterations === Infinity) looping = true;
|
|
64
|
+
else animating = true;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return { animating, looping };
|
|
68
|
+
}
|
|
69
|
+
function backdropOf(el, doc = el.ownerDocument) {
|
|
70
|
+
const win = doc.defaultView;
|
|
71
|
+
if (!win) return { kind: "solid", rgb: [255, 255, 255] };
|
|
72
|
+
const layers = [];
|
|
73
|
+
let opaque = false;
|
|
74
|
+
let stop = null;
|
|
75
|
+
for (let n = el; n && n.nodeType === 1; n = n.parentElement) {
|
|
76
|
+
const cs = win.getComputedStyle(n);
|
|
77
|
+
const image = cs.backgroundImage;
|
|
78
|
+
if (image && image !== "none" && !(/gradient\(/.test(image) && isFaintTexture(image, parseFloat(cs.opacity)))) {
|
|
79
|
+
return unknownBackdrop(/gradient\(/.test(image) ? "gradient" : "image", n);
|
|
80
|
+
}
|
|
81
|
+
const filter = cs.backdropFilter;
|
|
82
|
+
if (filter && filter !== "none") return unknownBackdrop("filter", n);
|
|
83
|
+
const bg = toRgba(doc, cs.backgroundColor);
|
|
84
|
+
if (bg && bg.a > 0) {
|
|
85
|
+
layers.push(bg);
|
|
86
|
+
if (bg.a >= 0.999) {
|
|
87
|
+
opaque = true;
|
|
88
|
+
stop = n;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
let acc = opaque ? layers.pop() : { rgb: [255, 255, 255], a: 1 };
|
|
94
|
+
for (let i = layers.length - 1; i >= 0; i--) acc = over(layers[i], acc);
|
|
95
|
+
const layer = layerBehind(el, stop, doc, win);
|
|
96
|
+
if (layer && "owner" in layer) return unknownBackdrop("layer", layer.owner);
|
|
97
|
+
if (layer) return { kind: "solid", rgb: layer.rgb };
|
|
98
|
+
return { kind: "solid", rgb: acc.rgb };
|
|
99
|
+
}
|
|
100
|
+
function layerBehind(el, stop, doc, win) {
|
|
101
|
+
const r = el.getBoundingClientRect();
|
|
102
|
+
if (r.width <= 0 && r.height <= 0) return null;
|
|
103
|
+
const cx = r.x + r.width / 2;
|
|
104
|
+
const cy = r.y + r.height / 2;
|
|
105
|
+
const found = [];
|
|
106
|
+
for (let n = el; n && n !== stop && n.nodeType === 1 && found.length < 3; n = n.parentElement) {
|
|
107
|
+
const parent = n.parentElement;
|
|
108
|
+
if (!parent) break;
|
|
109
|
+
for (const c of Array.from(parent.children)) {
|
|
110
|
+
if (c === n || c.contains(el)) continue;
|
|
111
|
+
const cs = win.getComputedStyle(c);
|
|
112
|
+
if (cs.position !== "absolute" && cs.position !== "fixed") continue;
|
|
113
|
+
if (cs.display === "none" || cs.visibility === "hidden") continue;
|
|
114
|
+
const cr = c.getBoundingClientRect();
|
|
115
|
+
if (cx < cr.left || cx > cr.right || cy < cr.top || cy > cr.bottom) continue;
|
|
116
|
+
const image = cs.backgroundImage;
|
|
117
|
+
if (/^(IMG|VIDEO|CANVAS|PICTURE|IFRAME)$/.test(c.tagName) || image && image !== "none") {
|
|
118
|
+
if (image && image !== "none" && /gradient\(/.test(image) && isFaintTexture(image, parseFloat(cs.opacity))) continue;
|
|
119
|
+
found.push({ owner: c });
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const bg = toRgba(doc, cs.backgroundColor);
|
|
123
|
+
if (bg && bg.a > 0) found.push(bg.a >= 0.999 && !(parseFloat(cs.opacity) < 0.999) ? bg : { owner: c });
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (!found.length) return null;
|
|
127
|
+
if (found.length > 1) {
|
|
128
|
+
const first = found.find((f) => "owner" in f);
|
|
129
|
+
return { owner: first ? first.owner : el };
|
|
130
|
+
}
|
|
131
|
+
return found[0];
|
|
132
|
+
}
|
|
133
|
+
function isFaintTexture(image, opacity) {
|
|
134
|
+
const op = Number.isFinite(opacity) ? opacity : 1;
|
|
135
|
+
const stops = image.match(/rgba?\([^)]*\)/g) ?? [];
|
|
136
|
+
if (stops.length === 0) return false;
|
|
137
|
+
let max = 0;
|
|
138
|
+
for (const stop of stops) {
|
|
139
|
+
const c = parseColor(stop);
|
|
140
|
+
if (!c) return false;
|
|
141
|
+
max = Math.max(max, c.a);
|
|
142
|
+
}
|
|
143
|
+
return max * op <= FAINT_TEXTURE;
|
|
144
|
+
}
|
|
145
|
+
const FAINT_TEXTURE = 0.35;
|
|
146
|
+
function unknownBackdrop(reason, owner) {
|
|
147
|
+
const r = owner.getBoundingClientRect();
|
|
148
|
+
return { kind: "unknown", reason, owner, ownerBox: { x: r.x, y: r.y, w: r.width, h: r.height } };
|
|
149
|
+
}
|
|
150
|
+
function mediaBehind(el, box, doc) {
|
|
151
|
+
if (typeof doc.elementsFromPoint !== "function") return null;
|
|
152
|
+
try {
|
|
153
|
+
const stack = doc.elementsFromPoint(box.x + box.w / 2, box.y + box.h / 2);
|
|
154
|
+
const at = stack.indexOf(el);
|
|
155
|
+
const win = doc.defaultView;
|
|
156
|
+
if (at === -1 || !win) return null;
|
|
157
|
+
for (let i = at + 1; i < stack.length; i++) {
|
|
158
|
+
const other = stack[i];
|
|
159
|
+
if (other.contains(el)) continue;
|
|
160
|
+
if (/^(IMG|VIDEO|CANVAS|PICTURE|IFRAME)$/.test(other.tagName)) return other;
|
|
161
|
+
const ocs = win.getComputedStyle(other);
|
|
162
|
+
const bg = ocs.backgroundImage;
|
|
163
|
+
if (bg && bg !== "none" && !(/gradient\(/.test(bg) && isFaintTexture(bg, parseFloat(ocs.opacity)))) return other;
|
|
164
|
+
}
|
|
165
|
+
} catch {
|
|
166
|
+
}
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
const boxOf = (r) => ({ x: r.x, y: r.y, w: r.width, h: r.height });
|
|
170
|
+
function collectPage(options = {}) {
|
|
171
|
+
const doc = options.doc ?? document;
|
|
172
|
+
const win = doc.defaultView;
|
|
173
|
+
const skipNode = options.isInspectorNode ?? defaultIsInspectorNode;
|
|
174
|
+
const maxText = options.maxText ?? 2500;
|
|
175
|
+
const maxElements = options.maxElements ?? 5e3;
|
|
176
|
+
let probes = options.maxBackdropProbes ?? 400;
|
|
177
|
+
const viewport = { w: win.innerWidth, h: win.innerHeight, scrollX: win.scrollX, scrollY: win.scrollY };
|
|
178
|
+
const seen = /* @__PURE__ */ new Map();
|
|
179
|
+
const walker = doc.createTreeWalker(doc.body, NodeFilter.SHOW_TEXT);
|
|
180
|
+
for (let node = walker.nextNode(); node && seen.size < maxText; node = walker.nextNode()) {
|
|
181
|
+
const value = node.nodeValue ?? "";
|
|
182
|
+
if (!value.trim()) continue;
|
|
183
|
+
const el = node.parentElement;
|
|
184
|
+
if (!el || SKIP_TAGS.has(el.tagName) || skipNode(el) || isHidden(el, win)) continue;
|
|
185
|
+
const range = doc.createRange();
|
|
186
|
+
range.selectNodeContents(node);
|
|
187
|
+
const rects = Array.from(range.getClientRects()).filter((q) => q.width > 1 && q.height > 1);
|
|
188
|
+
if (!rects.length) continue;
|
|
189
|
+
const eb = el.getBoundingClientRect();
|
|
190
|
+
if (eb.width <= 2 && eb.height <= 2) continue;
|
|
191
|
+
const rec = seen.get(el) ?? { rects: [], text: "" };
|
|
192
|
+
rec.rects.push(...rects.map(boxOf));
|
|
193
|
+
rec.text += `${value.trim()} `;
|
|
194
|
+
seen.set(el, rec);
|
|
195
|
+
}
|
|
196
|
+
const items = [];
|
|
197
|
+
for (const [el, rec] of seen) {
|
|
198
|
+
const opacity = inheritedOpacity(el, win);
|
|
199
|
+
if (!opacity) continue;
|
|
200
|
+
const cs = win.getComputedStyle(el);
|
|
201
|
+
const fontSize = parseFloat(cs.fontSize) || 16;
|
|
202
|
+
const parsedLineHeight = parseFloat(cs.lineHeight);
|
|
203
|
+
const lineHeight = cs.lineHeight === "normal" || !Number.isFinite(parsedLineHeight) ? fontSize * 1.2 : parsedLineHeight;
|
|
204
|
+
const x0 = Math.min(...rec.rects.map((q) => q.x));
|
|
205
|
+
const y0 = Math.min(...rec.rects.map((q) => q.y));
|
|
206
|
+
const x1 = Math.max(...rec.rects.map((q) => q.x + q.w));
|
|
207
|
+
const y1 = Math.max(...rec.rects.map((q) => q.y + q.h));
|
|
208
|
+
const box = { x: x0, y: y0, w: x1 - x0, h: y1 - y0 };
|
|
209
|
+
const motion = motionState(el);
|
|
210
|
+
let backdrop = backdropOf(el, doc);
|
|
211
|
+
if (backdrop.kind === "solid" && probes > 0 && !motion.animating) {
|
|
212
|
+
probes--;
|
|
213
|
+
const media = mediaBehind(el, box, doc);
|
|
214
|
+
if (media) backdrop = unknownBackdrop(/^VIDEO$/.test(media.tagName) ? "video" : "image", media);
|
|
215
|
+
}
|
|
216
|
+
items.push({
|
|
217
|
+
ref: el,
|
|
218
|
+
text: rec.text.trim(),
|
|
219
|
+
box,
|
|
220
|
+
rects: rec.rects,
|
|
221
|
+
fontSize,
|
|
222
|
+
lineHeight,
|
|
223
|
+
lines: new Set(rec.rects.map((q) => Math.round(q.y))).size,
|
|
224
|
+
weight: parseInt(cs.fontWeight, 10) || 400,
|
|
225
|
+
color: toRgba(doc, cs.color),
|
|
226
|
+
opacity,
|
|
227
|
+
backdrop,
|
|
228
|
+
animating: motion.animating,
|
|
229
|
+
looping: motion.looping,
|
|
230
|
+
offscreen: x0 >= win.innerWidth - 1 || x1 <= 1
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
const interactive = [];
|
|
234
|
+
for (const el of Array.from(doc.querySelectorAll(INTERACTIVE))) {
|
|
235
|
+
if (skipNode(el) || isHidden(el, win) || !inheritedOpacity(el, win)) continue;
|
|
236
|
+
if (el.tagName === "A" && win.getComputedStyle(el).display === "inline") {
|
|
237
|
+
const siblings = Array.from(el.parentNode?.childNodes ?? []);
|
|
238
|
+
if (siblings.some((s) => s !== el && s.nodeType === 3 && (s.nodeValue ?? "").trim())) continue;
|
|
239
|
+
}
|
|
240
|
+
const r = el.getBoundingClientRect();
|
|
241
|
+
if (r.width <= 0 || r.height <= 0) continue;
|
|
242
|
+
let inset = { w: 0, h: 0 };
|
|
243
|
+
try {
|
|
244
|
+
const pe = win.getComputedStyle(el, "::after");
|
|
245
|
+
if (pe.content !== "none" && pe.position === "absolute") inset = { w: parseFloat(pe.width) || 0, h: parseFloat(pe.height) || 0 };
|
|
246
|
+
} catch {
|
|
247
|
+
}
|
|
248
|
+
const w = Math.max(r.width, inset.w);
|
|
249
|
+
const h = Math.max(r.height, inset.h);
|
|
250
|
+
if (w <= 2 && h <= 2) continue;
|
|
251
|
+
interactive.push({ ref: el, text: (el.textContent ?? el.getAttribute("aria-label") ?? "").trim().slice(0, 60), box: boxOf(r), w, h });
|
|
252
|
+
}
|
|
253
|
+
const overflow = [];
|
|
254
|
+
const docEl = doc.documentElement;
|
|
255
|
+
const viewportOverflow = docEl.scrollWidth > win.innerWidth + 1;
|
|
256
|
+
const flagged = /* @__PURE__ */ new Set();
|
|
257
|
+
const clipped = (el) => {
|
|
258
|
+
for (let e = el.parentElement; e && e !== doc.body && e !== docEl; e = e.parentElement) {
|
|
259
|
+
if (clips(win.getComputedStyle(e).overflowX)) return true;
|
|
260
|
+
}
|
|
261
|
+
return false;
|
|
262
|
+
};
|
|
263
|
+
let scanned = 0;
|
|
264
|
+
for (const el of Array.from(doc.body.querySelectorAll("*"))) {
|
|
265
|
+
if (++scanned > maxElements) break;
|
|
266
|
+
if (skipNode(el) || SKIP_TAGS.has(el.tagName)) continue;
|
|
267
|
+
const cs = win.getComputedStyle(el);
|
|
268
|
+
if (cs.display === "none" || cs.visibility === "hidden" || cs.position === "fixed") continue;
|
|
269
|
+
const r = el.getBoundingClientRect();
|
|
270
|
+
if (r.width <= 0 || r.height <= 0) continue;
|
|
271
|
+
if (viewportOverflow && r.right > win.innerWidth + 1 && !clipped(el)) {
|
|
272
|
+
const parent = el.parentElement;
|
|
273
|
+
const parentFits = !parent || parent === doc.body || parent === docEl || parent.getBoundingClientRect().right <= win.innerWidth + 1;
|
|
274
|
+
if (parentFits && overflow.filter((o) => o.kind === "viewport").length < 5) {
|
|
275
|
+
overflow.push({ ref: el, box: boxOf(r), kind: "viewport", measured: `ends at ${Math.round(r.right)}px, viewport ${win.innerWidth}px` });
|
|
276
|
+
flagged.add(el);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if (!clips(cs.overflowX) && cs.position !== "absolute" && el.clientWidth > 0 && el.scrollWidth > el.clientWidth + 1 && el.children.length > 0 && !/^(inline|table-cell|table-row|contents)/.test(cs.display)) {
|
|
281
|
+
const spills = Array.from(el.children).some((c) => (c.textContent ?? "").trim() !== "" && c.getBoundingClientRect().right > r.right + 1);
|
|
282
|
+
if (spills && overflow.filter((o) => o.kind === "container").length < 12) {
|
|
283
|
+
overflow.push({ ref: el, box: boxOf(r), kind: "container", measured: `content ${el.scrollWidth}px in a ${el.clientWidth}px box` });
|
|
284
|
+
flagged.add(el);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (viewportOverflow && !overflow.some((o) => o.kind === "viewport")) {
|
|
289
|
+
overflow.push({ ref: docEl, box: { x: 0, y: 0, w: docEl.scrollWidth, h: win.innerHeight }, kind: "viewport", measured: `page ${docEl.scrollWidth}px wide, viewport ${win.innerWidth}px` });
|
|
290
|
+
}
|
|
291
|
+
return { items, interactive, overflow, viewport, consoleErrors: options.consoleErrors ?? [] };
|
|
292
|
+
}
|
|
293
|
+
export {
|
|
294
|
+
FAINT_TEXTURE,
|
|
295
|
+
backdropOf,
|
|
296
|
+
collectPage,
|
|
297
|
+
defaultIsInspectorNode,
|
|
298
|
+
isFaintTexture
|
|
299
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const clamp255 = (n) => Math.max(0, Math.min(255, n));
|
|
2
|
+
function parseColor(value) {
|
|
3
|
+
if (!value) return null;
|
|
4
|
+
const s = value.trim().toLowerCase();
|
|
5
|
+
if (s === "transparent") return { rgb: [0, 0, 0], a: 0 };
|
|
6
|
+
const fn = s.match(/^rgba?\(([^)]+)\)$/);
|
|
7
|
+
if (fn && fn[1]) {
|
|
8
|
+
const parts = fn[1].split(/[\s,/]+/).filter(Boolean);
|
|
9
|
+
if (parts.length < 3) return null;
|
|
10
|
+
const channel = (p) => p.endsWith("%") ? parseFloat(p) / 100 * 255 : parseFloat(p);
|
|
11
|
+
const rgb = [channel(parts[0]), channel(parts[1]), channel(parts[2])];
|
|
12
|
+
if (rgb.some((n) => !Number.isFinite(n))) return null;
|
|
13
|
+
let a = 1;
|
|
14
|
+
if (parts[3] !== void 0) {
|
|
15
|
+
a = parts[3].endsWith("%") ? parseFloat(parts[3]) / 100 : parseFloat(parts[3]);
|
|
16
|
+
if (!Number.isFinite(a)) return null;
|
|
17
|
+
}
|
|
18
|
+
return { rgb: [clamp255(rgb[0]), clamp255(rgb[1]), clamp255(rgb[2])], a: Math.max(0, Math.min(1, a)) };
|
|
19
|
+
}
|
|
20
|
+
const hex = s.match(/^#([0-9a-f]{3,8})$/);
|
|
21
|
+
if (hex && hex[1]) {
|
|
22
|
+
let h = hex[1];
|
|
23
|
+
if (h.length === 3 || h.length === 4) h = h.split("").map((c) => c + c).join("");
|
|
24
|
+
if (h.length !== 6 && h.length !== 8) return null;
|
|
25
|
+
const n = (i) => parseInt(h.slice(i, i + 2), 16);
|
|
26
|
+
return { rgb: [n(0), n(2), n(4)], a: h.length === 8 ? n(6) / 255 : 1 };
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
function over(top, bottom) {
|
|
31
|
+
const a = top.a + bottom.a * (1 - top.a);
|
|
32
|
+
if (a <= 0) return { rgb: [0, 0, 0], a: 0 };
|
|
33
|
+
const mix = (i) => Math.round((top.rgb[i] * top.a + bottom.rgb[i] * bottom.a * (1 - top.a)) / a);
|
|
34
|
+
return { rgb: [mix(0), mix(1), mix(2)], a };
|
|
35
|
+
}
|
|
36
|
+
function luminance([r, g, b]) {
|
|
37
|
+
const f = (c) => {
|
|
38
|
+
const v = c / 255;
|
|
39
|
+
return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;
|
|
40
|
+
};
|
|
41
|
+
return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
|
|
42
|
+
}
|
|
43
|
+
function contrastRatio(a, b) {
|
|
44
|
+
const la = luminance(a);
|
|
45
|
+
const lb = luminance(b);
|
|
46
|
+
const [hi, lo] = la > lb ? [la, lb] : [lb, la];
|
|
47
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
48
|
+
}
|
|
49
|
+
const LIGHT_THRESHOLD = 0.179;
|
|
50
|
+
const isLight = (rgb) => luminance(rgb) > LIGHT_THRESHOLD;
|
|
51
|
+
export {
|
|
52
|
+
LIGHT_THRESHOLD,
|
|
53
|
+
contrastRatio,
|
|
54
|
+
isLight,
|
|
55
|
+
luminance,
|
|
56
|
+
over,
|
|
57
|
+
parseColor
|
|
58
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { clampText } from "./schema.js";
|
|
2
|
+
const MAX_KEPT = 20;
|
|
3
|
+
const MAX_LENGTH = 300;
|
|
4
|
+
const KEY = "__shavinConsoleCapture";
|
|
5
|
+
function describe(arg) {
|
|
6
|
+
if (arg instanceof Error) return `${arg.name}: ${arg.message}`;
|
|
7
|
+
if (typeof arg === "string") return arg;
|
|
8
|
+
try {
|
|
9
|
+
return typeof arg === "object" ? JSON.stringify(arg) ?? String(arg) : String(arg);
|
|
10
|
+
} catch {
|
|
11
|
+
return "[unprintable]";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function installConsoleCapture(target = globalThis) {
|
|
15
|
+
const holder = target;
|
|
16
|
+
const existing = holder[KEY];
|
|
17
|
+
if (existing) {
|
|
18
|
+
existing.count++;
|
|
19
|
+
return release(existing, holder);
|
|
20
|
+
}
|
|
21
|
+
const kept = [];
|
|
22
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
23
|
+
const push = (message) => {
|
|
24
|
+
const text = clampText(message, MAX_LENGTH);
|
|
25
|
+
if (!text) return;
|
|
26
|
+
const known = kept.includes(text);
|
|
27
|
+
const at = kept.indexOf(text);
|
|
28
|
+
if (at !== -1) kept.splice(at, 1);
|
|
29
|
+
kept.push(text);
|
|
30
|
+
if (kept.length > MAX_KEPT) kept.shift();
|
|
31
|
+
if (!known) {
|
|
32
|
+
for (const fn of Array.from(listeners)) {
|
|
33
|
+
try {
|
|
34
|
+
fn();
|
|
35
|
+
} catch {
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const original = target.console?.error;
|
|
41
|
+
let patched = false;
|
|
42
|
+
if (typeof original === "function") {
|
|
43
|
+
target.console.error = function patchedError(...args) {
|
|
44
|
+
try {
|
|
45
|
+
push(args.map(describe).join(" "));
|
|
46
|
+
} catch {
|
|
47
|
+
}
|
|
48
|
+
return original.apply(this, args);
|
|
49
|
+
};
|
|
50
|
+
patched = true;
|
|
51
|
+
}
|
|
52
|
+
const onError = (e) => push(e.error instanceof Error ? describe(e.error) : e.message);
|
|
53
|
+
const onRejection = (e) => push(`Unhandled rejection: ${describe(e.reason)}`);
|
|
54
|
+
target.addEventListener?.("error", onError);
|
|
55
|
+
target.addEventListener?.("unhandledrejection", onRejection);
|
|
56
|
+
const capture = {
|
|
57
|
+
errors: () => kept.slice().reverse(),
|
|
58
|
+
subscribe: (fn) => {
|
|
59
|
+
listeners.add(fn);
|
|
60
|
+
return () => void listeners.delete(fn);
|
|
61
|
+
},
|
|
62
|
+
clear: () => {
|
|
63
|
+
kept.length = 0;
|
|
64
|
+
},
|
|
65
|
+
dispose: () => {
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const entry = { count: 1, capture };
|
|
69
|
+
holder[KEY] = entry;
|
|
70
|
+
const teardown = () => {
|
|
71
|
+
if (patched && original) target.console.error = original;
|
|
72
|
+
target.removeEventListener?.("error", onError);
|
|
73
|
+
target.removeEventListener?.("unhandledrejection", onRejection);
|
|
74
|
+
delete holder[KEY];
|
|
75
|
+
};
|
|
76
|
+
entry.teardown = teardown;
|
|
77
|
+
return release(entry, holder);
|
|
78
|
+
}
|
|
79
|
+
function release(entry, holder) {
|
|
80
|
+
let released = false;
|
|
81
|
+
return {
|
|
82
|
+
errors: () => entry.capture.errors(),
|
|
83
|
+
subscribe: (fn) => entry.capture.subscribe(fn),
|
|
84
|
+
clear: () => entry.capture.clear(),
|
|
85
|
+
dispose: () => {
|
|
86
|
+
if (released) return;
|
|
87
|
+
released = true;
|
|
88
|
+
entry.count--;
|
|
89
|
+
if (entry.count <= 0) entry.teardown?.();
|
|
90
|
+
else if (holder[KEY] !== entry) return;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
installConsoleCapture
|
|
96
|
+
};
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { contrastRatio, over } from "./color.js";
|
|
2
|
+
import { makeFinding, rankFindings } from "./schema.js";
|
|
3
|
+
const RULE_LIMITS = {
|
|
4
|
+
unknownBackdrop: 10,
|
|
5
|
+
overlap: 30,
|
|
6
|
+
overflow: 12,
|
|
7
|
+
console: 10,
|
|
8
|
+
/** Overlap is only judged between boxes at least this big (px). */
|
|
9
|
+
minBox: 2,
|
|
10
|
+
/** Share of the smaller box that must overlap before it counts. */
|
|
11
|
+
overlapRatio: 0.12,
|
|
12
|
+
overlapErrorRatio: 0.3,
|
|
13
|
+
tapMin: 24
|
|
14
|
+
};
|
|
15
|
+
const rectOf = (box, v) => ({ x: box.x, y: box.y, w: box.w, h: box.h, scrollX: v.scrollX, scrollY: v.scrollY });
|
|
16
|
+
const px = (n) => `${Math.round(n)}px`;
|
|
17
|
+
function neededContrast(fontSize, weight) {
|
|
18
|
+
return fontSize >= 24 || fontSize >= 18.66 && weight >= 700 ? 3 : 4.5;
|
|
19
|
+
}
|
|
20
|
+
function effectiveForeground(color, opacity, backdrop) {
|
|
21
|
+
const top = { rgb: color.rgb, a: color.a * opacity };
|
|
22
|
+
const out = over(top, { rgb: backdrop, a: 1 });
|
|
23
|
+
return out.rgb;
|
|
24
|
+
}
|
|
25
|
+
function lineHeightFindings(data, hooks) {
|
|
26
|
+
const out = [];
|
|
27
|
+
for (const it of data.items) {
|
|
28
|
+
if (!(it.lineHeight < it.fontSize * 0.95)) continue;
|
|
29
|
+
const multi = it.lines > 1;
|
|
30
|
+
out.push(
|
|
31
|
+
makeFinding({
|
|
32
|
+
detector: "line-height",
|
|
33
|
+
rule: "line-height.tight",
|
|
34
|
+
severity: multi ? "error" : "warning",
|
|
35
|
+
message: multi ? "Text lines are packed so tight they overlap." : "Text is set tighter than its font size.",
|
|
36
|
+
evidence: {
|
|
37
|
+
measured: `line-height ${px(it.lineHeight)}, font-size ${px(it.fontSize)}, ${it.lines} line${multi ? "s" : ""}`,
|
|
38
|
+
expected: "line-height at least the font size"
|
|
39
|
+
},
|
|
40
|
+
fixHint: "Give the text an explicit leading: use a Heading size, or leading-tight or leading-snug.",
|
|
41
|
+
selector: hooks.selectorOf(it.ref),
|
|
42
|
+
context: hooks.contextOf(it.ref),
|
|
43
|
+
rect: rectOf(it.box, data.viewport),
|
|
44
|
+
text: it.text
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
function contrastFindings(data, hooks) {
|
|
51
|
+
const out = [];
|
|
52
|
+
const owners = /* @__PURE__ */ new Map();
|
|
53
|
+
for (const it of data.items) {
|
|
54
|
+
if (it.animating || it.offscreen || !it.color) continue;
|
|
55
|
+
if (it.backdrop.kind === "unknown") {
|
|
56
|
+
const owner = it.backdrop.owner ?? it.ref;
|
|
57
|
+
const hit = owners.get(owner);
|
|
58
|
+
if (hit) hit.count++;
|
|
59
|
+
else owners.set(owner, { first: it, reason: it.backdrop.reason, box: it.backdrop.ownerBox ?? it.box, count: 1 });
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
const bg = it.backdrop.rgb;
|
|
63
|
+
const fg = effectiveForeground(it.color, it.opacity, bg);
|
|
64
|
+
const need = neededContrast(it.fontSize, it.weight);
|
|
65
|
+
const ratio = contrastRatio(fg, bg);
|
|
66
|
+
if (ratio >= need * 0.97) continue;
|
|
67
|
+
out.push(
|
|
68
|
+
makeFinding({
|
|
69
|
+
detector: "contrast",
|
|
70
|
+
rule: "contrast.text",
|
|
71
|
+
severity: ratio < need * 0.9 ? "error" : "warning",
|
|
72
|
+
message: "Text is hard to read on its background.",
|
|
73
|
+
evidence: { measured: `${ratio.toFixed(1)}:1`, expected: `${need}:1`, backdrop: "solid ancestor" },
|
|
74
|
+
fixHint: "Use text-fg or text-fg-subtle on bg-surface, or darken the text token.",
|
|
75
|
+
selector: hooks.selectorOf(it.ref),
|
|
76
|
+
context: hooks.contextOf(it.ref),
|
|
77
|
+
rect: rectOf(it.box, data.viewport),
|
|
78
|
+
text: it.text
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
let shown = 0;
|
|
83
|
+
for (const [owner, o] of owners) {
|
|
84
|
+
if (shown >= RULE_LIMITS.unknownBackdrop) break;
|
|
85
|
+
shown++;
|
|
86
|
+
out.push(
|
|
87
|
+
makeFinding({
|
|
88
|
+
detector: "contrast",
|
|
89
|
+
rule: "contrast.unknown-backdrop",
|
|
90
|
+
severity: "warning",
|
|
91
|
+
message: "Contrast cannot be judged here: the background is not a flat colour.",
|
|
92
|
+
evidence: { reason: o.reason, texts: String(o.count) },
|
|
93
|
+
fixHint: "Check it with render_check, which samples the real pixels.",
|
|
94
|
+
selector: hooks.selectorOf(owner),
|
|
95
|
+
context: hooks.contextOf(owner),
|
|
96
|
+
rect: rectOf(o.box, data.viewport)
|
|
97
|
+
})
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
return out;
|
|
101
|
+
}
|
|
102
|
+
function overlapFindings(data, hooks) {
|
|
103
|
+
const out = [];
|
|
104
|
+
const seenPairs = /* @__PURE__ */ new Set();
|
|
105
|
+
const list = [];
|
|
106
|
+
for (const item of data.items) {
|
|
107
|
+
if (item.looping) continue;
|
|
108
|
+
for (const box of item.rects && item.rects.length ? item.rects : [item.box]) {
|
|
109
|
+
if (box.w > RULE_LIMITS.minBox && box.h > RULE_LIMITS.minBox) list.push({ item, box });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
list.sort((a, b) => a.box.y - b.box.y);
|
|
113
|
+
for (let i = 0; i < list.length && out.length < RULE_LIMITS.overlap; i++) {
|
|
114
|
+
const a = list[i];
|
|
115
|
+
for (let j = i + 1; j < list.length; j++) {
|
|
116
|
+
const b = list[j];
|
|
117
|
+
if (b.box.y >= a.box.y + a.box.h) break;
|
|
118
|
+
if (a.item === b.item) continue;
|
|
119
|
+
const ox = Math.min(a.box.x + a.box.w, b.box.x + b.box.w) - Math.max(a.box.x, b.box.x);
|
|
120
|
+
const oy = Math.min(a.box.y + a.box.h, b.box.y + b.box.h) - Math.max(a.box.y, b.box.y);
|
|
121
|
+
if (ox <= 2 || oy <= 2) continue;
|
|
122
|
+
const ratio = ox * oy / Math.min(a.box.w * a.box.h, b.box.w * b.box.h);
|
|
123
|
+
if (ratio <= RULE_LIMITS.overlapRatio) continue;
|
|
124
|
+
const selA = hooks.selectorOf(a.item.ref);
|
|
125
|
+
const selB = hooks.selectorOf(b.item.ref);
|
|
126
|
+
if (selA === selB) continue;
|
|
127
|
+
const key = selA < selB ? `${selA}|${selB}` : `${selB}|${selA}`;
|
|
128
|
+
if (seenPairs.has(key)) continue;
|
|
129
|
+
seenPairs.add(key);
|
|
130
|
+
out.push(
|
|
131
|
+
makeFinding({
|
|
132
|
+
detector: "overlap",
|
|
133
|
+
rule: "overlap.text",
|
|
134
|
+
severity: ratio > RULE_LIMITS.overlapErrorRatio ? "error" : "warning",
|
|
135
|
+
message: "Two pieces of text sit on top of each other.",
|
|
136
|
+
evidence: { measured: `${px(ox)} by ${px(oy)} overlap with ${selB}`, expected: "no overlap" },
|
|
137
|
+
fixHint: "Give the text room: add gap or a wrapping container, or shorten the copy.",
|
|
138
|
+
selector: selA,
|
|
139
|
+
context: hooks.contextOf(a.item.ref),
|
|
140
|
+
rect: rectOf(a.box, data.viewport),
|
|
141
|
+
text: a.item.text
|
|
142
|
+
})
|
|
143
|
+
);
|
|
144
|
+
if (out.length >= RULE_LIMITS.overlap) break;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return out;
|
|
148
|
+
}
|
|
149
|
+
function tapFindings(data, hooks) {
|
|
150
|
+
const out = [];
|
|
151
|
+
const min = RULE_LIMITS.tapMin;
|
|
152
|
+
for (const it of data.interactive) {
|
|
153
|
+
if (it.w >= min && it.h >= min) continue;
|
|
154
|
+
out.push(
|
|
155
|
+
makeFinding({
|
|
156
|
+
detector: "tap-target",
|
|
157
|
+
rule: "tap-target.min-24",
|
|
158
|
+
severity: it.w < min && it.h < min ? "error" : "warning",
|
|
159
|
+
message: "Tap target is too small to hit reliably.",
|
|
160
|
+
evidence: { measured: `${Math.round(it.w)} by ${Math.round(it.h)}px`, expected: "at least 24 by 24px (44 on touch)" },
|
|
161
|
+
fixHint: "Use a Button or IconButton size md, or add the hit-area utility.",
|
|
162
|
+
selector: hooks.selectorOf(it.ref),
|
|
163
|
+
context: hooks.contextOf(it.ref),
|
|
164
|
+
rect: rectOf(it.box, data.viewport),
|
|
165
|
+
text: it.text
|
|
166
|
+
})
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
return out;
|
|
170
|
+
}
|
|
171
|
+
function overflowFindings(data, hooks) {
|
|
172
|
+
const out = [];
|
|
173
|
+
for (const it of data.overflow.slice(0, RULE_LIMITS.overflow)) {
|
|
174
|
+
const viewport = it.kind === "viewport";
|
|
175
|
+
out.push(
|
|
176
|
+
makeFinding({
|
|
177
|
+
detector: "overflow",
|
|
178
|
+
rule: viewport ? "overflow.viewport" : "overflow.container",
|
|
179
|
+
severity: "error",
|
|
180
|
+
message: viewport ? "This element runs past the edge of the screen." : "Content spills out of its box.",
|
|
181
|
+
evidence: { measured: it.measured, expected: viewport ? "fits the viewport width" : "fits its container" },
|
|
182
|
+
fixHint: "Let it wrap or scroll inside its own box: min-w-0, overflow-x-auto, or flex-wrap.",
|
|
183
|
+
selector: hooks.selectorOf(it.ref),
|
|
184
|
+
context: hooks.contextOf(it.ref),
|
|
185
|
+
rect: rectOf(it.box, data.viewport)
|
|
186
|
+
})
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
return out;
|
|
190
|
+
}
|
|
191
|
+
function consoleFindings(data) {
|
|
192
|
+
const seen = /* @__PURE__ */ new Set();
|
|
193
|
+
const out = [];
|
|
194
|
+
for (const message of data.consoleErrors) {
|
|
195
|
+
const key = message.slice(0, 120);
|
|
196
|
+
if (seen.has(key)) continue;
|
|
197
|
+
seen.add(key);
|
|
198
|
+
if (out.length >= RULE_LIMITS.console) break;
|
|
199
|
+
out.push(
|
|
200
|
+
makeFinding({
|
|
201
|
+
detector: "console",
|
|
202
|
+
rule: "console.error",
|
|
203
|
+
severity: "error",
|
|
204
|
+
message: "The page logged an error.",
|
|
205
|
+
evidence: { measured: message },
|
|
206
|
+
fixHint: "Open the console for the stack trace, then fix the source named in the message.",
|
|
207
|
+
selector: "(page)",
|
|
208
|
+
context: "Console",
|
|
209
|
+
rect: null,
|
|
210
|
+
text: message.slice(0, 40)
|
|
211
|
+
})
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
return out;
|
|
215
|
+
}
|
|
216
|
+
function analyzePage(data, hooks) {
|
|
217
|
+
const all = [
|
|
218
|
+
...lineHeightFindings(data, hooks),
|
|
219
|
+
...contrastFindings(data, hooks),
|
|
220
|
+
...overlapFindings(data, hooks),
|
|
221
|
+
...tapFindings(data, hooks),
|
|
222
|
+
...overflowFindings(data, hooks),
|
|
223
|
+
...consoleFindings(data)
|
|
224
|
+
];
|
|
225
|
+
return rankFindings(all);
|
|
226
|
+
}
|
|
227
|
+
export {
|
|
228
|
+
RULE_LIMITS,
|
|
229
|
+
analyzePage,
|
|
230
|
+
effectiveForeground,
|
|
231
|
+
neededContrast
|
|
232
|
+
};
|