epos 1.1.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/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "epos",
3
+ "type": "module",
4
+ "version": "1.1.0",
5
+ "description": "epos",
6
+ "main": "index.js",
7
+ "keywords": [],
8
+ "author": "imkost",
9
+ "license": "ISC",
10
+ "exports": {
11
+ "./plugin-esbuild": "./src/plugin/plugin-esbuild.js",
12
+ "./plugin-vite": "./src/plugin/plugin-vite.js"
13
+ },
14
+ "dependencies": {
15
+ "epos-bridge": "link:",
16
+ "prettier": "3.4.2"
17
+ },
18
+ "scripts": {
19
+ "release": "pnpm pack; pnpm publish; rm *.tgz"
20
+ }
21
+ }
@@ -0,0 +1,7 @@
1
+ export default {
2
+ semi: false,
3
+ singleQuote: true,
4
+ arrowParens: 'avoid',
5
+ quoteProps: 'preserve',
6
+ printWidth: 87,
7
+ }
@@ -0,0 +1,35 @@
1
+ const {
2
+ MobXProviderContext,
3
+ Observer,
4
+ PropTypes,
5
+ Provider,
6
+ disposeOnUnmount,
7
+ enableStaticRendering,
8
+ inject,
9
+ isUsingStaticRendering,
10
+ observer,
11
+ observerBatching,
12
+ useAsObservableSource,
13
+ useLocalObservable,
14
+ useLocalStore,
15
+ useObserver,
16
+ useStaticRendering,
17
+ } = self.mobxReact
18
+
19
+ export {
20
+ MobXProviderContext,
21
+ Observer,
22
+ PropTypes,
23
+ Provider,
24
+ disposeOnUnmount,
25
+ enableStaticRendering,
26
+ inject,
27
+ isUsingStaticRendering,
28
+ observer,
29
+ observerBatching,
30
+ useAsObservableSource,
31
+ useLocalObservable,
32
+ useLocalStore,
33
+ useObserver,
34
+ useStaticRendering,
35
+ }
@@ -0,0 +1,141 @@
1
+ const {
2
+ $mobx,
3
+ FlowCancellationError,
4
+ ObservableMap,
5
+ ObservableSet,
6
+ Reaction,
7
+ _allowStateChanges,
8
+ _allowStateChangesInsideComputed,
9
+ _allowStateReadsEnd,
10
+ _allowStateReadsStart,
11
+ _autoAction,
12
+ _endAction,
13
+ _getAdministration,
14
+ _getGlobalState,
15
+ _interceptReads,
16
+ _isComputingDerivation,
17
+ _resetGlobalState,
18
+ _startAction,
19
+ action,
20
+ autorun,
21
+ comparer,
22
+ computed,
23
+ configure,
24
+ createAtom,
25
+ defineProperty,
26
+ entries,
27
+ extendObservable,
28
+ flow,
29
+ flowResult,
30
+ get,
31
+ getAtom,
32
+ getDebugName,
33
+ getDependencyTree,
34
+ getObserverTree,
35
+ has,
36
+ intercept,
37
+ isAction,
38
+ isBoxedObservable,
39
+ isComputed,
40
+ isComputedProp,
41
+ isFlow,
42
+ isFlowCancellationError,
43
+ isObservable,
44
+ isObservableArray,
45
+ isObservableMap,
46
+ isObservableObject,
47
+ isObservableProp,
48
+ isObservableSet,
49
+ keys,
50
+ makeAutoObservable,
51
+ makeObservable,
52
+ observable,
53
+ observe,
54
+ onBecomeObserved,
55
+ onBecomeUnobserved,
56
+ onReactionError,
57
+ override,
58
+ ownKeys,
59
+ reaction,
60
+ remove,
61
+ runInAction,
62
+ set,
63
+ spy,
64
+ toJS,
65
+ trace,
66
+ transaction,
67
+ untracked,
68
+ values,
69
+ when,
70
+ } = self.mobx
71
+
72
+ export {
73
+ $mobx,
74
+ FlowCancellationError,
75
+ ObservableMap,
76
+ ObservableSet,
77
+ Reaction,
78
+ _allowStateChanges,
79
+ _allowStateChangesInsideComputed,
80
+ _allowStateReadsEnd,
81
+ _allowStateReadsStart,
82
+ _autoAction,
83
+ _endAction,
84
+ _getAdministration,
85
+ _getGlobalState,
86
+ _interceptReads,
87
+ _isComputingDerivation,
88
+ _resetGlobalState,
89
+ _startAction,
90
+ action,
91
+ autorun,
92
+ comparer,
93
+ computed,
94
+ configure,
95
+ createAtom,
96
+ defineProperty,
97
+ entries,
98
+ extendObservable,
99
+ flow,
100
+ flowResult,
101
+ get,
102
+ getAtom,
103
+ getDebugName,
104
+ getDependencyTree,
105
+ getObserverTree,
106
+ has,
107
+ intercept,
108
+ isAction,
109
+ isBoxedObservable,
110
+ isComputed,
111
+ isComputedProp,
112
+ isFlow,
113
+ isFlowCancellationError,
114
+ isObservable,
115
+ isObservableArray,
116
+ isObservableMap,
117
+ isObservableObject,
118
+ isObservableProp,
119
+ isObservableSet,
120
+ keys,
121
+ makeAutoObservable,
122
+ makeObservable,
123
+ observable,
124
+ observe,
125
+ onBecomeObserved,
126
+ onBecomeUnobserved,
127
+ onReactionError,
128
+ override,
129
+ ownKeys,
130
+ reaction,
131
+ remove,
132
+ runInAction,
133
+ set,
134
+ spy,
135
+ toJS,
136
+ trace,
137
+ transaction,
138
+ untracked,
139
+ values,
140
+ when,
141
+ }
@@ -0,0 +1,5 @@
1
+ const reactDomClient = self.reactDomClient
2
+ const { createRoot, hydrateRoot, version } = reactDomClient
3
+
4
+ export default reactDomClient
5
+ export { createRoot, hydrateRoot, version }
@@ -0,0 +1,35 @@
1
+ const reactDom = self.reactDom
2
+ const {
3
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
4
+ createPortal,
5
+ flushSync,
6
+ preconnect,
7
+ prefetchDNS,
8
+ preinit,
9
+ preinitModule,
10
+ preload,
11
+ preloadModule,
12
+ requestFormReset,
13
+ unstable_batchedUpdates,
14
+ useFormState,
15
+ useFormStatus,
16
+ version,
17
+ } = reactDom
18
+
19
+ export default reactDom
20
+ export {
21
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
22
+ createPortal,
23
+ flushSync,
24
+ preconnect,
25
+ prefetchDNS,
26
+ preinit,
27
+ preinitModule,
28
+ preload,
29
+ preloadModule,
30
+ requestFormReset,
31
+ unstable_batchedUpdates,
32
+ useFormState,
33
+ useFormStatus,
34
+ version,
35
+ }
@@ -0,0 +1,5 @@
1
+ const reactJsxRuntime = self.reactJsxRuntime
2
+ const { Fragment, jsx, jsxs } = reactJsxRuntime
3
+
4
+ export default reactJsxRuntime
5
+ export { Fragment, jsx, jsxs }
@@ -0,0 +1,85 @@
1
+ const react = self.react
2
+ const {
3
+ Children,
4
+ Component,
5
+ Fragment,
6
+ Profiler,
7
+ PureComponent,
8
+ StrictMode,
9
+ Suspense,
10
+ __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
11
+ act,
12
+ cache,
13
+ cloneElement,
14
+ createContext,
15
+ createElement,
16
+ createRef,
17
+ forwardRef,
18
+ isValidElement,
19
+ lazy,
20
+ memo,
21
+ startTransition,
22
+ unstable_useCacheRefresh,
23
+ use,
24
+ useActionState,
25
+ useCallback,
26
+ useContext,
27
+ useDebugValue,
28
+ useDeferredValue,
29
+ useEffect,
30
+ useId,
31
+ useImperativeHandle,
32
+ useInsertionEffect,
33
+ useLayoutEffect,
34
+ useMemo,
35
+ useOptimistic,
36
+ useReducer,
37
+ useRef,
38
+ useState,
39
+ useSyncExternalStore,
40
+ useTransition,
41
+ version,
42
+ } = react
43
+
44
+ export default react
45
+ export {
46
+ Children,
47
+ Component,
48
+ Fragment,
49
+ Profiler,
50
+ PureComponent,
51
+ StrictMode,
52
+ Suspense,
53
+ __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
54
+ act,
55
+ cache,
56
+ cloneElement,
57
+ createContext,
58
+ createElement,
59
+ createRef,
60
+ forwardRef,
61
+ isValidElement,
62
+ lazy,
63
+ memo,
64
+ startTransition,
65
+ unstable_useCacheRefresh,
66
+ use,
67
+ useActionState,
68
+ useCallback,
69
+ useContext,
70
+ useDebugValue,
71
+ useDeferredValue,
72
+ useEffect,
73
+ useId,
74
+ useImperativeHandle,
75
+ useInsertionEffect,
76
+ useLayoutEffect,
77
+ useMemo,
78
+ useOptimistic,
79
+ useReducer,
80
+ useRef,
81
+ useState,
82
+ useSyncExternalStore,
83
+ useTransition,
84
+ version,
85
+ }
@@ -0,0 +1,37 @@
1
+ import $path from 'path'
2
+ const dirname = import.meta.dirname
3
+
4
+ export default {
5
+ name: 'epos/esbuild-plugin',
6
+ setup(build) {
7
+ // react
8
+ build.onResolve({ filter: /^react$/ }, () => ({
9
+ path: $path.resolve(dirname, '../bridge/bridge-react.js'),
10
+ }))
11
+
12
+ // react/jsx-runtime
13
+ build.onResolve({ filter: /^react\/jsx-runtime$/ }, () => ({
14
+ path: $path.resolve(dirname, '../bridge/bridge-react-jsx-runtime.js'),
15
+ }))
16
+
17
+ // react-dom
18
+ build.onResolve({ filter: /^react-dom$/ }, () => ({
19
+ path: $path.resolve(dirname, '../bridge/bridge-react-dom.js'),
20
+ }))
21
+
22
+ // react-dom/client
23
+ build.onResolve({ filter: /^react-dom\/client$/ }, () => ({
24
+ path: $path.resolve(dirname, '../bridge/bridge-react-dom-client.js'),
25
+ }))
26
+
27
+ // mobx
28
+ build.onResolve({ filter: /^mobx$/ }, () => ({
29
+ path: $path.resolve(dirname, '../bridge/bridge-mobx.js'),
30
+ }))
31
+
32
+ // mobx-react
33
+ build.onResolve({ filter: /^mobx-react$/ }, () => ({
34
+ path: $path.resolve(dirname, '../bridge/bridge-mobx-react.js'),
35
+ }))
36
+ },
37
+ }
@@ -0,0 +1,40 @@
1
+ import $path from 'path'
2
+ const dirname = import.meta.dirname
3
+
4
+ export default {
5
+ name: 'epos/vite-plugin',
6
+ enforce: 'pre',
7
+ resolveId(source) {
8
+ // react
9
+ if (source === 'react') {
10
+ return $path.resolve(dirname, '../bridge/bridge-react.js')
11
+ }
12
+
13
+ // react/jsx-runtime
14
+ if (source === 'react/jsx-runtime') {
15
+ return $path.resolve(dirname, '../bridge/bridge-react-jsx-runtime.js')
16
+ }
17
+
18
+ // react-dom
19
+ if (source === 'react-dom') {
20
+ return $path.resolve(dirname, '../bridge/bridge-react-dom.js')
21
+ }
22
+
23
+ // react-dom/client
24
+ if (source === 'react-dom/client') {
25
+ return $path.resolve(dirname, '../bridge/bridge-react-dom-client.js')
26
+ }
27
+
28
+ // mobx
29
+ if (source === 'mobx') {
30
+ return $path.resolve(dirname, '../bridge/bridge-mobx.js')
31
+ }
32
+
33
+ // mobx-react
34
+ if (source === 'mobx-react') {
35
+ return $path.resolve(dirname, '../bridge/bridge-mobx-react.js')
36
+ }
37
+
38
+ return null
39
+ },
40
+ }