@effect/atom-react 4.0.0-beta.67 → 4.0.0-beta.68

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.
@@ -3,14 +3,14 @@ import * as React from "react";
3
3
  /**
4
4
  * Type identifier for ScopedAtom.
5
5
  *
6
- * @category Type IDs
6
+ * @category type IDs
7
7
  * @since 4.0.0
8
8
  */
9
9
  export type TypeId = "~@effect/atom-react/ScopedAtom";
10
10
  /**
11
11
  * Type identifier for ScopedAtom.
12
12
  *
13
- * @category Type IDs
13
+ * @category type IDs
14
14
  * @since 4.0.0
15
15
  */
16
16
  export declare const TypeId: TypeId;
@@ -20,16 +20,15 @@ export declare const TypeId: TypeId;
20
20
  * **Example** (Providing and reading a scoped atom)
21
21
  *
22
22
  * ```ts
23
- * import * as Atom from "effect/unstable/reactivity/Atom"
23
+ * import * as AtomReact from "@effect/atom-react"
24
+ * import { Atom } from "effect/unstable/reactivity"
24
25
  * import * as React from "react"
25
- * import * as ScopedAtom from "@effect/atom-react/ScopedAtom"
26
- * import { useAtomValue } from "@effect/atom-react"
27
26
  *
28
- * const Counter = ScopedAtom.make(() => Atom.make(0))
27
+ * const Counter = AtomReact.make(() => Atom.make(0))
29
28
  *
30
29
  * function View() {
31
30
  * const atom = Counter.use()
32
- * const value = useAtomValue(atom)
31
+ * const value = AtomReact.useAtomValue(atom)
33
32
  * return React.createElement("div", null, value)
34
33
  * }
35
34
  *
@@ -58,16 +57,15 @@ export interface ScopedAtom<A extends Atom.Atom<any>, Input = never> {
58
57
  * **Example** (Creating a scoped atom with input)
59
58
  *
60
59
  * ```ts
61
- * import * as Atom from "effect/unstable/reactivity/Atom"
60
+ * import * as AtomReact from "@effect/atom-react"
61
+ * import { Atom } from "effect/unstable/reactivity"
62
62
  * import * as React from "react"
63
- * import * as ScopedAtom from "@effect/atom-react/ScopedAtom"
64
- * import { useAtomValue } from "@effect/atom-react"
65
63
  *
66
- * const User = ScopedAtom.make((name: string) => Atom.make(name))
64
+ * const User = AtomReact.make((name: string) => Atom.make(name))
67
65
  *
68
66
  * function UserName() {
69
67
  * const atom = User.use()
70
- * const value = useAtomValue(atom)
68
+ * const value = AtomReact.useAtomValue(atom)
71
69
  * return React.createElement("span", null, value)
72
70
  * }
73
71
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ScopedAtom.d.ts","sourceRoot":"","sources":["../src/ScopedAtom.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,gCAAgC,CAAA;AAErD;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAAE,MAAyC,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK;IACjE,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACzB,GAAG,IAAI,CAAC,CAAA;IACR,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAA;KAAE,CAAC,GAC7F,KAAK,CAAC,EAAE,CAAC;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;IACxF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,IAAI,CAAC,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,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,EAC1D,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,CAAC,KACnC,UAAU,CAAC,CAAC,EAAE,KAAK,CA6BrB,CAAA"}
@@ -24,7 +24,7 @@ import * as React from "react";
24
24
  /**
25
25
  * Type identifier for ScopedAtom.
26
26
  *
27
- * @category Type IDs
27
+ * @category type IDs
28
28
  * @since 4.0.0
29
29
  */
30
30
  export const TypeId = "~@effect/atom-react/ScopedAtom";
@@ -34,16 +34,15 @@ export const TypeId = "~@effect/atom-react/ScopedAtom";
34
34
  * **Example** (Creating a scoped atom with input)
35
35
  *
