@phreshos/react 0.1.7 → 0.1.8

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 CHANGED
@@ -31,9 +31,6 @@ It provides two kinds of adapter:
31
31
  - `useObserveAsks()` adapts an Endpoint traffic surface's question observation,
32
32
  while `useObserveAnswers()` adapts a Server traffic surface's answer
33
33
  observation.
34
- - `useScale(value)` and `useColor(value)` memoize the complete derived scale
35
- around the explicit number or CSS color supplied by the component. They do
36
- not read a Theme or choose a source value implicitly.
37
34
 
38
35
  Window needs no React resolution: `current.window` is already a synchronous,
39
36
  silent capability object. `CurrentProvider` therefore has no `window` selection
@@ -75,13 +72,6 @@ mount its `useWindowState()` child only while `clientExists` is true. Calling
75
72
  the Window hook while the Client is absent lets the existing Window reads
76
73
  reject normally.
77
74
 
78
- ```tsx
79
- const theme = useHostTheme()
80
- const spacing = useScale(theme.spacing)
81
- const radius = useScale(theme.radius)
82
- const accent = useColor(theme.accent)
83
- ```
84
-
85
75
  The ordinary-event and traffic hooks retain the latest value returned by their projector.
86
76
  `useSubscribe()` may omit that callback; its default projector is
87
77
  `message => message`, so the hook retains the latest message unchanged.
package/dist/main.d.ts CHANGED
@@ -2,8 +2,6 @@ export { default as CurrentProvider, useParent, useProcess, useProgram, type Cur
2
2
  export { default as HostProvider, usePointerPosition, useDesktopSize, useHostTheme, type HostProvision, type HostProvisionName, type HostProviderProperties } from "./host-provider.js";
3
3
  export { default as useSubscribe } from "./use-subscribe.js";
4
4
  export { default as useObserve } from "./use-observe.js";
5
- export { default as useScale } from "./use-scale.js";
6
- export { default as useColor } from "./use-color.js";
7
5
  export { default as useProgramState, type ProgramState } from "./use-program-state.js";
8
6
  export { default as useProcessState, type ProcessState } from "./use-process-state.js";
9
7
  export { default as useServiceState, type ServiceState } from "./use-service-state.js";
package/dist/main.js CHANGED
@@ -2,8 +2,6 @@ export { default as CurrentProvider, useParent, useProcess, useProgram } from ".
2
2
  export { default as HostProvider, usePointerPosition, useDesktopSize, useHostTheme } from "./host-provider.js";
3
3
  export { default as useSubscribe } from "./use-subscribe.js";
4
4
  export { default as useObserve } from "./use-observe.js";
5
- export { default as useScale } from "./use-scale.js";
6
- export { default as useColor } from "./use-color.js";
7
5
  export { default as useProgramState } from "./use-program-state.js";
8
6
  export { default as useProcessState } from "./use-process-state.js";
9
7
  export { default as useServiceState } from "./use-service-state.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phreshos/react",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "React adapters for the Client SDK.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
@@ -52,8 +52,8 @@
52
52
  "react": "^19.2.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@phreshos/client": "^0.1.13",
56
- "@phreshos/core": "^0.1.9",
55
+ "@phreshos/client": "^0.1.19",
56
+ "@phreshos/core": "^0.1.16",
57
57
  "@testing-library/react": "^16.3.0",
58
58
  "@types/react": "^19.2.18",
59
59
  "@types/react-dom": "^19.2.4",
@@ -1,3 +0,0 @@
1
- import { type ColorScale } from "@phreshos/core";
2
- /** Returns the complete color scale derived from one explicit CSS color. */
3
- export default function useColor(value: string): ColorScale;
package/dist/use-color.js DELETED
@@ -1,6 +0,0 @@
1
- import { useMemo } from "react";
2
- import { color } from "@phreshos/core";
3
- /** Returns the complete color scale derived from one explicit CSS color. */
4
- export default function useColor(value) {
5
- return useMemo(() => color(value), [value]);
6
- }
@@ -1,3 +0,0 @@
1
- import { type NumericScale } from "@phreshos/core";
2
- /** Returns the complete visual scale derived from one explicit numeric value. */
3
- export default function useScale(value: number): NumericScale;
package/dist/use-scale.js DELETED
@@ -1,6 +0,0 @@
1
- import { useMemo } from "react";
2
- import { numericScale } from "@phreshos/core";
3
- /** Returns the complete visual scale derived from one explicit numeric value. */
4
- export default function useScale(value) {
5
- return useMemo(() => numericScale(value), [value]);
6
- }