Skip to content

Rename eyeDropper.sRGBHex() to .value() #256

Description

@vs-borodin

Which @signality/* package(s) are relevant/related to the feature request?

core

Description

EyeDropperRef.sRGBHex copies the field name straight off the platform's open() result, so the web API's shape leaks into ours. Other core utilities that carry a single primary value expose it as value (cva, queryParams, and fpsMonitor after #248), so eyeDropper is inconsistent with the rest of the API.

Proposed solution

Rename the ref member to match the rest of the API, with a temporary deprecation window instead of a hard break.

New API:

import { eyeDropper } from '@signality/core';

readonly picker = eyeDropper();
// picker.value()      (was picker.sRGBHex())
// picker.isSupported()
// picker.open() / picker.close()

Renames:

Before After
EyeDropperRef.sRGBHex EyeDropperRef.value

Alternatives considered

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions