@buoy-gg/floating-tools-core 7.0.38 → 7.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/FloatingToolsStore.js +512 -1
- package/lib/commonjs/colors.js +54 -1
- package/lib/commonjs/constants.js +31 -1
- package/lib/commonjs/devToolsState.js +325 -1
- package/lib/commonjs/dial.js +639 -1
- package/lib/commonjs/dialUsage.js +130 -1
- package/lib/commonjs/easing.js +69 -1
- package/lib/commonjs/floating.js +75 -1
- package/lib/commonjs/fonts.js +31 -1
- package/lib/commonjs/fonts.web.js +8 -1
- package/lib/commonjs/icons/ask-buoy-icon.js +17 -1
- package/lib/commonjs/icons/ask-buoy-icon.native.js +32 -1
- package/lib/commonjs/icons/assets-icon.js +19 -1
- package/lib/commonjs/icons/assets-icon.native.js +17 -1
- package/lib/commonjs/icons/benchmark-icon.js +19 -1
- package/lib/commonjs/icons/benchmark-icon.native.js +17 -1
- package/lib/commonjs/icons/bif-raster-icon.js +49 -1
- package/lib/commonjs/icons/bif-raster-icon.native.js +47 -1
- package/lib/commonjs/icons/camera-icon.js +19 -1
- package/lib/commonjs/icons/camera-icon.native.js +17 -1
- package/lib/commonjs/icons/console-icon.js +17 -1
- package/lib/commonjs/icons/console-icon.native.js +32 -1
- package/lib/commonjs/icons/env-icon.js +19 -1
- package/lib/commonjs/icons/env-icon.native.js +17 -1
- package/lib/commonjs/icons/events-icon.js +19 -1
- package/lib/commonjs/icons/events-icon.native.js +17 -1
- package/lib/commonjs/icons/generated/assets-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/benchmark-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/camera-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/env-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/events-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/glyph-icons.g.js +299 -1
- package/lib/commonjs/icons/generated/highlight-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/highlighter-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/icon-data.g.js +33855 -1
- package/lib/commonjs/icons/generated/image-overlay-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/images-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/network-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/raster-icons.g.js +19 -1
- package/lib/commonjs/icons/generated/riverpod-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/routes-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/settings-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/storage-raster.g.js +8 -1
- package/lib/commonjs/icons/generated/wifi-raster.g.js +8 -1
- package/lib/commonjs/icons/highlight-icon.js +19 -1
- package/lib/commonjs/icons/highlight-icon.native.js +17 -1
- package/lib/commonjs/icons/highlighter-icon.js +27 -1
- package/lib/commonjs/icons/highlighter-icon.native.js +25 -1
- package/lib/commonjs/icons/icon-factories.js +173 -1
- package/lib/commonjs/icons/icon-primitives.js +676 -1
- package/lib/commonjs/icons/icon-primitives.native.js +904 -1
- package/lib/commonjs/icons/icon-renderer.js +307 -1
- package/lib/commonjs/icons/iconGlow.js +32 -1
- package/lib/commonjs/icons/image-overlay-icon.js +19 -1
- package/lib/commonjs/icons/image-overlay-icon.native.js +17 -1
- package/lib/commonjs/icons/images-icon.js +19 -1
- package/lib/commonjs/icons/images-icon.native.js +17 -1
- package/lib/commonjs/icons/impersonate-icon.js +17 -1
- package/lib/commonjs/icons/impersonate-icon.native.js +32 -1
- package/lib/commonjs/icons/jotai-icon.js +17 -1
- package/lib/commonjs/icons/jotai-icon.native.js +34 -1
- package/lib/commonjs/icons/network-icon.js +19 -1
- package/lib/commonjs/icons/network-icon.native.js +17 -1
- package/lib/commonjs/icons/query-icon.js +17 -1
- package/lib/commonjs/icons/query-icon.native.js +34 -1
- package/lib/commonjs/icons/raster-icon.js +51 -1
- package/lib/commonjs/icons/redux-icon.js +17 -1
- package/lib/commonjs/icons/redux-icon.native.js +35 -1
- package/lib/commonjs/icons/renders-icon.js +30 -1
- package/lib/commonjs/icons/renders-icon.native.js +30 -1
- package/lib/commonjs/icons/riverpod-icon.js +19 -1
- package/lib/commonjs/icons/riverpod-icon.native.js +17 -1
- package/lib/commonjs/icons/routes-icon.js +35 -1
- package/lib/commonjs/icons/routes-icon.native.js +33 -1
- package/lib/commonjs/icons/routes-parts.js +47 -1
- package/lib/commonjs/icons/scenarios-icon.js +17 -1
- package/lib/commonjs/icons/scenarios-icon.native.js +32 -1
- package/lib/commonjs/icons/sentry-icon.js +17 -1
- package/lib/commonjs/icons/sentry-icon.native.js +36 -1
- package/lib/commonjs/icons/settings-icon.js +13 -1
- package/lib/commonjs/icons/settings-icon.native.js +11 -1
- package/lib/commonjs/icons/storage-icon.js +19 -1
- package/lib/commonjs/icons/storage-icon.native.js +17 -1
- package/lib/commonjs/icons/time-machine-icon.js +17 -1
- package/lib/commonjs/icons/time-machine-icon.native.js +32 -1
- package/lib/commonjs/icons/wifi-icon.js +19 -1
- package/lib/commonjs/icons/wifi-icon.native.js +17 -1
- package/lib/commonjs/icons/zustand-icon.js +17 -1
- package/lib/commonjs/icons/zustand-icon.native.js +34 -1
- package/lib/commonjs/index.js +1099 -1
- package/lib/commonjs/settings.js +601 -1
- package/lib/commonjs/utils.js +72 -1
- package/lib/module/FloatingToolsStore.js +507 -1
- package/lib/module/colors.js +49 -1
- package/lib/module/constants.js +27 -1
- package/lib/module/devToolsState.js +318 -1
- package/lib/module/dial.js +624 -1
- package/lib/module/dialUsage.js +122 -1
- package/lib/module/easing.js +62 -1
- package/lib/module/floating.js +9 -1
- package/lib/module/fonts.js +28 -1
- package/lib/module/fonts.web.js +4 -1
- package/lib/module/icons/ask-buoy-icon.js +6 -1
- package/lib/module/icons/ask-buoy-icon.native.js +23 -1
- package/lib/module/icons/assets-icon.js +8 -1
- package/lib/module/icons/assets-icon.native.js +7 -1
- package/lib/module/icons/benchmark-icon.js +8 -1
- package/lib/module/icons/benchmark-icon.native.js +7 -1
- package/lib/module/icons/bif-raster-icon.js +46 -1
- package/lib/module/icons/bif-raster-icon.native.js +44 -1
- package/lib/module/icons/camera-icon.js +8 -1
- package/lib/module/icons/camera-icon.native.js +7 -1
- package/lib/module/icons/console-icon.js +6 -1
- package/lib/module/icons/console-icon.native.js +23 -1
- package/lib/module/icons/env-icon.js +8 -1
- package/lib/module/icons/env-icon.native.js +7 -1
- package/lib/module/icons/events-icon.js +8 -1
- package/lib/module/icons/events-icon.native.js +7 -1
- package/lib/module/icons/generated/assets-raster.g.js +4 -1
- package/lib/module/icons/generated/benchmark-raster.g.js +4 -1
- package/lib/module/icons/generated/camera-raster.g.js +4 -1
- package/lib/module/icons/generated/env-raster.g.js +4 -1
- package/lib/module/icons/generated/events-raster.g.js +4 -1
- package/lib/module/icons/generated/glyph-icons.g.js +296 -1
- package/lib/module/icons/generated/highlight-raster.g.js +4 -1
- package/lib/module/icons/generated/highlighter-raster.g.js +4 -1
- package/lib/module/icons/generated/icon-data.g.js +33850 -1
- package/lib/module/icons/generated/image-overlay-raster.g.js +4 -1
- package/lib/module/icons/generated/images-raster.g.js +4 -1
- package/lib/module/icons/generated/network-raster.g.js +4 -1
- package/lib/module/icons/generated/raster-icons.g.js +15 -1
- package/lib/module/icons/generated/riverpod-raster.g.js +4 -1
- package/lib/module/icons/generated/routes-raster.g.js +4 -1
- package/lib/module/icons/generated/settings-raster.g.js +4 -1
- package/lib/module/icons/generated/storage-raster.g.js +4 -1
- package/lib/module/icons/generated/wifi-raster.g.js +4 -1
- package/lib/module/icons/highlight-icon.js +8 -1
- package/lib/module/icons/highlight-icon.native.js +7 -1
- package/lib/module/icons/highlighter-icon.js +10 -1
- package/lib/module/icons/highlighter-icon.native.js +9 -1
- package/lib/module/icons/icon-factories.js +163 -1
- package/lib/module/icons/icon-primitives.js +673 -1
- package/lib/module/icons/icon-primitives.native.js +899 -1
- package/lib/module/icons/icon-renderer.js +302 -1
- package/lib/module/icons/iconGlow.js +28 -1
- package/lib/module/icons/image-overlay-icon.js +8 -1
- package/lib/module/icons/image-overlay-icon.native.js +7 -1
- package/lib/module/icons/images-icon.js +8 -1
- package/lib/module/icons/images-icon.native.js +7 -1
- package/lib/module/icons/impersonate-icon.js +6 -1
- package/lib/module/icons/impersonate-icon.native.js +23 -1
- package/lib/module/icons/jotai-icon.js +6 -1
- package/lib/module/icons/jotai-icon.native.js +25 -1
- package/lib/module/icons/network-icon.js +8 -1
- package/lib/module/icons/network-icon.native.js +7 -1
- package/lib/module/icons/query-icon.js +6 -1
- package/lib/module/icons/query-icon.native.js +25 -1
- package/lib/module/icons/raster-icon.js +48 -1
- package/lib/module/icons/redux-icon.js +6 -1
- package/lib/module/icons/redux-icon.native.js +26 -1
- package/lib/module/icons/renders-icon.js +3 -1
- package/lib/module/icons/renders-icon.native.js +3 -1
- package/lib/module/icons/riverpod-icon.js +8 -1
- package/lib/module/icons/riverpod-icon.native.js +7 -1
- package/lib/module/icons/routes-icon.js +9 -1
- package/lib/module/icons/routes-icon.native.js +8 -1
- package/lib/module/icons/routes-parts.js +40 -1
- package/lib/module/icons/scenarios-icon.js +6 -1
- package/lib/module/icons/scenarios-icon.native.js +23 -1
- package/lib/module/icons/sentry-icon.js +6 -1
- package/lib/module/icons/sentry-icon.native.js +27 -1
- package/lib/module/icons/settings-icon.js +7 -1
- package/lib/module/icons/settings-icon.native.js +6 -1
- package/lib/module/icons/storage-icon.js +8 -1
- package/lib/module/icons/storage-icon.native.js +7 -1
- package/lib/module/icons/time-machine-icon.js +6 -1
- package/lib/module/icons/time-machine-icon.native.js +23 -1
- package/lib/module/icons/wifi-icon.js +8 -1
- package/lib/module/icons/wifi-icon.native.js +7 -1
- package/lib/module/icons/zustand-icon.js +6 -1
- package/lib/module/icons/zustand-icon.native.js +25 -1
- package/lib/module/index.js +128 -1
- package/lib/module/settings.js +589 -1
- package/lib/module/utils.js +66 -1
- package/lib/typescript/commonjs/FloatingToolsStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/devToolsState.d.ts.map +1 -0
- package/lib/typescript/commonjs/dial.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialUsage.d.ts.map +1 -0
- package/lib/typescript/commonjs/easing.d.ts.map +1 -0
- package/lib/typescript/commonjs/floating.d.ts.map +1 -0
- package/lib/typescript/commonjs/fonts.d.ts.map +1 -0
- package/lib/typescript/commonjs/fonts.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/ask-buoy-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/ask-buoy-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/assets-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/assets-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/benchmark-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/benchmark-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/bif-raster-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/bif-raster-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/camera-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/camera-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/console-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/console-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/env-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/env-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/events-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/events-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/assets-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/benchmark-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/camera-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/env-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/events-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/glyph-icons.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/highlight-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/highlighter-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/icon-data.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/image-overlay-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/images-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/network-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/raster-icons.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/riverpod-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/routes-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/settings-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/storage-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/generated/wifi-raster.g.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/highlight-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/highlight-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/highlighter-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/highlighter-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-factories.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-primitives.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-primitives.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-renderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/iconGlow.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/image-overlay-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/image-overlay-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/images-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/images-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/impersonate-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/impersonate-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/jotai-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/jotai-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/network-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/network-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/query-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/query-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/raster-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/redux-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/redux-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/renders-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/renders-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/riverpod-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/riverpod-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/routes-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/routes-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/routes-parts.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/scenarios-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/scenarios-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/sentry-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/sentry-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/settings-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/settings-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/storage-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/storage-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/time-machine-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/time-machine-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/wifi-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/wifi-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/zustand-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/zustand-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/settings.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils.d.ts.map +1 -0
- package/lib/typescript/module/FloatingToolsStore.d.ts.map +1 -0
- package/lib/typescript/module/colors.d.ts.map +1 -0
- package/lib/typescript/module/constants.d.ts.map +1 -0
- package/lib/typescript/module/devToolsState.d.ts.map +1 -0
- package/lib/typescript/module/dial.d.ts.map +1 -0
- package/lib/typescript/module/dialUsage.d.ts.map +1 -0
- package/lib/typescript/module/easing.d.ts.map +1 -0
- package/lib/typescript/module/floating.d.ts.map +1 -0
- package/lib/typescript/module/fonts.d.ts.map +1 -0
- package/lib/typescript/module/fonts.web.d.ts.map +1 -0
- package/lib/typescript/module/icons/ask-buoy-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/ask-buoy-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/assets-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/assets-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/benchmark-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/benchmark-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/bif-raster-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/bif-raster-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/camera-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/camera-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/console-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/console-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/env-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/env-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/events-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/events-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/assets-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/benchmark-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/camera-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/env-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/events-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/glyph-icons.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/highlight-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/highlighter-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/icon-data.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/image-overlay-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/images-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/network-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/raster-icons.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/riverpod-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/routes-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/settings-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/storage-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/generated/wifi-raster.g.d.ts.map +1 -0
- package/lib/typescript/module/icons/highlight-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/highlight-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/highlighter-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/highlighter-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-factories.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-primitives.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-primitives.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-renderer.d.ts.map +1 -0
- package/lib/typescript/module/icons/iconGlow.d.ts.map +1 -0
- package/lib/typescript/module/icons/image-overlay-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/image-overlay-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/images-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/images-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/impersonate-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/impersonate-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/jotai-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/jotai-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/network-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/network-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/query-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/query-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/raster-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/redux-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/redux-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/renders-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/renders-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/riverpod-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/riverpod-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/routes-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/routes-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/routes-parts.d.ts.map +1 -0
- package/lib/typescript/module/icons/scenarios-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/scenarios-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/sentry-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/sentry-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/settings-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/settings-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/storage-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/storage-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/time-machine-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/time-machine-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/wifi-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/wifi-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/zustand-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/zustand-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/settings.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/lib/typescript/module/utils.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1,899 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Icon Primitives - MOBILE (React Native)
|
|
5
|
+
*
|
|
6
|
+
* This file is auto-picked by Metro (React Native bundler).
|
|
7
|
+
* Web bundlers pick icon-primitives.tsx instead.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { memo } from 'react';
|
|
11
|
+
import { Text, View } from 'react-native';
|
|
12
|
+
import { ICON_GLOW } from "./iconGlow.js";
|
|
13
|
+
|
|
14
|
+
// ===========================================
|
|
15
|
+
// Types
|
|
16
|
+
// ===========================================
|
|
17
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
// ===========================================
|
|
19
|
+
// Mobile Primitives (React Native Views)
|
|
20
|
+
// ===========================================
|
|
21
|
+
|
|
22
|
+
export const IconContainer = ({
|
|
23
|
+
size,
|
|
24
|
+
children,
|
|
25
|
+
style
|
|
26
|
+
}) => {
|
|
27
|
+
const box = {
|
|
28
|
+
position: 'relative',
|
|
29
|
+
width: size,
|
|
30
|
+
height: size
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/_jsx(View, {
|
|
33
|
+
style: [box, style],
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
const IconCircleImpl = ({
|
|
38
|
+
cx,
|
|
39
|
+
cy,
|
|
40
|
+
r,
|
|
41
|
+
fill,
|
|
42
|
+
borderColor,
|
|
43
|
+
borderWidth = 0,
|
|
44
|
+
opacity = 1,
|
|
45
|
+
scaleX = 1,
|
|
46
|
+
scaleY = 1,
|
|
47
|
+
glowColor,
|
|
48
|
+
glowRadius = 0
|
|
49
|
+
}) => {
|
|
50
|
+
const diameter = r * 2;
|
|
51
|
+
|
|
52
|
+
// Build transforms array
|
|
53
|
+
const transforms = [];
|
|
54
|
+
if (scaleX !== 1) transforms.push({
|
|
55
|
+
scaleX
|
|
56
|
+
});
|
|
57
|
+
if (scaleY !== 1) transforms.push({
|
|
58
|
+
scaleY
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Check if this is a "transparent" element (border-only ring)
|
|
62
|
+
// RN shadows require backgroundColor, so we need a separate glow layer
|
|
63
|
+
const needsSeparateGlow = glowColor && glowRadius > 0 && (!fill || fill === 'transparent');
|
|
64
|
+
const hasFillForShadow = fill && fill !== 'transparent';
|
|
65
|
+
const style = {
|
|
66
|
+
position: 'absolute',
|
|
67
|
+
left: cx - r,
|
|
68
|
+
top: cy - r,
|
|
69
|
+
width: diameter,
|
|
70
|
+
height: diameter,
|
|
71
|
+
borderRadius: r,
|
|
72
|
+
backgroundColor: fill,
|
|
73
|
+
borderColor,
|
|
74
|
+
borderWidth,
|
|
75
|
+
opacity,
|
|
76
|
+
transform: transforms.length > 0 ? transforms : undefined,
|
|
77
|
+
// Only apply shadow if we have a fill (RN shadows need backgroundColor)
|
|
78
|
+
...(glowColor && glowRadius > 0 && hasFillForShadow && {
|
|
79
|
+
shadowColor: glowColor,
|
|
80
|
+
shadowOffset: {
|
|
81
|
+
width: 0,
|
|
82
|
+
height: 0
|
|
83
|
+
},
|
|
84
|
+
shadowOpacity: ICON_GLOW.filledShadowOpacity,
|
|
85
|
+
shadowRadius: glowRadius * ICON_GLOW.filledRadiusScale
|
|
86
|
+
})
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// For border-only elements (rings), create glow using a filled circle with shadow
|
|
90
|
+
// The trick: use backgroundColor:'#000' (matches icon bg) so shadow renders,
|
|
91
|
+
// with glowColor on the border for the visible glow effect
|
|
92
|
+
if (needsSeparateGlow) {
|
|
93
|
+
const strokeW = borderWidth || 1;
|
|
94
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
95
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
96
|
+
style: {
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
left: cx - r,
|
|
99
|
+
top: cy - r,
|
|
100
|
+
width: r * 2,
|
|
101
|
+
height: r * 2,
|
|
102
|
+
borderRadius: r,
|
|
103
|
+
backgroundColor: '#000',
|
|
104
|
+
// Matches icon bg - enables shadow
|
|
105
|
+
borderWidth: strokeW,
|
|
106
|
+
borderColor: glowColor,
|
|
107
|
+
opacity: ICON_GLOW.ringLayerOpacity,
|
|
108
|
+
transform: transforms.length > 0 ? transforms : undefined,
|
|
109
|
+
shadowColor: glowColor,
|
|
110
|
+
shadowOffset: {
|
|
111
|
+
width: 0,
|
|
112
|
+
height: 0
|
|
113
|
+
},
|
|
114
|
+
shadowOpacity: ICON_GLOW.ringShadowOpacity,
|
|
115
|
+
shadowRadius: ICON_GLOW.ringShadowRadius
|
|
116
|
+
}
|
|
117
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
118
|
+
style: style
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
return /*#__PURE__*/_jsx(View, {
|
|
123
|
+
style: style
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
const IconRectImpl = ({
|
|
127
|
+
x,
|
|
128
|
+
y,
|
|
129
|
+
width,
|
|
130
|
+
height,
|
|
131
|
+
fill,
|
|
132
|
+
borderColor,
|
|
133
|
+
borderWidth = 0,
|
|
134
|
+
borderRadius = 0,
|
|
135
|
+
opacity = 1,
|
|
136
|
+
glowColor,
|
|
137
|
+
glowRadius = 0,
|
|
138
|
+
rotation,
|
|
139
|
+
originX = 0.5,
|
|
140
|
+
// default center
|
|
141
|
+
originY = 0.5 // default center
|
|
142
|
+
}) => {
|
|
143
|
+
// Build transform array
|
|
144
|
+
// React Native rotates around center by default.
|
|
145
|
+
// To rotate around a custom origin, we:
|
|
146
|
+
// 1. Translate so the origin point moves to center
|
|
147
|
+
// 2. Rotate
|
|
148
|
+
// 3. Translate back
|
|
149
|
+
|
|
150
|
+
const transforms = [];
|
|
151
|
+
if (rotation !== undefined) {
|
|
152
|
+
// Calculate offset from center to desired origin
|
|
153
|
+
// originX/originY are 0-1 values (0=left/top, 0.5=center, 1=right/bottom)
|
|
154
|
+
const offsetX = (0.5 - originX) * width;
|
|
155
|
+
const offsetY = (0.5 - originY) * height;
|
|
156
|
+
|
|
157
|
+
// Apply transforms: translate to origin, rotate, translate back
|
|
158
|
+
if (offsetX !== 0 || offsetY !== 0) {
|
|
159
|
+
transforms.push({
|
|
160
|
+
translateX: -offsetX
|
|
161
|
+
});
|
|
162
|
+
transforms.push({
|
|
163
|
+
translateY: -offsetY
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
transforms.push({
|
|
167
|
+
rotate: `${rotation}deg`
|
|
168
|
+
});
|
|
169
|
+
if (offsetX !== 0 || offsetY !== 0) {
|
|
170
|
+
transforms.push({
|
|
171
|
+
translateX: offsetX
|
|
172
|
+
});
|
|
173
|
+
transforms.push({
|
|
174
|
+
translateY: offsetY
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Check if this is a "transparent" element (border-only)
|
|
180
|
+
// RN shadows require backgroundColor, so we need a separate glow layer
|
|
181
|
+
const hasGlow = glowColor && glowRadius > 0;
|
|
182
|
+
const needsSeparateGlow = hasGlow && (!fill || fill === 'transparent');
|
|
183
|
+
const hasFillForShadow = fill && fill !== 'transparent';
|
|
184
|
+
const style = {
|
|
185
|
+
position: 'absolute',
|
|
186
|
+
left: x,
|
|
187
|
+
top: y,
|
|
188
|
+
width,
|
|
189
|
+
height,
|
|
190
|
+
borderRadius,
|
|
191
|
+
backgroundColor: fill,
|
|
192
|
+
borderColor,
|
|
193
|
+
borderWidth,
|
|
194
|
+
opacity,
|
|
195
|
+
transform: transforms.length > 0 ? transforms : undefined,
|
|
196
|
+
// Only apply shadow if we have a fill (RN shadows need backgroundColor)
|
|
197
|
+
...(hasGlow && hasFillForShadow && {
|
|
198
|
+
shadowColor: glowColor,
|
|
199
|
+
shadowOffset: {
|
|
200
|
+
width: 0,
|
|
201
|
+
height: 0
|
|
202
|
+
},
|
|
203
|
+
shadowOpacity: ICON_GLOW.filledShadowOpacity,
|
|
204
|
+
shadowRadius: glowRadius * ICON_GLOW.filledRadiusScale
|
|
205
|
+
})
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
// For border-only elements, render a glow rect with shadow
|
|
209
|
+
if (needsSeparateGlow) {
|
|
210
|
+
const strokeW = borderWidth || 1;
|
|
211
|
+
const glowExpand = strokeW;
|
|
212
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
213
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
214
|
+
style: {
|
|
215
|
+
position: 'absolute',
|
|
216
|
+
left: x - glowExpand,
|
|
217
|
+
top: y - glowExpand,
|
|
218
|
+
width: width + glowExpand * 2,
|
|
219
|
+
height: height + glowExpand * 2,
|
|
220
|
+
borderRadius: borderRadius + glowExpand,
|
|
221
|
+
borderWidth: strokeW * ICON_GLOW.rectBorderScale,
|
|
222
|
+
borderColor: glowColor,
|
|
223
|
+
opacity: ICON_GLOW.rectLayerOpacity,
|
|
224
|
+
transform: transforms.length > 0 ? transforms : undefined,
|
|
225
|
+
shadowColor: glowColor,
|
|
226
|
+
shadowOffset: {
|
|
227
|
+
width: 0,
|
|
228
|
+
height: 0
|
|
229
|
+
},
|
|
230
|
+
shadowOpacity: ICON_GLOW.rectShadowOpacity,
|
|
231
|
+
shadowRadius: strokeW * ICON_GLOW.rectShadowRadiusScale
|
|
232
|
+
}
|
|
233
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
234
|
+
style: style
|
|
235
|
+
})]
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
return /*#__PURE__*/_jsx(View, {
|
|
239
|
+
style: style
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Curve flattening budget, in dp. A curved line is drawn as a polyline of
|
|
245
|
+
* straight capsule segments (the same primitive the straight-line path below
|
|
246
|
+
* uses); the segment count is derived from the standard Bezier flattening
|
|
247
|
+
* bound so the polyline never strays further than this from the true curve,
|
|
248
|
+
* however the curve was authored. 0.08dp is a quarter of a physical pixel on a
|
|
249
|
+
* 3x screen — well below anything the eye can resolve.
|
|
250
|
+
*/
|
|
251
|
+
const CURVE_FLATTEN_TOLERANCE = 0.08;
|
|
252
|
+
/**
|
|
253
|
+
* The analytic bound is derived for a slightly different error metric than the
|
|
254
|
+
* one that matters here (distance from the curve to the *nearest* segment), so
|
|
255
|
+
* the segment count is padded. 1.5 was the smallest factor that satisfied every
|
|
256
|
+
* curve in shared/icons when checked against an exact numeric search.
|
|
257
|
+
*/
|
|
258
|
+
const CURVE_FLATTEN_SAFETY = 1.5;
|
|
259
|
+
/** Hard ceiling, so a pathologically authored curve can never explode the tree. */
|
|
260
|
+
const CURVE_MAX_SEGMENTS = 48;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* How many straight segments a Bezier needs to stay within `tolerance` of the
|
|
264
|
+
* true curve, via the second-difference flattening bound.
|
|
265
|
+
*/
|
|
266
|
+
function bezierSegmentCount(p0x, p0y, c1x, c1y, c2x, c2y, p1x, p1y, isCubic, tolerance) {
|
|
267
|
+
let secondDiff;
|
|
268
|
+
if (isCubic) {
|
|
269
|
+
const ax = p0x - 2 * c1x + c2x;
|
|
270
|
+
const ay = p0y - 2 * c1y + c2y;
|
|
271
|
+
const bx = c1x - 2 * c2x + p1x;
|
|
272
|
+
const by = c1y - 2 * c2y + p1y;
|
|
273
|
+
secondDiff = 3 * Math.max(Math.hypot(ax, ay), Math.hypot(bx, by));
|
|
274
|
+
} else {
|
|
275
|
+
secondDiff = Math.hypot(p0x - 2 * c1x + p1x, p0y - 2 * c1y + p1y);
|
|
276
|
+
}
|
|
277
|
+
if (!(secondDiff > 0)) return 2;
|
|
278
|
+
const n = Math.ceil(CURVE_FLATTEN_SAFETY * Math.sqrt(secondDiff / (8 * tolerance)));
|
|
279
|
+
return Math.max(2, Math.min(CURVE_MAX_SEGMENTS, n));
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Calculates a point on a quadratic Bezier curve (1 control point)
|
|
284
|
+
* B(t) = (1-t)²P0 + 2(1-t)tP1 + t²P2
|
|
285
|
+
*/
|
|
286
|
+
function getQuadraticBezierPoint(t, p0x, p0y, p1x, p1y, p2x, p2y) {
|
|
287
|
+
const mt = 1 - t;
|
|
288
|
+
return {
|
|
289
|
+
x: mt * mt * p0x + 2 * mt * t * p1x + t * t * p2x,
|
|
290
|
+
y: mt * mt * p0y + 2 * mt * t * p1y + t * t * p2y
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Calculates a point on a cubic Bezier curve (2 control points)
|
|
296
|
+
* B(t) = (1-t)³P0 + 3(1-t)²tP1 + 3(1-t)t²P2 + t³P3
|
|
297
|
+
*/
|
|
298
|
+
function getCubicBezierPoint(t, p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
|
|
299
|
+
const mt = 1 - t;
|
|
300
|
+
const mt2 = mt * mt;
|
|
301
|
+
const mt3 = mt2 * mt;
|
|
302
|
+
const t2 = t * t;
|
|
303
|
+
const t3 = t2 * t;
|
|
304
|
+
return {
|
|
305
|
+
x: mt3 * p0x + 3 * mt2 * t * p1x + 3 * mt * t2 * p2x + t3 * p3x,
|
|
306
|
+
y: mt3 * p0y + 3 * mt2 * t * p1y + 3 * mt * t2 * p2y + t3 * p3y
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
const IconTextImpl = ({
|
|
310
|
+
x,
|
|
311
|
+
y,
|
|
312
|
+
text,
|
|
313
|
+
fontSize,
|
|
314
|
+
fontWeight = 700,
|
|
315
|
+
align = 'center',
|
|
316
|
+
fill,
|
|
317
|
+
opacity = 1,
|
|
318
|
+
rotation,
|
|
319
|
+
letterSpacing = 0
|
|
320
|
+
}) => {
|
|
321
|
+
// RN has no translate(-50%), so anchor via an estimated-width container with
|
|
322
|
+
// matching textAlign. The estimate only pads the container; alignment inside
|
|
323
|
+
// it is exact for left/right and near-exact for center.
|
|
324
|
+
const estWidth = text.length * fontSize * 0.75 + Math.max(0, text.length - 1) * letterSpacing + fontSize;
|
|
325
|
+
const height = fontSize * 1.5;
|
|
326
|
+
const left = align === 'left' ? x : align === 'right' ? x - estWidth : x - estWidth / 2;
|
|
327
|
+
const containerStyle = {
|
|
328
|
+
position: 'absolute',
|
|
329
|
+
left,
|
|
330
|
+
top: y - height / 2,
|
|
331
|
+
width: estWidth,
|
|
332
|
+
height,
|
|
333
|
+
justifyContent: 'center',
|
|
334
|
+
transform: rotation !== undefined ? [{
|
|
335
|
+
rotate: `${rotation}deg`
|
|
336
|
+
}] : undefined
|
|
337
|
+
};
|
|
338
|
+
const textStyle = {
|
|
339
|
+
color: fill,
|
|
340
|
+
fontSize,
|
|
341
|
+
fontWeight: String(fontWeight),
|
|
342
|
+
textAlign: align,
|
|
343
|
+
letterSpacing,
|
|
344
|
+
opacity,
|
|
345
|
+
includeFontPadding: false
|
|
346
|
+
};
|
|
347
|
+
return /*#__PURE__*/_jsx(View, {
|
|
348
|
+
style: containerStyle,
|
|
349
|
+
pointerEvents: "none",
|
|
350
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
351
|
+
style: textStyle,
|
|
352
|
+
numberOfLines: 1,
|
|
353
|
+
allowFontScaling: false,
|
|
354
|
+
children: text
|
|
355
|
+
})
|
|
356
|
+
});
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* IconLine - draws a line between two points
|
|
361
|
+
* Auto-calculates length and rotation from coordinates!
|
|
362
|
+
* Supports curved lines via cubic Bezier (2 control points) or quadratic (1 control point).
|
|
363
|
+
*/
|
|
364
|
+
const IconLineImpl = ({
|
|
365
|
+
x1,
|
|
366
|
+
y1,
|
|
367
|
+
x2,
|
|
368
|
+
y2,
|
|
369
|
+
stroke,
|
|
370
|
+
strokeWidth = 1,
|
|
371
|
+
opacity = 1,
|
|
372
|
+
glowColor,
|
|
373
|
+
glowRadius = 0,
|
|
374
|
+
rotation = 0,
|
|
375
|
+
curveX,
|
|
376
|
+
curveY,
|
|
377
|
+
curve2X,
|
|
378
|
+
curve2Y
|
|
379
|
+
}) => {
|
|
380
|
+
// Check if this is a curved line (either control point set)
|
|
381
|
+
const hasCurve1 = curveX !== undefined && curveX !== 0 || curveY !== undefined && curveY !== 0;
|
|
382
|
+
const hasCurve2 = curve2X !== undefined && curve2X !== 0 || curve2Y !== undefined && curve2Y !== 0;
|
|
383
|
+
const isCurved = hasCurve1 || hasCurve2;
|
|
384
|
+
if (isCurved) {
|
|
385
|
+
const midX = (x1 + x2) / 2;
|
|
386
|
+
const midY = (y1 + y2) / 2;
|
|
387
|
+
|
|
388
|
+
// Control points: offset from line midpoint
|
|
389
|
+
const control1X = midX + (curveX ?? 0);
|
|
390
|
+
const control1Y = midY + (curveY ?? 0);
|
|
391
|
+
const control2X = midX + (curve2X ?? 0);
|
|
392
|
+
const control2Y = midY + (curve2Y ?? 0);
|
|
393
|
+
|
|
394
|
+
// Determine if cubic (2 distinct control points) or quadratic (1 control point)
|
|
395
|
+
const isCubic = hasCurve1 && hasCurve2;
|
|
396
|
+
const soleControlX = hasCurve1 ? control1X : control2X;
|
|
397
|
+
const soleControlY = hasCurve1 ? control1Y : control2Y;
|
|
398
|
+
const pointAt = t => isCubic ? getCubicBezierPoint(t, x1, y1, control1X, control1Y, control2X, control2Y, x2, y2) : getQuadraticBezierPoint(t, x1, y1, soleControlX, soleControlY, x2, y2);
|
|
399
|
+
const segments = bezierSegmentCount(x1, y1, isCubic ? control1X : soleControlX, isCubic ? control1Y : soleControlY, control2X, control2Y, x2, y2, isCubic, CURVE_FLATTEN_TOLERANCE);
|
|
400
|
+
const elements = [];
|
|
401
|
+
let prev = {
|
|
402
|
+
x: x1,
|
|
403
|
+
y: y1
|
|
404
|
+
};
|
|
405
|
+
for (let i = 1; i <= segments; i++) {
|
|
406
|
+
const pt = pointAt(i / segments);
|
|
407
|
+
const segDx = pt.x - prev.x;
|
|
408
|
+
const segDy = pt.y - prev.y;
|
|
409
|
+
const segLength = Math.sqrt(segDx * segDx + segDy * segDy);
|
|
410
|
+
const segAngle = Math.atan2(segDy, segDx) * (180 / Math.PI);
|
|
411
|
+
const segCenterX = (prev.x + pt.x) / 2;
|
|
412
|
+
const segCenterY = (prev.y + pt.y) / 2;
|
|
413
|
+
|
|
414
|
+
// A capsule per segment. Interior joints OVERLAP by half a stroke on each side (a
|
|
415
|
+
// capsule exactly segLength long shrinks to a blob when the segment is shorter than
|
|
416
|
+
// the stroke, and neighbouring round ends leave notches on the outside of a turn —
|
|
417
|
+
// the route-path icon rendered as dashes). The chain's two ends stay exactly at the
|
|
418
|
+
// authored endpoints so a curve is the same length as a straight line.
|
|
419
|
+
const extS = i > 1 ? strokeWidth / 2 : 0;
|
|
420
|
+
const extE = i < segments ? strokeWidth / 2 : 0;
|
|
421
|
+
const ux = segLength > 0 ? segDx / segLength : 0;
|
|
422
|
+
const uy = segLength > 0 ? segDy / segLength : 0;
|
|
423
|
+
const capLength = segLength + extS + extE;
|
|
424
|
+
const capCenterX = segCenterX + ux * (extE - extS) / 2;
|
|
425
|
+
const capCenterY = segCenterY + uy * (extE - extS) / 2;
|
|
426
|
+
elements.push(/*#__PURE__*/_jsx(View, {
|
|
427
|
+
style: {
|
|
428
|
+
position: 'absolute',
|
|
429
|
+
left: capCenterX - capLength / 2,
|
|
430
|
+
top: capCenterY - strokeWidth / 2,
|
|
431
|
+
width: capLength,
|
|
432
|
+
height: strokeWidth,
|
|
433
|
+
borderRadius: strokeWidth / 2,
|
|
434
|
+
backgroundColor: stroke,
|
|
435
|
+
opacity,
|
|
436
|
+
transform: [{
|
|
437
|
+
rotate: `${segAngle}deg`
|
|
438
|
+
}]
|
|
439
|
+
}
|
|
440
|
+
}, `s${i}`));
|
|
441
|
+
prev = pt;
|
|
442
|
+
}
|
|
443
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
444
|
+
children: elements
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// Straight line (original logic)
|
|
449
|
+
const dx = x2 - x1;
|
|
450
|
+
const dy = y2 - y1;
|
|
451
|
+
const length = Math.sqrt(dx * dx + dy * dy);
|
|
452
|
+
const angle = Math.atan2(dy, dx) * (180 / Math.PI);
|
|
453
|
+
|
|
454
|
+
// Position at midpoint of line
|
|
455
|
+
const centerX = (x1 + x2) / 2;
|
|
456
|
+
const centerY = (y1 + y2) / 2;
|
|
457
|
+
|
|
458
|
+
// Total rotation = line angle + additional rotation
|
|
459
|
+
const totalRotation = angle + rotation;
|
|
460
|
+
const hasGlow = glowColor && glowRadius > 0;
|
|
461
|
+
const style = {
|
|
462
|
+
position: 'absolute',
|
|
463
|
+
left: centerX - length / 2,
|
|
464
|
+
top: centerY - strokeWidth / 2,
|
|
465
|
+
width: length,
|
|
466
|
+
height: strokeWidth,
|
|
467
|
+
backgroundColor: stroke,
|
|
468
|
+
opacity,
|
|
469
|
+
transform: [{
|
|
470
|
+
rotate: `${totalRotation}deg`
|
|
471
|
+
}],
|
|
472
|
+
borderRadius: strokeWidth / 2
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
// For neon glow effect, render a glow line with shadow
|
|
476
|
+
if (hasGlow) {
|
|
477
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
478
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
479
|
+
style: {
|
|
480
|
+
position: 'absolute',
|
|
481
|
+
left: centerX - length / 2,
|
|
482
|
+
top: centerY - strokeWidth / 2,
|
|
483
|
+
width: length,
|
|
484
|
+
height: strokeWidth,
|
|
485
|
+
backgroundColor: glowColor,
|
|
486
|
+
opacity: ICON_GLOW.lineLayerOpacity,
|
|
487
|
+
transform: [{
|
|
488
|
+
rotate: `${totalRotation}deg`
|
|
489
|
+
}],
|
|
490
|
+
borderRadius: strokeWidth / 2,
|
|
491
|
+
// Shadow creates the glow
|
|
492
|
+
shadowColor: glowColor,
|
|
493
|
+
shadowOffset: {
|
|
494
|
+
width: 0,
|
|
495
|
+
height: 0
|
|
496
|
+
},
|
|
497
|
+
shadowOpacity: ICON_GLOW.lineShadowOpacity,
|
|
498
|
+
shadowRadius: ICON_GLOW.lineShadowRadius
|
|
499
|
+
}
|
|
500
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
501
|
+
style: style
|
|
502
|
+
})]
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
return /*#__PURE__*/_jsx(View, {
|
|
506
|
+
style: style
|
|
507
|
+
});
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* IconTriangle - creates triangles using CSS border trick
|
|
512
|
+
* Works in pure React Native!
|
|
513
|
+
*/
|
|
514
|
+
const IconTriangleImpl = ({
|
|
515
|
+
x,
|
|
516
|
+
y,
|
|
517
|
+
size,
|
|
518
|
+
direction,
|
|
519
|
+
fill,
|
|
520
|
+
opacity = 1,
|
|
521
|
+
rotation
|
|
522
|
+
}) => {
|
|
523
|
+
// CSS border trick: use transparent borders to create triangle
|
|
524
|
+
// The size is the height of the triangle
|
|
525
|
+
const halfWidth = size * 0.577; // size / sqrt(3) for equilateral-ish triangle
|
|
526
|
+
|
|
527
|
+
// Build border styles based on direction
|
|
528
|
+
let borderStyles = {};
|
|
529
|
+
let offsetX = 0;
|
|
530
|
+
let offsetY = 0;
|
|
531
|
+
switch (direction) {
|
|
532
|
+
case 'down':
|
|
533
|
+
borderStyles = {
|
|
534
|
+
borderLeftWidth: halfWidth,
|
|
535
|
+
borderRightWidth: halfWidth,
|
|
536
|
+
borderTopWidth: size,
|
|
537
|
+
borderLeftColor: 'transparent',
|
|
538
|
+
borderRightColor: 'transparent',
|
|
539
|
+
borderTopColor: fill
|
|
540
|
+
};
|
|
541
|
+
offsetX = -halfWidth;
|
|
542
|
+
offsetY = 0;
|
|
543
|
+
break;
|
|
544
|
+
case 'up':
|
|
545
|
+
borderStyles = {
|
|
546
|
+
borderLeftWidth: halfWidth,
|
|
547
|
+
borderRightWidth: halfWidth,
|
|
548
|
+
borderBottomWidth: size,
|
|
549
|
+
borderLeftColor: 'transparent',
|
|
550
|
+
borderRightColor: 'transparent',
|
|
551
|
+
borderBottomColor: fill
|
|
552
|
+
};
|
|
553
|
+
offsetX = -halfWidth;
|
|
554
|
+
offsetY = -size;
|
|
555
|
+
break;
|
|
556
|
+
case 'left':
|
|
557
|
+
borderStyles = {
|
|
558
|
+
borderTopWidth: halfWidth,
|
|
559
|
+
borderBottomWidth: halfWidth,
|
|
560
|
+
borderRightWidth: size,
|
|
561
|
+
borderTopColor: 'transparent',
|
|
562
|
+
borderBottomColor: 'transparent',
|
|
563
|
+
borderRightColor: fill
|
|
564
|
+
};
|
|
565
|
+
offsetX = -size;
|
|
566
|
+
offsetY = -halfWidth;
|
|
567
|
+
break;
|
|
568
|
+
case 'right':
|
|
569
|
+
borderStyles = {
|
|
570
|
+
borderTopWidth: halfWidth,
|
|
571
|
+
borderBottomWidth: halfWidth,
|
|
572
|
+
borderLeftWidth: size,
|
|
573
|
+
borderTopColor: 'transparent',
|
|
574
|
+
borderBottomColor: 'transparent',
|
|
575
|
+
borderLeftColor: fill
|
|
576
|
+
};
|
|
577
|
+
offsetX = 0;
|
|
578
|
+
offsetY = -halfWidth;
|
|
579
|
+
break;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
// Build transforms
|
|
583
|
+
const transforms = [];
|
|
584
|
+
if (rotation !== undefined) {
|
|
585
|
+
transforms.push({
|
|
586
|
+
rotate: `${rotation}deg`
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
const style = {
|
|
590
|
+
position: 'absolute',
|
|
591
|
+
left: x + offsetX,
|
|
592
|
+
top: y + offsetY,
|
|
593
|
+
width: 0,
|
|
594
|
+
height: 0,
|
|
595
|
+
opacity,
|
|
596
|
+
...borderStyles,
|
|
597
|
+
transform: transforms.length > 0 ? transforms : undefined
|
|
598
|
+
};
|
|
599
|
+
return /*#__PURE__*/_jsx(View, {
|
|
600
|
+
style: style
|
|
601
|
+
});
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* IconArc - draws an arc using multiple line segments
|
|
606
|
+
* Creates smooth curves in pure React Native!
|
|
607
|
+
*/
|
|
608
|
+
const IconArcImpl = ({
|
|
609
|
+
cx,
|
|
610
|
+
cy,
|
|
611
|
+
r,
|
|
612
|
+
startAngle,
|
|
613
|
+
endAngle,
|
|
614
|
+
stroke,
|
|
615
|
+
strokeWidth = 1.5,
|
|
616
|
+
opacity = 1,
|
|
617
|
+
segments
|
|
618
|
+
}) => {
|
|
619
|
+
// Calculate number of segments based on arc length
|
|
620
|
+
const arcLength = Math.abs(endAngle - startAngle);
|
|
621
|
+
const autoSegments = Math.max(8, Math.ceil(arcLength / 10)); // ~10 degrees per segment
|
|
622
|
+
const numSegments = segments ?? autoSegments;
|
|
623
|
+
|
|
624
|
+
// Generate line segments
|
|
625
|
+
const lines = [];
|
|
626
|
+
const angleStep = (endAngle - startAngle) / numSegments;
|
|
627
|
+
for (let i = 0; i < numSegments; i++) {
|
|
628
|
+
const angle1 = startAngle + i * angleStep;
|
|
629
|
+
const angle2 = startAngle + (i + 1) * angleStep;
|
|
630
|
+
|
|
631
|
+
// Convert to radians
|
|
632
|
+
const rad1 = angle1 * Math.PI / 180;
|
|
633
|
+
const rad2 = angle2 * Math.PI / 180;
|
|
634
|
+
|
|
635
|
+
// Calculate segment endpoints
|
|
636
|
+
const x1 = cx + r * Math.cos(rad1);
|
|
637
|
+
const y1 = cy + r * Math.sin(rad1);
|
|
638
|
+
const x2 = cx + r * Math.cos(rad2);
|
|
639
|
+
const y2 = cy + r * Math.sin(rad2);
|
|
640
|
+
|
|
641
|
+
// Calculate segment geometry. Interior joints overlap by half a stroke (same reason
|
|
642
|
+
// as the curved-line chain above); the arc's two ends stay at the authored angles.
|
|
643
|
+
const dx = x2 - x1;
|
|
644
|
+
const dy = y2 - y1;
|
|
645
|
+
const segLen = Math.sqrt(dx * dx + dy * dy);
|
|
646
|
+
const angle = Math.atan2(dy, dx) * (180 / Math.PI);
|
|
647
|
+
const extS = i > 0 ? strokeWidth / 2 : 0;
|
|
648
|
+
const extE = i < numSegments - 1 ? strokeWidth / 2 : 0;
|
|
649
|
+
const ux = segLen > 0 ? dx / segLen : 0;
|
|
650
|
+
const uy = segLen > 0 ? dy / segLen : 0;
|
|
651
|
+
const length = segLen + extS + extE;
|
|
652
|
+
const midX = (x1 + x2) / 2 + ux * (extE - extS) / 2;
|
|
653
|
+
const midY = (y1 + y2) / 2 + uy * (extE - extS) / 2;
|
|
654
|
+
const style = {
|
|
655
|
+
position: 'absolute',
|
|
656
|
+
left: midX - length / 2,
|
|
657
|
+
top: midY - strokeWidth / 2,
|
|
658
|
+
width: length,
|
|
659
|
+
height: strokeWidth,
|
|
660
|
+
backgroundColor: stroke,
|
|
661
|
+
opacity,
|
|
662
|
+
transform: [{
|
|
663
|
+
rotate: `${angle}deg`
|
|
664
|
+
}],
|
|
665
|
+
borderRadius: strokeWidth / 2
|
|
666
|
+
};
|
|
667
|
+
lines.push(/*#__PURE__*/_jsx(View, {
|
|
668
|
+
style: style
|
|
669
|
+
}, i));
|
|
670
|
+
}
|
|
671
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
672
|
+
children: lines
|
|
673
|
+
});
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* IconSemicircle - creates a half circle (filled)
|
|
678
|
+
* Perfect for pokeball-style split designs!
|
|
679
|
+
*/
|
|
680
|
+
const IconSemicircleImpl = ({
|
|
681
|
+
cx,
|
|
682
|
+
cy,
|
|
683
|
+
r,
|
|
684
|
+
half,
|
|
685
|
+
fill,
|
|
686
|
+
borderColor,
|
|
687
|
+
borderWidth = 0,
|
|
688
|
+
opacity = 1,
|
|
689
|
+
glowColor,
|
|
690
|
+
glowRadius = 0
|
|
691
|
+
}) => {
|
|
692
|
+
const diameter = r * 2;
|
|
693
|
+
|
|
694
|
+
// Calculate position and border radii based on which half
|
|
695
|
+
let left;
|
|
696
|
+
let top;
|
|
697
|
+
let width;
|
|
698
|
+
let height;
|
|
699
|
+
let borderTopLeftRadius = 0;
|
|
700
|
+
let borderTopRightRadius = 0;
|
|
701
|
+
let borderBottomLeftRadius = 0;
|
|
702
|
+
let borderBottomRightRadius = 0;
|
|
703
|
+
switch (half) {
|
|
704
|
+
case 'top':
|
|
705
|
+
left = cx - r;
|
|
706
|
+
top = cy - r;
|
|
707
|
+
width = diameter;
|
|
708
|
+
height = r;
|
|
709
|
+
borderTopLeftRadius = r;
|
|
710
|
+
borderTopRightRadius = r;
|
|
711
|
+
break;
|
|
712
|
+
case 'bottom':
|
|
713
|
+
left = cx - r;
|
|
714
|
+
top = cy;
|
|
715
|
+
width = diameter;
|
|
716
|
+
height = r;
|
|
717
|
+
borderBottomLeftRadius = r;
|
|
718
|
+
borderBottomRightRadius = r;
|
|
719
|
+
break;
|
|
720
|
+
case 'left':
|
|
721
|
+
left = cx - r;
|
|
722
|
+
top = cy - r;
|
|
723
|
+
width = r;
|
|
724
|
+
height = diameter;
|
|
725
|
+
borderTopLeftRadius = r;
|
|
726
|
+
borderBottomLeftRadius = r;
|
|
727
|
+
break;
|
|
728
|
+
case 'right':
|
|
729
|
+
left = cx;
|
|
730
|
+
top = cy - r;
|
|
731
|
+
width = r;
|
|
732
|
+
height = diameter;
|
|
733
|
+
borderTopRightRadius = r;
|
|
734
|
+
borderBottomRightRadius = r;
|
|
735
|
+
break;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
// Check if this is a "transparent" element (border-only)
|
|
739
|
+
// RN shadows require backgroundColor, so we need a separate glow layer
|
|
740
|
+
const hasGlow = glowColor && glowRadius > 0;
|
|
741
|
+
const needsSeparateGlow = hasGlow && (!fill || fill === 'transparent');
|
|
742
|
+
const hasFillForShadow = fill && fill !== 'transparent';
|
|
743
|
+
const style = {
|
|
744
|
+
position: 'absolute',
|
|
745
|
+
left,
|
|
746
|
+
top,
|
|
747
|
+
width,
|
|
748
|
+
height,
|
|
749
|
+
borderTopLeftRadius,
|
|
750
|
+
borderTopRightRadius,
|
|
751
|
+
borderBottomLeftRadius,
|
|
752
|
+
borderBottomRightRadius,
|
|
753
|
+
backgroundColor: fill,
|
|
754
|
+
borderColor,
|
|
755
|
+
borderWidth,
|
|
756
|
+
opacity,
|
|
757
|
+
// Only apply shadow if we have a fill (RN shadows need backgroundColor)
|
|
758
|
+
...(hasGlow && hasFillForShadow && {
|
|
759
|
+
shadowColor: glowColor,
|
|
760
|
+
shadowOffset: {
|
|
761
|
+
width: 0,
|
|
762
|
+
height: 0
|
|
763
|
+
},
|
|
764
|
+
shadowOpacity: ICON_GLOW.filledShadowOpacity,
|
|
765
|
+
shadowRadius: glowRadius * ICON_GLOW.filledRadiusScale
|
|
766
|
+
})
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
// For border-only elements, render a glow semicircle with shadow
|
|
770
|
+
if (needsSeparateGlow) {
|
|
771
|
+
const strokeW = borderWidth || 1;
|
|
772
|
+
const glowExpand = strokeW;
|
|
773
|
+
const glowR = r + glowExpand;
|
|
774
|
+
const glowWidth = half === 'left' || half === 'right' ? glowR : glowR * 2;
|
|
775
|
+
const glowHeight = half === 'top' || half === 'bottom' ? glowR : glowR * 2;
|
|
776
|
+
const glowLeft = cx - (half === 'right' ? 0 : glowR);
|
|
777
|
+
const glowTop = cy - (half === 'bottom' ? 0 : glowR);
|
|
778
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
779
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
780
|
+
style: {
|
|
781
|
+
position: 'absolute',
|
|
782
|
+
left: glowLeft,
|
|
783
|
+
top: glowTop,
|
|
784
|
+
width: glowWidth,
|
|
785
|
+
height: glowHeight,
|
|
786
|
+
borderTopLeftRadius: half === 'top' || half === 'left' ? glowR : 0,
|
|
787
|
+
borderTopRightRadius: half === 'top' || half === 'right' ? glowR : 0,
|
|
788
|
+
borderBottomLeftRadius: half === 'bottom' || half === 'left' ? glowR : 0,
|
|
789
|
+
borderBottomRightRadius: half === 'bottom' || half === 'right' ? glowR : 0,
|
|
790
|
+
borderWidth: strokeW * ICON_GLOW.rectBorderScale,
|
|
791
|
+
borderColor: glowColor,
|
|
792
|
+
opacity: ICON_GLOW.rectLayerOpacity,
|
|
793
|
+
shadowColor: glowColor,
|
|
794
|
+
shadowOffset: {
|
|
795
|
+
width: 0,
|
|
796
|
+
height: 0
|
|
797
|
+
},
|
|
798
|
+
shadowOpacity: ICON_GLOW.rectShadowOpacity,
|
|
799
|
+
shadowRadius: strokeW * ICON_GLOW.rectShadowRadiusScale
|
|
800
|
+
}
|
|
801
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
802
|
+
style: style
|
|
803
|
+
})]
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
return /*#__PURE__*/_jsx(View, {
|
|
807
|
+
style: style
|
|
808
|
+
});
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* IconSmoothArc - creates a smooth arc using the border trick
|
|
813
|
+
* Uses bordered circles with partial borders hidden - gives perfect anti-aliased curves!
|
|
814
|
+
* This is how the WiFi icon achieves smooth lines without dots.
|
|
815
|
+
*/
|
|
816
|
+
const IconSmoothArcImpl = ({
|
|
817
|
+
cx,
|
|
818
|
+
cy,
|
|
819
|
+
r,
|
|
820
|
+
stroke,
|
|
821
|
+
strokeWidth = 2,
|
|
822
|
+
opacity = 1,
|
|
823
|
+
portion = 'bottom'
|
|
824
|
+
}) => {
|
|
825
|
+
const diameter = r * 2;
|
|
826
|
+
|
|
827
|
+
// Build border colors based on which portion to show
|
|
828
|
+
let borderTopColor = stroke;
|
|
829
|
+
let borderBottomColor = stroke;
|
|
830
|
+
let borderLeftColor = stroke;
|
|
831
|
+
let borderRightColor = stroke;
|
|
832
|
+
switch (portion) {
|
|
833
|
+
case 'bottom':
|
|
834
|
+
// Show bottom arc (hide top, left, right)
|
|
835
|
+
borderTopColor = 'transparent';
|
|
836
|
+
borderLeftColor = 'transparent';
|
|
837
|
+
borderRightColor = 'transparent';
|
|
838
|
+
break;
|
|
839
|
+
case 'top':
|
|
840
|
+
// Show top arc (hide bottom, left, right)
|
|
841
|
+
borderBottomColor = 'transparent';
|
|
842
|
+
borderLeftColor = 'transparent';
|
|
843
|
+
borderRightColor = 'transparent';
|
|
844
|
+
break;
|
|
845
|
+
case 'left':
|
|
846
|
+
// Show left arc (hide top, bottom, right)
|
|
847
|
+
borderTopColor = 'transparent';
|
|
848
|
+
borderBottomColor = 'transparent';
|
|
849
|
+
borderRightColor = 'transparent';
|
|
850
|
+
break;
|
|
851
|
+
case 'right':
|
|
852
|
+
// Show right arc (hide top, bottom, left)
|
|
853
|
+
borderTopColor = 'transparent';
|
|
854
|
+
borderBottomColor = 'transparent';
|
|
855
|
+
borderLeftColor = 'transparent';
|
|
856
|
+
break;
|
|
857
|
+
}
|
|
858
|
+
const style = {
|
|
859
|
+
position: 'absolute',
|
|
860
|
+
left: cx - r,
|
|
861
|
+
top: cy - r,
|
|
862
|
+
width: diameter,
|
|
863
|
+
height: diameter,
|
|
864
|
+
borderRadius: r,
|
|
865
|
+
borderWidth: strokeWidth,
|
|
866
|
+
borderTopColor,
|
|
867
|
+
borderBottomColor,
|
|
868
|
+
borderLeftColor,
|
|
869
|
+
borderRightColor,
|
|
870
|
+
opacity
|
|
871
|
+
};
|
|
872
|
+
return /*#__PURE__*/_jsx(View, {
|
|
873
|
+
style: style
|
|
874
|
+
});
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
// ===========================================
|
|
878
|
+
// Memoized leaf exports
|
|
879
|
+
// ===========================================
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* These primitives are LEAF nodes with measured render cost, so they are the
|
|
883
|
+
* one place rule2 sanctions React.memo. Every prop is a scalar, so a shallow
|
|
884
|
+
* compare is exact — an icon whose geometry did not change cannot re-render.
|
|
885
|
+
*
|
|
886
|
+
* Evidence (iOS sim, reopening the Time Machine tool, measure_renders):
|
|
887
|
+
* IconLine alone burned 58.3ms across 103 renders, 100% attributed to
|
|
888
|
+
* `parent` — a pure cascade from IconContainer with identical props. A curved
|
|
889
|
+
* IconLine expands to 100+ absolutely-positioned Views, so each of those
|
|
890
|
+
* cascaded renders rebuilt hundreds of style objects for an unchanged glyph.
|
|
891
|
+
*/
|
|
892
|
+
export const IconCircle = /*#__PURE__*/memo(IconCircleImpl);
|
|
893
|
+
export const IconRect = /*#__PURE__*/memo(IconRectImpl);
|
|
894
|
+
export const IconText = /*#__PURE__*/memo(IconTextImpl);
|
|
895
|
+
export const IconLine = /*#__PURE__*/memo(IconLineImpl);
|
|
896
|
+
export const IconTriangle = /*#__PURE__*/memo(IconTriangleImpl);
|
|
897
|
+
export const IconArc = /*#__PURE__*/memo(IconArcImpl);
|
|
898
|
+
export const IconSemicircle = /*#__PURE__*/memo(IconSemicircleImpl);
|
|
899
|
+
export const IconSmoothArc = /*#__PURE__*/memo(IconSmoothArcImpl);
|