@buoy-gg/floating-tools-core 7.0.36 → 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 -7267
- 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 -23
- 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 -1099
- 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 -7262
- 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 -19
- 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 -128
- 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 +26 -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 +0 -13
- 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/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 +26 -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 +0 -13
- 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/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/settings-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/settings-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
package/lib/module/dialUsage.js
CHANGED
|
@@ -1,122 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Dial Usage - Recency-weighted usage tracking for the dial menu.
|
|
5
|
-
*
|
|
6
|
-
* Pure scoring/ranking logic. No React or platform-specific code.
|
|
7
|
-
*
|
|
8
|
-
* The dial menu ranks tools by how recently and frequently they are used.
|
|
9
|
-
* Each press adds 1 point to a tool's score; that score decays exponentially
|
|
10
|
-
* over time (half-life ~3 days) so the ordering reflects "what I'm using most
|
|
11
|
-
* lately" rather than all-time totals.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
// =============================
|
|
15
|
-
// Constants
|
|
16
|
-
// =============================
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Half-life of a usage score, in milliseconds (~3 days).
|
|
20
|
-
* After this much time, an untouched tool's score halves.
|
|
21
|
-
*/
|
|
22
|
-
export const USAGE_HALF_LIFE_MS = 3 * 24 * 60 * 60 * 1000;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Scores at or below this value are treated as zero. Entries that decay
|
|
26
|
-
* below it can be safely pruned from storage.
|
|
27
|
-
*/
|
|
28
|
-
export const USAGE_MIN_SCORE = 0.01;
|
|
29
|
-
|
|
30
|
-
// =============================
|
|
31
|
-
// Types
|
|
32
|
-
// =============================
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* A single tool's usage record.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
/** Map of tool id to its usage record. */
|
|
39
|
-
|
|
40
|
-
// =============================
|
|
41
|
-
// Scoring
|
|
42
|
-
// =============================
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Decay a stored score forward to `now`.
|
|
46
|
-
*
|
|
47
|
-
* @param entry - The usage entry to evaluate
|
|
48
|
-
* @param now - Current epoch ms
|
|
49
|
-
* @returns The score decayed to `now` (never negative)
|
|
50
|
-
*/
|
|
51
|
-
export function decayScore(entry, now) {
|
|
52
|
-
if (!entry || entry.score <= 0) return 0;
|
|
53
|
-
const elapsed = now - entry.lastUsed;
|
|
54
|
-
// Guard against clock skew producing a score boost.
|
|
55
|
-
if (elapsed <= 0) return entry.score;
|
|
56
|
-
return entry.score * Math.pow(0.5, elapsed / USAGE_HALF_LIFE_MS);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Record a single press of a tool, returning a new usage map.
|
|
61
|
-
*
|
|
62
|
-
* The existing score is decayed forward to `now` before adding 1, so a
|
|
63
|
-
* burst of presses accumulates while stale scores naturally fade.
|
|
64
|
-
*
|
|
65
|
-
* @param map - Current usage map
|
|
66
|
-
* @param id - Tool id that was pressed
|
|
67
|
-
* @param now - Current epoch ms
|
|
68
|
-
* @returns A new usage map (input is not mutated)
|
|
69
|
-
*/
|
|
70
|
-
export function recordUsage(map, id, now) {
|
|
71
|
-
const decayed = decayScore(map[id], now);
|
|
72
|
-
return {
|
|
73
|
-
...map,
|
|
74
|
-
[id]: {
|
|
75
|
-
score: decayed + 1,
|
|
76
|
-
lastUsed: now
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Rank tool ids by decayed usage score, highest first.
|
|
83
|
-
*
|
|
84
|
-
* The sort is stable: tools with equal scores (including never-used tools,
|
|
85
|
-
* which score 0) keep their original order in `orderedIds`. This preserves
|
|
86
|
-
* registration order as the tie-breaker.
|
|
87
|
-
*
|
|
88
|
-
* @param orderedIds - Tool ids in their default/registration order
|
|
89
|
-
* @param map - Current usage map
|
|
90
|
-
* @param now - Current epoch ms
|
|
91
|
-
* @returns A new array of ids sorted by usage
|
|
92
|
-
*/
|
|
93
|
-
export function rankToolIds(orderedIds, map, now) {
|
|
94
|
-
const scored = orderedIds.map((id, index) => ({
|
|
95
|
-
id,
|
|
96
|
-
index,
|
|
97
|
-
score: decayScore(map[id], now)
|
|
98
|
-
}));
|
|
99
|
-
scored.sort((a, b) => {
|
|
100
|
-
if (b.score !== a.score) return b.score - a.score;
|
|
101
|
-
return a.index - b.index;
|
|
102
|
-
});
|
|
103
|
-
return scored.map(entry => entry.id);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Drop entries whose decayed score has fallen below `USAGE_MIN_SCORE`,
|
|
108
|
-
* keeping the persisted map from growing unbounded.
|
|
109
|
-
*
|
|
110
|
-
* @param map - Current usage map
|
|
111
|
-
* @param now - Current epoch ms
|
|
112
|
-
* @returns A new, pruned usage map
|
|
113
|
-
*/
|
|
114
|
-
export function pruneUsage(map, now) {
|
|
115
|
-
const pruned = {};
|
|
116
|
-
for (const [id, entry] of Object.entries(map)) {
|
|
117
|
-
if (decayScore(entry, now) > USAGE_MIN_SCORE) {
|
|
118
|
-
pruned[id] = entry;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return pruned;
|
|
122
|
-
}
|
|
1
|
+
"use strict";export const USAGE_HALF_LIFE_MS=2592e5;export const USAGE_MIN_SCORE=.01;export function decayScore(e,o){if(!e||e.score<=0)return 0;const r=o-e.lastUsed;return r<=0?e.score:e.score*Math.pow(.5,r/2592e5)}export function recordUsage(e,o,r){const c=decayScore(e[o],r);return{...e,[o]:{score:c+1,lastUsed:r}}}export function rankToolIds(e,o,r){const c=e.map((e,c)=>({id:e,index:c,score:decayScore(o[e],r)}));return c.sort((e,o)=>o.score!==e.score?o.score-e.score:e.index-o.index),c.map(e=>e.id)}export function pruneUsage(e,o){const r={};for(const[c,t]of Object.entries(e))decayScore(t,o)>.01&&(r[c]=t);return r}
|
package/lib/module/easing.js
CHANGED
|
@@ -1,62 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Animation easing functions.
|
|
5
|
-
* Platform-agnostic - used by both web (RAF) and mobile (Animated).
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Easing functions for animations.
|
|
10
|
-
* All functions take progress (0-1) and return eased value (0-1).
|
|
11
|
-
*/
|
|
12
|
-
export const easing = {
|
|
13
|
-
/**
|
|
14
|
-
* Linear - no easing.
|
|
15
|
-
*/
|
|
16
|
-
linear: t => t,
|
|
17
|
-
/**
|
|
18
|
-
* Ease out cubic - decelerates towards end.
|
|
19
|
-
* Used for hide/show animations.
|
|
20
|
-
*/
|
|
21
|
-
easeOutCubic: t => 1 - Math.pow(1 - t, 3),
|
|
22
|
-
/**
|
|
23
|
-
* Ease in cubic - accelerates from start.
|
|
24
|
-
*/
|
|
25
|
-
easeInCubic: t => t * t * t,
|
|
26
|
-
/**
|
|
27
|
-
* Ease in-out cubic - smooth acceleration and deceleration.
|
|
28
|
-
*/
|
|
29
|
-
easeInOutCubic: t => t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2,
|
|
30
|
-
/**
|
|
31
|
-
* Ease out quad - lighter deceleration than cubic.
|
|
32
|
-
*/
|
|
33
|
-
easeOutQuad: t => 1 - (1 - t) * (1 - t),
|
|
34
|
-
/**
|
|
35
|
-
* Ease out expo - strong deceleration (snappy feel).
|
|
36
|
-
*/
|
|
37
|
-
easeOutExpo: t => t === 1 ? 1 : 1 - Math.pow(2, -10 * t)
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Get an easing function by name.
|
|
41
|
-
*/
|
|
42
|
-
export function getEasing(name) {
|
|
43
|
-
return easing[name];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Interpolate between two values using an easing function.
|
|
48
|
-
*/
|
|
49
|
-
export function interpolate(from, to, progress, easingFn = easing.easeOutCubic) {
|
|
50
|
-
const eased = easingFn(Math.max(0, Math.min(1, progress)));
|
|
51
|
-
return from + (to - from) * eased;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Interpolate a position (x, y) using an easing function.
|
|
56
|
-
*/
|
|
57
|
-
export function interpolatePosition(from, to, progress, easingFn = easing.easeOutCubic) {
|
|
58
|
-
return {
|
|
59
|
-
x: interpolate(from.x, to.x, progress, easingFn),
|
|
60
|
-
y: interpolate(from.y, to.y, progress, easingFn)
|
|
61
|
-
};
|
|
62
|
-
}
|
|
1
|
+
"use strict";export const easing={linear:e=>e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInCubic:e=>e*e*e,easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeOutQuad:e=>1-(1-e)*(1-e),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e)};export function getEasing(e){return easing[e]}export function interpolate(e,t,a,n=easing.easeOutCubic){return e+(t-e)*n(Math.max(0,Math.min(1,a)))}export function interpolatePosition(e,t,a,n=easing.easeOutCubic){return{x:interpolate(e.x,t.x,a,n),y:interpolate(e.y,t.y,a,n)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{FloatingToolsStore}from"./FloatingToolsStore.js";export*from"./constants.js";export*from"./types.js";export*from"./utils.js";export*from"./easing.js";export*from"./colors.js";
|
package/lib/module/fonts.js
CHANGED
|
@@ -1,28 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { Platform } from "react-native";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The monospace family, per platform — THE seam for every `fontFamily` in Buoy.
|
|
7
|
-
*
|
|
8
|
-
* `"monospace"` is an ANDROID family name. iOS has no family called that, so
|
|
9
|
-
* React Native silently falls back to the system font: every code path, header
|
|
10
|
-
* name, JSON value and status chip Buoy renders "in monospace" was actually
|
|
11
|
-
* proportional on iOS. The cross-framework parity sheet is what surfaced it —
|
|
12
|
-
* Flutter resolves `monospace` to a real monospaced face, so its chips came out
|
|
13
|
-
* wider and taller than their RN twins and looked like a port bug.
|
|
14
|
-
*
|
|
15
|
-
* Menlo ships with every iOS version and is the family the ports can name too
|
|
16
|
-
* (Flutter `buoyMonoFont`, SwiftUI `Font.custom("Menlo", …)`), which is what
|
|
17
|
-
* makes the three frameworks draw the same glyphs.
|
|
18
|
-
*
|
|
19
|
-
* On web (the desktop dashboard, react-native-web) the generic `monospace`
|
|
20
|
-
* resolves to a thin, poorly-hinted browser default, so a curated stack is used
|
|
21
|
-
* there instead — the choice `packages/console` had already made locally.
|
|
22
|
-
*/
|
|
23
|
-
export const monoFont = Platform.select({
|
|
24
|
-
ios: "Menlo",
|
|
25
|
-
android: "monospace",
|
|
26
|
-
web: 'ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace',
|
|
27
|
-
default: "monospace"
|
|
28
|
-
}) ?? "monospace";
|
|
1
|
+
"use strict";import{Platform}from"react-native";export const monoFont=Platform.select({ios:"Menlo",android:"monospace",web:'ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace',default:"monospace"})??"monospace";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const monoFont='ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace';
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
> **Raster defaults:** 15 shared tool designs plus 10 supplied or separately exported raster families use PNGs across supported platforms.
|
|
2
|
+
> Sources remain in `shared/icons`; the raster manifest is `shared/raster-icon-manifest.json`.
|
|
3
|
+
> Run `pnpm icons` after editing a source. Per-icon modules preserve aliases and fall back to
|
|
4
|
+
> the existing renderer for custom colors/backgrounds or previews above 48 points.
|
|
5
|
+
> Transparent image bleed does not enlarge the layout box. See `ICON_RASTER_CONVERSION_PLAN.md`
|
|
6
|
+
> for platform coverage and remaining validation.
|
|
7
|
+
|
|
1
8
|
# Icon System API Documentation
|
|
2
9
|
|
|
3
10
|
A declarative, data-driven icon system for creating scalable vector-like icons using pure React components. Works on both **web** and **React Native** without SVG dependencies.
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* AskBuoyIcon - Data-driven icon
|
|
5
|
-
*
|
|
6
|
-
* A speech bubble with three dots and a small orb above it — a conversation,
|
|
7
|
-
* with something thinking behind it.
|
|
8
|
-
*
|
|
9
|
-
* Defined as pure data in shared/icons/ask-buoy.json (Buoy Icon Format),
|
|
10
|
-
* so this is the same artwork the Flutter build renders.
|
|
11
|
-
*
|
|
12
|
-
* To change: edit that JSON, then run `node scripts/gen-icons.mjs`.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { createIcon } from "./icon-renderer.js";
|
|
16
|
-
import { askBuoyIconData, ASK_BUOY_ICON_COLOR } from "./generated/icon-data.g.js";
|
|
17
|
-
export { ASK_BUOY_ICON_COLOR };
|
|
18
|
-
export const AskBuoyIcon = createIcon(askBuoyIconData);
|
|
1
|
+
"use strict";import{createRasterIcon}from"./raster-icon.js";export{ASK_BUOY_ICON_COLOR}from"./generated/icon-data.g.js";export const AskBuoyIcon=createRasterIcon("askBuoy");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Image}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";export{ASK_BUOY_ICON_COLOR}from"./generated/icon-data.g.js";const source=require("./assets/askBuoy.png");export function AskBuoyIcon({size:e=24,style:s}){return _jsx(Image,{source:source,resizeMode:"contain",fadeDuration:0,accessible:!1,style:[{width:e,height:e},s]})}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* AssetsIcon - Data-driven icon
|
|
5
|
-
*
|
|
6
|
-
* Stacked asset layers inside the tool frame.
|
|
7
|
-
*
|
|
8
|
-
* Defined as pure data in shared/icons/assets.json (Buoy Icon Format), so this
|
|
9
|
-
* is the same artwork the Flutter build renders.
|
|
10
|
-
*
|
|
11
|
-
* To change: edit that JSON, then run `node scripts/gen-icons.mjs`.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import { createIcon } from "./icon-renderer.js";
|
|
15
|
-
import { assetsIconData, ASSETS_ICON_COLOR } from "./generated/icon-data.g.js";
|
|
16
|
-
export { ASSETS_ICON_COLOR };
|
|
17
|
-
export const AssetsIcon = createIcon(assetsIconData);
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{assetsIconData}from"./generated/icon-data.g.js";import source from"./generated/assets-raster.g.js";export{ASSETS_ICON_COLOR}from"./generated/icon-data.g.js";export const AssetsIcon=createBifRasterIcon(assetsIconData,source,9);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{assetsIconData}from"./generated/icon-data.g.js";export{ASSETS_ICON_COLOR}from"./generated/icon-data.g.js";export const AssetsIcon=createBifRasterIcon(assetsIconData,require("./assets/assets.png"),9);
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* BenchmarkIcon - Data-driven icon
|
|
5
|
-
*
|
|
6
|
-
* Defined as pure data in shared/icons/benchmark.json (Buoy Icon Format).
|
|
7
|
-
* The renderer transforms it to components.
|
|
8
|
-
*
|
|
9
|
-
* To change: edit that JSON, then run `node scripts/gen-icons.mjs`.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { createIcon } from "./icon-renderer.js";
|
|
13
|
-
import { benchmarkIconData, BENCHMARK_ICON_COLOR } from "./generated/icon-data.g.js";
|
|
14
|
-
export { BENCHMARK_ICON_COLOR };
|
|
15
|
-
export const BenchmarkIcon = createIcon(benchmarkIconData);
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{benchmarkIconData}from"./generated/icon-data.g.js";import source from"./generated/benchmark-raster.g.js";export{BENCHMARK_ICON_COLOR}from"./generated/icon-data.g.js";export const BenchmarkIcon=createBifRasterIcon(benchmarkIconData,source,3);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{benchmarkIconData}from"./generated/icon-data.g.js";export{BENCHMARK_ICON_COLOR}from"./generated/icon-data.g.js";export const BenchmarkIcon=createBifRasterIcon(benchmarkIconData,require("./assets/benchmark.png"),3);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createElement}from"react";import{createIcon}from"./icon-renderer.js";export function createBifRasterIcon(e,t,o){const r=createIcon(e);return function(n){const{size:i=24,color:a,bgColor:c,style:l}=n;if(void 0!==a&&a.toLowerCase()!==e.color.toLowerCase()||void 0!==c&&c.toLowerCase()!==e.bgColor.toLowerCase()||i>48)return createElement(r,n);const s=i*o/24;return createElement("span",{"aria-hidden":!0,style:{display:"inline-block",position:"relative",width:i,height:i,flexShrink:0,verticalAlign:"middle",...l}},createElement("img",{src:t,alt:"",draggable:!1,style:{position:"absolute",left:-s,top:-s,width:i+2*s,height:i+2*s,maxWidth:"none",pointerEvents:"none"}}))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Image,View}from"react-native";import{createIcon}from"./icon-renderer.js";import{jsx as _jsx}from"react/jsx-runtime";export function createBifRasterIcon(e,o,t){const r=createIcon(e);return function(s){const{size:i=24,color:c,bgColor:n,style:a}=s;if(void 0!==c&&c.toLowerCase()!==e.color.toLowerCase()||void 0!==n&&n.toLowerCase()!==e.bgColor.toLowerCase()||i>48)return _jsx(r,{...s});const l=i*t/24;return _jsx(View,{accessible:!1,style:[{width:i,height:i},a],children:_jsx(Image,{source:o,resizeMode:"contain",fadeDuration:0,accessible:!1,style:{position:"absolute",left:-l,top:-l,width:i+2*l,height:i+2*l}})})}}
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* CameraIcon - Data-driven icon
|
|
5
|
-
*
|
|
6
|
-
* A camera body with a viewfinder hump, a lens ring with lit glass, and a
|
|
7
|
-
* flash dot.
|
|
8
|
-
*
|
|
9
|
-
* Defined as pure data in shared/icons/camera.json (Buoy Icon Format), so this
|
|
10
|
-
* is the same artwork the Flutter build renders.
|
|
11
|
-
*
|
|
12
|
-
* To change: edit that JSON, then run `node scripts/gen-icons.mjs`.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { createIcon } from "./icon-renderer.js";
|
|
16
|
-
import { cameraIconData, CAMERA_ICON_COLOR } from "./generated/icon-data.g.js";
|
|
17
|
-
export { CAMERA_ICON_COLOR };
|
|
18
|
-
export const CameraIcon = createIcon(cameraIconData);
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{cameraIconData}from"./generated/icon-data.g.js";import source from"./generated/camera-raster.g.js";export{CAMERA_ICON_COLOR}from"./generated/icon-data.g.js";export const CameraIcon=createBifRasterIcon(cameraIconData,source,9);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{cameraIconData}from"./generated/icon-data.g.js";export{CAMERA_ICON_COLOR}from"./generated/icon-data.g.js";export const CameraIcon=createBifRasterIcon(cameraIconData,require("./assets/camera.png"),9);
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* ConsoleIcon - Data-driven icon
|
|
5
|
-
*
|
|
6
|
-
* Terminal frame with a `>_` prompt.
|
|
7
|
-
*
|
|
8
|
-
* Defined as pure data in shared/icons/console.json (Buoy Icon Format), so this
|
|
9
|
-
* is the same artwork the Flutter build renders.
|
|
10
|
-
*
|
|
11
|
-
* To change: edit that JSON, then run `node scripts/gen-icons.mjs`.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import { createIcon } from "./icon-renderer.js";
|
|
15
|
-
import { consoleIconData, CONSOLE_ICON_COLOR } from "./generated/icon-data.g.js";
|
|
16
|
-
export { CONSOLE_ICON_COLOR };
|
|
17
|
-
export const ConsoleIcon = createIcon(consoleIconData);
|
|
1
|
+
"use strict";import{createRasterIcon}from"./raster-icon.js";export{CONSOLE_ICON_COLOR}from"./generated/icon-data.g.js";export const ConsoleIcon=createRasterIcon("console");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Image}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";export{CONSOLE_ICON_COLOR}from"./generated/icon-data.g.js";const source=require("./assets/console.png");export function ConsoleIcon({size:e=24,style:s}){return _jsx(Image,{source:source,resizeMode:"contain",fadeDuration:0,accessible:!1,style:[{width:e,height:e},s]})}
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* EnvIcon - Data-driven icon
|
|
5
|
-
*
|
|
6
|
-
* Defined as pure data in shared/icons/env.json (Buoy Icon Format).
|
|
7
|
-
* The renderer transforms it to components.
|
|
8
|
-
*
|
|
9
|
-
* To change: edit that JSON, then run `node scripts/gen-icons.mjs`.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { createIcon } from "./icon-renderer.js";
|
|
13
|
-
import { envIconData, ENV_ICON_COLOR } from "./generated/icon-data.g.js";
|
|
14
|
-
export { ENV_ICON_COLOR };
|
|
15
|
-
export const EnvIcon = createIcon(envIconData);
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{envIconData}from"./generated/icon-data.g.js";import source from"./generated/env-raster.g.js";export{ENV_ICON_COLOR}from"./generated/icon-data.g.js";export const EnvIcon=createBifRasterIcon(envIconData,source,3);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{envIconData}from"./generated/icon-data.g.js";export{ENV_ICON_COLOR}from"./generated/icon-data.g.js";export const EnvIcon=createBifRasterIcon(envIconData,require("./assets/env.png"),3);
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* EventsIcon - Data-driven icon
|
|
5
|
-
*
|
|
6
|
-
* Defined as pure data in shared/icons/events.json (Buoy Icon Format).
|
|
7
|
-
* The renderer transforms it to components.
|
|
8
|
-
*
|
|
9
|
-
* To change: edit that JSON, then run `node scripts/gen-icons.mjs`.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { createIcon } from "./icon-renderer.js";
|
|
13
|
-
import { eventsIconData, EVENTS_ICON_COLOR } from "./generated/icon-data.g.js";
|
|
14
|
-
export { EVENTS_ICON_COLOR };
|
|
15
|
-
export const EventsIcon = createIcon(eventsIconData);
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{eventsIconData}from"./generated/icon-data.g.js";import source from"./generated/events-raster.g.js";export{EVENTS_ICON_COLOR}from"./generated/icon-data.g.js";export const EventsIcon=createBifRasterIcon(eventsIconData,source,3);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createBifRasterIcon}from"./bif-raster-icon";import{eventsIconData}from"./generated/icon-data.g.js";export{EVENTS_ICON_COLOR}from"./generated/icon-data.g.js";export const EventsIcon=createBifRasterIcon(eventsIconData,require("./assets/events.png"),3);
|