@expressive/react 0.53.5 → 0.54.0
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/esm/adapter.mjs +121 -0
- package/dist/esm/adapter.mjs.map +1 -0
- package/dist/esm/context.mjs +23 -0
- package/dist/esm/context.mjs.map +1 -0
- package/dist/esm/index.mjs +34 -0
- package/dist/esm/index.mjs.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// src/model.as.ts
|
|
2
|
+
import { Model } from "@expressive/mvc";
|
|
3
|
+
Model.as = function(render) {
|
|
4
|
+
if (this === Model)
|
|
5
|
+
throw new Error("Cannot create component from base Model.");
|
|
6
|
+
const Component = (inputProps) => {
|
|
7
|
+
const props = this.use(inputProps, true);
|
|
8
|
+
for (const key in inputProps)
|
|
9
|
+
if (!(key in props))
|
|
10
|
+
Object.defineProperty(props, key, { value: inputProps[key] });
|
|
11
|
+
return render(props);
|
|
12
|
+
};
|
|
13
|
+
Component.Model = this;
|
|
14
|
+
Component.displayName = this.name;
|
|
15
|
+
return Component;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/model.use.ts
|
|
19
|
+
import { Model as Model2 } from "@expressive/mvc";
|
|
20
|
+
import { Pragma } from "./adapter";
|
|
21
|
+
Model2.use = function(argument, repeat) {
|
|
22
|
+
const ambient = Pragma.useContext();
|
|
23
|
+
const render = Pragma.useFactory((refresh) => {
|
|
24
|
+
let enabled;
|
|
25
|
+
let local;
|
|
26
|
+
const instance = new this(argument);
|
|
27
|
+
const context = ambient.push({ instance });
|
|
28
|
+
const unwatch = instance.get((current) => {
|
|
29
|
+
local = current;
|
|
30
|
+
if (enabled)
|
|
31
|
+
refresh();
|
|
32
|
+
});
|
|
33
|
+
function didMount() {
|
|
34
|
+
enabled = true;
|
|
35
|
+
return () => {
|
|
36
|
+
unwatch();
|
|
37
|
+
instance.set(null);
|
|
38
|
+
context.pop();
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return (props) => {
|
|
42
|
+
Pragma.useLifecycle(didMount);
|
|
43
|
+
if (repeat && enabled && props) {
|
|
44
|
+
enabled = false;
|
|
45
|
+
if (typeof props == "function")
|
|
46
|
+
props.call(instance, instance);
|
|
47
|
+
else if (typeof props == "object")
|
|
48
|
+
instance.set(props);
|
|
49
|
+
const update = instance.set();
|
|
50
|
+
if (update)
|
|
51
|
+
update.then(() => enabled = true);
|
|
52
|
+
else
|
|
53
|
+
enabled = true;
|
|
54
|
+
}
|
|
55
|
+
return local;
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
return render(argument);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// src/model.get.ts
|
|
62
|
+
import { createEffect, Model as Model3 } from "@expressive/mvc";
|
|
63
|
+
import { Pragma as Pragma2 } from "./adapter";
|
|
64
|
+
Model3.get = function(argument) {
|
|
65
|
+
const context = Pragma2.useContext();
|
|
66
|
+
const render = Pragma2.useFactory((refresh) => {
|
|
67
|
+
function forceUpdate(action) {
|
|
68
|
+
if (typeof action == "function")
|
|
69
|
+
action = action();
|
|
70
|
+
refresh();
|
|
71
|
+
if (action)
|
|
72
|
+
return action.finally(refresh);
|
|
73
|
+
}
|
|
74
|
+
const instance = context.get(this);
|
|
75
|
+
if (!instance)
|
|
76
|
+
if (argument === false)
|
|
77
|
+
return () => void 0;
|
|
78
|
+
else
|
|
79
|
+
throw new Error(`Could not find ${this} in context.`);
|
|
80
|
+
let unwatch;
|
|
81
|
+
let value;
|
|
82
|
+
unwatch = createEffect(instance, (current) => {
|
|
83
|
+
if (typeof argument === "function") {
|
|
84
|
+
const next = argument.call(current, current, forceUpdate);
|
|
85
|
+
if (next === value)
|
|
86
|
+
return;
|
|
87
|
+
value = next;
|
|
88
|
+
} else
|
|
89
|
+
value = current;
|
|
90
|
+
if (unwatch)
|
|
91
|
+
refresh();
|
|
92
|
+
}, argument === true);
|
|
93
|
+
if (value instanceof Promise) {
|
|
94
|
+
let error;
|
|
95
|
+
unwatch();
|
|
96
|
+
value.then((x) => value = x).catch((e) => error = e).finally(refresh);
|
|
97
|
+
value = null;
|
|
98
|
+
return () => {
|
|
99
|
+
if (error)
|
|
100
|
+
throw error;
|
|
101
|
+
return value === void 0 ? null : value;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (value === null) {
|
|
105
|
+
unwatch();
|
|
106
|
+
return () => null;
|
|
107
|
+
}
|
|
108
|
+
return () => {
|
|
109
|
+
Pragma2.useLifecycle(() => unwatch);
|
|
110
|
+
return value === void 0 ? null : value;
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
return render();
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// src/adapter.ts
|
|
117
|
+
var Pragma3 = {};
|
|
118
|
+
export {
|
|
119
|
+
Pragma3 as Pragma
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=adapter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/model.as.ts","../../src/model.use.ts","../../src/model.get.ts","../../src/adapter.ts"],"sourcesContent":["import { Model } from '@expressive/mvc';\n\ndeclare module '@expressive/mvc' {\n namespace Model {\n interface Component<T extends Model, P extends Model.Assign<T>> {\n (props: P): JSX.Element | null;\n\n displayName?: string;\n Model: Model.Type<T>;\n }\n\n /**\n * Creates a component which reflects this Model. All managed properties may be assigned using props.\n * \n * @param render Function which renders component. This function receives all Model state merged with props. Normal subscription behavior still applies.\n */\n function as <T extends Model, P extends Model.Assign<T>> (\n this: Model.Init<T>, render: (using: P) => JSX.Element | null\n ): Component<T, P & Model.Assign<T>>;\n }\n}\n\nModel.as = function <T extends Model, P extends Model.Assign<T>> (\n this: Model.Init<T>, render: (using: P) => JSX.Element | null){\n\n if(this === Model)\n throw new Error(\"Cannot create component from base Model.\");\n\n const Component = ((inputProps: P) => {\n const props = this.use(inputProps, true) as T & P;\n\n for(const key in inputProps)\n if(!(key in props))\n Object.defineProperty(props, key, { value: inputProps[key] });\n\n return render(props);\n }) as Model.Component<T, P>;\n\n Component.Model = this;\n Component.displayName = this.name;\n \n return Component;\n}","import { Model } from '@expressive/mvc';\n\nimport { Pragma } from './adapter';\n\ndeclare module '@expressive/mvc' {\n namespace Model {\n function use <T extends Model> (\n this: Model.Init<T>,\n apply?: Model.Assign<T>,\n repeat?: boolean\n ): T;\n\n function use <T extends Model> (\n this: Model.Init<T>,\n callback?: Model.Callback<T>,\n repeat?: boolean\n ): T;\n }\n}\n\nModel.use = function <T extends Model> (\n this: Model.Init<T>,\n argument?: Model.Assign<T> | Model.Callback<T>,\n repeat?: boolean){\n\n const ambient = Pragma.useContext();\n const render = Pragma.useFactory((refresh) => {\n let enabled: boolean | undefined;\n let local: T;\n\n const instance = new this(argument);\n const context = ambient.push({ instance });\n const unwatch = instance.get(current => {\n local = current;\n\n if(enabled)\n refresh();\n });\n\n function didMount(){\n enabled = true;\n return () => {\n unwatch();\n instance.set(null);\n context.pop()\n }\n }\n\n return (props?: Model.Assign<T> | Model.Callback<T>) => {\n Pragma.useLifecycle(didMount);\n\n if(repeat && enabled && props){\n enabled = false;\n\n if(typeof props == \"function\")\n props.call(instance, instance);\n else if(typeof props == \"object\")\n instance.set(props);\n\n const update = instance.set();\n\n if(update)\n update.then(() => enabled = true);\n else\n enabled = true;\n }\n\n return local; \n };\n });\n\n return render(argument);\n}","import { createEffect, Model } from '@expressive/mvc';\n\nimport { Pragma } from './adapter';\n\n/** Type may not be undefined - instead will be null. */\ntype NoVoid<T> = T extends undefined | void ? null : T;\n\ntype ForceRefresh = {\n /** Request a refresh for current component. */\n (): void;\n \n /**\n * Request a refresh and again after promise either resolves or rejects.\n * \n * @param waitFor Promise to wait for.\n * @returns Promise which resolves, after refresh, to same value as `waitFor`.\n */\n <T = void>(waitFor: Promise<T>): Promise<T>;\n\n /**\n * Request refresh before and after async function.\n * A refresh will occur both before and after the given function.\n * \n * **Note:** Any actions performed before first `await` will occur prior to refresh.\n * \n * @param invoke Async function to invoke.\n * @returns Promise which resolves returned value after refresh.\n */\n <T = void>(invoke: () => Promise<T>): Promise<T>;\n};\n\ndeclare module '@expressive/mvc' {\n namespace Model {\n type GetFactory<T extends Model, R> =\n (this: T, current: T, refresh: ForceRefresh) => R;\n\n type GetEffect<T extends Model> =\n (this: T, current: T, refresh: ForceRefresh) => null;\n\n /** Fetch instance of this class from context. */\n function get <T extends Model> (this: Model.Type<T>): T;\n \n /** Fetch instance of this class optionally. */\n function get <T extends Model> (this: Model.Type<T>, required: false): T | undefined;\n\n /** Fetch instance of this class from context. */\n function get <T extends Model> (this: Model.Type<T>, requireValues: true): Required<T>\n \n function get <T extends Model, R> (this: Model.Type<T>, factory: GetFactory<T, Promise<R> | R>): NoVoid<R>;\n \n // TODO: eagerly metch this so any nulls are caught - would prevent updates.\n function get <T extends Model> (this: Model.Type<T>, factory: GetEffect<T>): null;\n }\n}\n\nModel.get = function <T extends Model, R> (\n this: Model.Type<T>,\n argument?: boolean | Model.GetFactory<T, unknown>\n){\n const context = Pragma.useContext();\n const render = Pragma.useFactory((refresh) => {\n function forceUpdate(): void;\n function forceUpdate<T>(action: Promise<T> | (() => Promise<T>)): Promise<T>;\n function forceUpdate<T>(action?: Promise<T> | (() => Promise<T>)){\n if(typeof action == \"function\")\n action = action();\n\n refresh();\n\n if(action)\n return action.finally(refresh);\n }\n\n const instance = context.get(this);\n\n if(!instance)\n if(argument === false)\n return () => undefined;\n else\n throw new Error(`Could not find ${this} in context.`);\n\n let unwatch: (() => void) | undefined;\n let value: any;\n\n unwatch = createEffect(instance, current => {\n if(typeof argument === \"function\"){\n const next = argument.call(current, current, forceUpdate);\n\n if(next === value)\n return;\n\n value = next;\n }\n else\n value = current;\n\n if(unwatch)\n refresh();\n }, argument === true);\n\n if(value instanceof Promise){\n let error: Error | undefined;\n\n unwatch();\n\n // TODO: ignore update if resolves to undefined or null\n value.then(x => value = x).catch(e => error = e).finally(refresh);\n value = null;\n\n return () => {\n if(error)\n throw error;\n\n return value === undefined ? null : value;\n }\n }\n\n if(value === null){\n unwatch();\n return () => null;\n }\n\n return () => {\n Pragma.useLifecycle(() => unwatch);\n return value === undefined ? null : value;\n }\n });\n\n return render() as R;\n}","import { Context } from '@expressive/mvc';\n\nconst Pragma = {} as {\n useContext(): Context;\n\n useFactory<T extends () => unknown>(\n factory: (refresh: () => void) => T\n ): T;\n\n useLifecycle(callback: () => () => void): void;\n};\n\nexport { Pragma };\n\nimport \"./model.as\";\nimport './model.use';\nimport './model.get';"],"mappings":"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","names":["Model","Model","Pragma","Pragma"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/context.ts
|
|
2
|
+
import { Context } from "@expressive/mvc";
|
|
3
|
+
import { createContext, createElement, useContext, useEffect, useMemo } from "react";
|
|
4
|
+
var Lookup = createContext(new Context());
|
|
5
|
+
function Consumer(props) {
|
|
6
|
+
return props.for.get((i) => props.children(i));
|
|
7
|
+
}
|
|
8
|
+
function Provider(props) {
|
|
9
|
+
const ambient = useContext(Lookup);
|
|
10
|
+
const context = useMemo(() => ambient.push(), [ambient]);
|
|
11
|
+
useEffect(() => () => context.pop(), [ambient]);
|
|
12
|
+
context.include(props.for, props.set);
|
|
13
|
+
return createElement(Lookup.Provider, {
|
|
14
|
+
key: context.id,
|
|
15
|
+
value: context
|
|
16
|
+
}, props.children);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
Consumer,
|
|
20
|
+
Lookup as Context,
|
|
21
|
+
Provider
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/context.ts"],"sourcesContent":["import Model, { Context } from '@expressive/mvc';\nimport { ReactNode, createContext, createElement, useContext, useEffect, useMemo } from 'react';\n\nconst Lookup = createContext(new Context());\n\ndeclare namespace Consumer {\n type Props<T extends Model> = {\n /** Type of controller to fetch from context. */\n for: Model.Type<T>;\n\n /**\n * Render function, will receive instance of desired controller.\n *\n * Called every render of parent component.\n * Similar to `Model.get()`, updates to properties accessed in\n * this function will cause a refresh when they change.\n */\n children: (value: T) => ReactNode | void;\n }\n}\n\nfunction Consumer<T extends Model>(props: Consumer.Props<T>){\n return props.for.get(i => props.children(i));\n}\n\ndeclare namespace Provider {\n interface Props<T extends Model> {\n for: Context.Accept<T>;\n set?: Model.Assign<T>;\n children?: ReactNode;\n }\n}\n\nfunction Provider<T extends Model>(props: Provider.Props<T>){\n const ambient = useContext(Lookup);\n const context = useMemo(() => ambient.push(), [ambient]);\n\n useEffect(() => () => context.pop(), [ambient]);\n \n context.include(props.for, props.set);\n\n return createElement(Lookup.Provider, {\n key: context.id,\n value: context\n }, props.children);\n}\n\nexport { Consumer, Provider, Lookup as Context }"],"mappings":";AAAA,SAAgB,eAAe;AAC/B,SAAoB,eAAe,eAAe,YAAY,WAAW,eAAe;AAExF,IAAM,SAAS,cAAc,IAAI,QAAQ,CAAC;AAkB1C,SAAS,SAA0B,OAAyB;AAC1D,SAAO,MAAM,IAAI,IAAI,OAAK,MAAM,SAAS,CAAC,CAAC;AAC7C;AAUA,SAAS,SAA0B,OAAyB;AAC1D,QAAM,UAAU,WAAW,MAAM;AACjC,QAAM,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG,CAAC,OAAO,CAAC;AAEvD,YAAU,MAAM,MAAM,QAAQ,IAAI,GAAG,CAAC,OAAO,CAAC;AAE9C,UAAQ,QAAQ,MAAM,KAAK,MAAM,GAAG;AAEpC,SAAO,cAAc,OAAO,UAAU;AAAA,IACpC,KAAK,QAAQ;AAAA,IACb,OAAO;AAAA,EACT,GAAG,MAAM,QAAQ;AACnB;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { useContext, useEffect, useState } from "react";
|
|
3
|
+
import { Pragma } from "./adapter";
|
|
4
|
+
import { Context } from "./context";
|
|
5
|
+
import {
|
|
6
|
+
Model,
|
|
7
|
+
Model as Model2,
|
|
8
|
+
get,
|
|
9
|
+
use,
|
|
10
|
+
ref,
|
|
11
|
+
set,
|
|
12
|
+
has
|
|
13
|
+
} from "@expressive/mvc";
|
|
14
|
+
import { Consumer, Provider } from "./context";
|
|
15
|
+
Pragma.useContext = () => useContext(Context);
|
|
16
|
+
Pragma.useLifecycle = (callback) => useEffect(() => callback(), []);
|
|
17
|
+
Pragma.useFactory = (factory) => {
|
|
18
|
+
const state = useState(() => factory(() => {
|
|
19
|
+
state[1]((x) => x.bind(null));
|
|
20
|
+
}));
|
|
21
|
+
return state[0];
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
Consumer,
|
|
25
|
+
Model,
|
|
26
|
+
Provider,
|
|
27
|
+
Model2 as default,
|
|
28
|
+
get,
|
|
29
|
+
has,
|
|
30
|
+
ref,
|
|
31
|
+
set,
|
|
32
|
+
use
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import { useContext, useEffect, useState } from 'react';\n\nimport { Pragma } from './adapter';\nimport { Context } from './context';\n\nPragma.useContext = () => useContext(Context);\n\nPragma.useLifecycle = (callback) => useEffect(() => callback(), []);\n\nPragma.useFactory = (factory) => {\n const state = useState(() => factory(() => {\n state[1](x => x.bind(null) as any);\n }));\n\n return state[0];\n}\n\nexport {\n Model, Model as default,\n get, use, ref, set, has\n} from '@expressive/mvc';\n\nexport { Consumer, Provider } from './context';\nexport { type Pragma };"],"mappings":";AAAA,SAAS,YAAY,WAAW,gBAAgB;AAEhD,SAAS,cAAc;AACvB,SAAS,eAAe;AAcxB;AAAA,EACE;AAAA,EAAgB,SAATA;AAAA,EACP;AAAA,EAAK;AAAA,EAAK;AAAA,EAAK;AAAA,EAAK;AAAA,OACf;AAEP,SAAS,UAAU,gBAAgB;AAjBnC,OAAO,aAAa,MAAM,WAAW,OAAO;AAE5C,OAAO,eAAe,CAAC,aAAa,UAAU,MAAM,SAAS,GAAG,CAAC,CAAC;AAElE,OAAO,aAAa,CAAC,YAAY;AAC/B,QAAM,QAAQ,SAAS,MAAM,QAAQ,MAAM;AACzC,UAAM,CAAC,EAAE,OAAK,EAAE,KAAK,IAAI,CAAQ;AAAA,EACnC,CAAC,CAAC;AAEF,SAAO,MAAM,CAAC;AAChB;","names":["Model"]}
|
package/package.json
CHANGED
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
".": {
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
24
|
"require": "./dist/index.js",
|
|
25
|
-
"import": "./dist/index.
|
|
25
|
+
"import": "./dist/esm/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./adapter": {
|
|
28
28
|
"types": "./dist/adapter.d.ts",
|
|
29
29
|
"require": "./dist/adapter.js",
|
|
30
|
-
"import": "./dist/adapter.
|
|
30
|
+
"import": "./dist/esm/adapter.mjs"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"preversion": "npm run test && npm run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@expressive/mvc": "^0.
|
|
42
|
+
"@expressive/mvc": "^0.54.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0 <19.0.0"
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"react-test-renderer": "^18.2.0",
|
|
58
58
|
"tsup": "^8.0.2"
|
|
59
59
|
},
|
|
60
|
-
"version": "0.
|
|
61
|
-
"gitHead": "
|
|
60
|
+
"version": "0.54.0",
|
|
61
|
+
"gitHead": "555c20fdef310f22e38f4378d137f77855e70c4a"
|
|
62
62
|
}
|