@tomorrowevening/theatre-dataverse 1.0.0 → 1.0.2

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.
Files changed (40) hide show
  1. package/dist/Atom.d.ts +85 -127
  2. package/dist/Atom.d.ts.map +1 -1
  3. package/dist/Atom.test.d.ts +2 -0
  4. package/dist/Atom.test.d.ts.map +1 -0
  5. package/dist/PointerProxy.d.ts +33 -33
  6. package/dist/Ticker.d.ts +105 -105
  7. package/dist/Ticker.test.d.ts +2 -0
  8. package/dist/Ticker.test.d.ts.map +1 -0
  9. package/dist/atom.typeTest.d.ts +2 -2
  10. package/dist/dataverse.test.d.ts +2 -0
  11. package/dist/dataverse.test.d.ts.map +1 -0
  12. package/dist/index.d.ts +19 -19
  13. package/dist/index.js +30 -13
  14. package/dist/index.js.map +2 -2
  15. package/dist/index.mjs +1564 -0
  16. package/dist/index.mjs.map +7 -0
  17. package/dist/integration.test.d.ts +2 -0
  18. package/dist/integration.test.d.ts.map +1 -0
  19. package/dist/pointer.d.ts +107 -107
  20. package/dist/pointer.test.d.ts +2 -0
  21. package/dist/pointer.test.d.ts.map +1 -0
  22. package/dist/pointer.typeTest.d.ts +2 -2
  23. package/dist/pointerToPrism.d.ts +20 -20
  24. package/dist/prism/Interface.d.ts +33 -33
  25. package/dist/prism/asyncIterateOver.d.ts +1 -1
  26. package/dist/prism/discoveryMechanism.d.ts +4 -4
  27. package/dist/prism/iterateAndCountTicks.d.ts +7 -7
  28. package/dist/prism/iterateOver.d.ts +4 -4
  29. package/dist/prism/iterateOver.test.d.ts +2 -0
  30. package/dist/prism/iterateOver.test.d.ts.map +1 -0
  31. package/dist/prism/prism.d.ts +1 -1
  32. package/dist/prism/prism.test.d.ts +2 -0
  33. package/dist/prism/prism.test.d.ts.map +1 -0
  34. package/dist/setupTestEnv.d.ts +2 -2
  35. package/dist/types.d.ts +6 -6
  36. package/dist/utils/Stack.d.ts +16 -16
  37. package/dist/utils/typeTestUtils.d.ts +11 -11
  38. package/dist/utils/updateDeep.d.ts +3 -3
  39. package/dist/val.d.ts +14 -14
  40. package/package.json +8 -10
