panelui-native 0.116.0 → 1.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/README.md +3 -1
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/ai-input/index.js.map +1 -1
- package/lib/module/components/alert/index.js.map +1 -1
- package/lib/module/components/animated-badge/index.js +1 -2
- package/lib/module/components/animated-badge/index.js.map +1 -1
- package/lib/module/components/area-chart/index.js +15 -3
- package/lib/module/components/area-chart/index.js.map +1 -1
- package/lib/module/components/attachment/index.js.map +1 -1
- package/lib/module/components/avatar/index.js.map +1 -1
- package/lib/module/components/avatar-cropper/index.js.map +1 -1
- package/lib/module/components/badge/index.js.map +1 -1
- package/lib/module/components/bar-chart/index.js +15 -3
- package/lib/module/components/bar-chart/index.js.map +1 -1
- package/lib/module/components/breadcrumb/index.js.map +1 -1
- package/lib/module/components/bubble-chart/index.js +13 -3
- package/lib/module/components/bubble-chart/index.js.map +1 -1
- package/lib/module/components/bump-chart/index.js +15 -3
- package/lib/module/components/bump-chart/index.js.map +1 -1
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/button-group/index.js.map +1 -1
- package/lib/module/components/calendar/index.js.map +1 -1
- package/lib/module/components/candlestick-chart/index.js +15 -3
- package/lib/module/components/candlestick-chart/index.js.map +1 -1
- package/lib/module/components/card/index.js.map +1 -1
- package/lib/module/components/checkbox/index.js.map +1 -1
- package/lib/module/components/chip/index.js.map +1 -1
- package/lib/module/components/collapsible/index.js.map +1 -1
- package/lib/module/components/color-picker/index.js +13 -5
- package/lib/module/components/color-picker/index.js.map +1 -1
- package/lib/module/components/combobox/index.js +1 -2
- package/lib/module/components/combobox/index.js.map +1 -1
- package/lib/module/components/context-menu/index.js +1 -2
- package/lib/module/components/context-menu/index.js.map +1 -1
- package/lib/module/components/countdown/index.js.map +1 -1
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/empty-state/index.js.map +1 -1
- package/lib/module/components/fab/index.js +2 -1
- package/lib/module/components/fab/index.js.map +1 -1
- package/lib/module/components/feedback/index.js +1 -2
- package/lib/module/components/feedback/index.js.map +1 -1
- package/lib/module/components/field/index.js.map +1 -1
- package/lib/module/components/file-upload/index.js.map +1 -1
- package/lib/module/components/flip-card/index.js +1 -2
- package/lib/module/components/flip-card/index.js.map +1 -1
- package/lib/module/components/frame/index.js +1 -2
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/grid-item/index.js.map +1 -1
- package/lib/module/components/heatmap-chart/index.js +1 -2
- package/lib/module/components/heatmap-chart/index.js.map +1 -1
- package/lib/module/components/image-viewer/index.js +1 -2
- package/lib/module/components/image-viewer/index.js.map +1 -1
- package/lib/module/components/input/index.js +1 -2
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/input-group/index.js.map +1 -1
- package/lib/module/components/item/index.js.map +1 -1
- package/lib/module/components/kpi/index.js +1 -2
- package/lib/module/components/kpi/index.js.map +1 -1
- package/lib/module/components/label/index.js.map +1 -1
- package/lib/module/components/leaderboard/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +15 -3
- package/lib/module/components/line-chart/index.js.map +1 -1
- package/lib/module/components/live-line-chart/index.js +16 -4
- package/lib/module/components/live-line-chart/index.js.map +1 -1
- package/lib/module/components/map/native-style.js +38 -7
- package/lib/module/components/map/native-style.js.map +1 -1
- package/lib/module/components/markdown-editor/index.js.map +1 -1
- package/lib/module/components/marker/index.js.map +1 -1
- package/lib/module/components/marquee/index.js +2 -1
- package/lib/module/components/marquee/index.js.map +1 -1
- package/lib/module/components/message/index.js.map +1 -1
- package/lib/module/components/message-scroller/index.js +2 -3
- package/lib/module/components/message-scroller/index.js.map +1 -1
- package/lib/module/components/meter/index.js.map +1 -1
- package/lib/module/components/mirror-area-chart/index.js +15 -3
- package/lib/module/components/mirror-area-chart/index.js.map +1 -1
- package/lib/module/components/number-input/index.js +1 -2
- package/lib/module/components/number-input/index.js.map +1 -1
- package/lib/module/components/otp-input/index.js +1 -2
- package/lib/module/components/otp-input/index.js.map +1 -1
- package/lib/module/components/page-header/index.js +1 -2
- package/lib/module/components/page-header/index.js.map +1 -1
- package/lib/module/components/pagination/index.js.map +1 -1
- package/lib/module/components/panelside/index.js +8 -7
- package/lib/module/components/panelside/index.js.map +1 -1
- package/lib/module/components/planner/index.js +1 -2
- package/lib/module/components/planner/index.js.map +1 -1
- package/lib/module/components/plot/index.js +15 -3
- package/lib/module/components/plot/index.js.map +1 -1
- package/lib/module/components/popover/index.js +1 -2
- package/lib/module/components/popover/index.js.map +1 -1
- package/lib/module/components/post/index.js +1 -2
- package/lib/module/components/post/index.js.map +1 -1
- package/lib/module/components/progress/index.js.map +1 -1
- package/lib/module/components/progress-button/index.js +1 -2
- package/lib/module/components/progress-button/index.js.map +1 -1
- package/lib/module/components/pyramid-chart/index.js +15 -3
- package/lib/module/components/pyramid-chart/index.js.map +1 -1
- package/lib/module/components/qr-code/index.js.map +1 -1
- package/lib/module/components/questionnaire/index.js +1 -2
- package/lib/module/components/questionnaire/index.js.map +1 -1
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/rating/index.js +1 -2
- package/lib/module/components/rating/index.js.map +1 -1
- package/lib/module/components/scatter-chart/index.js +13 -3
- package/lib/module/components/scatter-chart/index.js.map +1 -1
- package/lib/module/components/scroll-header/index.js +5 -4
- package/lib/module/components/scroll-header/index.js.map +1 -1
- package/lib/module/components/search-bar/index.js +1 -2
- package/lib/module/components/search-bar/index.js.map +1 -1
- package/lib/module/components/section-progress/index.js +3 -2
- package/lib/module/components/section-progress/index.js.map +1 -1
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/separator/index.js.map +1 -1
- package/lib/module/components/shimmer/index.js +8 -1
- package/lib/module/components/shimmer/index.js.map +1 -1
- package/lib/module/components/signature/index.js.map +1 -1
- package/lib/module/components/sketch/index.js.map +1 -1
- package/lib/module/components/slide-button/index.js +1 -2
- package/lib/module/components/slide-button/index.js.map +1 -1
- package/lib/module/components/slider/index.js +1 -2
- package/lib/module/components/slider/index.js.map +1 -1
- package/lib/module/components/sortable/index.js +6 -7
- package/lib/module/components/sortable/index.js.map +1 -1
- package/lib/module/components/splitter/index.js +3 -2
- package/lib/module/components/splitter/index.js.map +1 -1
- package/lib/module/components/stack-card/index.js +3 -2
- package/lib/module/components/stack-card/index.js.map +1 -1
- package/lib/module/components/steps/index.js.map +1 -1
- package/lib/module/components/support/index.js.map +1 -1
- package/lib/module/components/surface/index.js.map +1 -1
- package/lib/module/components/swipe/index.js.map +1 -1
- package/lib/module/components/switch/index.js.map +1 -1
- package/lib/module/components/table/index.js +1 -2
- package/lib/module/components/table/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +2 -1
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/tag-input/index.js +1 -2
- package/lib/module/components/tag-input/index.js.map +1 -1
- package/lib/module/components/text-animation/index.js +2 -1
- package/lib/module/components/text-animation/index.js.map +1 -1
- package/lib/module/components/textarea/index.js +1 -2
- package/lib/module/components/textarea/index.js.map +1 -1
- package/lib/module/components/time-picker/index.js.map +1 -1
- package/lib/module/components/timeline/index.js.map +1 -1
- package/lib/module/components/toast/index.js +1 -0
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/toggle-button/index.js.map +1 -1
- package/lib/module/components/tooltip/index.js +1 -2
- package/lib/module/components/tooltip/index.js.map +1 -1
- package/lib/module/components/tour/index.js.map +1 -1
- package/lib/module/components/tree/index.js +2 -1
- package/lib/module/components/tree/index.js.map +1 -1
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/components/waterfall-chart/index.js +15 -3
- package/lib/module/components/waterfall-chart/index.js.map +1 -1
- package/lib/module/hooks/use-keyboard-avoidance.js +0 -1
- package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -1
- package/lib/module/hooks/use-reveal-progress.js.map +1 -1
- package/lib/module/hooks/use-scroll-sections.js.map +1 -1
- package/lib/module/icons/index.js +22 -1
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/primitives/animated-pressable.js.map +1 -1
- package/lib/module/primitives/chart-accessibility.js +9 -1
- package/lib/module/primitives/chart-accessibility.js.map +1 -1
- package/lib/module/primitives/glass.js.map +1 -1
- package/lib/module/primitives/refs.js +4 -0
- package/lib/module/primitives/refs.js.map +1 -0
- package/lib/module/primitives/scroll-progress.js.map +1 -1
- package/lib/module/primitives/text.js.map +1 -1
- package/lib/module/primitives/web-deps.js +17 -0
- package/lib/module/primitives/web-deps.js.map +1 -0
- package/lib/module/uniwind-env.d.ts +1 -0
- package/lib/typescript/src/components/accordion/index.d.ts +8 -7
- package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ai-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/alert/index.d.ts +9 -8
- package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/animated-badge/index.d.ts +5 -4
- package/lib/typescript/src/components/animated-badge/index.d.ts.map +1 -1
- package/lib/typescript/src/components/area-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/attachment/index.d.ts +10 -9
- package/lib/typescript/src/components/attachment/index.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar/index.d.ts +7 -6
- package/lib/typescript/src/components/avatar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar-cropper/index.d.ts.map +1 -1
- package/lib/typescript/src/components/badge/index.d.ts +5 -4
- package/lib/typescript/src/components/badge/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bar-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/bar-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts +1 -1
- package/lib/typescript/src/components/breadcrumb/index.d.ts +9 -8
- package/lib/typescript/src/components/breadcrumb/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bubble-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/bubble-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bump-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/bump-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +4 -4
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button-group/index.d.ts +5 -4
- package/lib/typescript/src/components/button-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/calendar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/candlestick-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/candlestick-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/card/index.d.ts +16 -15
- package/lib/typescript/src/components/card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/checkbox/index.d.ts +5 -4
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/index.d.ts +4 -4
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -1
- package/lib/typescript/src/components/collapsible/index.d.ts +7 -6
- package/lib/typescript/src/components/collapsible/index.d.ts.map +1 -1
- package/lib/typescript/src/components/color-picker/index.d.ts +13 -13
- package/lib/typescript/src/components/color-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/combobox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/context-menu/index.d.ts.map +1 -1
- package/lib/typescript/src/components/countdown/index.d.ts +5 -4
- package/lib/typescript/src/components/countdown/index.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/index.d.ts +11 -10
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts +12 -11
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
- package/lib/typescript/src/components/fab/index.d.ts +7 -6
- package/lib/typescript/src/components/fab/index.d.ts.map +1 -1
- package/lib/typescript/src/components/feedback/index.d.ts +6 -5
- package/lib/typescript/src/components/feedback/index.d.ts.map +1 -1
- package/lib/typescript/src/components/field/index.d.ts +12 -11
- package/lib/typescript/src/components/field/index.d.ts.map +1 -1
- package/lib/typescript/src/components/file-upload/index.d.ts +5 -4
- package/lib/typescript/src/components/file-upload/index.d.ts.map +1 -1
- package/lib/typescript/src/components/flip-card/index.d.ts +5 -4
- package/lib/typescript/src/components/flip-card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/frame/index.d.ts +14 -13
- package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
- package/lib/typescript/src/components/grid-item/index.d.ts +30 -29
- package/lib/typescript/src/components/grid-item/index.d.ts.map +1 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts +3 -2
- package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/image-viewer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input/index.d.ts +5 -4
- package/lib/typescript/src/components/input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input-group/index.d.ts +6 -5
- package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/item/index.d.ts +34 -33
- package/lib/typescript/src/components/item/index.d.ts.map +1 -1
- package/lib/typescript/src/components/kpi/index.d.ts +6 -5
- package/lib/typescript/src/components/kpi/index.d.ts.map +1 -1
- package/lib/typescript/src/components/label/index.d.ts +4 -3
- package/lib/typescript/src/components/label/index.d.ts.map +1 -1
- package/lib/typescript/src/components/leaderboard/index.d.ts +3 -2
- package/lib/typescript/src/components/leaderboard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/live-line-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/live-line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/native-style.d.ts.map +1 -1
- package/lib/typescript/src/components/markdown-editor/index.d.ts +6 -5
- package/lib/typescript/src/components/markdown-editor/index.d.ts.map +1 -1
- package/lib/typescript/src/components/marker/index.d.ts +7 -6
- package/lib/typescript/src/components/marker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/marquee/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message/index.d.ts +13 -12
- package/lib/typescript/src/components/message/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message-scroller/index.d.ts.map +1 -1
- package/lib/typescript/src/components/meter/index.d.ts +5 -4
- package/lib/typescript/src/components/meter/index.d.ts.map +1 -1
- package/lib/typescript/src/components/mirror-area-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/mirror-area-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/number-input/index.d.ts +5 -4
- package/lib/typescript/src/components/number-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/otp-input/index.d.ts +5 -4
- package/lib/typescript/src/components/otp-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/page-header/index.d.ts +15 -14
- package/lib/typescript/src/components/page-header/index.d.ts.map +1 -1
- package/lib/typescript/src/components/pagination/index.d.ts +9 -8
- package/lib/typescript/src/components/pagination/index.d.ts.map +1 -1
- package/lib/typescript/src/components/panelside/index.d.ts.map +1 -1
- package/lib/typescript/src/components/planner/index.d.ts +3 -2
- package/lib/typescript/src/components/planner/index.d.ts.map +1 -1
- package/lib/typescript/src/components/plot/index.d.ts +11 -1
- package/lib/typescript/src/components/plot/index.d.ts.map +1 -1
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
- package/lib/typescript/src/components/post/index.d.ts +15 -14
- package/lib/typescript/src/components/post/index.d.ts.map +1 -1
- package/lib/typescript/src/components/progress/index.d.ts +5 -4
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/progress-button/index.d.ts +5 -4
- package/lib/typescript/src/components/progress-button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/pyramid-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/pyramid-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/qr-code/index.d.ts +11 -10
- package/lib/typescript/src/components/qr-code/index.d.ts.map +1 -1
- package/lib/typescript/src/components/questionnaire/index.d.ts +4 -3
- package/lib/typescript/src/components/questionnaire/index.d.ts.map +1 -1
- package/lib/typescript/src/components/radio-group/index.d.ts +6 -5
- package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/rating/index.d.ts +4 -4
- package/lib/typescript/src/components/rating/index.d.ts.map +1 -1
- package/lib/typescript/src/components/scatter-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/scatter-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/scroll-header/index.d.ts +11 -10
- package/lib/typescript/src/components/scroll-header/index.d.ts.map +1 -1
- package/lib/typescript/src/components/search-bar/index.d.ts +5 -4
- package/lib/typescript/src/components/search-bar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/section-progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/selection-mode/index.d.ts +2 -2
- package/lib/typescript/src/components/selection-mode/index.d.ts.map +1 -1
- package/lib/typescript/src/components/separator/index.d.ts +17 -16
- package/lib/typescript/src/components/separator/index.d.ts.map +1 -1
- package/lib/typescript/src/components/shimmer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/signature/index.d.ts +2 -2
- package/lib/typescript/src/components/signature/index.d.ts.map +1 -1
- package/lib/typescript/src/components/sketch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/slide-button/index.d.ts +5 -4
- package/lib/typescript/src/components/slide-button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/index.d.ts +4 -4
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
- package/lib/typescript/src/components/sortable/index.d.ts.map +1 -1
- package/lib/typescript/src/components/spinner/index.d.ts +11 -11
- package/lib/typescript/src/components/spinner/index.d.ts.map +1 -1
- package/lib/typescript/src/components/splitter/index.d.ts.map +1 -1
- package/lib/typescript/src/components/stack-card/index.d.ts +11 -10
- package/lib/typescript/src/components/stack-card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/steps/index.d.ts +9 -8
- package/lib/typescript/src/components/steps/index.d.ts.map +1 -1
- package/lib/typescript/src/components/support/index.d.ts +22 -21
- package/lib/typescript/src/components/support/index.d.ts.map +1 -1
- package/lib/typescript/src/components/surface/index.d.ts +35 -34
- package/lib/typescript/src/components/surface/index.d.ts.map +1 -1
- package/lib/typescript/src/components/swipe/index.d.ts +8 -7
- package/lib/typescript/src/components/swipe/index.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/index.d.ts +5 -4
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/table/index.d.ts +14 -13
- package/lib/typescript/src/components/table/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tag-input/index.d.ts +5 -4
- package/lib/typescript/src/components/tag-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/text-animation/index.d.ts.map +1 -1
- package/lib/typescript/src/components/textarea/index.d.ts +5 -4
- package/lib/typescript/src/components/textarea/index.d.ts.map +1 -1
- package/lib/typescript/src/components/time-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/timeline/index.d.ts +18 -17
- package/lib/typescript/src/components/timeline/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts +2 -2
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toggle-button/index.d.ts +6 -5
- package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tooltip/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tour/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tree/index.d.ts +10 -9
- package/lib/typescript/src/components/tree/index.d.ts.map +1 -1
- package/lib/typescript/src/components/typography/index.d.ts +101 -100
- package/lib/typescript/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/src/components/waterfall-chart/index.d.ts +11 -1
- package/lib/typescript/src/components/waterfall-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +3 -2
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-reveal-progress.d.ts +2 -2
- package/lib/typescript/src/hooks/use-reveal-progress.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts +3 -2
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts.map +1 -1
- package/lib/typescript/src/icons/index.d.ts +40 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/animated-pressable.d.ts +3 -2
- package/lib/typescript/src/primitives/animated-pressable.d.ts.map +1 -1
- package/lib/typescript/src/primitives/chart-accessibility.d.ts +5 -6
- package/lib/typescript/src/primitives/chart-accessibility.d.ts.map +1 -1
- package/lib/typescript/src/primitives/glass.d.ts +3 -2
- package/lib/typescript/src/primitives/glass.d.ts.map +1 -1
- package/lib/typescript/src/primitives/refs.d.ts +25 -0
- package/lib/typescript/src/primitives/refs.d.ts.map +1 -0
- package/lib/typescript/src/primitives/scroll-progress.d.ts.map +1 -1
- package/lib/typescript/src/primitives/text.d.ts +41 -40
- package/lib/typescript/src/primitives/text.d.ts.map +1 -1
- package/lib/typescript/src/primitives/web-deps.d.ts +11 -0
- package/lib/typescript/src/primitives/web-deps.d.ts.map +1 -0
- package/package.json +12 -7
- package/src/components/accordion/index.tsx +7 -6
- package/src/components/ai-input/index.tsx +2 -1
- package/src/components/alert/index.tsx +6 -5
- package/src/components/animated-badge/index.tsx +2 -1
- package/src/components/area-chart/index.tsx +31 -3
- package/src/components/attachment/index.tsx +9 -8
- package/src/components/avatar/index.tsx +4 -3
- package/src/components/avatar-cropper/index.tsx +2 -1
- package/src/components/badge/index.tsx +2 -1
- package/src/components/bar-chart/index.tsx +40 -3
- package/src/components/breadcrumb/index.tsx +8 -7
- package/src/components/bubble-chart/index.tsx +23 -2
- package/src/components/bump-chart/index.tsx +31 -3
- package/src/components/button/index.tsx +2 -1
- package/src/components/button-group/index.tsx +2 -1
- package/src/components/calendar/index.tsx +2 -1
- package/src/components/candlestick-chart/index.tsx +25 -2
- package/src/components/card/index.tsx +7 -6
- package/src/components/checkbox/index.tsx +2 -1
- package/src/components/chip/index.tsx +2 -1
- package/src/components/collapsible/index.tsx +6 -5
- package/src/components/color-picker/index.tsx +29 -15
- package/src/components/combobox/index.tsx +3 -2
- package/src/components/context-menu/index.tsx +2 -1
- package/src/components/countdown/index.tsx +2 -1
- package/src/components/dialog/index.tsx +3 -2
- package/src/components/empty-state/index.tsx +7 -6
- package/src/components/fab/index.tsx +6 -4
- package/src/components/feedback/index.tsx +5 -4
- package/src/components/field/index.tsx +11 -10
- package/src/components/file-upload/index.tsx +4 -3
- package/src/components/flip-card/index.tsx +4 -3
- package/src/components/frame/index.tsx +13 -12
- package/src/components/grid-item/index.tsx +10 -9
- package/src/components/heatmap-chart/index.tsx +2 -1
- package/src/components/image-viewer/index.tsx +2 -1
- package/src/components/input/index.tsx +2 -1
- package/src/components/input-group/index.tsx +4 -3
- package/src/components/item/index.tsx +11 -10
- package/src/components/kpi/index.tsx +3 -2
- package/src/components/label/index.tsx +3 -2
- package/src/components/leaderboard/index.tsx +2 -1
- package/src/components/line-chart/index.tsx +31 -3
- package/src/components/live-line-chart/index.tsx +31 -4
- package/src/components/map/native-style.ts +31 -4
- package/src/components/markdown-editor/index.tsx +11 -11
- package/src/components/marker/index.tsx +4 -3
- package/src/components/marquee/index.tsx +2 -1
- package/src/components/message/index.tsx +10 -9
- package/src/components/message-scroller/index.tsx +4 -4
- package/src/components/meter/index.tsx +2 -1
- package/src/components/mirror-area-chart/index.tsx +25 -2
- package/src/components/number-input/index.tsx +2 -1
- package/src/components/otp-input/index.tsx +4 -3
- package/src/components/page-header/index.tsx +12 -11
- package/src/components/pagination/index.tsx +6 -5
- package/src/components/panelside/index.tsx +8 -7
- package/src/components/planner/index.tsx +7 -7
- package/src/components/plot/index.tsx +37 -3
- package/src/components/popover/index.tsx +2 -1
- package/src/components/post/index.tsx +12 -11
- package/src/components/progress/index.tsx +2 -1
- package/src/components/progress-button/index.tsx +2 -1
- package/src/components/pyramid-chart/index.tsx +25 -2
- package/src/components/qr-code/index.tsx +8 -7
- package/src/components/questionnaire/index.tsx +4 -3
- package/src/components/radio-group/index.tsx +3 -2
- package/src/components/rating/index.tsx +2 -1
- package/src/components/scatter-chart/index.tsx +23 -2
- package/src/components/scroll-header/index.tsx +13 -11
- package/src/components/search-bar/index.tsx +7 -8
- package/src/components/section-progress/index.tsx +3 -2
- package/src/components/select/index.tsx +2 -1
- package/src/components/separator/index.tsx +2 -1
- package/src/components/shimmer/index.tsx +11 -2
- package/src/components/signature/index.tsx +2 -1
- package/src/components/sketch/index.tsx +2 -1
- package/src/components/slide-button/index.tsx +2 -1
- package/src/components/slider/index.tsx +2 -1
- package/src/components/sortable/index.tsx +5 -7
- package/src/components/splitter/index.tsx +3 -2
- package/src/components/stack-card/index.tsx +9 -7
- package/src/components/steps/index.tsx +8 -7
- package/src/components/support/index.tsx +17 -16
- package/src/components/surface/index.tsx +2 -1
- package/src/components/swipe/index.tsx +5 -4
- package/src/components/switch/index.tsx +2 -1
- package/src/components/table/index.tsx +11 -10
- package/src/components/tabs/index.tsx +4 -2
- package/src/components/tag-input/index.tsx +5 -5
- package/src/components/text-animation/index.tsx +2 -1
- package/src/components/textarea/index.tsx +3 -3
- package/src/components/time-picker/index.tsx +2 -1
- package/src/components/timeline/index.tsx +17 -16
- package/src/components/toast/index.tsx +2 -2
- package/src/components/toggle-button/index.tsx +3 -2
- package/src/components/tooltip/index.tsx +2 -1
- package/src/components/tour/index.tsx +3 -2
- package/src/components/tree/index.tsx +11 -9
- package/src/components/typography/index.tsx +8 -7
- package/src/components/waterfall-chart/index.tsx +35 -2
- package/src/hooks/use-keyboard-avoidance.ts +3 -2
- package/src/hooks/use-reveal-progress.ts +3 -2
- package/src/hooks/use-scroll-sections.ts +3 -2
- package/src/icons/index.tsx +21 -2
- package/src/index.ts +14 -0
- package/src/primitives/animated-pressable.tsx +2 -1
- package/src/primitives/chart-accessibility.ts +9 -5
- package/src/primitives/glass.tsx +3 -2
- package/src/primitives/refs.ts +45 -0
- package/src/primitives/scroll-progress.tsx +2 -1
- package/src/primitives/text.tsx +2 -1
- package/src/primitives/web-deps.ts +14 -0
- package/lib/module/uniwind-env.d.js +0 -4
- package/lib/module/uniwind-env.d.js.map +0 -1
|
@@ -93,6 +93,7 @@ import { tv } from 'tailwind-variants';
|
|
|
93
93
|
import { ChevronRightIcon } from '../../icons';
|
|
94
94
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
95
95
|
import { cn } from '../../utils/cn';
|
|
96
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
96
97
|
|
|
97
98
|
/**
|
|
98
99
|
* The `inset` shell's geometry. Numbers rather than classes, because an
|
|
@@ -191,7 +192,7 @@ export interface FrameRootProps extends FrameProps {
|
|
|
191
192
|
variant?: FrameVariant;
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
const FrameRoot = forwardRef<
|
|
195
|
+
const FrameRoot = forwardRef<ViewRef, FrameRootProps>(
|
|
195
196
|
({ className, variant = 'default', children, style, ...props }, ref) => {
|
|
196
197
|
const slots = frameVariants({ variant });
|
|
197
198
|
const inset = variant === 'inset';
|
|
@@ -225,7 +226,7 @@ export interface FrameHeaderProps extends FrameProps {
|
|
|
225
226
|
* the left, `Frame.Action` on the right. Add `className="flex-col items-start"`
|
|
226
227
|
* when you want a description underneath.
|
|
227
228
|
*/
|
|
228
|
-
const FrameHeader = forwardRef<
|
|
229
|
+
const FrameHeader = forwardRef<ViewRef, FrameHeaderProps>(
|
|
229
230
|
({ className, ...props }, ref) => {
|
|
230
231
|
// `min-w-0` on nothing here — the title itself takes the flexible side, so
|
|
231
232
|
// a long one truncates instead of shoving the action off the edge.
|
|
@@ -251,7 +252,7 @@ FrameHeader.displayName = 'Frame.Header';
|
|
|
251
252
|
* colour and medium weight, and truncates to one line rather than pushing the
|
|
252
253
|
* row's trailing slot out of view. Pass `numberOfLines` to override either way.
|
|
253
254
|
*/
|
|
254
|
-
const FrameTitle = forwardRef<
|
|
255
|
+
const FrameTitle = forwardRef<TextRef, TextProps>(({ className, ...props }, ref) => {
|
|
255
256
|
const inRow = useContext(FrameSlotContext);
|
|
256
257
|
|
|
257
258
|
if (inRow) {
|
|
@@ -281,7 +282,7 @@ export interface FrameActionProps extends FrameProps {
|
|
|
281
282
|
* Trailing slot on the header row — a column label, a count, a button, a badge.
|
|
282
283
|
* Plain strings render as muted text; anything else renders as-is.
|
|
283
284
|
*/
|
|
284
|
-
const FrameAction = forwardRef<
|
|
285
|
+
const FrameAction = forwardRef<ViewRef, FrameActionProps>(
|
|
285
286
|
({ className, children, ...props }, ref) => (
|
|
286
287
|
<View
|
|
287
288
|
ref={ref}
|
|
@@ -302,7 +303,7 @@ FrameAction.displayName = 'Frame.Action';
|
|
|
302
303
|
* Secondary line under the title — in a column-wrapped header, or under a row's
|
|
303
304
|
* title inside `Frame.Content`, where it drops a size and wraps to two lines.
|
|
304
305
|
*/
|
|
305
|
-
const FrameDescription = forwardRef<
|
|
306
|
+
const FrameDescription = forwardRef<TextRef, TextProps>(
|
|
306
307
|
({ className, ...props }, ref) => {
|
|
307
308
|
const inRow = useContext(FrameSlotContext);
|
|
308
309
|
|
|
@@ -328,7 +329,7 @@ export interface FrameMediaProps extends FrameProps {
|
|
|
328
329
|
* Leading slot on a row — an icon, an avatar, a status dot. Holds its size, so
|
|
329
330
|
* whatever it holds is never squeezed by the text beside it.
|
|
330
331
|
*/
|
|
331
|
-
const FrameMedia = forwardRef<
|
|
332
|
+
const FrameMedia = forwardRef<ViewRef, FrameMediaProps>(
|
|
332
333
|
({ className, ...props }, ref) => (
|
|
333
334
|
<View
|
|
334
335
|
ref={ref}
|
|
@@ -349,7 +350,7 @@ export interface FrameContentProps extends FrameProps {
|
|
|
349
350
|
* allowed to shrink past its content, which is what keeps a long line from
|
|
350
351
|
* pushing the rest of the row off the edge.
|
|
351
352
|
*/
|
|
352
|
-
const FrameContent = forwardRef<
|
|
353
|
+
const FrameContent = forwardRef<ViewRef, FrameContentProps>(
|
|
353
354
|
({ className, children, ...props }, ref) => (
|
|
354
355
|
// `min-w-0` is the whole trick: a flex child's minimum size is its content
|
|
355
356
|
// unless told otherwise, so `flex-1` alone still refuses to go narrower
|
|
@@ -369,7 +370,7 @@ export interface FrameActionsProps extends FrameProps {
|
|
|
369
370
|
* Trailing slot on a row — a chip, a value, a switch, a small button. Holds its
|
|
370
371
|
* size, so it stays readable however long the content beside it runs.
|
|
371
372
|
*/
|
|
372
|
-
const FrameActions = forwardRef<
|
|
373
|
+
const FrameActions = forwardRef<ViewRef, FrameActionsProps>(
|
|
373
374
|
({ className, ...props }, ref) => (
|
|
374
375
|
<View
|
|
375
376
|
ref={ref}
|
|
@@ -419,7 +420,7 @@ export interface FramePanelProps extends FrameProps {
|
|
|
419
420
|
* with the header strip above it. Under `inset` it floats clear of all four
|
|
420
421
|
* instead, at the radius that keeps it concentric with the shell.
|
|
421
422
|
*/
|
|
422
|
-
const FramePanel = forwardRef<
|
|
423
|
+
const FramePanel = forwardRef<ViewRef, FramePanelProps>(
|
|
423
424
|
({ className, dividers = true, children, style, ...props }, ref) => {
|
|
424
425
|
const variant = useContext(FrameVariantContext);
|
|
425
426
|
return (
|
|
@@ -464,7 +465,7 @@ export interface FrameRowProps extends Omit<PressableProps, 'children'>, Dividab
|
|
|
464
465
|
* pressable — press feedback, a button role — rather than a View with a
|
|
465
466
|
* handler bolted on.
|
|
466
467
|
*/
|
|
467
|
-
const FrameRow = forwardRef<
|
|
468
|
+
const FrameRow = forwardRef<ViewRef, FrameRowProps>(
|
|
468
469
|
(
|
|
469
470
|
{ className, divided, chevron, wrap, align = 'center', children, onPress, ...props },
|
|
470
471
|
ref
|
|
@@ -520,7 +521,7 @@ export interface FrameSectionProps extends FrameProps, Dividable {
|
|
|
520
521
|
* one group. It divides its own rows the way the panel does, so the two nest
|
|
521
522
|
* without either having to know about the other.
|
|
522
523
|
*/
|
|
523
|
-
const FrameSection = forwardRef<
|
|
524
|
+
const FrameSection = forwardRef<ViewRef, FrameSectionProps>(
|
|
524
525
|
({ className, title, divided, children, ...props }, ref) => (
|
|
525
526
|
<View
|
|
526
527
|
ref={ref}
|
|
@@ -577,7 +578,7 @@ function pillChildren(children: ReactNode) {
|
|
|
577
578
|
* as things to press. Under the other two variants the panel stops being flush
|
|
578
579
|
* at the bottom, which is what having a footer means there.
|
|
579
580
|
*/
|
|
580
|
-
const FrameFooter = forwardRef<
|
|
581
|
+
const FrameFooter = forwardRef<ViewRef, FrameFooterProps>(
|
|
581
582
|
({ className, style, children, ...props }, ref) => {
|
|
582
583
|
const variant = useContext(FrameVariantContext);
|
|
583
584
|
const inset = variant === 'inset';
|
|
@@ -62,6 +62,7 @@ import {
|
|
|
62
62
|
} from '../../primitives/animated-pressable';
|
|
63
63
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
64
64
|
import { cn } from '../../utils/cn';
|
|
65
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
65
66
|
|
|
66
67
|
type GridItemSize = 'default' | 'sm';
|
|
67
68
|
|
|
@@ -191,7 +192,7 @@ function findSpot(
|
|
|
191
192
|
* The grid. Measures its own width, places its tiles, and stands as tall as the
|
|
192
193
|
* rows they ended up needing.
|
|
193
194
|
*/
|
|
194
|
-
const GridItemGroup = forwardRef<
|
|
195
|
+
const GridItemGroup = forwardRef<ViewRef, GridItemGroupProps>(
|
|
195
196
|
(
|
|
196
197
|
{
|
|
197
198
|
className,
|
|
@@ -311,7 +312,7 @@ export interface GridItemProps
|
|
|
311
312
|
* Renders as a pressable when given `onPress`, and as a plain view otherwise,
|
|
312
313
|
* so a tile that is only showing a number does not announce itself as a button.
|
|
313
314
|
*/
|
|
314
|
-
const GridItemRoot = forwardRef<
|
|
315
|
+
const GridItemRoot = forwardRef<ViewRef, GridItemProps>(
|
|
315
316
|
(
|
|
316
317
|
{
|
|
317
318
|
className,
|
|
@@ -374,7 +375,7 @@ export interface GridItemBackgroundProps extends ViewProps {
|
|
|
374
375
|
* grid read as a bento grid rather than as a wall of stat cards, and it is the
|
|
375
376
|
* one part that is meant to be cropped: the tile clips it.
|
|
376
377
|
*/
|
|
377
|
-
const GridItemBackground = forwardRef<
|
|
378
|
+
const GridItemBackground = forwardRef<ViewRef, GridItemBackgroundProps>(
|
|
378
379
|
({ className, children, ...props }, ref) => (
|
|
379
380
|
<View
|
|
380
381
|
ref={ref}
|
|
@@ -397,7 +398,7 @@ export interface GridItemMediaProps
|
|
|
397
398
|
}
|
|
398
399
|
|
|
399
400
|
/** Leading slot: an icon tile, a thumbnail, or an avatar passed through. */
|
|
400
|
-
const GridItemMedia = forwardRef<
|
|
401
|
+
const GridItemMedia = forwardRef<ViewRef, GridItemMediaProps>(
|
|
401
402
|
({ className, variant, size, children, ...props }, ref) => {
|
|
402
403
|
const grid = useContext(GridItemContext);
|
|
403
404
|
|
|
@@ -419,7 +420,7 @@ export interface GridItemTitleProps extends TextProps {
|
|
|
419
420
|
}
|
|
420
421
|
|
|
421
422
|
/** What the tile is of. Quiet, because the number under it is the message. */
|
|
422
|
-
const GridItemTitle = forwardRef<
|
|
423
|
+
const GridItemTitle = forwardRef<TextRef, GridItemTitleProps>(
|
|
423
424
|
({ className, ...props }, ref) => {
|
|
424
425
|
const { size } = useContext(GridItemContext);
|
|
425
426
|
const { title } = gridItemVariants({ size });
|
|
@@ -434,7 +435,7 @@ export interface GridItemValueProps extends TextProps {
|
|
|
434
435
|
}
|
|
435
436
|
|
|
436
437
|
/** The figure. The largest thing on the tile, and the reason it is there. */
|
|
437
|
-
const GridItemValue = forwardRef<
|
|
438
|
+
const GridItemValue = forwardRef<TextRef, GridItemValueProps>(
|
|
438
439
|
({ className, ...props }, ref) => {
|
|
439
440
|
const { size } = useContext(GridItemContext);
|
|
440
441
|
const { value } = gridItemVariants({ size });
|
|
@@ -449,7 +450,7 @@ export interface GridItemDescriptionProps extends TextProps {
|
|
|
449
450
|
}
|
|
450
451
|
|
|
451
452
|
const GridItemDescription = forwardRef<
|
|
452
|
-
|
|
453
|
+
TextRef,
|
|
453
454
|
GridItemDescriptionProps
|
|
454
455
|
>(({ className, ...props }, ref) => {
|
|
455
456
|
const { size } = useContext(GridItemContext);
|
|
@@ -471,7 +472,7 @@ export interface GridItemFooterProps extends ViewProps {
|
|
|
471
472
|
* pushing the footer down with the space left over pins it to the bottom
|
|
472
473
|
* without taking it out of the layout the rest of the tile is sharing.
|
|
473
474
|
*/
|
|
474
|
-
const GridItemFooter = forwardRef<
|
|
475
|
+
const GridItemFooter = forwardRef<ViewRef, GridItemFooterProps>(
|
|
475
476
|
({ className, children, ...props }, ref) => (
|
|
476
477
|
<View
|
|
477
478
|
ref={ref}
|
|
@@ -490,7 +491,7 @@ export interface GridItemActionsProps extends ViewProps {
|
|
|
490
491
|
}
|
|
491
492
|
|
|
492
493
|
/** Trailing slot: buttons, a chip, a chevron. */
|
|
493
|
-
const GridItemActions = forwardRef<
|
|
494
|
+
const GridItemActions = forwardRef<ViewRef, GridItemActionsProps>(
|
|
494
495
|
({ className, children, ...props }, ref) => (
|
|
495
496
|
<View
|
|
496
497
|
ref={ref}
|
|
@@ -75,6 +75,7 @@ import {
|
|
|
75
75
|
} from '../../primitives/chart-accessibility';
|
|
76
76
|
import { cn } from '../../utils/cn';
|
|
77
77
|
import { normalizeWeekStart, startOfDay } from '../../utils/date';
|
|
78
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
78
79
|
|
|
79
80
|
|
|
80
81
|
/**
|
|
@@ -402,7 +403,7 @@ export interface HeatmapChartProps extends ViewProps, ChartAccessibilityProps<He
|
|
|
402
403
|
children?: ReactNode;
|
|
403
404
|
}
|
|
404
405
|
|
|
405
|
-
const HeatmapChartRoot = forwardRef<
|
|
406
|
+
const HeatmapChartRoot = forwardRef<ViewRef, HeatmapChartProps>(function HeatmapChartRoot(
|
|
406
407
|
{
|
|
407
408
|
className,
|
|
408
409
|
data,
|
|
@@ -119,6 +119,7 @@ import {
|
|
|
119
119
|
type Rect,
|
|
120
120
|
type Size,
|
|
121
121
|
} from './image-viewer-geometry';
|
|
122
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
122
123
|
|
|
123
124
|
/** Space between two pages of a gallery, so a page turn reads as two pictures. */
|
|
124
125
|
const PAGE_GAP = 16;
|
|
@@ -475,7 +476,7 @@ function ImageViewerTrigger({
|
|
|
475
476
|
}: ImageViewerTriggerProps) {
|
|
476
477
|
const { store, hiddenId, openItem } = useViewer('ImageViewer.Trigger');
|
|
477
478
|
const id = useId();
|
|
478
|
-
const ref = useRef<
|
|
479
|
+
const ref = useRef<ViewRef>(null);
|
|
479
480
|
const orderRef = useRef<number | null>(null);
|
|
480
481
|
orderRef.current ??= store.nextOrder();
|
|
481
482
|
|
|
@@ -60,6 +60,7 @@ import { KeyboardAvoider } from '../../primitives/keyboard-avoider';
|
|
|
60
60
|
import { Text, textChildren } from '../../primitives/text';
|
|
61
61
|
import { Label } from '../label';
|
|
62
62
|
import { inputContentPadding } from './input-content-padding';
|
|
63
|
+
import type { TextInputRef } from '../../primitives/refs';
|
|
63
64
|
|
|
64
65
|
/** Long enough to read as a transition, short enough not to lag a fast tab. */
|
|
65
66
|
const FOCUS_DURATION = 150;
|
|
@@ -214,7 +215,7 @@ export interface InputProps
|
|
|
214
215
|
|
|
215
216
|
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
|
|
216
217
|
|
|
217
|
-
export const Input = forwardRef<
|
|
218
|
+
export const Input = forwardRef<TextInputRef, InputProps>(
|
|
218
219
|
(
|
|
219
220
|
{
|
|
220
221
|
className,
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
type InputGroupDecoratorOwner,
|
|
29
29
|
type InputGroupDecoratorSide,
|
|
30
30
|
} from './input-group-measurements';
|
|
31
|
+
import type { TextInputRef, ViewRef } from '../../primitives/refs';
|
|
31
32
|
|
|
32
33
|
const inputGroupVariants = tv({
|
|
33
34
|
slots: {
|
|
@@ -70,7 +71,7 @@ export interface InputGroupProps extends ViewProps {
|
|
|
70
71
|
children?: ReactNode;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
const InputGroupRoot = forwardRef<
|
|
74
|
+
const InputGroupRoot = forwardRef<ViewRef, InputGroupProps>(
|
|
74
75
|
({ className, isDisabled = false, children, ...props }, ref) => {
|
|
75
76
|
const { root } = inputGroupVariants();
|
|
76
77
|
const { prefixWidth, suffixWidth, measureDecorator, removeDecorator } =
|
|
@@ -117,7 +118,7 @@ export interface InputGroupDecoratorProps extends ViewProps {
|
|
|
117
118
|
|
|
118
119
|
/** Builds Prefix/Suffix, which differ only in which side they measure. */
|
|
119
120
|
function createDecorator(side: 'prefix' | 'suffix') {
|
|
120
|
-
const Decorator = forwardRef<
|
|
121
|
+
const Decorator = forwardRef<ViewRef, InputGroupDecoratorProps>(
|
|
121
122
|
({ className, isDecorative = false, onLayout, children, ...props }, ref) => {
|
|
122
123
|
const group = useInputGroup();
|
|
123
124
|
const slots = inputGroupVariants({ isDisabled: group?.isDisabled ?? false });
|
|
@@ -163,7 +164,7 @@ export type InputGroupInputProps = InputProps;
|
|
|
163
164
|
* The Input itself. Receives left/right padding matching the measured
|
|
164
165
|
* decorator widths, so its text always clears them.
|
|
165
166
|
*/
|
|
166
|
-
const InputGroupInput = forwardRef<
|
|
167
|
+
const InputGroupInput = forwardRef<TextInputRef, InputGroupInputProps>(
|
|
167
168
|
({ style, disabled, ...props }, ref) => {
|
|
168
169
|
const group = useInputGroup();
|
|
169
170
|
|
|
@@ -30,6 +30,7 @@ import { tv, type VariantProps } from 'tailwind-variants';
|
|
|
30
30
|
import { AnimatedPressable, type AnimatedPressableProps } from '../../primitives/animated-pressable';
|
|
31
31
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
32
32
|
import { cn } from '../../utils/cn';
|
|
33
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
33
34
|
|
|
34
35
|
type ItemSize = 'default' | 'sm' | 'xs';
|
|
35
36
|
type ItemOrientation = 'horizontal' | 'vertical';
|
|
@@ -129,7 +130,7 @@ export interface ItemProps
|
|
|
129
130
|
* Renders as a pressable when given `onPress`, and as a plain view otherwise,
|
|
130
131
|
* so a static row does not announce itself as a button.
|
|
131
132
|
*/
|
|
132
|
-
const ItemRoot = forwardRef<
|
|
133
|
+
const ItemRoot = forwardRef<ViewRef, ItemProps>(
|
|
133
134
|
(
|
|
134
135
|
{
|
|
135
136
|
className,
|
|
@@ -187,7 +188,7 @@ export interface ItemGroupProps extends ViewProps {
|
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
/** Stack of items. Pair with `Item.Separator` between them. */
|
|
190
|
-
const ItemGroup = forwardRef<
|
|
191
|
+
const ItemGroup = forwardRef<ViewRef, ItemGroupProps>(
|
|
191
192
|
({ className, orientation = 'vertical', children, ...props }, ref) => (
|
|
192
193
|
<View
|
|
193
194
|
ref={ref}
|
|
@@ -213,7 +214,7 @@ export interface ItemSeparatorProps extends ViewProps {
|
|
|
213
214
|
}
|
|
214
215
|
|
|
215
216
|
/** Hairline between rows in a group. */
|
|
216
|
-
const ItemSeparator = forwardRef<
|
|
217
|
+
const ItemSeparator = forwardRef<ViewRef, ItemSeparatorProps>(
|
|
217
218
|
({ className, orientation = 'vertical', ...props }, ref) => (
|
|
218
219
|
<View
|
|
219
220
|
ref={ref}
|
|
@@ -236,7 +237,7 @@ export interface ItemMediaProps
|
|
|
236
237
|
}
|
|
237
238
|
|
|
238
239
|
/** Leading slot: an icon tile, a thumbnail, or an avatar passed through. */
|
|
239
|
-
const ItemMedia = forwardRef<
|
|
240
|
+
const ItemMedia = forwardRef<ViewRef, ItemMediaProps>(
|
|
240
241
|
({ className, variant, size, children, ...props }, ref) => {
|
|
241
242
|
const item = useContext(ItemContext);
|
|
242
243
|
|
|
@@ -263,7 +264,7 @@ export interface ItemContentProps extends ViewProps {
|
|
|
263
264
|
* actions stay pinned to the trailing edge; in a vertical one it just fills
|
|
264
265
|
* the width, because there is nothing beside it to push against.
|
|
265
266
|
*/
|
|
266
|
-
const ItemContent = forwardRef<
|
|
267
|
+
const ItemContent = forwardRef<ViewRef, ItemContentProps>(
|
|
267
268
|
({ className, children, ...props }, ref) => {
|
|
268
269
|
const { orientation } = useContext(ItemContext);
|
|
269
270
|
|
|
@@ -288,7 +289,7 @@ export interface ItemTitleProps extends TextProps {
|
|
|
288
289
|
className?: string;
|
|
289
290
|
}
|
|
290
291
|
|
|
291
|
-
const ItemTitle = forwardRef<
|
|
292
|
+
const ItemTitle = forwardRef<TextRef, ItemTitleProps>(
|
|
292
293
|
({ className, ...props }, ref) => {
|
|
293
294
|
const { size } = useContext(ItemContext);
|
|
294
295
|
const { title } = itemVariants({ size });
|
|
@@ -303,7 +304,7 @@ export interface ItemDescriptionProps extends TextProps {
|
|
|
303
304
|
}
|
|
304
305
|
|
|
305
306
|
const ItemDescription = forwardRef<
|
|
306
|
-
|
|
307
|
+
TextRef,
|
|
307
308
|
ItemDescriptionProps
|
|
308
309
|
>(({ className, ...props }, ref) => {
|
|
309
310
|
const { size } = useContext(ItemContext);
|
|
@@ -319,7 +320,7 @@ export interface ItemActionsProps extends ViewProps {
|
|
|
319
320
|
}
|
|
320
321
|
|
|
321
322
|
/** Trailing slot: buttons, a chevron, a switch. */
|
|
322
|
-
const ItemActions = forwardRef<
|
|
323
|
+
const ItemActions = forwardRef<ViewRef, ItemActionsProps>(
|
|
323
324
|
({ className, children, ...props }, ref) => (
|
|
324
325
|
<View
|
|
325
326
|
ref={ref}
|
|
@@ -342,7 +343,7 @@ export interface ItemHeaderProps extends ViewProps {
|
|
|
342
343
|
* row. Needs `orientation="vertical"` on the item, since a strip only makes
|
|
343
344
|
* sense once the item stacks.
|
|
344
345
|
*/
|
|
345
|
-
const ItemHeader = forwardRef<
|
|
346
|
+
const ItemHeader = forwardRef<ViewRef, ItemHeaderProps>(
|
|
346
347
|
({ className, children, ...props }, ref) => (
|
|
347
348
|
<View
|
|
348
349
|
ref={ref}
|
|
@@ -361,7 +362,7 @@ export interface ItemFooterProps extends ViewProps {
|
|
|
361
362
|
}
|
|
362
363
|
|
|
363
364
|
/** Full-width strip below the row's main content. */
|
|
364
|
-
const ItemFooter = forwardRef<
|
|
365
|
+
const ItemFooter = forwardRef<ViewRef, ItemFooterProps>(
|
|
365
366
|
({ className, children, ...props }, ref) => (
|
|
366
367
|
<View
|
|
367
368
|
ref={ref}
|
|
@@ -37,6 +37,7 @@ import { type SeriesColorIndex } from '../../utils/chart';
|
|
|
37
37
|
import { LineChart, type LineChartDatum } from '../line-chart';
|
|
38
38
|
import { Progress } from '../progress';
|
|
39
39
|
import { Surface } from '../surface';
|
|
40
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
40
41
|
|
|
41
42
|
/** Height of the sparkline when nothing else is said. */
|
|
42
43
|
const CHART_HEIGHT = 56;
|
|
@@ -192,7 +193,7 @@ export interface KpiProps extends Omit<ViewProps, 'children'> {
|
|
|
192
193
|
children: ReactNode;
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
const KpiRoot = forwardRef<
|
|
196
|
+
const KpiRoot = forwardRef<ViewRef, KpiProps>(function KpiRoot(
|
|
196
197
|
{ className, colorIndex = 1, goodDirection = 'up', surface = true, children, ...props },
|
|
197
198
|
ref
|
|
198
199
|
) {
|
|
@@ -628,7 +629,7 @@ export interface KpiGroupProps extends ViewProps {
|
|
|
628
629
|
* caller, because "between" is the one thing a list of siblings cannot express
|
|
629
630
|
* — a trailing rule after the last card is the mistake this exists to prevent.
|
|
630
631
|
*/
|
|
631
|
-
const KpiGroup = forwardRef<
|
|
632
|
+
const KpiGroup = forwardRef<ViewRef, KpiGroupProps>(function KpiGroup(
|
|
632
633
|
{ className, orientation = 'horizontal', separated = true, children, ...props },
|
|
633
634
|
ref
|
|
634
635
|
) {
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
18
18
|
import { tv } from 'tailwind-variants';
|
|
19
19
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
20
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
20
21
|
|
|
21
22
|
const labelVariants = tv({
|
|
22
23
|
slots: {
|
|
@@ -59,7 +60,7 @@ export interface LabelProps extends ViewProps {
|
|
|
59
60
|
children?: ReactNode;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
const LabelRoot = forwardRef<
|
|
63
|
+
const LabelRoot = forwardRef<ViewRef, LabelProps>(
|
|
63
64
|
(
|
|
64
65
|
{
|
|
65
66
|
className,
|
|
@@ -100,7 +101,7 @@ export interface LabelTextProps extends TextProps {
|
|
|
100
101
|
asteriskClassName?: string;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
const LabelText = forwardRef<
|
|
104
|
+
const LabelText = forwardRef<TextRef, LabelTextProps>(
|
|
104
105
|
({ className, asteriskClassName, children, ...props }, ref) => {
|
|
105
106
|
const { isRequired, isInvalid, isDisabled } = useContext(LabelContext);
|
|
106
107
|
const { text, asterisk } = labelVariants({ isDisabled, isInvalid });
|
|
@@ -49,6 +49,7 @@ import { Text } from '../../primitives/text';
|
|
|
49
49
|
import { cn } from '../../utils/cn';
|
|
50
50
|
import { Avatar } from '../avatar';
|
|
51
51
|
import { podiumHeights, rankEntries, type Ranked } from './leaderboard-rank';
|
|
52
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
52
53
|
|
|
53
54
|
export { rankEntries } from './leaderboard-rank';
|
|
54
55
|
export type { Ranked as LeaderboardRanked } from './leaderboard-rank';
|
|
@@ -326,7 +327,7 @@ function ChangeLabel({ change }: { change: number | undefined }) {
|
|
|
326
327
|
* `limit` for a long board, and `highlightId` to keep the viewer's own row in
|
|
327
328
|
* sight when the limit cuts them off.
|
|
328
329
|
*/
|
|
329
|
-
const LeaderboardRoot = forwardRef<
|
|
330
|
+
const LeaderboardRoot = forwardRef<ViewRef, LeaderboardProps>(function Leaderboard(
|
|
330
331
|
{
|
|
331
332
|
className,
|
|
332
333
|
data,
|
|
@@ -954,6 +954,15 @@ LineChartYAxis.layer = 'overlay' as Layer;
|
|
|
954
954
|
// plot out.
|
|
955
955
|
LineChartYAxis.axis = 'y' as const;
|
|
956
956
|
|
|
957
|
+
/**
|
|
958
|
+
* How long the readout waits before claiming the touch, in milliseconds.
|
|
959
|
+
*
|
|
960
|
+
* Long enough that a tap reaches a button drawn over the chart and a swipe
|
|
961
|
+
* scrolls the screen, short enough that a deliberate press does not feel
|
|
962
|
+
* ignored.
|
|
963
|
+
*/
|
|
964
|
+
const DEFAULT_HOLD = 180;
|
|
965
|
+
|
|
957
966
|
export interface LineChartTooltipProps {
|
|
958
967
|
color?: string;
|
|
959
968
|
/**
|
|
@@ -965,6 +974,16 @@ export interface LineChartTooltipProps {
|
|
|
965
974
|
formatValue?: (value: number, key: string) => string;
|
|
966
975
|
/** Format the label's heading from the row. Defaults to the value at xDataKey. */
|
|
967
976
|
formatX?: (datum: LineChartDatum) => string;
|
|
977
|
+
/**
|
|
978
|
+
* How long a press has to be held before the readout takes the touch, in
|
|
979
|
+
* milliseconds.
|
|
980
|
+
*
|
|
981
|
+
* Until then the touch belongs to whatever else wants it: a quick tap still
|
|
982
|
+
* reaches a button floating over the chart, and a swipe still scrolls the
|
|
983
|
+
* screen the chart sits in. Set `0` to read on contact, only for a chart with
|
|
984
|
+
* nothing over it and no scroll view around it.
|
|
985
|
+
*/
|
|
986
|
+
activateAfterLongPress?: number;
|
|
968
987
|
}
|
|
969
988
|
|
|
970
989
|
/**
|
|
@@ -979,7 +998,13 @@ export interface LineChartTooltipProps {
|
|
|
979
998
|
* The hit area is the whole plot. A crosshair you have to land on the line to
|
|
980
999
|
* summon is a crosshair nobody finds.
|
|
981
1000
|
*/
|
|
982
|
-
function LineChartTooltip({
|
|
1001
|
+
function LineChartTooltip({
|
|
1002
|
+
color,
|
|
1003
|
+
showLabel = true,
|
|
1004
|
+
formatValue,
|
|
1005
|
+
formatX,
|
|
1006
|
+
activateAfterLongPress = DEFAULT_HOLD,
|
|
1007
|
+
}: LineChartTooltipProps) {
|
|
983
1008
|
const {
|
|
984
1009
|
data,
|
|
985
1010
|
xDataKey,
|
|
@@ -1022,7 +1047,8 @@ function LineChartTooltip({ color, showLabel = true, formatValue, formatX }: Lin
|
|
|
1022
1047
|
|
|
1023
1048
|
return Gesture.Pan()
|
|
1024
1049
|
.minDistance(0)
|
|
1025
|
-
.
|
|
1050
|
+
.activateAfterLongPress(activateAfterLongPress)
|
|
1051
|
+
.onStart((event) => {
|
|
1026
1052
|
'worklet';
|
|
1027
1053
|
resolve(event.x);
|
|
1028
1054
|
})
|
|
@@ -1032,10 +1058,12 @@ function LineChartTooltip({ color, showLabel = true, formatValue, formatX }: Lin
|
|
|
1032
1058
|
})
|
|
1033
1059
|
.onFinalize(() => {
|
|
1034
1060
|
'worklet';
|
|
1061
|
+
// Fires whether or not the readout ever took the touch.
|
|
1062
|
+
if (activeIndex.value === -1) return;
|
|
1035
1063
|
activeIndex.value = -1;
|
|
1036
1064
|
runOnJS(setActiveIndexJS)(-1);
|
|
1037
1065
|
});
|
|
1038
|
-
}, [total, left, width, activeIndex, setActiveIndexJS]);
|
|
1066
|
+
}, [total, left, width, activeIndex, setActiveIndexJS, activateAfterLongPress]);
|
|
1039
1067
|
|
|
1040
1068
|
const crosshairStyle = useAnimatedStyle(() => {
|
|
1041
1069
|
const index = activeIndex.value;
|
|
@@ -69,6 +69,7 @@ import {
|
|
|
69
69
|
View,
|
|
70
70
|
type LayoutChangeEvent,
|
|
71
71
|
type ViewProps,
|
|
72
|
+
type AppStateStatus,
|
|
72
73
|
} from 'react-native';
|
|
73
74
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
74
75
|
import Animated, {
|
|
@@ -457,7 +458,7 @@ const LiveLineChartRoot = forwardRef<LiveLineChartHandle, LiveLineChartProps>(
|
|
|
457
458
|
now.value = Date.now();
|
|
458
459
|
}, false);
|
|
459
460
|
|
|
460
|
-
const running = liveLineClockRuns({ paused, loading, reducedMotion, appState });
|
|
461
|
+
const running = liveLineClockRuns({ paused, loading, reducedMotion, appState: appState as AppStateStatus });
|
|
461
462
|
|
|
462
463
|
useEffect(() => {
|
|
463
464
|
frame.setActive(running);
|
|
@@ -1106,10 +1107,29 @@ LiveLineChartYAxis.displayName = 'LiveLineChart.YAxis';
|
|
|
1106
1107
|
LiveLineChartYAxis.layer = 'overlay' as Layer;
|
|
1107
1108
|
LiveLineChartYAxis.axis = 'y' as const;
|
|
1108
1109
|
|
|
1110
|
+
/**
|
|
1111
|
+
* How long the readout waits before claiming the touch, in milliseconds.
|
|
1112
|
+
*
|
|
1113
|
+
* Long enough that a tap reaches a button drawn over the chart and a swipe
|
|
1114
|
+
* scrolls the screen, short enough that a deliberate press does not feel
|
|
1115
|
+
* ignored.
|
|
1116
|
+
*/
|
|
1117
|
+
const DEFAULT_HOLD = 180;
|
|
1118
|
+
|
|
1109
1119
|
export interface LiveLineChartTooltipProps {
|
|
1110
1120
|
/** Format the value. Defaults to a compact number. */
|
|
1111
1121
|
formatValue?: (value: number) => string;
|
|
1112
1122
|
className?: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* How long a press has to be held before the readout takes the touch, in
|
|
1125
|
+
* milliseconds.
|
|
1126
|
+
*
|
|
1127
|
+
* Until then the touch belongs to whatever else wants it: a quick tap still
|
|
1128
|
+
* reaches a button floating over the chart, and a swipe still scrolls the
|
|
1129
|
+
* screen the chart sits in. Set `0` to read on contact, only for a chart with
|
|
1130
|
+
* nothing over it and no scroll view around it.
|
|
1131
|
+
*/
|
|
1132
|
+
activateAfterLongPress?: number;
|
|
1113
1133
|
}
|
|
1114
1134
|
|
|
1115
1135
|
/**
|
|
@@ -1119,7 +1139,11 @@ export interface LiveLineChartTooltipProps {
|
|
|
1119
1139
|
* place on screen, so it travels left with the reading it named instead of
|
|
1120
1140
|
* sitting still while the line slides out from under it.
|
|
1121
1141
|
*/
|
|
1122
|
-
function LiveLineChartTooltip({
|
|
1142
|
+
function LiveLineChartTooltip({
|
|
1143
|
+
formatValue,
|
|
1144
|
+
className,
|
|
1145
|
+
activateAfterLongPress = DEFAULT_HOLD,
|
|
1146
|
+
}: LiveLineChartTooltipProps) {
|
|
1123
1147
|
const {
|
|
1124
1148
|
plot,
|
|
1125
1149
|
times,
|
|
@@ -1181,7 +1205,8 @@ function LiveLineChartTooltip({ formatValue, className }: LiveLineChartTooltipPr
|
|
|
1181
1205
|
|
|
1182
1206
|
return Gesture.Pan()
|
|
1183
1207
|
.minDistance(0)
|
|
1184
|
-
.
|
|
1208
|
+
.activateAfterLongPress(activateAfterLongPress)
|
|
1209
|
+
.onStart((event) => {
|
|
1185
1210
|
'worklet';
|
|
1186
1211
|
resolve(event.x);
|
|
1187
1212
|
})
|
|
@@ -1191,10 +1216,12 @@ function LiveLineChartTooltip({ formatValue, className }: LiveLineChartTooltipPr
|
|
|
1191
1216
|
})
|
|
1192
1217
|
.onFinalize(() => {
|
|
1193
1218
|
'worklet';
|
|
1219
|
+
// Fires whether or not the readout ever took the touch.
|
|
1220
|
+
if (activeTime.value === -1) return;
|
|
1194
1221
|
activeTime.value = -1;
|
|
1195
1222
|
runOnJS(report)(-1, 0);
|
|
1196
1223
|
});
|
|
1197
|
-
}, [times, values, now, windowMs, plot, activeTime, report]);
|
|
1224
|
+
}, [times, values, now, windowMs, plot, activeTime, report, activateAfterLongPress]);
|
|
1198
1225
|
|
|
1199
1226
|
const crosshairStyle = useAnimatedStyle(() => {
|
|
1200
1227
|
const time = activeTime.value;
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
* - `resampling` becomes `raster-resampling` on a raster layer. Hillshade and
|
|
17
17
|
* color-relief layers have no older name for it, so there it is dropped and
|
|
18
18
|
* the layer keeps the default.
|
|
19
|
+
* - `symbol-height-offset` and `symbol-height-anchor`, which lift a label off
|
|
20
|
+
* the ground in a tilted view, are dropped. Native has nothing like them;
|
|
21
|
+
* without them the label sits on the ground, as it did before they existed.
|
|
22
|
+
* - `fill-layer-opacity` and `line-layer-opacity` fade a whole layer. A plain
|
|
23
|
+
* number is folded into `fill-opacity` or `line-opacity` when that is a plain
|
|
24
|
+
* number too, which looks the same for a layer whose features do not overlap;
|
|
25
|
+
* anything else is dropped and the layer draws at its own opacity.
|
|
19
26
|
* - A tiled source with neither `url` nor `tiles` is removed. Hosted styles use
|
|
20
27
|
* one to carry attribution text. Native cannot parse it, and it draws
|
|
21
28
|
* nothing either way.
|
|
@@ -48,9 +55,17 @@ const OVERLAP = new Map<unknown, boolean>([
|
|
|
48
55
|
['cooperative', false],
|
|
49
56
|
]);
|
|
50
57
|
|
|
58
|
+
/** Layout properties native cannot parse and has no older name for. */
|
|
59
|
+
const DROPPED_LAYOUT = ['symbol-height-offset', 'symbol-height-anchor'];
|
|
60
|
+
|
|
51
61
|
/** The layout with `-overlap` translated, or `null` when it has none. */
|
|
52
62
|
function adaptLayout(layout: Json): Json | null {
|
|
53
63
|
let next: Json | null = null;
|
|
64
|
+
for (const key of DROPPED_LAYOUT) {
|
|
65
|
+
if (!(key in layout)) continue;
|
|
66
|
+
next ??= { ...layout };
|
|
67
|
+
delete next[key];
|
|
68
|
+
}
|
|
54
69
|
for (const kind of ['icon', 'text']) {
|
|
55
70
|
const key = `${kind}-overlap`;
|
|
56
71
|
if (!(key in layout)) continue;
|
|
@@ -65,11 +80,23 @@ function adaptLayout(layout: Json): Json | null {
|
|
|
65
80
|
return next;
|
|
66
81
|
}
|
|
67
82
|
|
|
68
|
-
/** The paint with `resampling` translated, or `null` when it has none. */
|
|
83
|
+
/** The paint with `resampling` and the layer opacities translated, or `null` when it has none. */
|
|
69
84
|
function adaptPaint(type: unknown, paint: Json): Json | null {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
85
|
+
let next: Json | null = null;
|
|
86
|
+
if ('resampling' in paint) {
|
|
87
|
+
const { resampling, ...rest } = paint;
|
|
88
|
+
if (type === 'raster') rest['raster-resampling'] = resampling;
|
|
89
|
+
next = rest;
|
|
90
|
+
}
|
|
91
|
+
for (const kind of ['fill', 'line']) {
|
|
92
|
+
const key = `${kind}-layer-opacity`;
|
|
93
|
+
if (!(key in paint)) continue;
|
|
94
|
+
next ??= { ...paint };
|
|
95
|
+
const layer = next[key];
|
|
96
|
+
const own = next[`${kind}-opacity`] ?? 1;
|
|
97
|
+
delete next[key];
|
|
98
|
+
if (typeof layer === 'number' && typeof own === 'number') next[`${kind}-opacity`] = own * layer;
|
|
99
|
+
}
|
|
73
100
|
return next;
|
|
74
101
|
}
|
|
75
102
|
|