valdres 0.2.0-alpha.58 → 0.2.0-alpha.59

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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- // index.ts
2
- import { version } from "./package.json";
1
+ // src/index.ts
2
+ import { version } from "../package.json";
3
3
 
4
4
  // src/lib/equal.ts
5
5
  var hasElementType = typeof Element !== "undefined";
@@ -1047,7 +1047,7 @@ var selectorFamily = (get, options) => {
1047
1047
  // src/utils/isFamilySelector.ts
1048
1048
  var isFamilySelector = (state) => isFamilyState(state) && isSelector(state);
1049
1049
 
1050
- // index.ts
1050
+ // src/index.ts
1051
1051
  if (globalThis.__valdres__) {
1052
1052
  throw new Error(`Error! An instance of valdres is already loaded. Loaded: ${globalThis.__valdres__}. Attempted to load: ${version}`);
1053
1053
  } else {
@@ -1,4 +1,4 @@
1
1
  import type { AtomOptions } from "./types/AtomOptions";
2
2
  import type { FamilyKey } from "./types/FamilyKey";
3
3
  import type { AtomFamilyDefaultValue } from "./types/AtomFamilyDefaultValue";
4
- export declare function atomFamily<Key = FamilyKey, Value = unknown>(defaultValue?: AtomFamilyDefaultValue<Key, Value>, options?: AtomOptions<Value>): import("..").AtomFamily<Key, Value>;
4
+ export declare function atomFamily<Key = FamilyKey, Value = unknown>(defaultValue?: AtomFamilyDefaultValue<Key, Value>, options?: AtomOptions<Value>): import(".").AtomFamily<Key, Value>;
@@ -1,4 +1,4 @@
1
- export declare const globalStore: import("..").Store & {
1
+ export declare const globalStore: import(".").Store & {
2
2
  atoms: Map<any, any>;
3
3
  atomFamilies: Map<any, any>;
4
4
  };
@@ -0,0 +1,34 @@
1
+ declare global {
2
+ var __valdres__: string;
3
+ }
4
+ export { atom } from "./atom";
5
+ export { atomFamily } from "./atomFamily";
6
+ export { createStoreWithSelectorSet } from "./createStoreWithSelectorSet";
7
+ export { globalStore } from "./globalStore";
8
+ export { selector } from "./selector";
9
+ export { selectorFamily } from "./selectorFamily";
10
+ export { store } from "./store";
11
+ export { isAtom } from "./utils/isAtom";
12
+ export { isAtomFamily } from "./utils/isAtomFamily";
13
+ export { isFamily } from "./utils/isFamily";
14
+ export { isFamilyAtom } from "./utils/isFamilyAtom";
15
+ export { isFamilySelector } from "./utils/isFamilySelector";
16
+ export { isFamilyState } from "./utils/isFamilyState";
17
+ export { isPromiseLike } from "./utils/isPromiseLike";
18
+ export { isSelector } from "./utils/isSelector";
19
+ export { isSelectorFamily } from "./utils/isSelectorFamily";
20
+ export type { Atom } from "./types/Atom";
21
+ export type { AtomFamily } from "./types/AtomFamily";
22
+ export type { FamilyKey } from "./types/FamilyKey";
23
+ export type { GetValue } from "./types/GetValue";
24
+ export type { GlobalAtom } from "./types/GlobalAtom";
25
+ export type { ResetAtom } from "./types/ResetAtom";
26
+ export type { Selector } from "./types/Selector";
27
+ export type { SelectorFamily } from "./types/SelectorFamily";
28
+ export type { SetAtom } from "./types/SetAtom";
29
+ export type { SetAtomValue } from "./types/SetAtomValue";
30
+ export type { State } from "./types/State";
31
+ export type { Store } from "./types/Store";
32
+ export type { StoreData } from "./types/StoreData";
33
+ export type { TransactionFn } from "./types/TransactionFn";
34
+ export type { TransactionInterface } from "./types/TransactionInterface";
@@ -1 +1 @@
1
- export declare const store: (id?: string) => import("..").Store;
1
+ export declare const store: (id?: string) => import(".").Store;
@@ -1 +1 @@
1
- export declare const isFamily: (state: any) => state is import("../..").SelectorFamily<unknown, unknown> | import("../..").AtomFamily<unknown, unknown>;
1
+ export declare const isFamily: (state: any) => state is import("..").SelectorFamily<unknown, unknown> | import("..").AtomFamily<unknown, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valdres",
3
- "version": "0.2.0-alpha.58",
3
+ "version": "0.2.0-alpha.59",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Eigil Sagafos"
@@ -13,7 +13,7 @@
13
13
  "type": "module",
14
14
  "exports": {
15
15
  "default": "./dist/index.js",
16
- "types": "./dist/types/index.d.ts"
16
+ "types": "./dist/types/src/index.d.ts"
17
17
  },
18
18
  "files": [
19
19
  "dist"
@@ -36,5 +36,5 @@
36
36
  "access": "public",
37
37
  "registry": "https://registry.npmjs.org/"
38
38
  },
39
- "gitHead": "9783a71f127ea52a02868525a075bc78b1c9f9ef"
39
+ "gitHead": "7e66391e22da3c056ade60b1f735238fbc25a9d3"
40
40
  }
@@ -1,34 +0,0 @@
1
- declare global {
2
- var __valdres__: string;
3
- }
4
- export { atom } from "./src/atom";
5
- export { atomFamily } from "./src/atomFamily";
6
- export { createStoreWithSelectorSet } from "./src/createStoreWithSelectorSet";
7
- export { globalStore } from "./src/globalStore";
8
- export { selector } from "./src/selector";
9
- export { selectorFamily } from "./src/selectorFamily";
10
- export { store } from "./src/store";
11
- export { isAtom } from "./src/utils/isAtom";
12
- export { isAtomFamily } from "./src/utils/isAtomFamily";
13
- export { isFamily } from "./src/utils/isFamily";
14
- export { isFamilyAtom } from "./src/utils/isFamilyAtom";
15
- export { isFamilySelector } from "./src/utils/isFamilySelector";
16
- export { isFamilyState } from "./src/utils/isFamilyState";
17
- export { isPromiseLike } from "./src/utils/isPromiseLike";
18
- export { isSelector } from "./src/utils/isSelector";
19
- export { isSelectorFamily } from "./src/utils/isSelectorFamily";
20
- export type { Atom } from "./src/types/Atom";
21
- export type { AtomFamily } from "./src/types/AtomFamily";
22
- export type { FamilyKey } from "./src/types/FamilyKey";
23
- export type { GetValue } from "./src/types/GetValue";
24
- export type { GlobalAtom } from "./src/types/GlobalAtom";
25
- export type { ResetAtom } from "./src/types/ResetAtom";
26
- export type { Selector } from "./src/types/Selector";
27
- export type { SelectorFamily } from "./src/types/SelectorFamily";
28
- export type { SetAtom } from "./src/types/SetAtom";
29
- export type { SetAtomValue } from "./src/types/SetAtomValue";
30
- export type { State } from "./src/types/State";
31
- export type { Store } from "./src/types/Store";
32
- export type { StoreData } from "./src/types/StoreData";
33
- export type { TransactionFn } from "./src/types/TransactionFn";
34
- export type { TransactionInterface } from "./src/types/TransactionInterface";