@@ -1,33 +1,33 @@
1
- import type Ticker from '../Ticker';
2
- import type { VoidFn } from '../types';
3
- /**
4
- * Common interface for prisms.
5
- */
6
- export interface Prism<V> {
7
- /**
8
- * Whether the object is a prism.
9
- */
10
- isPrism: true;
11
- /**
12
- * Whether the prism is hot.
13
- */
14
- isHot: boolean;
15
- /**
16
- * Calls `listener` with a fresh value every time the prism _has_ a new value, throttled by Ticker.
17
- */
18
- onChange(ticker: Ticker, listener: (v: V) => void, immediate?: boolean): VoidFn;
19
- onStale(cb: () => void): VoidFn;
20
- /**
21
- * Keep the prism hot, even if there are no tappers (subscribers).
22
- */
23
- keepHot(): VoidFn;
24
- /**
25
- * Gets the current value of the prism. If the value is stale, it causes the prism to freshen.
26
- */
27
- getValue(): V;
28
- }
29
- /**
30
- * Returns whether `d` is a prism.
31
- */
32
- export declare function isPrism(d: any): d is Prism<unknown>;
33
- //# sourceMappingURL=Interface.d.ts.map
1
+ import type Ticker from '../Ticker';
2
+ import type { VoidFn } from '../types';
3
+ /**
4
+ * Common interface for prisms.
5
+ */
6
+ export interface Prism<V> {
7
+ /**
8
+ * Whether the object is a prism.
9
+ */
10
+ isPrism: true;
11
+ /**
12
+ * Whether the prism is hot.
13
+ */
14
+ isHot: boolean;
15
+ /**
16
+ * Calls `listener` with a fresh value every time the prism _has_ a new value, throttled by Ticker.
17
+ */
18
+ onChange(ticker: Ticker, listener: (v: V) => void, immediate?: boolean): VoidFn;
19
+ onStale(cb: () => void): VoidFn;
20
+ /**
21
+ * Keep the prism hot, even if there are no tappers (subscribers).
22
+ */
23
+ keepHot(): VoidFn;
24
+ /**
25
+ * Gets the current value of the prism. If the value is stale, it causes the prism to freshen.
26
+ */
27
+ getValue(): V;
28
+ }
29
+ /**
30
+ * Returns whether `d` is a prism.
31
+ */
32
+ export declare function isPrism(d: any): d is Prism<unknown>;
33
+ //# sourceMappingURL=Interface.d.ts.map
@@ -1 +1 @@
1
- //# sourceMappingURL=asyncIterateOver.d.ts.map
1
+ //# sourceMappingURL=asyncIterateOver.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { $IntentionalAny } from '../types';
2
- import type { Prism } from './Interface';
3
- export declare const startIgnoringDependencies: () => void, stopIgnoringDependencies: () => void, reportResolutionEnd: (_d: Prism<$IntentionalAny>) => void, reportResolutionStart: (d: Prism<$IntentionalAny>) => void, pushCollector: (collector: (d: Prism<$IntentionalAny>) => void) => void, popCollector: (collector: (d: Prism<$IntentionalAny>) => void) => void;
4
- //# sourceMappingURL=discoveryMechanism.d.ts.map
1
+ import type { $IntentionalAny } from '../types';
2
+ import type { Prism } from './Interface';
3
+ export declare const startIgnoringDependencies: () => void, stopIgnoringDependencies: () => void, reportResolutionEnd: (_d: Prism<$IntentionalAny>) => void, reportResolutionStart: (d: Prism<$IntentionalAny>) => void, pushCollector: (collector: (d: Prism<$IntentionalAny>) => void) => void, popCollector: (collector: (d: Prism<$IntentionalAny>) => void) => void;
4
+ //# sourceMappingURL=discoveryMechanism.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { Pointer } from '../pointer';
2
- import type { Prism } from './Interface';
3
- export default function iterateAndCountTicks<V>(pointerOrPrism: Prism<V> | Pointer<V>): Generator<{
4
- value: V;
5
- ticks: number;
6
- }, void, void>;
7
- //# sourceMappingURL=iterateAndCountTicks.d.ts.map
1
+ import type { Pointer } from '../pointer';
2
+ import type { Prism } from './Interface';
3
+ export default function iterateAndCountTicks<V>(pointerOrPrism: Prism<V> | Pointer<V>): Generator<{
4
+ value: V;
5
+ ticks: number;
6
+ }, void, void>;
7
+ //# sourceMappingURL=iterateAndCountTicks.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Pointer } from '../pointer';
2
- import type { Prism } from './Interface';
3
- export default function iterateOver<V>(pointerOrPrism: Prism<V> | Pointer<V>): Generator<V, void, void>;
4
- //# sourceMappingURL=iterateOver.d.ts.map
1
+ import type { Pointer } from '../pointer';
2
+ import type { Prism } from './Interface';
3
+ export default function iterateOver<V>(pointerOrPrism: Prism<V> | Pointer<V>): Generator<V, void, void>;
4
+ //# sourceMappingURL=iterateOver.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=iterateOver.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iterateOver.test.d.ts","sourceRoot":"","sources":["../../src/prism/iterateOver.test.ts"],"names":[],"mappings":""}
@@ -90,7 +90,7 @@ declare function state<T>(key: string, initialValue: T): [T, (val: T) => void];
90
90
  *
91
91
  * @example