36
36
  * ```ts
37
- * import * as Atom from "effect/unstable/reactivity/Atom"
37
+ * import * as AtomReact from "@effect/atom-react"
38
+ * import { Atom } from "effect/unstable/reactivity"
38
39
  * import * as React from "react"
39
- * import * as ScopedAtom from "@effect/atom-react/ScopedAtom"
40
- * import { useAtomValue } from "@effect/atom-react"
41
40
  *
42
- * const User = ScopedAtom.make((name: string) => Atom.make(name))
41
+ * const User = AtomReact.make((name: string) => Atom.make(name))
43
42
  *
44
43
  * function UserName() {
45
44
  * const atom = User.use()
46
- * const value = useAtomValue(atom)
45
+ * const value = AtomReact.useAtomValue(atom)
47
46
  * return React.createElement("span", null, value)
48
47
  * }
49
48
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ScopedAtom.js","names":["React","TypeId","make","f","Context","createContext","undefined","use","atom","useContext","Error","Provider","props","useRef","current","value","createElement","children"],"sources":["../src/ScopedAtom.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AAoBA,YAAY;;AAGZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAU9B;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAW,gCAAgC;AAqC9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,IAAI,GACfC,CAAoC,IACZ;EACxB,MAAMC,OAAO,GAAGJ,KAAK,CAACK,aAAa,CAAIC,SAAyB,CAAC;EAEjE,MAAMC,GAAG,GAAGA,CAAA,KAAQ;IAClB,MAAMC,IAAI,GAAGR,KAAK,CAACS,UAAU,CAACL,OAAO,CAAC;IACtC,IAAII,IAAI,KAAKF,SAAS,EAAE;MACtB,MAAM,IAAII,KAAK,CAAC,yCAAyC,CAAC;IAC5D;IACA,OAAOF,IAAI;EACb,CAAC;EAED,MAAMG,QAAQ,GAA2FC,KAAK,IAAI;IAChH,MAAMJ,IAAI,GAAGR,KAAK,CAACa,MAAM,CAAW,IAAI,CAAC;IACzC,IAAIL,IAAI,CAACM,OAAO,KAAK,IAAI,EAAE;MACzB,IAAI,OAAO,IAAIF,KAAK,EAAE;QACpBJ,IAAI,CAACM,OAAO,GAAIX,CAAyB,CAACS,KAAK,CAACG,KAAc,CAAC;MACjE,CAAC,MAAM;QACLP,IAAI,CAACM,OAAO,GAAIX,CAAa,EAAE;MACjC;IACF;IACA,OAAOH,KAAK,CAACgB,aAAa,CAACZ,OAAO,CAACO,QAAQ,EAAE;MAAEI,KAAK,EAAEP,IAAI,CAACM;IAAO,CAAE,EAAEF,KAAK,CAACK,QAAQ,CAAC;EACvF,CAAC;EAED,OAAO;IACL,CAAChB,MAAM,GAAGA,MAAM;IAChBM,GAAG;IACHI,QAAQ,EAAEA,QAAe;IACzBP;GACD;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ScopedAtom.js","names":["React","TypeId","make","f","Context","createContext","undefined","use","atom","useContext","Error","Provider","props","useRef","current","value","createElement","children"],"sources":["../src/ScopedAtom.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AAoBA,YAAY;;AAGZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAU9B;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAW,gCAAgC;AAoC9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMC,IAAI,GACfC,CAAoC,IACZ;EACxB,MAAMC,OAAO,GAAGJ,KAAK,CAACK,aAAa,CAAIC,SAAyB,CAAC;EAEjE,MAAMC,GAAG,GAAGA,CAAA,KAAQ;IAClB,MAAMC,IAAI,GAAGR,KAAK,CAACS,UAAU,CAACL,OAAO,CAAC;IACtC,IAAII,IAAI,KAAKF,SAAS,EAAE;MACtB,MAAM,IAAII,KAAK,CAAC,yCAAyC,CAAC;IAC5D;IACA,OAAOF,IAAI;EACb,CAAC;EAED,MAAMG,QAAQ,GAA2FC,KAAK,IAAI;IAChH,MAAMJ,IAAI,GAAGR,KAAK,CAACa,MAAM,CAAW,IAAI,CAAC;IACzC,IAAIL,IAAI,CAACM,OAAO,KAAK,IAAI,EAAE;MACzB,IAAI,OAAO,IAAIF,KAAK,EAAE;QACpBJ,IAAI,CAACM,OAAO,GAAIX,CAAyB,CAACS,KAAK,CAACG,KAAc,CAAC;MACjE,CAAC,MAAM;QACLP,IAAI,CAACM,OAAO,GAAIX,CAAa,EAAE;MACjC;IACF;IACA,OAAOH,KAAK,CAACgB,aAAa,CAACZ,OAAO,CAACO,QAAQ,EAAE;MAAEI,KAAK,EAAEP,IAAI,CAACM;IAAO,CAAE,EAAEF,KAAK,CAACK,QAAQ,CAAC;EACvF,CAAC;EAED,OAAO;IACL,CAAChB,MAAM,GAAGA,MAAM;IAChBM,GAAG;IACHI,QAAQ,EAAEA,QAAe;IACzBP;GACD;AACH,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/atom-react",
3
- "version": "4.0.0-beta.67",
3
+ "version": "4.0.0-beta.68",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "React bindings for the Effect Atom modules",
@@ -45,7 +45,7 @@
45
45
  "peerDependencies": {
46
46
  "react": "^19.2.4",
47
47
  "scheduler": "*",
48
- "effect": "^4.0.0-beta.67"
48
+ "effect": "^4.0.0-beta.68"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@testing-library/dom": "^10.4.1",
@@ -59,7 +59,7 @@
59
59
  "react-dom": "19.2.6",
60
60
  "react-error-boundary": "^6.1.1",
61
61
  "scheduler": "^0.27.0",
62
- "effect": "^4.0.0-beta.67"
62
+ "effect": "^4.0.0-beta.68"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "tsc -b tsconfig.json && pnpm babel",
package/src/ScopedAtom.ts CHANGED
@@ -26,7 +26,7 @@ import * as React from "react"
26
26
  /**
27
27
  * Type identifier for ScopedAtom.
28
28
  *
29
- * @category Type IDs
29
+ * @category type IDs
30
30
  * @since 4.0.0
31
31
  */
32
32
  export type TypeId = "~@effect/atom-react/ScopedAtom"
@@ -34,7 +34,7 @@ export type TypeId = "~@effect/atom-react/ScopedAtom"
34
34
  /**
35
35
  * Type identifier for ScopedAtom.
36
36
  *
37
- * @category Type IDs
37
+ * @category type IDs
38
38
  * @since 4.0.0
39
39
  */
40
40
  export const TypeId: TypeId = "~@effect/atom-react/ScopedAtom"
@@ -45,16 +45,15 @@ export const TypeId: TypeId = "~@effect/atom-react/ScopedAtom"
45
45
  * **Example** (Providing and reading a scoped atom)
46
46
  *
47
47
  * ```ts
