@buoy-gg/floating-tools-core 7.0.35 → 7.0.38
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 +36 -0
- package/floating.d.ts +1 -0
- package/floating.js +1 -0
- package/lib/commonjs/FloatingToolsStore.js +1 -501
- package/lib/commonjs/colors.js +1 -54
- package/lib/commonjs/constants.js +1 -31
- package/lib/commonjs/devToolsState.js +1 -325
- package/lib/commonjs/dial.js +1 -633
- package/lib/commonjs/dialUsage.js +1 -130
- package/lib/commonjs/easing.js +1 -69
- package/lib/commonjs/floating.js +1 -0
- package/lib/commonjs/fonts.js +1 -31
- package/lib/commonjs/fonts.web.js +1 -0
- package/lib/commonjs/icons/ICONS.md +7 -0
- package/lib/commonjs/icons/ask-buoy-icon.js +1 -27
- package/lib/commonjs/icons/ask-buoy-icon.native.js +1 -0
- package/lib/commonjs/icons/assets/askBuoy.png +0 -0
- package/lib/commonjs/icons/assets/askBuoy@2x.png +0 -0
- package/lib/commonjs/icons/assets/askBuoy@3x.png +0 -0
- package/lib/commonjs/icons/assets/assets.png +0 -0
- package/lib/commonjs/icons/assets/assets@2x.png +0 -0
- package/lib/commonjs/icons/assets/assets@3x.png +0 -0
- package/lib/commonjs/icons/assets/benchmark.png +0 -0
- package/lib/commonjs/icons/assets/benchmark@2x.png +0 -0
- package/lib/commonjs/icons/assets/benchmark@3x.png +0 -0
- package/lib/commonjs/icons/assets/camera.png +0 -0
- package/lib/commonjs/icons/assets/camera@2x.png +0 -0
- package/lib/commonjs/icons/assets/camera@3x.png +0 -0
- package/lib/commonjs/icons/assets/console.png +0 -0
- package/lib/commonjs/icons/assets/console@2x.png +0 -0
- package/lib/commonjs/icons/assets/console@3x.png +0 -0
- package/lib/commonjs/icons/assets/env.png +0 -0
- package/lib/commonjs/icons/assets/env@2x.png +0 -0
- package/lib/commonjs/icons/assets/env@3x.png +0 -0
- package/lib/commonjs/icons/assets/events.png +0 -0
- package/lib/commonjs/icons/assets/events@2x.png +0 -0
- package/lib/commonjs/icons/assets/events@3x.png +0 -0
- package/lib/commonjs/icons/assets/highlight.png +0 -0
- package/lib/commonjs/icons/assets/highlight@2x.png +0 -0
- package/lib/commonjs/icons/assets/highlight@3x.png +0 -0
- package/lib/commonjs/icons/assets/highlighter.png +0 -0
- package/lib/commonjs/icons/assets/highlighter@2x.png +0 -0
- package/lib/commonjs/icons/assets/highlighter@3x.png +0 -0
- package/lib/commonjs/icons/assets/image-overlay.png +0 -0
- package/lib/commonjs/icons/assets/image-overlay@2x.png +0 -0
- package/lib/commonjs/icons/assets/image-overlay@3x.png +0 -0
- package/lib/commonjs/icons/assets/images.png +0 -0
- package/lib/commonjs/icons/assets/images@2x.png +0 -0
- package/lib/commonjs/icons/assets/images@3x.png +0 -0
- package/lib/commonjs/icons/assets/impersonate.png +0 -0
- package/lib/commonjs/icons/assets/impersonate@2x.png +0 -0
- package/lib/commonjs/icons/assets/impersonate@3x.png +0 -0
- package/lib/commonjs/icons/assets/jotai.png +0 -0
- package/lib/commonjs/icons/assets/jotai@2x.png +0 -0
- package/lib/commonjs/icons/assets/jotai@3x.png +0 -0
- package/lib/commonjs/icons/assets/network.png +0 -0
- package/lib/commonjs/icons/assets/network@2x.png +0 -0
- package/lib/commonjs/icons/assets/network@3x.png +0 -0
- package/lib/commonjs/icons/assets/query.png +0 -0
- package/lib/commonjs/icons/assets/query@2x.png +0 -0
- package/lib/commonjs/icons/assets/query@3x.png +0 -0
- package/lib/commonjs/icons/assets/redux.png +0 -0
- package/lib/commonjs/icons/assets/redux@2x.png +0 -0
- package/lib/commonjs/icons/assets/redux@3x.png +0 -0
- package/lib/commonjs/icons/assets/riverpod.png +0 -0
- package/lib/commonjs/icons/assets/riverpod@2x.png +0 -0
- package/lib/commonjs/icons/assets/riverpod@3x.png +0 -0
- package/lib/commonjs/icons/assets/routes.png +0 -0
- package/lib/commonjs/icons/assets/routes@2x.png +0 -0
- package/lib/commonjs/icons/assets/routes@3x.png +0 -0
- package/lib/commonjs/icons/assets/scenarios.png +0 -0
- package/lib/commonjs/icons/assets/scenarios@2x.png +0 -0
- package/lib/commonjs/icons/assets/scenarios@3x.png +0 -0
- package/lib/commonjs/icons/assets/sentry.png +0 -0
- package/lib/commonjs/icons/assets/sentry@2x.png +0 -0
- package/lib/commonjs/icons/assets/sentry@3x.png +0 -0
- package/lib/commonjs/icons/assets/settings.png +0 -0
- package/lib/commonjs/icons/assets/settings@2x.png +0 -0
- package/lib/commonjs/icons/assets/settings@3x.png +0 -0
- package/lib/commonjs/icons/assets/storage.png +0 -0
- package/lib/commonjs/icons/assets/storage@2x.png +0 -0
- package/lib/commonjs/icons/assets/storage@3x.png +0 -0
- package/lib/commonjs/icons/assets/time-machine.png +0 -0
- package/lib/commonjs/icons/assets/time-machine@2x.png +0 -0
- package/lib/commonjs/icons/assets/time-machine@3x.png +0 -0
- package/lib/commonjs/icons/assets/wifi.png +0 -0
- package/lib/commonjs/icons/assets/wifi@2x.png +0 -0
- package/lib/commonjs/icons/assets/wifi@3x.png +0 -0
- package/lib/commonjs/icons/assets/zustand.png +0 -0
- package/lib/commonjs/icons/assets/zustand@2x.png +0 -0
- package/lib/commonjs/icons/assets/zustand@3x.png +0 -0
- package/lib/commonjs/icons/assets-icon.js +1 -26
- package/lib/commonjs/icons/assets-icon.native.js +1 -0
- package/lib/commonjs/icons/benchmark-icon.js +1 -24
- package/lib/commonjs/icons/benchmark-icon.native.js +1 -0
- package/lib/commonjs/icons/bif-raster-icon.js +1 -0
- package/lib/commonjs/icons/bif-raster-icon.native.js +1 -0
- package/lib/commonjs/icons/camera-icon.js +1 -27
- package/lib/commonjs/icons/camera-icon.native.js +1 -0
- package/lib/commonjs/icons/console-icon.js +1 -26
- package/lib/commonjs/icons/console-icon.native.js +1 -0
- package/lib/commonjs/icons/env-icon.js +1 -24
- package/lib/commonjs/icons/env-icon.native.js +1 -0
- package/lib/commonjs/icons/events-icon.js +1 -24
- package/lib/commonjs/icons/events-icon.native.js +1 -0
- package/lib/commonjs/icons/generated/assets-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/benchmark-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/camera-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/env-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/events-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/glyph-icons.g.js +1 -299
- package/lib/commonjs/icons/generated/highlight-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/highlighter-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/icon-data.g.js +1 -7170
- package/lib/commonjs/icons/generated/image-overlay-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/images-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/network-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/raster-icons.g.js +1 -0
- package/lib/commonjs/icons/generated/riverpod-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/routes-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/settings-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/storage-raster.g.js +1 -0
- package/lib/commonjs/icons/generated/wifi-raster.g.js +1 -0
- package/lib/commonjs/icons/highlight-icon.js +1 -24
- package/lib/commonjs/icons/highlight-icon.native.js +1 -0
- package/lib/commonjs/icons/highlighter-icon.js +1 -0
- package/lib/commonjs/icons/highlighter-icon.native.js +1 -0
- package/lib/commonjs/icons/icon-factories.js +1 -173
- package/lib/commonjs/icons/icon-primitives.js +1 -676
- package/lib/commonjs/icons/icon-primitives.native.js +1 -904
- package/lib/commonjs/icons/icon-renderer.js +1 -307
- package/lib/commonjs/icons/iconGlow.js +1 -32
- package/lib/commonjs/icons/image-overlay-icon.js +1 -26
- package/lib/commonjs/icons/image-overlay-icon.native.js +1 -0
- package/lib/commonjs/icons/images-icon.js +1 -26
- package/lib/commonjs/icons/images-icon.native.js +1 -0
- package/lib/commonjs/icons/impersonate-icon.js +1 -26
- package/lib/commonjs/icons/impersonate-icon.native.js +1 -0
- package/lib/commonjs/icons/jotai-icon.js +1 -26
- package/lib/commonjs/icons/jotai-icon.native.js +1 -0
- package/lib/commonjs/icons/network-icon.js +1 -24
- package/lib/commonjs/icons/network-icon.native.js +1 -0
- package/lib/commonjs/icons/query-icon.js +1 -24
- package/lib/commonjs/icons/query-icon.native.js +1 -0
- package/lib/commonjs/icons/raster-icon.js +1 -0
- package/lib/commonjs/icons/redux-icon.js +1 -24
- package/lib/commonjs/icons/redux-icon.native.js +1 -0
- package/lib/commonjs/icons/renders-icon.js +1 -33
- package/lib/commonjs/icons/renders-icon.native.js +1 -0
- package/lib/commonjs/icons/riverpod-icon.js +1 -26
- package/lib/commonjs/icons/riverpod-icon.native.js +1 -0
- package/lib/commonjs/icons/routes-icon.js +1 -49
- package/lib/commonjs/icons/routes-icon.native.js +1 -0
- package/lib/commonjs/icons/routes-parts.js +1 -0
- package/lib/commonjs/icons/scenarios-icon.js +1 -26
- package/lib/commonjs/icons/scenarios-icon.native.js +1 -0
- package/lib/commonjs/icons/sentry-icon.js +1 -24
- package/lib/commonjs/icons/sentry-icon.native.js +1 -0
- package/lib/commonjs/icons/settings-icon.js +1 -0
- package/lib/commonjs/icons/settings-icon.native.js +1 -0
- package/lib/commonjs/icons/storage-icon.js +1 -24
- package/lib/commonjs/icons/storage-icon.native.js +1 -0
- package/lib/commonjs/icons/time-machine-icon.js +1 -26
- package/lib/commonjs/icons/time-machine-icon.native.js +1 -0
- package/lib/commonjs/icons/wifi-icon.js +1 -24
- package/lib/commonjs/icons/wifi-icon.native.js +1 -0
- package/lib/commonjs/icons/zustand-icon.js +1 -26
- package/lib/commonjs/icons/zustand-icon.native.js +1 -0
- package/lib/commonjs/index.js +1 -1091
- package/lib/commonjs/settings.js +1 -601
- package/lib/commonjs/utils.js +1 -72
- package/lib/module/FloatingToolsStore.js +1 -496
- package/lib/module/colors.js +1 -49
- package/lib/module/constants.js +1 -27
- package/lib/module/devToolsState.js +1 -318
- package/lib/module/dial.js +1 -618
- package/lib/module/dialUsage.js +1 -122
- package/lib/module/easing.js +1 -62
- package/lib/module/floating.js +1 -0
- package/lib/module/fonts.js +1 -28
- package/lib/module/fonts.web.js +1 -0
- package/lib/module/icons/ICONS.md +7 -0
- package/lib/module/icons/ask-buoy-icon.js +1 -18
- package/lib/module/icons/ask-buoy-icon.native.js +1 -0
- package/lib/module/icons/assets/askBuoy.png +0 -0
- package/lib/module/icons/assets/askBuoy@2x.png +0 -0
- package/lib/module/icons/assets/askBuoy@3x.png +0 -0
- package/lib/module/icons/assets/assets.png +0 -0
- package/lib/module/icons/assets/assets@2x.png +0 -0
- package/lib/module/icons/assets/assets@3x.png +0 -0
- package/lib/module/icons/assets/benchmark.png +0 -0
- package/lib/module/icons/assets/benchmark@2x.png +0 -0
- package/lib/module/icons/assets/benchmark@3x.png +0 -0
- package/lib/module/icons/assets/camera.png +0 -0
- package/lib/module/icons/assets/camera@2x.png +0 -0
- package/lib/module/icons/assets/camera@3x.png +0 -0
- package/lib/module/icons/assets/console.png +0 -0
- package/lib/module/icons/assets/console@2x.png +0 -0
- package/lib/module/icons/assets/console@3x.png +0 -0
- package/lib/module/icons/assets/env.png +0 -0
- package/lib/module/icons/assets/env@2x.png +0 -0
- package/lib/module/icons/assets/env@3x.png +0 -0
- package/lib/module/icons/assets/events.png +0 -0
- package/lib/module/icons/assets/events@2x.png +0 -0
- package/lib/module/icons/assets/events@3x.png +0 -0
- package/lib/module/icons/assets/highlight.png +0 -0
- package/lib/module/icons/assets/highlight@2x.png +0 -0
- package/lib/module/icons/assets/highlight@3x.png +0 -0
- package/lib/module/icons/assets/highlighter.png +0 -0
- package/lib/module/icons/assets/highlighter@2x.png +0 -0
- package/lib/module/icons/assets/highlighter@3x.png +0 -0
- package/lib/module/icons/assets/image-overlay.png +0 -0
- package/lib/module/icons/assets/image-overlay@2x.png +0 -0
- package/lib/module/icons/assets/image-overlay@3x.png +0 -0
- package/lib/module/icons/assets/images.png +0 -0
- package/lib/module/icons/assets/images@2x.png +0 -0
- package/lib/module/icons/assets/images@3x.png +0 -0
- package/lib/module/icons/assets/impersonate.png +0 -0
- package/lib/module/icons/assets/impersonate@2x.png +0 -0
- package/lib/module/icons/assets/impersonate@3x.png +0 -0
- package/lib/module/icons/assets/jotai.png +0 -0
- package/lib/module/icons/assets/jotai@2x.png +0 -0
- package/lib/module/icons/assets/jotai@3x.png +0 -0
- package/lib/module/icons/assets/network.png +0 -0
- package/lib/module/icons/assets/network@2x.png +0 -0
- package/lib/module/icons/assets/network@3x.png +0 -0
- package/lib/module/icons/assets/query.png +0 -0
- package/lib/module/icons/assets/query@2x.png +0 -0
- package/lib/module/icons/assets/query@3x.png +0 -0
- package/lib/module/icons/assets/redux.png +0 -0
- package/lib/module/icons/assets/redux@2x.png +0 -0
- package/lib/module/icons/assets/redux@3x.png +0 -0
- package/lib/module/icons/assets/riverpod.png +0 -0
- package/lib/module/icons/assets/riverpod@2x.png +0 -0
- package/lib/module/icons/assets/riverpod@3x.png +0 -0
- package/lib/module/icons/assets/routes.png +0 -0
- package/lib/module/icons/assets/routes@2x.png +0 -0
- package/lib/module/icons/assets/routes@3x.png +0 -0
- package/lib/module/icons/assets/scenarios.png +0 -0
- package/lib/module/icons/assets/scenarios@2x.png +0 -0
- package/lib/module/icons/assets/scenarios@3x.png +0 -0
- package/lib/module/icons/assets/sentry.png +0 -0
- package/lib/module/icons/assets/sentry@2x.png +0 -0
- package/lib/module/icons/assets/sentry@3x.png +0 -0
- package/lib/module/icons/assets/settings.png +0 -0
- package/lib/module/icons/assets/settings@2x.png +0 -0
- package/lib/module/icons/assets/settings@3x.png +0 -0
- package/lib/module/icons/assets/storage.png +0 -0
- package/lib/module/icons/assets/storage@2x.png +0 -0
- package/lib/module/icons/assets/storage@3x.png +0 -0
- package/lib/module/icons/assets/time-machine.png +0 -0
- package/lib/module/icons/assets/time-machine@2x.png +0 -0
- package/lib/module/icons/assets/time-machine@3x.png +0 -0
- package/lib/module/icons/assets/wifi.png +0 -0
- package/lib/module/icons/assets/wifi@2x.png +0 -0
- package/lib/module/icons/assets/wifi@3x.png +0 -0
- package/lib/module/icons/assets/zustand.png +0 -0
- package/lib/module/icons/assets/zustand@2x.png +0 -0
- package/lib/module/icons/assets/zustand@3x.png +0 -0
- package/lib/module/icons/assets-icon.js +1 -17
- package/lib/module/icons/assets-icon.native.js +1 -0
- package/lib/module/icons/benchmark-icon.js +1 -15
- package/lib/module/icons/benchmark-icon.native.js +1 -0
- package/lib/module/icons/bif-raster-icon.js +1 -0
- package/lib/module/icons/bif-raster-icon.native.js +1 -0
- package/lib/module/icons/camera-icon.js +1 -18
- package/lib/module/icons/camera-icon.native.js +1 -0
- package/lib/module/icons/console-icon.js +1 -17
- package/lib/module/icons/console-icon.native.js +1 -0
- package/lib/module/icons/env-icon.js +1 -15
- package/lib/module/icons/env-icon.native.js +1 -0
- package/lib/module/icons/events-icon.js +1 -15
- package/lib/module/icons/events-icon.native.js +1 -0
- package/lib/module/icons/generated/assets-raster.g.js +1 -0
- package/lib/module/icons/generated/benchmark-raster.g.js +1 -0
- package/lib/module/icons/generated/camera-raster.g.js +1 -0
- package/lib/module/icons/generated/env-raster.g.js +1 -0
- package/lib/module/icons/generated/events-raster.g.js +1 -0
- package/lib/module/icons/generated/glyph-icons.g.js +1 -296
- package/lib/module/icons/generated/highlight-raster.g.js +1 -0
- package/lib/module/icons/generated/highlighter-raster.g.js +1 -0
- package/lib/module/icons/generated/icon-data.g.js +1 -7165
- package/lib/module/icons/generated/image-overlay-raster.g.js +1 -0
- package/lib/module/icons/generated/images-raster.g.js +1 -0
- package/lib/module/icons/generated/network-raster.g.js +1 -0
- package/lib/module/icons/generated/raster-icons.g.js +1 -0
- package/lib/module/icons/generated/riverpod-raster.g.js +1 -0
- package/lib/module/icons/generated/routes-raster.g.js +1 -0
- package/lib/module/icons/generated/settings-raster.g.js +1 -0
- package/lib/module/icons/generated/storage-raster.g.js +1 -0
- package/lib/module/icons/generated/wifi-raster.g.js +1 -0
- package/lib/module/icons/highlight-icon.js +1 -15
- package/lib/module/icons/highlight-icon.native.js +1 -0
- package/lib/module/icons/highlighter-icon.js +1 -0
- package/lib/module/icons/highlighter-icon.native.js +1 -0
- package/lib/module/icons/icon-factories.js +1 -163
- package/lib/module/icons/icon-primitives.js +1 -673
- package/lib/module/icons/icon-primitives.native.js +1 -899
- package/lib/module/icons/icon-renderer.js +1 -302
- package/lib/module/icons/iconGlow.js +1 -28
- package/lib/module/icons/image-overlay-icon.js +1 -17
- package/lib/module/icons/image-overlay-icon.native.js +1 -0
- package/lib/module/icons/images-icon.js +1 -17
- package/lib/module/icons/images-icon.native.js +1 -0
- package/lib/module/icons/impersonate-icon.js +1 -17
- package/lib/module/icons/impersonate-icon.native.js +1 -0
- package/lib/module/icons/jotai-icon.js +1 -17
- package/lib/module/icons/jotai-icon.native.js +1 -0
- package/lib/module/icons/network-icon.js +1 -15
- package/lib/module/icons/network-icon.native.js +1 -0
- package/lib/module/icons/query-icon.js +1 -15
- package/lib/module/icons/query-icon.native.js +1 -0
- package/lib/module/icons/raster-icon.js +1 -0
- package/lib/module/icons/redux-icon.js +1 -15
- package/lib/module/icons/redux-icon.native.js +1 -0
- package/lib/module/icons/renders-icon.js +1 -17
- package/lib/module/icons/renders-icon.native.js +1 -0
- package/lib/module/icons/riverpod-icon.js +1 -17
- package/lib/module/icons/riverpod-icon.native.js +1 -0
- package/lib/module/icons/routes-icon.js +1 -41
- package/lib/module/icons/routes-icon.native.js +1 -0
- package/lib/module/icons/routes-parts.js +1 -0
- package/lib/module/icons/scenarios-icon.js +1 -17
- package/lib/module/icons/scenarios-icon.native.js +1 -0
- package/lib/module/icons/sentry-icon.js +1 -15
- package/lib/module/icons/sentry-icon.native.js +1 -0
- package/lib/module/icons/settings-icon.js +1 -0
- package/lib/module/icons/settings-icon.native.js +1 -0
- package/lib/module/icons/storage-icon.js +1 -15
- package/lib/module/icons/storage-icon.native.js +1 -0
- package/lib/module/icons/time-machine-icon.js +1 -17
- package/lib/module/icons/time-machine-icon.native.js +1 -0
- package/lib/module/icons/wifi-icon.js +1 -15
- package/lib/module/icons/wifi-icon.native.js +1 -0
- package/lib/module/icons/zustand-icon.js +1 -17
- package/lib/module/icons/zustand-icon.native.js +1 -0
- package/lib/module/index.js +1 -127
- package/lib/module/settings.js +1 -589
- package/lib/module/utils.js +1 -66
- package/lib/typescript/commonjs/FloatingToolsStore.d.ts +2 -0
- package/lib/typescript/commonjs/dial.d.ts +6 -0
- package/lib/typescript/commonjs/floating.d.ts +8 -0
- package/lib/typescript/commonjs/fonts.web.d.ts +3 -0
- package/lib/typescript/commonjs/icons/ask-buoy-icon.d.ts +1 -13
- package/lib/typescript/commonjs/icons/ask-buoy-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/assets-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/assets-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/benchmark-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/benchmark-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/bif-raster-icon.d.ts +4 -0
- package/lib/typescript/commonjs/icons/bif-raster-icon.native.d.ts +5 -0
- package/lib/typescript/commonjs/icons/camera-icon.d.ts +1 -13
- package/lib/typescript/commonjs/icons/camera-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/console-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/console-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/env-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/env-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/events-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/events-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/assets-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/benchmark-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/camera-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/env-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/events-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/highlight-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/highlighter-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/icon-data.g.d.ts +27 -1
- package/lib/typescript/commonjs/icons/generated/image-overlay-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/images-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/network-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/raster-icons.g.d.ts +13 -0
- package/lib/typescript/commonjs/icons/generated/riverpod-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/routes-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/settings-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/storage-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/generated/wifi-raster.g.d.ts +3 -0
- package/lib/typescript/commonjs/icons/highlight-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/highlight-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/highlighter-icon.d.ts +5 -0
- package/lib/typescript/commonjs/icons/highlighter-icon.native.d.ts +5 -0
- package/lib/typescript/commonjs/icons/image-overlay-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/image-overlay-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/images-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/images-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/impersonate-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/impersonate-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/jotai-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/jotai-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/network-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/network-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/query-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/query-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/raster-icon.d.ts +5 -0
- package/lib/typescript/commonjs/icons/redux-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/redux-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/renders-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/renders-icon.native.d.ts +2 -0
- package/lib/typescript/commonjs/icons/riverpod-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/riverpod-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/routes-icon.d.ts +2 -30
- package/lib/typescript/commonjs/icons/routes-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/routes-parts.d.ts +31 -0
- package/lib/typescript/commonjs/icons/scenarios-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/scenarios-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/sentry-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/sentry-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/settings-icon.d.ts +2 -0
- package/lib/typescript/commonjs/icons/settings-icon.native.d.ts +2 -0
- package/lib/typescript/commonjs/icons/storage-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/storage-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/time-machine-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/time-machine-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/icons/wifi-icon.d.ts +1 -10
- package/lib/typescript/commonjs/icons/wifi-icon.native.d.ts +3 -0
- package/lib/typescript/commonjs/icons/zustand-icon.d.ts +1 -12
- package/lib/typescript/commonjs/icons/zustand-icon.native.d.ts +4 -0
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/module/FloatingToolsStore.d.ts +2 -0
- package/lib/typescript/module/dial.d.ts +6 -0
- package/lib/typescript/module/floating.d.ts +8 -0
- package/lib/typescript/module/fonts.web.d.ts +3 -0
- package/lib/typescript/module/icons/ask-buoy-icon.d.ts +1 -13
- package/lib/typescript/module/icons/ask-buoy-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/assets-icon.d.ts +1 -12
- package/lib/typescript/module/icons/assets-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/benchmark-icon.d.ts +1 -10
- package/lib/typescript/module/icons/benchmark-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/bif-raster-icon.d.ts +4 -0
- package/lib/typescript/module/icons/bif-raster-icon.native.d.ts +5 -0
- package/lib/typescript/module/icons/camera-icon.d.ts +1 -13
- package/lib/typescript/module/icons/camera-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/console-icon.d.ts +1 -12
- package/lib/typescript/module/icons/console-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/env-icon.d.ts +1 -10
- package/lib/typescript/module/icons/env-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/events-icon.d.ts +1 -10
- package/lib/typescript/module/icons/events-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/generated/assets-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/benchmark-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/camera-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/env-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/events-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/highlight-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/highlighter-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/icon-data.g.d.ts +27 -1
- package/lib/typescript/module/icons/generated/image-overlay-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/images-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/network-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/raster-icons.g.d.ts +13 -0
- package/lib/typescript/module/icons/generated/riverpod-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/routes-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/settings-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/storage-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/generated/wifi-raster.g.d.ts +3 -0
- package/lib/typescript/module/icons/highlight-icon.d.ts +1 -10
- package/lib/typescript/module/icons/highlight-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/highlighter-icon.d.ts +5 -0
- package/lib/typescript/module/icons/highlighter-icon.native.d.ts +5 -0
- package/lib/typescript/module/icons/image-overlay-icon.d.ts +1 -12
- package/lib/typescript/module/icons/image-overlay-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/images-icon.d.ts +1 -12
- package/lib/typescript/module/icons/images-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/impersonate-icon.d.ts +1 -12
- package/lib/typescript/module/icons/impersonate-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/jotai-icon.d.ts +1 -12
- package/lib/typescript/module/icons/jotai-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/network-icon.d.ts +1 -10
- package/lib/typescript/module/icons/network-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/query-icon.d.ts +1 -10
- package/lib/typescript/module/icons/query-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/raster-icon.d.ts +5 -0
- package/lib/typescript/module/icons/redux-icon.d.ts +1 -10
- package/lib/typescript/module/icons/redux-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/renders-icon.d.ts +1 -12
- package/lib/typescript/module/icons/renders-icon.native.d.ts +2 -0
- package/lib/typescript/module/icons/riverpod-icon.d.ts +1 -12
- package/lib/typescript/module/icons/riverpod-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/routes-icon.d.ts +2 -30
- package/lib/typescript/module/icons/routes-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/routes-parts.d.ts +31 -0
- package/lib/typescript/module/icons/scenarios-icon.d.ts +1 -12
- package/lib/typescript/module/icons/scenarios-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/sentry-icon.d.ts +1 -10
- package/lib/typescript/module/icons/sentry-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/settings-icon.d.ts +2 -0
- package/lib/typescript/module/icons/settings-icon.native.d.ts +2 -0
- package/lib/typescript/module/icons/storage-icon.d.ts +1 -10
- package/lib/typescript/module/icons/storage-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/time-machine-icon.d.ts +1 -12
- package/lib/typescript/module/icons/time-machine-icon.native.d.ts +4 -0
- package/lib/typescript/module/icons/wifi-icon.d.ts +1 -10
- package/lib/typescript/module/icons/wifi-icon.native.d.ts +3 -0
- package/lib/typescript/module/icons/zustand-icon.d.ts +1 -12
- package/lib/typescript/module/icons/zustand-icon.native.d.ts +4 -0
- package/lib/typescript/module/index.d.ts +1 -0
- package/package.json +23 -3
- package/lib/typescript/commonjs/FloatingToolsStore.d.ts.map +0 -1
- package/lib/typescript/commonjs/colors.d.ts.map +0 -1
- package/lib/typescript/commonjs/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/devToolsState.d.ts.map +0 -1
- package/lib/typescript/commonjs/dial.d.ts.map +0 -1
- package/lib/typescript/commonjs/dialUsage.d.ts.map +0 -1
- package/lib/typescript/commonjs/easing.d.ts.map +0 -1
- package/lib/typescript/commonjs/fonts.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/ask-buoy-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/assets-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/benchmark-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/camera-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/console-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/env-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/events-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/generated/glyph-icons.g.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/generated/icon-data.g.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/highlight-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-factories.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-primitives.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-primitives.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-renderer.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/iconGlow.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/image-overlay-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/images-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/impersonate-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/jotai-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/network-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/query-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/redux-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/renders-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/riverpod-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/routes-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/scenarios-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/sentry-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/storage-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/time-machine-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/wifi-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/zustand-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/settings.d.ts.map +0 -1
- package/lib/typescript/commonjs/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils.d.ts.map +0 -1
- package/lib/typescript/module/FloatingToolsStore.d.ts.map +0 -1
- package/lib/typescript/module/colors.d.ts.map +0 -1
- package/lib/typescript/module/constants.d.ts.map +0 -1
- package/lib/typescript/module/devToolsState.d.ts.map +0 -1
- package/lib/typescript/module/dial.d.ts.map +0 -1
- package/lib/typescript/module/dialUsage.d.ts.map +0 -1
- package/lib/typescript/module/easing.d.ts.map +0 -1
- package/lib/typescript/module/fonts.d.ts.map +0 -1
- package/lib/typescript/module/icons/ask-buoy-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/assets-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/benchmark-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/camera-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/console-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/env-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/events-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/generated/glyph-icons.g.d.ts.map +0 -1
- package/lib/typescript/module/icons/generated/icon-data.g.d.ts.map +0 -1
- package/lib/typescript/module/icons/highlight-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-factories.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-primitives.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-primitives.native.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-renderer.d.ts.map +0 -1
- package/lib/typescript/module/icons/iconGlow.d.ts.map +0 -1
- package/lib/typescript/module/icons/image-overlay-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/images-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/impersonate-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/jotai-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/network-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/query-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/redux-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/renders-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/riverpod-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/routes-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/scenarios-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/sentry-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/storage-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/time-machine-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/wifi-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/zustand-icon.d.ts.map +0 -1
- package/lib/typescript/module/index.d.ts.map +0 -1
- package/lib/typescript/module/settings.d.ts.map +0 -1
- package/lib/typescript/module/types.d.ts.map +0 -1
- package/lib/typescript/module/utils.d.ts.map +0 -1
|
@@ -1,676 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.IconTriangle = exports.IconText = exports.IconSmoothArc = exports.IconSemicircle = exports.IconRect = exports.IconLine = exports.IconContainer = exports.IconCircle = exports.IconArc = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
/**
|
|
10
|
-
* Icon Primitives - WEB
|
|
11
|
-
*
|
|
12
|
-
* This file is auto-picked by web bundlers (Vite, webpack).
|
|
13
|
-
* Mobile bundlers (Metro) pick icon-primitives.native.tsx instead.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Round to 2 decimals. Computed geometry must not carry full float precision
|
|
18
|
-
* into inline styles: the browser's CSSOM re-serializes numbers to ~6
|
|
19
|
-
* significant digits (e.g. rotate(117.64597536373869deg) -> "117.646deg"), so
|
|
20
|
-
* on server-rendered pages (buoy.gg docs) every full-precision value becomes a
|
|
21
|
-
* React hydration mismatch. Two decimals round-trip exactly and are far below
|
|
22
|
-
* visual tolerance at icon sizes.
|
|
23
|
-
*/const r2 = n => Math.round(n * 100) / 100;
|
|
24
|
-
|
|
25
|
-
// ===========================================
|
|
26
|
-
// Types
|
|
27
|
-
// ===========================================
|
|
28
|
-
|
|
29
|
-
// ===========================================
|
|
30
|
-
// Web Primitives (CSS/divs)
|
|
31
|
-
// ===========================================
|
|
32
|
-
|
|
33
|
-
const IconContainer = ({
|
|
34
|
-
size,
|
|
35
|
-
children,
|
|
36
|
-
style
|
|
37
|
-
}) => {
|
|
38
|
-
const box = {
|
|
39
|
-
position: 'relative',
|
|
40
|
-
width: r2(size),
|
|
41
|
-
height: r2(size)
|
|
42
|
-
};
|
|
43
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
44
|
-
style: {
|
|
45
|
-
...box,
|
|
46
|
-
...style
|
|
47
|
-
},
|
|
48
|
-
children: children
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Creates a neon glow box-shadow string with multiple layers
|
|
54
|
-
* This mimics SVG Gaussian blur filter effects
|
|
55
|
-
*/
|
|
56
|
-
exports.IconContainer = IconContainer;
|
|
57
|
-
function createNeonGlow(color, radius) {
|
|
58
|
-
// Layer 1: Tight bright core
|
|
59
|
-
// Layer 2: Medium spread
|
|
60
|
-
// Layer 3: Wide soft outer glow
|
|
61
|
-
// Layer 4: Very wide ambient glow
|
|
62
|
-
return [`0 0 ${r2(radius * 0.15)}px ${color}`,
|
|
63
|
-
// Bright core
|
|
64
|
-
`0 0 ${r2(radius * 0.3)}px ${color}`,
|
|
65
|
-
// Inner glow
|
|
66
|
-
`0 0 ${r2(radius * 0.6)}px ${color}cc`,
|
|
67
|
-
// Medium glow (80% opacity)
|
|
68
|
-
`0 0 ${r2(radius)}px ${color}80`,
|
|
69
|
-
// Outer glow (50% opacity)
|
|
70
|
-
`0 0 ${r2(radius * 1.5)}px ${color}40` // Ambient glow (25% opacity)
|
|
71
|
-
].join(', ');
|
|
72
|
-
}
|
|
73
|
-
const IconCircleImpl = ({
|
|
74
|
-
cx,
|
|
75
|
-
cy,
|
|
76
|
-
r,
|
|
77
|
-
fill,
|
|
78
|
-
borderColor,
|
|
79
|
-
borderWidth = 0,
|
|
80
|
-
opacity = 1,
|
|
81
|
-
scaleX = 1,
|
|
82
|
-
scaleY = 1,
|
|
83
|
-
glowColor,
|
|
84
|
-
glowRadius = 0,
|
|
85
|
-
rotation = 0
|
|
86
|
-
}) => {
|
|
87
|
-
const diameter = r * 2;
|
|
88
|
-
const transforms = [];
|
|
89
|
-
if (scaleX !== 1) transforms.push(`scaleX(${r2(scaleX)})`);
|
|
90
|
-
if (scaleY !== 1) transforms.push(`scaleY(${r2(scaleY)})`);
|
|
91
|
-
if (rotation !== 0) transforms.push(`rotate(${r2(rotation)}deg)`);
|
|
92
|
-
const style = {
|
|
93
|
-
position: 'absolute',
|
|
94
|
-
left: r2(cx - r),
|
|
95
|
-
top: r2(cy - r),
|
|
96
|
-
width: r2(diameter),
|
|
97
|
-
height: r2(diameter),
|
|
98
|
-
borderRadius: r2(r),
|
|
99
|
-
backgroundColor: fill,
|
|
100
|
-
border: borderColor ? `${r2(borderWidth)}px solid ${borderColor}` : undefined,
|
|
101
|
-
opacity,
|
|
102
|
-
transform: transforms.length > 0 ? transforms.join(' ') : undefined,
|
|
103
|
-
transformOrigin: '50% 50%',
|
|
104
|
-
boxShadow: glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined,
|
|
105
|
-
boxSizing: 'border-box'
|
|
106
|
-
};
|
|
107
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
108
|
-
style: style
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
const IconRectImpl = ({
|
|
112
|
-
x,
|
|
113
|
-
y,
|
|
114
|
-
width,
|
|
115
|
-
height,
|
|
116
|
-
fill,
|
|
117
|
-
borderColor,
|
|
118
|
-
borderWidth = 0,
|
|
119
|
-
borderRadius = 0,
|
|
120
|
-
opacity = 1,
|
|
121
|
-
glowColor,
|
|
122
|
-
glowRadius = 0,
|
|
123
|
-
rotation,
|
|
124
|
-
originX = 0,
|
|
125
|
-
originY = 0.5
|
|
126
|
-
}) => {
|
|
127
|
-
const style = {
|
|
128
|
-
position: 'absolute',
|
|
129
|
-
left: r2(x),
|
|
130
|
-
top: r2(y),
|
|
131
|
-
width: r2(width),
|
|
132
|
-
height: r2(height),
|
|
133
|
-
borderRadius: r2(borderRadius),
|
|
134
|
-
backgroundColor: fill,
|
|
135
|
-
border: borderColor ? `${r2(borderWidth)}px solid ${borderColor}` : undefined,
|
|
136
|
-
opacity,
|
|
137
|
-
boxShadow: glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined,
|
|
138
|
-
boxSizing: 'border-box',
|
|
139
|
-
transform: rotation !== undefined ? `rotate(${r2(rotation)}deg)` : undefined,
|
|
140
|
-
transformOrigin: rotation !== undefined ? `${r2(originX * 100)}% ${r2(originY * 100)}%` : undefined
|
|
141
|
-
};
|
|
142
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
143
|
-
style: style
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
const IconTextImpl = ({
|
|
147
|
-
x,
|
|
148
|
-
y,
|
|
149
|
-
text,
|
|
150
|
-
fontSize,
|
|
151
|
-
fontWeight = 700,
|
|
152
|
-
align = 'center',
|
|
153
|
-
fill,
|
|
154
|
-
opacity = 1,
|
|
155
|
-
rotation,
|
|
156
|
-
letterSpacing = 0
|
|
157
|
-
}) => {
|
|
158
|
-
const translateX = align === 'left' ? '0%' : align === 'right' ? '-100%' : '-50%';
|
|
159
|
-
const style = {
|
|
160
|
-
position: 'absolute',
|
|
161
|
-
left: r2(x),
|
|
162
|
-
top: r2(y),
|
|
163
|
-
transform: `translate(${translateX}, -50%)${rotation !== undefined ? ` rotate(${r2(rotation)}deg)` : ''}`,
|
|
164
|
-
color: fill,
|
|
165
|
-
fontSize: r2(fontSize),
|
|
166
|
-
fontWeight,
|
|
167
|
-
lineHeight: 1,
|
|
168
|
-
whiteSpace: 'nowrap',
|
|
169
|
-
fontFamily: "'Helvetica Neue', Arial, sans-serif",
|
|
170
|
-
letterSpacing,
|
|
171
|
-
opacity,
|
|
172
|
-
userSelect: 'none'
|
|
173
|
-
};
|
|
174
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
175
|
-
style: style,
|
|
176
|
-
children: text
|
|
177
|
-
});
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Curve flattening budget, in px. A curved line is drawn as a polyline of
|
|
182
|
-
* straight capsule segments (the same primitive the straight-line path below
|
|
183
|
-
* uses); the segment count is derived from the standard Bezier flattening
|
|
184
|
-
* bound so the polyline never strays further than this from the true curve,
|
|
185
|
-
* however the curve was authored.
|
|
186
|
-
*/
|
|
187
|
-
const CURVE_FLATTEN_TOLERANCE = 0.08;
|
|
188
|
-
/**
|
|
189
|
-
* The analytic bound is derived for a slightly different error metric than the
|
|
190
|
-
* one that matters here (distance from the curve to the *nearest* segment), so
|
|
191
|
-
* the segment count is padded. 1.5 was the smallest factor that satisfied every
|
|
192
|
-
* curve in shared/icons when checked against an exact numeric search.
|
|
193
|
-
*/
|
|
194
|
-
const CURVE_FLATTEN_SAFETY = 1.5;
|
|
195
|
-
/** Hard ceiling, so a pathologically authored curve can never explode the tree. */
|
|
196
|
-
const CURVE_MAX_SEGMENTS = 48;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* How many straight segments a Bezier needs to stay within `tolerance` of the
|
|
200
|
-
* true curve, via the second-difference flattening bound.
|
|
201
|
-
*/
|
|
202
|
-
function bezierSegmentCount(p0x, p0y, c1x, c1y, c2x, c2y, p1x, p1y, isCubic, tolerance) {
|
|
203
|
-
let secondDiff;
|
|
204
|
-
if (isCubic) {
|
|
205
|
-
const ax = p0x - 2 * c1x + c2x;
|
|
206
|
-
const ay = p0y - 2 * c1y + c2y;
|
|
207
|
-
const bx = c1x - 2 * c2x + p1x;
|
|
208
|
-
const by = c1y - 2 * c2y + p1y;
|
|
209
|
-
secondDiff = 3 * Math.max(Math.hypot(ax, ay), Math.hypot(bx, by));
|
|
210
|
-
} else {
|
|
211
|
-
secondDiff = Math.hypot(p0x - 2 * c1x + p1x, p0y - 2 * c1y + p1y);
|
|
212
|
-
}
|
|
213
|
-
if (!(secondDiff > 0)) return 2;
|
|
214
|
-
const n = Math.ceil(CURVE_FLATTEN_SAFETY * Math.sqrt(secondDiff / (8 * tolerance)));
|
|
215
|
-
return Math.max(2, Math.min(CURVE_MAX_SEGMENTS, n));
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Calculates a point on a quadratic Bezier curve (1 control point)
|
|
220
|
-
* B(t) = (1-t)²P0 + 2(1-t)tP1 + t²P2
|
|
221
|
-
*/
|
|
222
|
-
function getQuadraticBezierPoint(t, p0x, p0y, p1x, p1y, p2x, p2y) {
|
|
223
|
-
const mt = 1 - t;
|
|
224
|
-
return {
|
|
225
|
-
x: mt * mt * p0x + 2 * mt * t * p1x + t * t * p2x,
|
|
226
|
-
y: mt * mt * p0y + 2 * mt * t * p1y + t * t * p2y
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Calculates a point on a cubic Bezier curve (2 control points)
|
|
232
|
-
* B(t) = (1-t)³P0 + 3(1-t)²tP1 + 3(1-t)t²P2 + t³P3
|
|
233
|
-
*/
|
|
234
|
-
function getCubicBezierPoint(t, p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
|
|
235
|
-
const mt = 1 - t;
|
|
236
|
-
const mt2 = mt * mt;
|
|
237
|
-
const mt3 = mt2 * mt;
|
|
238
|
-
const t2 = t * t;
|
|
239
|
-
const t3 = t2 * t;
|
|
240
|
-
return {
|
|
241
|
-
x: mt3 * p0x + 3 * mt2 * t * p1x + 3 * mt * t2 * p2x + t3 * p3x,
|
|
242
|
-
y: mt3 * p0y + 3 * mt2 * t * p1y + 3 * mt * t2 * p2y + t3 * p3y
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* IconLine - draws a line between two points
|
|
248
|
-
* Auto-calculates length and rotation from coordinates!
|
|
249
|
-
* Supports curved lines via cubic Bezier (2 control points) or quadratic (1 control point).
|
|
250
|
-
*/
|
|
251
|
-
const IconLineImpl = ({
|
|
252
|
-
x1,
|
|
253
|
-
y1,
|
|
254
|
-
x2,
|
|
255
|
-
y2,
|
|
256
|
-
stroke,
|
|
257
|
-
strokeWidth = 1,
|
|
258
|
-
opacity = 1,
|
|
259
|
-
glowColor,
|
|
260
|
-
glowRadius = 0,
|
|
261
|
-
rotation = 0,
|
|
262
|
-
curveX,
|
|
263
|
-
curveY,
|
|
264
|
-
curve2X,
|
|
265
|
-
curve2Y
|
|
266
|
-
}) => {
|
|
267
|
-
// Check if this is a curved line (either control point set)
|
|
268
|
-
const hasCurve1 = curveX !== undefined && curveX !== 0 || curveY !== undefined && curveY !== 0;
|
|
269
|
-
const hasCurve2 = curve2X !== undefined && curve2X !== 0 || curve2Y !== undefined && curve2Y !== 0;
|
|
270
|
-
const isCurved = hasCurve1 || hasCurve2;
|
|
271
|
-
if (isCurved) {
|
|
272
|
-
const midX = (x1 + x2) / 2;
|
|
273
|
-
const midY = (y1 + y2) / 2;
|
|
274
|
-
|
|
275
|
-
// Control points: offset from line midpoint
|
|
276
|
-
const control1X = midX + (curveX ?? 0);
|
|
277
|
-
const control1Y = midY + (curveY ?? 0);
|
|
278
|
-
const control2X = midX + (curve2X ?? 0);
|
|
279
|
-
const control2Y = midY + (curve2Y ?? 0);
|
|
280
|
-
|
|
281
|
-
// Determine if cubic (2 distinct control points) or quadratic (1 control point)
|
|
282
|
-
const isCubic = hasCurve1 && hasCurve2;
|
|
283
|
-
const soleControlX = hasCurve1 ? control1X : control2X;
|
|
284
|
-
const soleControlY = hasCurve1 ? control1Y : control2Y;
|
|
285
|
-
const pointAt = t => isCubic ? getCubicBezierPoint(t, x1, y1, control1X, control1Y, control2X, control2Y, x2, y2) : getQuadraticBezierPoint(t, x1, y1, soleControlX, soleControlY, x2, y2);
|
|
286
|
-
const segments = bezierSegmentCount(x1, y1, isCubic ? control1X : soleControlX, isCubic ? control1Y : soleControlY, control2X, control2Y, x2, y2, isCubic, CURVE_FLATTEN_TOLERANCE);
|
|
287
|
-
const elements = [];
|
|
288
|
-
let prev = {
|
|
289
|
-
x: x1,
|
|
290
|
-
y: y1
|
|
291
|
-
};
|
|
292
|
-
for (let i = 1; i <= segments; i++) {
|
|
293
|
-
const pt = pointAt(i / segments);
|
|
294
|
-
const segDx = pt.x - prev.x;
|
|
295
|
-
const segDy = pt.y - prev.y;
|
|
296
|
-
const segLength = Math.sqrt(segDx * segDx + segDy * segDy);
|
|
297
|
-
const segAngle = Math.atan2(segDy, segDx) * (180 / Math.PI);
|
|
298
|
-
const segCenterX = (prev.x + pt.x) / 2;
|
|
299
|
-
const segCenterY = (prev.y + pt.y) / 2;
|
|
300
|
-
|
|
301
|
-
// A capsule per segment. Interior joints OVERLAP by half a stroke on each side (a
|
|
302
|
-
// capsule exactly segLength long shrinks to a blob when the segment is shorter than
|
|
303
|
-
// the stroke, and neighbouring round ends leave notches on the outside of a turn —
|
|
304
|
-
// the route-path icon rendered as dashes). The chain's two ends stay exactly at the
|
|
305
|
-
// authored endpoints so a curve is the same length as a straight line.
|
|
306
|
-
const extS = i > 1 ? strokeWidth / 2 : 0;
|
|
307
|
-
const extE = i < segments ? strokeWidth / 2 : 0;
|
|
308
|
-
const ux = segLength > 0 ? segDx / segLength : 0;
|
|
309
|
-
const uy = segLength > 0 ? segDy / segLength : 0;
|
|
310
|
-
const capLength = segLength + extS + extE;
|
|
311
|
-
const capCenterX = segCenterX + ux * (extE - extS) / 2;
|
|
312
|
-
const capCenterY = segCenterY + uy * (extE - extS) / 2;
|
|
313
|
-
elements.push(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
314
|
-
style: {
|
|
315
|
-
position: 'absolute',
|
|
316
|
-
left: r2(capCenterX - capLength / 2),
|
|
317
|
-
top: r2(capCenterY - strokeWidth / 2),
|
|
318
|
-
width: r2(capLength),
|
|
319
|
-
height: r2(strokeWidth),
|
|
320
|
-
borderRadius: r2(strokeWidth / 2),
|
|
321
|
-
backgroundColor: stroke,
|
|
322
|
-
opacity,
|
|
323
|
-
transform: `rotate(${r2(segAngle)}deg)`,
|
|
324
|
-
transformOrigin: '50% 50%'
|
|
325
|
-
}
|
|
326
|
-
}, `s${i}`));
|
|
327
|
-
prev = pt;
|
|
328
|
-
}
|
|
329
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
330
|
-
children: elements
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// Straight line (original logic)
|
|
335
|
-
const dx = x2 - x1;
|
|
336
|
-
const dy = y2 - y1;
|
|
337
|
-
const length = Math.sqrt(dx * dx + dy * dy);
|
|
338
|
-
const angle = Math.atan2(dy, dx) * (180 / Math.PI);
|
|
339
|
-
|
|
340
|
-
// Position at midpoint of line
|
|
341
|
-
const centerX = (x1 + x2) / 2;
|
|
342
|
-
const centerY = (y1 + y2) / 2;
|
|
343
|
-
|
|
344
|
-
// Total rotation = line angle + additional rotation
|
|
345
|
-
const totalRotation = angle + rotation;
|
|
346
|
-
const style = {
|
|
347
|
-
position: 'absolute',
|
|
348
|
-
left: r2(centerX - length / 2),
|
|
349
|
-
top: r2(centerY - strokeWidth / 2),
|
|
350
|
-
width: r2(length),
|
|
351
|
-
height: r2(strokeWidth),
|
|
352
|
-
backgroundColor: stroke,
|
|
353
|
-
opacity,
|
|
354
|
-
transform: `rotate(${r2(totalRotation)}deg)`,
|
|
355
|
-
transformOrigin: '50% 50%',
|
|
356
|
-
borderRadius: r2(strokeWidth / 2),
|
|
357
|
-
boxShadow: glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined
|
|
358
|
-
};
|
|
359
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
360
|
-
style: style
|
|
361
|
-
});
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* IconTriangle - creates triangles using CSS border trick
|
|
366
|
-
* Works without SVG!
|
|
367
|
-
*/
|
|
368
|
-
const IconTriangleImpl = ({
|
|
369
|
-
x,
|
|
370
|
-
y,
|
|
371
|
-
size,
|
|
372
|
-
direction,
|
|
373
|
-
fill,
|
|
374
|
-
opacity = 1,
|
|
375
|
-
rotation
|
|
376
|
-
}) => {
|
|
377
|
-
// CSS border trick: use transparent borders to create triangle
|
|
378
|
-
// The size is the height of the triangle, width is size * 2 / sqrt(3) for equilateral
|
|
379
|
-
const halfWidth = r2(size * 0.577); // size / sqrt(3) for equilateral-ish triangle
|
|
380
|
-
|
|
381
|
-
// Build border styles based on direction
|
|
382
|
-
let borderStyles = {};
|
|
383
|
-
let offsetX = 0;
|
|
384
|
-
let offsetY = 0;
|
|
385
|
-
switch (direction) {
|
|
386
|
-
case 'down':
|
|
387
|
-
borderStyles = {
|
|
388
|
-
borderLeft: `${halfWidth}px solid transparent`,
|
|
389
|
-
borderRight: `${halfWidth}px solid transparent`,
|
|
390
|
-
borderTop: `${r2(size)}px solid ${fill}`
|
|
391
|
-
};
|
|
392
|
-
offsetX = -halfWidth;
|
|
393
|
-
offsetY = 0;
|
|
394
|
-
break;
|
|
395
|
-
case 'up':
|
|
396
|
-
borderStyles = {
|
|
397
|
-
borderLeft: `${halfWidth}px solid transparent`,
|
|
398
|
-
borderRight: `${halfWidth}px solid transparent`,
|
|
399
|
-
borderBottom: `${r2(size)}px solid ${fill}`
|
|
400
|
-
};
|
|
401
|
-
offsetX = -halfWidth;
|
|
402
|
-
offsetY = -size;
|
|
403
|
-
break;
|
|
404
|
-
case 'left':
|
|
405
|
-
borderStyles = {
|
|
406
|
-
borderTop: `${halfWidth}px solid transparent`,
|
|
407
|
-
borderBottom: `${halfWidth}px solid transparent`,
|
|
408
|
-
borderRight: `${r2(size)}px solid ${fill}`
|
|
409
|
-
};
|
|
410
|
-
offsetX = -size;
|
|
411
|
-
offsetY = -halfWidth;
|
|
412
|
-
break;
|
|
413
|
-
case 'right':
|
|
414
|
-
borderStyles = {
|
|
415
|
-
borderTop: `${halfWidth}px solid transparent`,
|
|
416
|
-
borderBottom: `${halfWidth}px solid transparent`,
|
|
417
|
-
borderLeft: `${r2(size)}px solid ${fill}`
|
|
418
|
-
};
|
|
419
|
-
offsetX = 0;
|
|
420
|
-
offsetY = -halfWidth;
|
|
421
|
-
break;
|
|
422
|
-
}
|
|
423
|
-
const transforms = [];
|
|
424
|
-
if (rotation !== undefined) {
|
|
425
|
-
transforms.push(`rotate(${r2(rotation)}deg)`);
|
|
426
|
-
}
|
|
427
|
-
const style = {
|
|
428
|
-
position: 'absolute',
|
|
429
|
-
left: r2(x + offsetX),
|
|
430
|
-
top: r2(y + offsetY),
|
|
431
|
-
width: 0,
|
|
432
|
-
height: 0,
|
|
433
|
-
opacity,
|
|
434
|
-
...borderStyles,
|
|
435
|
-
transform: transforms.length > 0 ? transforms.join(' ') : undefined,
|
|
436
|
-
transformOrigin: '50% 50%'
|
|
437
|
-
};
|
|
438
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
439
|
-
style: style
|
|
440
|
-
});
|
|
441
|
-
};
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* IconArc - draws an arc using multiple line segments
|
|
445
|
-
* Creates smooth curves without SVG!
|
|
446
|
-
*/
|
|
447
|
-
const IconArcImpl = ({
|
|
448
|
-
cx,
|
|
449
|
-
cy,
|
|
450
|
-
r,
|
|
451
|
-
startAngle,
|
|
452
|
-
endAngle,
|
|
453
|
-
stroke,
|
|
454
|
-
strokeWidth = 1.5,
|
|
455
|
-
opacity = 1,
|
|
456
|
-
segments
|
|
457
|
-
}) => {
|
|
458
|
-
// Calculate number of segments based on arc length
|
|
459
|
-
const arcLength = Math.abs(endAngle - startAngle);
|
|
460
|
-
const autoSegments = Math.max(8, Math.ceil(arcLength / 10)); // ~10 degrees per segment
|
|
461
|
-
const numSegments = segments ?? autoSegments;
|
|
462
|
-
|
|
463
|
-
// Generate line segments
|
|
464
|
-
const lines = [];
|
|
465
|
-
const angleStep = (endAngle - startAngle) / numSegments;
|
|
466
|
-
for (let i = 0; i < numSegments; i++) {
|
|
467
|
-
const angle1 = startAngle + i * angleStep;
|
|
468
|
-
const angle2 = startAngle + (i + 1) * angleStep;
|
|
469
|
-
|
|
470
|
-
// Convert to radians
|
|
471
|
-
const rad1 = angle1 * Math.PI / 180;
|
|
472
|
-
const rad2 = angle2 * Math.PI / 180;
|
|
473
|
-
|
|
474
|
-
// Calculate segment endpoints
|
|
475
|
-
const x1 = cx + r * Math.cos(rad1);
|
|
476
|
-
const y1 = cy + r * Math.sin(rad1);
|
|
477
|
-
const x2 = cx + r * Math.cos(rad2);
|
|
478
|
-
const y2 = cy + r * Math.sin(rad2);
|
|
479
|
-
|
|
480
|
-
// Calculate segment geometry. Interior joints overlap by half a stroke (same reason
|
|
481
|
-
// as the curved-line chain above); the arc's two ends stay at the authored angles.
|
|
482
|
-
const dx = x2 - x1;
|
|
483
|
-
const dy = y2 - y1;
|
|
484
|
-
const segLen = Math.sqrt(dx * dx + dy * dy);
|
|
485
|
-
const angle = Math.atan2(dy, dx) * (180 / Math.PI);
|
|
486
|
-
const extS = i > 0 ? strokeWidth / 2 : 0;
|
|
487
|
-
const extE = i < numSegments - 1 ? strokeWidth / 2 : 0;
|
|
488
|
-
const ux = segLen > 0 ? dx / segLen : 0;
|
|
489
|
-
const uy = segLen > 0 ? dy / segLen : 0;
|
|
490
|
-
const length = segLen + extS + extE;
|
|
491
|
-
const midX = (x1 + x2) / 2 + ux * (extE - extS) / 2;
|
|
492
|
-
const midY = (y1 + y2) / 2 + uy * (extE - extS) / 2;
|
|
493
|
-
const style = {
|
|
494
|
-
position: 'absolute',
|
|
495
|
-
left: r2(midX - length / 2),
|
|
496
|
-
top: r2(midY - strokeWidth / 2),
|
|
497
|
-
width: r2(length),
|
|
498
|
-
height: r2(strokeWidth),
|
|
499
|
-
backgroundColor: stroke,
|
|
500
|
-
opacity,
|
|
501
|
-
transform: `rotate(${r2(angle)}deg)`,
|
|
502
|
-
transformOrigin: '50% 50%',
|
|
503
|
-
borderRadius: r2(strokeWidth / 2)
|
|
504
|
-
};
|
|
505
|
-
lines.push(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
506
|
-
style: style
|
|
507
|
-
}, i));
|
|
508
|
-
}
|
|
509
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
510
|
-
children: lines
|
|
511
|
-
});
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* IconSemicircle - creates a half circle (filled)
|
|
516
|
-
* Perfect for pokeball-style split designs!
|
|
517
|
-
*/
|
|
518
|
-
const IconSemicircleImpl = ({
|
|
519
|
-
cx,
|
|
520
|
-
cy,
|
|
521
|
-
r,
|
|
522
|
-
half,
|
|
523
|
-
fill,
|
|
524
|
-
borderColor,
|
|
525
|
-
borderWidth = 0,
|
|
526
|
-
opacity = 1,
|
|
527
|
-
glowColor,
|
|
528
|
-
glowRadius = 0
|
|
529
|
-
}) => {
|
|
530
|
-
const diameter = r * 2;
|
|
531
|
-
|
|
532
|
-
// Calculate position and border radii based on which half
|
|
533
|
-
let left;
|
|
534
|
-
let top;
|
|
535
|
-
let width;
|
|
536
|
-
let height;
|
|
537
|
-
let borderRadius;
|
|
538
|
-
switch (half) {
|
|
539
|
-
case 'top':
|
|
540
|
-
left = r2(cx - r);
|
|
541
|
-
top = r2(cy - r);
|
|
542
|
-
width = r2(diameter);
|
|
543
|
-
height = r2(r);
|
|
544
|
-
borderRadius = `${r2(r)}px ${r2(r)}px 0 0`;
|
|
545
|
-
break;
|
|
546
|
-
case 'bottom':
|
|
547
|
-
left = r2(cx - r);
|
|
548
|
-
top = r2(cy);
|
|
549
|
-
width = r2(diameter);
|
|
550
|
-
height = r2(r);
|
|
551
|
-
borderRadius = `0 0 ${r2(r)}px ${r2(r)}px`;
|
|
552
|
-
break;
|
|
553
|
-
case 'left':
|
|
554
|
-
left = r2(cx - r);
|
|
555
|
-
top = r2(cy - r);
|
|
556
|
-
width = r2(r);
|
|
557
|
-
height = r2(diameter);
|
|
558
|
-
borderRadius = `${r2(r)}px 0 0 ${r2(r)}px`;
|
|
559
|
-
break;
|
|
560
|
-
case 'right':
|
|
561
|
-
left = r2(cx);
|
|
562
|
-
top = r2(cy - r);
|
|
563
|
-
width = r2(r);
|
|
564
|
-
height = r2(diameter);
|
|
565
|
-
borderRadius = `0 ${r2(r)}px ${r2(r)}px 0`;
|
|
566
|
-
break;
|
|
567
|
-
}
|
|
568
|
-
const style = {
|
|
569
|
-
position: 'absolute',
|
|
570
|
-
left,
|
|
571
|
-
top,
|
|
572
|
-
width,
|
|
573
|
-
height,
|
|
574
|
-
borderRadius,
|
|
575
|
-
backgroundColor: fill,
|
|
576
|
-
border: borderColor ? `${r2(borderWidth)}px solid ${borderColor}` : undefined,
|
|
577
|
-
opacity,
|
|
578
|
-
boxShadow: glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined,
|
|
579
|
-
boxSizing: 'border-box'
|
|
580
|
-
};
|
|
581
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
582
|
-
style: style
|
|
583
|
-
});
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* IconSmoothArc - creates a smooth arc using the border trick
|
|
588
|
-
* Uses bordered circles with partial borders hidden - gives perfect anti-aliased curves!
|
|
589
|
-
* This is how the WiFi icon achieves smooth lines without dots.
|
|
590
|
-
*/
|
|
591
|
-
const IconSmoothArcImpl = ({
|
|
592
|
-
cx,
|
|
593
|
-
cy,
|
|
594
|
-
r,
|
|
595
|
-
stroke,
|
|
596
|
-
strokeWidth = 2,
|
|
597
|
-
opacity = 1,
|
|
598
|
-
portion = 'bottom'
|
|
599
|
-
}) => {
|
|
600
|
-
const diameter = r * 2;
|
|
601
|
-
|
|
602
|
-
// Build border colors based on which portion to show
|
|
603
|
-
let borderTopColor = stroke;
|
|
604
|
-
let borderBottomColor = stroke;
|
|
605
|
-
let borderLeftColor = stroke;
|
|
606
|
-
let borderRightColor = stroke;
|
|
607
|
-
switch (portion) {
|
|
608
|
-
case 'bottom':
|
|
609
|
-
// Show bottom arc (hide top, left, right)
|
|
610
|
-
borderTopColor = 'transparent';
|
|
611
|
-
borderLeftColor = 'transparent';
|
|
612
|
-
borderRightColor = 'transparent';
|
|
613
|
-
break;
|
|
614
|
-
case 'top':
|
|
615
|
-
// Show top arc (hide bottom, left, right)
|
|
616
|
-
borderBottomColor = 'transparent';
|
|
617
|
-
borderLeftColor = 'transparent';
|
|
618
|
-
borderRightColor = 'transparent';
|
|
619
|
-
break;
|
|
620
|
-
case 'left':
|
|
621
|
-
// Show left arc (hide top, bottom, right)
|
|
622
|
-
borderTopColor = 'transparent';
|
|
623
|
-
borderBottomColor = 'transparent';
|
|
624
|
-
borderRightColor = 'transparent';
|
|
625
|
-
break;
|
|
626
|
-
case 'right':
|
|
627
|
-
// Show right arc (hide top, bottom, left)
|
|
628
|
-
borderTopColor = 'transparent';
|
|
629
|
-
borderBottomColor = 'transparent';
|
|
630
|
-
borderLeftColor = 'transparent';
|
|
631
|
-
break;
|
|
632
|
-
}
|
|
633
|
-
const style = {
|
|
634
|
-
position: 'absolute',
|
|
635
|
-
left: r2(cx - r),
|
|
636
|
-
top: r2(cy - r),
|
|
637
|
-
width: r2(diameter),
|
|
638
|
-
height: r2(diameter),
|
|
639
|
-
borderRadius: r2(r),
|
|
640
|
-
borderWidth: r2(strokeWidth),
|
|
641
|
-
borderStyle: 'solid',
|
|
642
|
-
borderTopColor,
|
|
643
|
-
borderBottomColor,
|
|
644
|
-
borderLeftColor,
|
|
645
|
-
borderRightColor,
|
|
646
|
-
opacity,
|
|
647
|
-
boxSizing: 'border-box'
|
|
648
|
-
};
|
|
649
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
650
|
-
style: style
|
|
651
|
-
});
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
// ===========================================
|
|
655
|
-
// Memoized leaf exports
|
|
656
|
-
// ===========================================
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* These primitives are LEAF nodes with measured render cost, so they are the
|
|
660
|
-
* one place rule2 sanctions React.memo. Every prop is a scalar, so a shallow
|
|
661
|
-
* compare is exact — an icon whose geometry did not change cannot re-render.
|
|
662
|
-
*
|
|
663
|
-
* Evidence (iOS sim, reopening the Time Machine tool, measure_renders):
|
|
664
|
-
* IconLine alone burned 58.3ms across 103 renders, 100% attributed to
|
|
665
|
-
* `parent` — a pure cascade from IconContainer with identical props. A curved
|
|
666
|
-
* IconLine expands to 100+ absolutely-positioned Views, so each of those
|
|
667
|
-
* cascaded renders rebuilt hundreds of style objects for an unchanged glyph.
|
|
668
|
-
*/
|
|
669
|
-
const IconCircle = exports.IconCircle = /*#__PURE__*/(0, _react.memo)(IconCircleImpl);
|
|
670
|
-
const IconRect = exports.IconRect = /*#__PURE__*/(0, _react.memo)(IconRectImpl);
|
|
671
|
-
const IconText = exports.IconText = /*#__PURE__*/(0, _react.memo)(IconTextImpl);
|
|
672
|
-
const IconLine = exports.IconLine = /*#__PURE__*/(0, _react.memo)(IconLineImpl);
|
|
673
|
-
const IconTriangle = exports.IconTriangle = /*#__PURE__*/(0, _react.memo)(IconTriangleImpl);
|
|
674
|
-
const IconArc = exports.IconArc = /*#__PURE__*/(0, _react.memo)(IconArcImpl);
|
|
675
|
-
const IconSemicircle = exports.IconSemicircle = /*#__PURE__*/(0, _react.memo)(IconSemicircleImpl);
|
|
676
|
-
const IconSmoothArc = exports.IconSmoothArc = /*#__PURE__*/(0, _react.memo)(IconSmoothArcImpl);
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.IconTriangle=exports.IconText=exports.IconSmoothArc=exports.IconSemicircle=exports.IconRect=exports.IconLine=exports.IconContainer=exports.IconCircle=exports.IconArc=void 0;var _react=require("react"),_jsxRuntime=require("react/jsx-runtime");const r2=r=>Math.round(100*r)/100,IconContainer=({size:r,children:t,style:o})=>{const e={position:"relative",width:r2(r),height:r2(r)};return(0,_jsxRuntime.jsx)("div",{style:{...e,...o},children:t})};function createNeonGlow(r,t){return[`0 0 ${r2(.15*t)}px ${r}`,`0 0 ${r2(.3*t)}px ${r}`,`0 0 ${r2(.6*t)}px ${r}cc`,`0 0 ${r2(t)}px ${r}80`,`0 0 ${r2(1.5*t)}px ${r}40`].join(", ")}exports.IconContainer=IconContainer;const IconCircleImpl=({cx:r,cy:t,r:o,fill:e,borderColor:i,borderWidth:n=0,opacity:a=1,scaleX:s=1,scaleY:c=1,glowColor:l,glowRadius:d=0,rotation:p=0})=>{const x=2*o,h=[];1!==s&&h.push(`scaleX(${r2(s)})`),1!==c&&h.push(`scaleY(${r2(c)})`),0!==p&&h.push(`rotate(${r2(p)}deg)`);const m={position:"absolute",left:r2(r-o),top:r2(t-o),width:r2(x),height:r2(x),borderRadius:r2(o),backgroundColor:e,border:i?`${r2(n)}px solid ${i}`:void 0,opacity:a,transform:h.length>0?h.join(" "):void 0,transformOrigin:"50% 50%",boxShadow:l&&d>0?createNeonGlow(l,d):void 0,boxSizing:"border-box"};return(0,_jsxRuntime.jsx)("div",{style:m})},IconRectImpl=({x:r,y:t,width:o,height:e,fill:i,borderColor:n,borderWidth:a=0,borderRadius:s=0,opacity:c=1,glowColor:l,glowRadius:d=0,rotation:p,originX:x=0,originY:h=.5})=>{const m={position:"absolute",left:r2(r),top:r2(t),width:r2(o),height:r2(e),borderRadius:r2(s),backgroundColor:i,border:n?`${r2(a)}px solid ${n}`:void 0,opacity:c,boxShadow:l&&d>0?createNeonGlow(l,d):void 0,boxSizing:"border-box",transform:void 0!==p?`rotate(${r2(p)}deg)`:void 0,transformOrigin:void 0!==p?`${r2(100*x)}% ${r2(100*h)}%`:void 0};return(0,_jsxRuntime.jsx)("div",{style:m})},IconTextImpl=({x:r,y:t,text:o,fontSize:e,fontWeight:i=700,align:n="center",fill:a,opacity:s=1,rotation:c,letterSpacing:l=0})=>{const d="left"===n?"0%":"right"===n?"-100%":"-50%",p={position:"absolute",left:r2(r),top:r2(t),transform:`translate(${d}, -50%)${void 0!==c?` rotate(${r2(c)}deg)`:""}`,color:a,fontSize:r2(e),fontWeight:i,lineHeight:1,whiteSpace:"nowrap",fontFamily:"'Helvetica Neue', Arial, sans-serif",letterSpacing:l,opacity:s,userSelect:"none"};return(0,_jsxRuntime.jsx)("div",{style:p,children:o})},CURVE_FLATTEN_TOLERANCE=.08,CURVE_FLATTEN_SAFETY=1.5,CURVE_MAX_SEGMENTS=48;function bezierSegmentCount(r,t,o,e,i,n,a,s,c,l){let d;if(c){const c=r-2*o+i,l=t-2*e+n,p=o-2*i+a,x=e-2*n+s;d=3*Math.max(Math.hypot(c,l),Math.hypot(p,x))}else d=Math.hypot(r-2*o+a,t-2*e+s);if(!(d>0))return 2;const p=Math.ceil(1.5*Math.sqrt(d/(8*l)));return Math.max(2,Math.min(48,p))}function getQuadraticBezierPoint(r,t,o,e,i,n,a){const s=1-r;return{x:s*s*t+2*s*r*e+r*r*n,y:s*s*o+2*s*r*i+r*r*a}}function getCubicBezierPoint(r,t,o,e,i,n,a,s,c){const l=1-r,d=l*l,p=d*l,x=r*r,h=x*r;return{x:p*t+3*d*r*e+3*l*x*n+h*s,y:p*o+3*d*r*i+3*l*x*a+h*c}}const IconLineImpl=({x1:r,y1:t,x2:o,y2:e,stroke:i,strokeWidth:n=1,opacity:a=1,glowColor:s,glowRadius:c=0,rotation:l=0,curveX:d,curveY:p,curve2X:x,curve2Y:h})=>{const m=void 0!==d&&0!==d||void 0!==p&&0!==p,u=void 0!==x&&0!==x||void 0!==h&&0!==h;if(m||u){const s=(r+o)/2,c=(t+e)/2,l=s+(d??0),b=c+(p??0),g=s+(x??0),I=c+(h??0),$=m&&u,f=m?l:g,y=m?b:I,R=i=>$?getCubicBezierPoint(i,r,t,l,b,g,I,o,e):getQuadraticBezierPoint(i,r,t,f,y,o,e),v=bezierSegmentCount(r,t,$?l:f,$?b:y,g,I,o,e,$,.08),C=[];let w={x:r,y:t};for(let r=1;r<=v;r++){const t=R(r/v),o=t.x-w.x,e=t.y-w.y,s=Math.sqrt(o*o+e*e),c=Math.atan2(e,o)*(180/Math.PI),l=r>1?n/2:0,d=r<v?n/2:0,p=s+l+d,x=(w.x+t.x)/2+(s>0?o/s:0)*(d-l)/2,h=(w.y+t.y)/2+(s>0?e/s:0)*(d-l)/2;C.push((0,_jsxRuntime.jsx)("div",{style:{position:"absolute",left:r2(x-p/2),top:r2(h-n/2),width:r2(p),height:r2(n),borderRadius:r2(n/2),backgroundColor:i,opacity:a,transform:`rotate(${r2(c)}deg)`,transformOrigin:"50% 50%"}},`s${r}`)),w=t}return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:C})}const b=o-r,g=e-t,I=Math.sqrt(b*b+g*g),$=Math.atan2(g,b)*(180/Math.PI),f=(t+e)/2,y=$+l,R={position:"absolute",left:r2((r+o)/2-I/2),top:r2(f-n/2),width:r2(I),height:r2(n),backgroundColor:i,opacity:a,transform:`rotate(${r2(y)}deg)`,transformOrigin:"50% 50%",borderRadius:r2(n/2),boxShadow:s&&c>0?createNeonGlow(s,c):void 0};return(0,_jsxRuntime.jsx)("div",{style:R})},IconTriangleImpl=({x:r,y:t,size:o,direction:e,fill:i,opacity:n=1,rotation:a})=>{const s=r2(.577*o);let c={},l=0,d=0;switch(e){case"down":c={borderLeft:`${s}px solid transparent`,borderRight:`${s}px solid transparent`,borderTop:`${r2(o)}px solid ${i}`},l=-s,d=0;break;case"up":c={borderLeft:`${s}px solid transparent`,borderRight:`${s}px solid transparent`,borderBottom:`${r2(o)}px solid ${i}`},l=-s,d=-o;break;case"left":c={borderTop:`${s}px solid transparent`,borderBottom:`${s}px solid transparent`,borderRight:`${r2(o)}px solid ${i}`},l=-o,d=-s;break;case"right":c={borderTop:`${s}px solid transparent`,borderBottom:`${s}px solid transparent`,borderLeft:`${r2(o)}px solid ${i}`},l=0,d=-s}const p=[];void 0!==a&&p.push(`rotate(${r2(a)}deg)`);const x={position:"absolute",left:r2(r+l),top:r2(t+d),width:0,height:0,opacity:n,...c,transform:p.length>0?p.join(" "):void 0,transformOrigin:"50% 50%"};return(0,_jsxRuntime.jsx)("div",{style:x})},IconArcImpl=({cx:r,cy:t,r:o,startAngle:e,endAngle:i,stroke:n,strokeWidth:a=1.5,opacity:s=1,segments:c})=>{const l=Math.abs(i-e),d=Math.max(8,Math.ceil(l/10)),p=c??d,x=[],h=(i-e)/p;for(let i=0;i<p;i++){const c=e+(i+1)*h,l=(e+i*h)*Math.PI/180,d=c*Math.PI/180,m=r+o*Math.cos(l),u=t+o*Math.sin(l),b=r+o*Math.cos(d),g=t+o*Math.sin(d),I=b-m,$=g-u,f=Math.sqrt(I*I+$*$),y=Math.atan2($,I)*(180/Math.PI),R=i>0?a/2:0,v=i<p-1?a/2:0,C=f+R+v,w=(u+g)/2+(f>0?$/f:0)*(v-R)/2,j={position:"absolute",left:r2((m+b)/2+(f>0?I/f:0)*(v-R)/2-C/2),top:r2(w-a/2),width:r2(C),height:r2(a),backgroundColor:n,opacity:s,transform:`rotate(${r2(y)}deg)`,transformOrigin:"50% 50%",borderRadius:r2(a/2)};x.push((0,_jsxRuntime.jsx)("div",{style:j},i))}return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:x})},IconSemicircleImpl=({cx:r,cy:t,r:o,half:e,fill:i,borderColor:n,borderWidth:a=0,opacity:s=1,glowColor:c,glowRadius:l=0})=>{const d=2*o;let p,x,h,m,u;switch(e){case"top":p=r2(r-o),x=r2(t-o),h=r2(d),m=r2(o),u=`${r2(o)}px ${r2(o)}px 0 0`;break;case"bottom":p=r2(r-o),x=r2(t),h=r2(d),m=r2(o),u=`0 0 ${r2(o)}px ${r2(o)}px`;break;case"left":p=r2(r-o),x=r2(t-o),h=r2(o),m=r2(d),u=`${r2(o)}px 0 0 ${r2(o)}px`;break;case"right":p=r2(r),x=r2(t-o),h=r2(o),m=r2(d),u=`0 ${r2(o)}px ${r2(o)}px 0`}const b={position:"absolute",left:p,top:x,width:h,height:m,borderRadius:u,backgroundColor:i,border:n?`${r2(a)}px solid ${n}`:void 0,opacity:s,boxShadow:c&&l>0?createNeonGlow(c,l):void 0,boxSizing:"border-box"};return(0,_jsxRuntime.jsx)("div",{style:b})},IconSmoothArcImpl=({cx:r,cy:t,r:o,stroke:e,strokeWidth:i=2,opacity:n=1,portion:a="bottom"})=>{const s=2*o;let c=e,l=e,d=e,p=e;switch(a){case"bottom":c="transparent",d="transparent",p="transparent";break;case"top":l="transparent",d="transparent",p="transparent";break;case"left":c="transparent",l="transparent",p="transparent";break;case"right":c="transparent",l="transparent",d="transparent"}const x={position:"absolute",left:r2(r-o),top:r2(t-o),width:r2(s),height:r2(s),borderRadius:r2(o),borderWidth:r2(i),borderStyle:"solid",borderTopColor:c,borderBottomColor:l,borderLeftColor:d,borderRightColor:p,opacity:n,boxSizing:"border-box"};return(0,_jsxRuntime.jsx)("div",{style:x})},IconCircle=exports.IconCircle=(0,_react.memo)(IconCircleImpl),IconRect=exports.IconRect=(0,_react.memo)(IconRectImpl),IconText=exports.IconText=(0,_react.memo)(IconTextImpl),IconLine=exports.IconLine=(0,_react.memo)(IconLineImpl),IconTriangle=exports.IconTriangle=(0,_react.memo)(IconTriangleImpl),IconArc=exports.IconArc=(0,_react.memo)(IconArcImpl),IconSemicircle=exports.IconSemicircle=(0,_react.memo)(IconSemicircleImpl),IconSmoothArc=exports.IconSmoothArc=(0,_react.memo)(IconSmoothArcImpl);
|