92
92
  * ```ts
93
- * import {prism} from '@tomorrowevening/theatre-dataverse'
93
+ * import {prism} from '@theatre/dataverse'
94
94
  *
95
95
  * function onlyUsefulInAPrism() {
96
96
  * prism.ensurePrism()
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=prism.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prism.test.d.ts","sourceRoot":"","sources":["../../src/prism/prism.test.ts"],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=setupTestEnv.d.ts.map
1
+ export {};
2
+ //# sourceMappingURL=setupTestEnv.d.ts.map
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- /** For `any`s that aren't meant to stay `any`*/
2
- export type $FixMe = any;
3
- /** For `any`s that we don't care about */
4
- export type $IntentionalAny = any;
5
- export type VoidFn = () => void;
6
- //# sourceMappingURL=types.d.ts.map
1
+ /** For `any`s that aren't meant to stay `any`*/
2
+ export type $FixMe = any;
3
+ /** For `any`s that we don't care about */
4
+ export type $IntentionalAny = any;
5
+ export type VoidFn = () => void;
6
+ //# sourceMappingURL=types.d.ts.map
@@ -1,16 +1,16 @@
1
- interface Node<Data> {
2
- next: undefined | Node<Data>;
3
- data: Data;
4
- }
5
- /**
6
- * Just a simple LinkedList
7
- */
8
- export default class Stack<Data> {
9
- _head: undefined | Node<Data>;
10
- constructor();
11
- peek(): Data | undefined;
12
- pop(): Data | undefined;
13
- push(data: Data): void;
14
- }
15
- export {};
16
- //# sourceMappingURL=Stack.d.ts.map
1
+ interface Node<Data> {
2
+ next: undefined | Node<Data>;
3
+ data: Data;
4
+ }
5
+ /**
6
+ * Just a simple LinkedList
7
+ */
8
+ export default class Stack<Data> {
9
+ _head: undefined | Node<Data>;
10
+ constructor();
11
+ peek(): Data | undefined;
12
+ pop(): Data | undefined;
13
+ push(data: Data): void;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=Stack.d.ts.map
@@ -1,11 +1,11 @@
1
- import type { $IntentionalAny } from '../types';
2
- /**
3
- * Useful in type tests, such as: const a: SomeType = _any
4
- */
5
- export declare const _any: $IntentionalAny;
6
- /**
7
- * Useful in typeTests. If you want to ensure that value v follows type V,
8
- * just write `expectType<V>(v)`
9
- */
10
- export declare const expectType: <T extends unknown>(v: T) => T;
11
- //# sourceMappingURL=typeTestUtils.d.ts.map
1
+ import type { $IntentionalAny } from '../types';
2
+ /**
3
+ * Useful in type tests, such as: const a: SomeType = _any
4
+ */
5
+ export declare const _any: $IntentionalAny;
6
+ /**
7
+ * Useful in typeTests. If you want to ensure that value v follows type V,
8
+ * just write `expectType<V>(v)`
9
+ */
10
+ export declare const expectType: <T extends unknown>(v: T) => T;
11
+ //# sourceMappingURL=typeTestUtils.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { $IntentionalAny } from '../types';
2
- export default function updateDeep<S>(state: S, path: (string | number | undefined)[], reducer: (...args: $IntentionalAny[]) => $IntentionalAny): S;
3
- //# sourceMappingURL=updateDeep.d.ts.map
1
+ import type { $IntentionalAny } from '../types';
2
+ export default function updateDeep<S>(state: S, path: (string | number | undefined)[], reducer: (...args: $IntentionalAny[]) => $IntentionalAny): S;
3
+ //# sourceMappingURL=updateDeep.d.ts.map
package/dist/val.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import type { Prism } from './prism/Interface';
2
- import type { PointerType } from './pointer';
3
- /**
4
- * Convenience function that returns a plain value from its argument, whether it
5
- * is a pointer, a prism or a plain value itself.
6
- *
7
- * @remarks
8
- * For pointers, the value is returned by first creating a prism, so it is
9
- * reactive e.g. when used in a `prism`.
10
- *
11
- * @param input - The argument to return a value from.
12
- */
13
- export declare const val: <P extends PointerType<any> | Prism<any> | null | undefined>(input: P) => P extends PointerType<infer T> ? T : P extends Prism<infer T_1> ? T_1 : P extends null | undefined ? P : unknown;
14
- //# sourceMappingURL=val.d.ts.map
1
+ import type { Prism } from './prism/Interface';
2
+ import type { PointerType } from './pointer';
3
+ /**
4
+ * Convenience function that returns a plain value from its argument, whether it
5
+ * is a pointer, a prism or a plain value itself.
6
+ *
7
+ * @remarks
8
+ * For pointers, the value is returned by first creating a prism, so it is
9
+ * reactive e.g. when used in a `prism`.
10
+ *
11
+ * @param input - The argument to return a value from.
12
+ */
13
+ export declare const val: <P extends Prism<any> | PointerType<any> | null | undefined>(input: P) => P extends PointerType<infer T> ? T : P extends Prism<infer T_1> ? T_1 : P extends null | undefined ? P : unknown;
14
+ //# sourceMappingURL=val.d.ts.map
package/package.json CHANGED
@@ -1,31 +1,29 @@
1
1
  {
2
2
  "name": "@tomorrowevening/theatre-dataverse",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "license": "Apache-2.0",
5
5
  "author": {
6
- "name": "Colin Duffy",
7
- "email": "colin@tomorrowevening.com",
8
- "url": "https://tomorrowevening.com/"
6
+ "name": "Aria Minaei",
7
+ "email": "aria@theatrejs.com",
8
+ "url": "https://github.com/AriaMinaei"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/tomorrowevening/theatre",
12
+ "url": "https://github.com/AriaMinaei/theatre",
13
13
  "directory": "packages/dataverse"
14
14
  },
15
15
  "main": "dist/index.js",
16
+ "module": "dist/index.mjs",
16
17
  "types": "dist/index.d.ts",
17
18
  "files": [
18
19
  "dist/**/*"
19
20
  ],
20
- "publishConfig": {
21
- "access": "public"
22
- },
23
21
  "scripts": {
24
22
  "prepack": "node ../../devEnv/ensurePublishing.js",
25
23
  "typecheck": "yarn run build:ts",
26
24
  "build": "run-s build:ts build:js build:api-json",
27
25
  "build:ts": "tsc --build ./tsconfig.json",
28
- "build:js": "tsx ./devEnv/build.ts",
26
+ "build:js": "node -r esbuild-register ./devEnv/build.ts",
29
27
  "build:api-json": "api-extractor run --local --config devEnv/api-extractor.json",
30
28
  "prepublish": "node ../../devEnv/ensurePublishing.js",
31
29
  "clean": "rm -rf ./dist && rm -f tsconfig.tsbuildinfo",
@@ -38,8 +36,8 @@
38
36
  "@types/lodash-es": "^4.17.4",
39
37
  "@types/node": "^15.6.2",
40
38
  "esbuild": "^0.12.15",
39
+ "esbuild-register": "^2.5.0",
41
40
  "npm-run-all": "^4.1.5",
42
- "tsx": "4.7.0",
43
41
  "typedoc": "^0.24.8",
44
42
  "typedoc-plugin-markdown": "^3.15.4",
45
43
  "typescript": "5.1.6"