48
- * import * as Atom from "effect/unstable/reactivity/Atom"
48
+ * import * as AtomReact from "@effect/atom-react"
49
+ * import { Atom } from "effect/unstable/reactivity"
49
50
  * import * as React from "react"
50
- * import * as ScopedAtom from "@effect/atom-react/ScopedAtom"
51
- * import { useAtomValue } from "@effect/atom-react"
52
51
  *
53
- * const Counter = ScopedAtom.make(() => Atom.make(0))
52
+ * const Counter = AtomReact.make(() => Atom.make(0))
54
53
  *
55
54
  * function View() {
56
55
  * const atom = Counter.use()
57
- * const value = useAtomValue(atom)
56
+ * const value = AtomReact.useAtomValue(atom)
58
57
  * return React.createElement("div", null, value)
59
58
  * }
60
59
  *
@@ -80,16 +79,15 @@ export interface ScopedAtom<A extends Atom.Atom<any>, Input = never> {
80
79
  * **Example** (Creating a scoped atom with input)
81
80
  *
82
81
  * ```ts
83
- * import * as Atom from "effect/unstable/reactivity/Atom"
82
+ * import * as AtomReact from "@effect/atom-react"
83
+ * import { Atom } from "effect/unstable/reactivity"
84
84
  * import * as React from "react"
85
- * import * as ScopedAtom from "@effect/atom-react/ScopedAtom"
86
- * import { useAtomValue } from "@effect/atom-react"
87
85
  *
88
- * const User = ScopedAtom.make((name: string) => Atom.make(name))
86
+ * const User = AtomReact.make((name: string) => Atom.make(name))
89
87
  *
90
88
  * function UserName() {
91
89
  * const atom = User.use()
92
- * const value = useAtomValue(atom)
90
+ * const value = AtomReact.useAtomValue(atom)
93
91
  * return React.createElement("span", null, value)
94
92
  * }
95
93
  *