react-rx 1.0.0 → 2.0.1
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/.idea/compiler.xml +1 -1
- package/.idea/inspectionProfiles/Project_Default.xml +1 -0
- package/.idea/markdown.xml +9 -0
- package/.idea/misc.xml +0 -6
- package/dist/cjs/displayName.js +1 -1
- package/dist/cjs/useAsObservable.js +9 -17
- package/dist/cjs/useObservable.js +25 -30
- package/dist/cjs/withPropsStream.js +5 -1
- package/dist/es2015/useAsObservable.js +10 -18
- package/dist/es2015/useObservable.js +24 -31
- package/dist/esm/displayName.js +1 -1
- package/dist/esm/useAsObservable.js +10 -18
- package/dist/esm/useObservable.js +26 -31
- package/package.json +6 -4
- package/src/useAsObservable.ts +13 -18
- package/src/useObservable.ts +39 -34
- package/.idea/workspace.xml +0 -226
- package/jest.config.js +0 -5
- package/website/.babelrc +0 -21
- package/website/.prettierrc +0 -7
- package/website/README.mdx +0 -1
- package/website/package.json +0 -84
- package/website/src/@types/babel.d.ts +0 -4
- package/website/src/@types/mdx.d.ts +0 -11
- package/website/src/@types/react-css-burger.d.ts +0 -4
- package/website/src/App.tsx +0 -68
- package/website/src/components/Header.tsx +0 -118
- package/website/src/components/Link.tsx +0 -18
- package/website/src/components/LoadPage.tsx +0 -60
- package/website/src/components/Sidebar.tsx +0 -88
- package/website/src/components/logos/Github.tsx +0 -10
- package/website/src/components/logos/React.tsx +0 -27
- package/website/src/components/logos/ReactRxLogo.tsx +0 -39
- package/website/src/components/logos/RxJs.tsx +0 -69
- package/website/src/components/repl/Checkerboard.tsx +0 -25
- package/website/src/components/repl/CodeBlock.tsx +0 -147
- package/website/src/components/repl/CodeMirror.tsx +0 -37
- package/website/src/components/repl/CodeMirrorMode.tsx +0 -67
- package/website/src/components/repl/EvalCode.tsx +0 -55
- package/website/src/components/repl/Prelude.tsx +0 -50
- package/website/src/components/repl/ShowError.tsx +0 -27
- package/website/src/components/repl/codemirror-lib.ts +0 -8
- package/website/src/components/repl/codemirror-theme.css +0 -131
- package/website/src/components/repl/compile/babel.ts +0 -21
- package/website/src/components/repl/eval/evalCallback.ts +0 -27
- package/website/src/components/repl/eval/evalCode.ts +0 -7
- package/website/src/components/repl/eval/evalExpression.ts +0 -4
- package/website/src/components/repl/eval/evalReactDomRender.ts +0 -23
- package/website/src/components/repl/index.ts +0 -1
- package/website/src/components/repl/runMode.ts +0 -42
- package/website/src/datastores/location.ts +0 -14
- package/website/src/datastores/page.ts +0 -11
- package/website/src/datastores/pageTransition.ts +0 -97
- package/website/src/entries/main.css +0 -2
- package/website/src/entries/main.tsx +0 -6
- package/website/src/examples/FizzBuzz/FizzBuzzExample.tsx +0 -39
- package/website/src/examples/FizzBuzz/index.tsx +0 -9
- package/website/src/examples/_utils/globalScope.ts +0 -45
- package/website/src/examples/animation/AnimationExample.tsx +0 -152
- package/website/src/examples/animation/easings.ts +0 -0
- package/website/src/examples/animation/index.tsx +0 -15
- package/website/src/examples/context/Context.example.jsx +0 -67
- package/website/src/examples/context/index.tsx +0 -9
- package/website/src/examples/errors/Errors.example.jsx +0 -69
- package/website/src/examples/errors/index.tsx +0 -9
- package/website/src/examples/event-handlers/EventHandlersExample.tsx +0 -48
- package/website/src/examples/event-handlers/index.tsx +0 -9
- package/website/src/examples/fetch/FetchExample.jsx +0 -43
- package/website/src/examples/fetch/a.txt +0 -1
- package/website/src/examples/fetch/b.txt +0 -1
- package/website/src/examples/fetch/index.tsx +0 -9
- package/website/src/examples/form-data/FormDataExample.jsx +0 -119
- package/website/src/examples/form-data/index.tsx +0 -12
- package/website/src/examples/form-data/storage.ts +0 -27
- package/website/src/examples/forward-ref/ForwardRefExample.tsx +0 -55
- package/website/src/examples/forward-ref/index.tsx +0 -9
- package/website/src/examples/hello-world/HelloWorld.example.jsx +0 -6
- package/website/src/examples/hello-world/index.tsx +0 -9
- package/website/src/examples/hooks-interop/HooksInterop.example.tsx +0 -42
- package/website/src/examples/hooks-interop/index.tsx +0 -9
- package/website/src/examples/passthrough-props/PassThroughPropsExample.jsx +0 -57
- package/website/src/examples/passthrough-props/index.tsx +0 -11
- package/website/src/examples/reactive-state/ReactiveState.example.jsx +0 -43
- package/website/src/examples/reactive-state/index.ts +0 -9
- package/website/src/examples/readme-examples/README.mdx +0 -0
- package/website/src/examples/readme-examples/index.ts +0 -11
- package/website/src/examples/shared-state/SharedState.example.tsx +0 -59
- package/website/src/examples/shared-state/index.tsx +0 -9
- package/website/src/examples/simple/Counter.example.tsx +0 -14
- package/website/src/examples/simple/index.tsx +0 -9
- package/website/src/examples/sync/Sync.example.tsx +0 -9
- package/website/src/examples/sync/index.tsx +0 -9
- package/website/src/examples/tick/TickExample.jsx +0 -51
- package/website/src/examples/tick/index.ts +0 -9
- package/website/src/examples/todo-app/TodoApp.example.tsx +0 -88
- package/website/src/examples/todo-app/index.tsx +0 -12
- package/website/src/examples/todo-app/storage.ts +0 -27
- package/website/src/examples/use-element/UseElementExample.tsx +0 -70
- package/website/src/examples/use-element/index.tsx +0 -9
- package/website/src/examples/use-observable/search/SearchExample.tsx +0 -82
- package/website/src/examples/use-observable/search/index.tsx +0 -8
- package/website/src/examples/use-observable/use-observable/UseObservableExample.tsx +0 -70
- package/website/src/examples/use-observable/use-observable/index.tsx +0 -9
- package/website/src/index.html +0 -10
- package/website/src/mdx-components.tsx +0 -74
- package/website/src/pages/Api/Api.mdx +0 -134
- package/website/src/pages/Api/ApiPage.tsx +0 -25
- package/website/src/pages/Examples/Examples.tsx +0 -105
- package/website/src/pages/Examples/ExamplesPage.tsx +0 -13
- package/website/src/pages/Guide/Guide.mdx +0 -275
- package/website/src/pages/Guide/GuidePage.tsx +0 -25
- package/website/src/pages/Index/IndexPage.tsx +0 -50
- package/website/src/pages/Index/ReactRxReadme.md +0 -20
- package/website/src/pages/NotFound.tsx +0 -3
- package/website/src/pages/pages.ts +0 -46
- package/website/src/pages/styles.tsx +0 -24
- package/website/src/theme.ts +0 -61
- package/website/src/utils/parseCodeFenceHeader.ts +0 -32
- package/website/tsconfig.json +0 -30
- package/website/vercel.json +0 -4
- package/website/webpack/config.js +0 -5
- package/website/webpack/createConfig.js +0 -95
- package/website/webpack/mdx-toc-loader.js +0 -38
package/.idea/workspace.xml
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ChangeListManager">
|
|
4
|
-
<list default="true" id="9f1530e5-3e67-4ff9-b8bc-a40f03478761" name="Default Changelist" comment="">
|
|
5
|
-
<change beforePath="$PROJECT_DIR$/../react-repl/src/Editor.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/../react-repl/src/Editor.tsx" afterDir="false" />
|
|
6
|
-
<change beforePath="$PROJECT_DIR$/../react-repl/src/ShowError.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/../react-repl/src/ShowError.tsx" afterDir="false" />
|
|
7
|
-
<change beforePath="$PROJECT_DIR$/../react-repl/src/transformers/babel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../react-repl/src/transformers/babel.ts" afterDir="false" />
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/../react-rx.dev/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../react-rx.dev/package-lock.json" afterDir="false" />
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/../react-rx.dev/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../react-rx.dev/package.json" afterDir="false" />
|
|
10
|
-
<change beforePath="$PROJECT_DIR$/../react-rx.dev/src/pages/Index/ReactRxReadme.md" beforeDir="false" afterPath="$PROJECT_DIR$/../react-rx.dev/src/pages/Index/ReactRxReadme.md" afterDir="false" />
|
|
11
|
-
</list>
|
|
12
|
-
<option name="SHOW_DIALOG" value="false" />
|
|
13
|
-
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
14
|
-
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
15
|
-
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
16
|
-
</component>
|
|
17
|
-
<component name="ChangesViewManager">
|
|
18
|
-
<option name="groupingKeys">
|
|
19
|
-
<option value="directory" />
|
|
20
|
-
</option>
|
|
21
|
-
</component>
|
|
22
|
-
<component name="Git.Settings">
|
|
23
|
-
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
24
|
-
<option name="ROOT_SYNC" value="DONT_SYNC" />
|
|
25
|
-
</component>
|
|
26
|
-
<component name="GitSEFilterConfiguration">
|
|
27
|
-
<file-type-list>
|
|
28
|
-
<filtered-out-file-type name="LOCAL_BRANCH" />
|
|
29
|
-
<filtered-out-file-type name="REMOTE_BRANCH" />
|
|
30
|
-
<filtered-out-file-type name="TAG" />
|
|
31
|
-
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
|
|
32
|
-
</file-type-list>
|
|
33
|
-
</component>
|
|
34
|
-
<component name="MacroExpansionManager">
|
|
35
|
-
<option name="directoryName" value="iy052u10" />
|
|
36
|
-
</component>
|
|
37
|
-
<component name="ProjectId" id="1PI8FtTkoa1tFBP8398nQ82nYf0" />
|
|
38
|
-
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
39
|
-
<component name="ProjectViewState">
|
|
40
|
-
<option name="autoscrollToSource" value="true" />
|
|
41
|
-
<option name="hideEmptyMiddlePackages" value="true" />
|
|
42
|
-
<option name="showLibraryContents" value="true" />
|
|
43
|
-
</component>
|
|
44
|
-
<component name="PropertiesComponent">
|
|
45
|
-
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
|
46
|
-
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
|
47
|
-
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
|
48
|
-
<property name="com.intellij.ide.scratch.LRUPopupBuilder$1/New Scratch File" value="JavaScript" />
|
|
49
|
-
<property name="full.screen.before.presentation.mode" value="true" />
|
|
50
|
-
<property name="last.edited.regexp" value="jsx{1,2}" />
|
|
51
|
-
<property name="last_opened_file_path" value="$PROJECT_DIR$/src" />
|
|
52
|
-
<property name="node.js.detected.package.eslint" value="true" />
|
|
53
|
-
<property name="node.js.detected.package.standard" value="true" />
|
|
54
|
-
<property name="node.js.detected.package.tslint" value="true" />
|
|
55
|
-
<property name="node.js.path.for.package.eslint" value="project" />
|
|
56
|
-
<property name="node.js.path.for.package.standard" value="project" />
|
|
57
|
-
<property name="node.js.path.for.package.tslint" value="project" />
|
|
58
|
-
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
|
59
|
-
<property name="node.js.selected.package.standard" value="" />
|
|
60
|
-
<property name="node.js.selected.package.tslint" value="$PROJECT_DIR$/node_modules/tslint" />
|
|
61
|
-
<property name="nodejs.jest.jest_package" value="$PROJECT_DIR$/node_modules/jest" />
|
|
62
|
-
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
|
63
|
-
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
|
64
|
-
<property name="nodejs_package_manager_path" value="npm" />
|
|
65
|
-
<property name="prettierjs.PrettierConfiguration.Package" value="$PROJECT_DIR$/node_modules/prettier" />
|
|
66
|
-
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
|
|
67
|
-
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
|
|
68
|
-
<property name="vue.rearranger.settings.migration" value="true" />
|
|
69
|
-
</component>
|
|
70
|
-
<component name="RecentsManager">
|
|
71
|
-
<key name="CopyFile.RECENT_KEYS">
|
|
72
|
-
<recent name="$PROJECT_DIR$/src" />
|
|
73
|
-
<recent name="$PROJECT_DIR$/test-concurrent-mode" />
|
|
74
|
-
<recent name="$PROJECT_DIR$/website/src/examples" />
|
|
75
|
-
<recent name="$PROJECT_DIR$/src/__tests__" />
|
|
76
|
-
<recent name="$PROJECT_DIR$/../react-rx.dev" />
|
|
77
|
-
</key>
|
|
78
|
-
<key name="MoveFile.RECENT_KEYS">
|
|
79
|
-
<recent name="$PROJECT_DIR$/website/src/examples" />
|
|
80
|
-
<recent name="$PROJECT_DIR$/src" />
|
|
81
|
-
<recent name="$PROJECT_DIR$/../react-rx.dev/src" />
|
|
82
|
-
<recent name="$PROJECT_DIR$/../react-rx.dev/webpack" />
|
|
83
|
-
<recent name="$PROJECT_DIR$/../react-rx.dev/webpack-configs" />
|
|
84
|
-
</key>
|
|
85
|
-
</component>
|
|
86
|
-
<component name="RunManager" selected="Jest.it calls the setup function once, at mount">
|
|
87
|
-
<configuration name="All Tests" type="JavaScriptTestRunnerJest" nameIsGenerated="true">
|
|
88
|
-
<node-interpreter value="project" />
|
|
89
|
-
<node-options value="" />
|
|
90
|
-
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
|
|
91
|
-
<working-dir value="$PROJECT_DIR$" />
|
|
92
|
-
<envs />
|
|
93
|
-
<scope-kind value="ALL" />
|
|
94
|
-
<method v="2" />
|
|
95
|
-
</configuration>
|
|
96
|
-
<configuration name="asObservable.test.tsx" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
|
|
97
|
-
<node-interpreter value="project" />
|
|
98
|
-
<node-options value="" />
|
|
99
|
-
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
|
|
100
|
-
<working-dir value="$PROJECT_DIR$" />
|
|
101
|
-
<envs />
|
|
102
|
-
<scope-kind value="TEST_FILE" />
|
|
103
|
-
<test-file value="$PROJECT_DIR$/src/__tests__/asObservable.test.tsx" />
|
|
104
|
-
<method v="2" />
|
|
105
|
-
</configuration>
|
|
106
|
-
<configuration name="it calls the setup function once, at mount" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
|
|
107
|
-
<node-interpreter value="project" />
|
|
108
|
-
<node-options value="" />
|
|
109
|
-
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
|
|
110
|
-
<working-dir value="$PROJECT_DIR$" />
|
|
111
|
-
<envs />
|
|
112
|
-
<scope-kind value="TEST" />
|
|
113
|
-
<test-file value="$PROJECT_DIR$/src/__tests__/reactiveComponent.test.tsx" />
|
|
114
|
-
<test-names>
|
|
115
|
-
<test-name value="it calls the setup function once, at mount" />
|
|
116
|
-
</test-names>
|
|
117
|
-
<method v="2" />
|
|
118
|
-
</configuration>
|
|
119
|
-
<configuration name="the returned observable should *not* receive a new value when component is rendered with an unchanged value" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
|
|
120
|
-
<node-interpreter value="project" />
|
|
121
|
-
<node-options value="" />
|
|
122
|
-
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
|
|
123
|
-
<working-dir value="$PROJECT_DIR$" />
|
|
124
|
-
<envs />
|
|
125
|
-
<scope-kind value="TEST" />
|
|
126
|
-
<test-file value="$PROJECT_DIR$/src/__tests__/asObservable.test.tsx" />
|
|
127
|
-
<test-names>
|
|
128
|
-
<test-name value="the returned observable should *not* receive a new value when component is rendered with an unchanged value" />
|
|
129
|
-
</test-names>
|
|
130
|
-
<method v="2" />
|
|
131
|
-
</configuration>
|
|
132
|
-
<configuration name="the returned observable should receive a new value when component is rendered with a new value" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
|
|
133
|
-
<node-interpreter value="project" />
|
|
134
|
-
<node-options value="" />
|
|
135
|
-
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
|
|
136
|
-
<working-dir value="$PROJECT_DIR$" />
|
|
137
|
-
<envs />
|
|
138
|
-
<scope-kind value="TEST" />
|
|
139
|
-
<test-file value="$PROJECT_DIR$/src/__tests__/asObservable.test.tsx" />
|
|
140
|
-
<test-names>
|
|
141
|
-
<test-name value="the returned observable should receive a new value when component is rendered with a new value" />
|
|
142
|
-
</test-names>
|
|
143
|
-
<method v="2" />
|
|
144
|
-
</configuration>
|
|
145
|
-
<configuration name="useAsObservable.test.tsx" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
|
|
146
|
-
<node-interpreter value="project" />
|
|
147
|
-
<node-options value="" />
|
|
148
|
-
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
|
|
149
|
-
<working-dir value="$PROJECT_DIR$" />
|
|
150
|
-
<envs />
|
|
151
|
-
<scope-kind value="TEST_FILE" />
|
|
152
|
-
<test-file value="$PROJECT_DIR$/src/__tests__/useAsObservable.test.tsx" />
|
|
153
|
-
<method v="2" />
|
|
154
|
-
</configuration>
|
|
155
|
-
<configuration name="useObservable.test.tsx" type="JavaScriptTestRunnerJest" nameIsGenerated="true">
|
|
156
|
-
<node-interpreter value="project" />
|
|
157
|
-
<node-options value="" />
|
|
158
|
-
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
|
|
159
|
-
<working-dir value="$PROJECT_DIR$" />
|
|
160
|
-
<envs />
|
|
161
|
-
<scope-kind value="TEST_FILE" />
|
|
162
|
-
<test-file value="$PROJECT_DIR$/src/__tests__/useObservable.test.tsx" />
|
|
163
|
-
<method v="2" />
|
|
164
|
-
</configuration>
|
|
165
|
-
<list>
|
|
166
|
-
<item itemvalue="Jest.All Tests" />
|
|
167
|
-
<item itemvalue="Jest.useObservable.test.tsx" />
|
|
168
|
-
<item itemvalue="Jest.asObservable.test.tsx" />
|
|
169
|
-
<item itemvalue="Jest.it calls the setup function once, at mount" />
|
|
170
|
-
<item itemvalue="Jest.the returned observable should *not* receive a new value when component is rendered with an unchanged value" />
|
|
171
|
-
<item itemvalue="Jest.the returned observable should receive a new value when component is rendered with a new value" />
|
|
172
|
-
<item itemvalue="Jest.useAsObservable.test.tsx" />
|
|
173
|
-
</list>
|
|
174
|
-
<recent_temporary>
|
|
175
|
-
<list>
|
|
176
|
-
<item itemvalue="Jest.it calls the setup function once, at mount" />
|
|
177
|
-
<item itemvalue="Jest.useAsObservable.test.tsx" />
|
|
178
|
-
<item itemvalue="Jest.asObservable.test.tsx" />
|
|
179
|
-
<item itemvalue="Jest.the returned observable should receive a new value when component is rendered with a new value" />
|
|
180
|
-
<item itemvalue="Jest.the returned observable should *not* receive a new value when component is rendered with an unchanged value" />
|
|
181
|
-
</list>
|
|
182
|
-
</recent_temporary>
|
|
183
|
-
</component>
|
|
184
|
-
<component name="RustProjectSettings">
|
|
185
|
-
<option name="toolchainHomeDirectory" value="$USER_HOME$/.cargo/bin" />
|
|
186
|
-
<option name="version" value="2" />
|
|
187
|
-
</component>
|
|
188
|
-
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
189
|
-
<component name="TaskManager">
|
|
190
|
-
<task active="true" id="Default" summary="Default task">
|
|
191
|
-
<changelist id="9f1530e5-3e67-4ff9-b8bc-a40f03478761" name="Default Changelist" comment="" />
|
|
192
|
-
<created>1610996869139</created>
|
|
193
|
-
<option name="number" value="Default" />
|
|
194
|
-
<option name="presentableId" value="Default" />
|
|
195
|
-
<updated>1610996869139</updated>
|
|
196
|
-
</task>
|
|
197
|
-
<servers />
|
|
198
|
-
</component>
|
|
199
|
-
<component name="TypeScriptGeneratedFilesManager">
|
|
200
|
-
<option name="version" value="3" />
|
|
201
|
-
</component>
|
|
202
|
-
<component name="Vcs.Log.Tabs.Properties">
|
|
203
|
-
<option name="TAB_STATES">
|
|
204
|
-
<map>
|
|
205
|
-
<entry key="MAIN">
|
|
206
|
-
<value>
|
|
207
|
-
<State />
|
|
208
|
-
</value>
|
|
209
|
-
</entry>
|
|
210
|
-
</map>
|
|
211
|
-
</option>
|
|
212
|
-
<option name="oldMeFiltersMigrated" value="true" />
|
|
213
|
-
</component>
|
|
214
|
-
<component name="VcsManagerConfiguration">
|
|
215
|
-
<ignored-roots>
|
|
216
|
-
<path value="$PROJECT_DIR$/../../_/parcel-plugin-mdx" />
|
|
217
|
-
<path value="$PROJECT_DIR$/test-concurrent-mode" />
|
|
218
|
-
<path value="$PROJECT_DIR$/test-concurrent-mode2" />
|
|
219
|
-
<path value="$PROJECT_DIR$/website" />
|
|
220
|
-
</ignored-roots>
|
|
221
|
-
</component>
|
|
222
|
-
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
|
223
|
-
<SUITE FILE_PATH="coverage/react_rx$toObservable_test_tsx.info" NAME="toObservable.test.tsx Coverage Results" MODIFIED="1585859575939" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="JestJavaScriptTestRunnerCoverage" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
|
|
224
|
-
<SUITE FILE_PATH="coverage/react_rx$All_Tests.info" NAME="All Tests Coverage Results" MODIFIED="1585859619310" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="JestJavaScriptTestRunnerCoverage" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
|
|
225
|
-
</component>
|
|
226
|
-
</project>
|
package/jest.config.js
DELETED
package/website/.babelrc
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
"@babel/react",
|
|
4
|
-
"@babel/typescript",
|
|
5
|
-
[
|
|
6
|
-
"@babel/env",
|
|
7
|
-
{
|
|
8
|
-
"targets": {
|
|
9
|
-
"esmodules": true
|
|
10
|
-
},
|
|
11
|
-
"modules": false
|
|
12
|
-
}
|
|
13
|
-
]
|
|
14
|
-
],
|
|
15
|
-
"plugins": [
|
|
16
|
-
"@babel/plugin-proposal-optional-chaining",
|
|
17
|
-
"@babel/plugin-proposal-class-properties",
|
|
18
|
-
"babel-plugin-static-fs",
|
|
19
|
-
"babel-plugin-styled-components"
|
|
20
|
-
]
|
|
21
|
-
}
|
package/website/.prettierrc
DELETED
package/website/README.mdx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
WRONG README
|
package/website/package.json
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-rx-website",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"description": "React rx website",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "NODE_ENV=production webpack --mode=production --config webpack/config.js",
|
|
8
|
-
"watch": "webpack -w --config webpack/config.js",
|
|
9
|
-
"start": "webpack-dev-server --config webpack/config.js",
|
|
10
|
-
"dev": "npm start",
|
|
11
|
-
"postinstall": "cp ../README.md src/pages/Index/ReactRxReadme.md"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [],
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@babel/core": "^7.10.3",
|
|
16
|
-
"@babel/plugin-proposal-class-properties": "^7.10.1",
|
|
17
|
-
"@babel/plugin-proposal-optional-chaining": "^7.10.3",
|
|
18
|
-
"@babel/plugin-transform-typescript": "^7.10.3",
|
|
19
|
-
"@babel/preset-react": "^7.10.1",
|
|
20
|
-
"@babel/preset-typescript": "^7.10.1",
|
|
21
|
-
"@mdx-js/react": "^1.6.6",
|
|
22
|
-
"@types/babel__core": "^7.1.9",
|
|
23
|
-
"@types/codemirror": "^0.0.96",
|
|
24
|
-
"@types/history": "^4.7.6",
|
|
25
|
-
"@types/mdx-js__react": "^1.5.2",
|
|
26
|
-
"@types/react": "^16.9.41",
|
|
27
|
-
"@types/react-dom": "^16.9.8",
|
|
28
|
-
"@types/styled-components": "^5.1.0",
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^3.4.0",
|
|
30
|
-
"@typescript-eslint/parser": "^3.4.0",
|
|
31
|
-
"bezier-easing": "^2.1.0",
|
|
32
|
-
"codemirror": "^5.55.0",
|
|
33
|
-
"date-fns": "^2.14.0",
|
|
34
|
-
"eslint": "^7.3.1",
|
|
35
|
-
"eslint-config-prettier": "^6.11.0",
|
|
36
|
-
"eslint-plugin-prettier": "^3.1.4",
|
|
37
|
-
"eslint-plugin-react": "^7.20.0",
|
|
38
|
-
"history": "^5.0.0",
|
|
39
|
-
"jest": "^26.1.0",
|
|
40
|
-
"lodash": "^4.17.15",
|
|
41
|
-
"observable-callback": "^1.0.1",
|
|
42
|
-
"prettier": "2.0.5",
|
|
43
|
-
"react": "^17.0.1",
|
|
44
|
-
"react-codemirror2": "^7.2.1",
|
|
45
|
-
"react-css-burger": "^0.2.0",
|
|
46
|
-
"react-dom": "^17.0.1",
|
|
47
|
-
"react-rx": "1.0.0-beta.4",
|
|
48
|
-
"remark-emoji": "^2.1.0",
|
|
49
|
-
"rimraf": "^3.0.2",
|
|
50
|
-
"rxjs": "^6.5.5",
|
|
51
|
-
"styled-components": "^5.1.1",
|
|
52
|
-
"webpack": "^4.43.0",
|
|
53
|
-
"webpack-cli": "^3.3.12"
|
|
54
|
-
},
|
|
55
|
-
"author": "",
|
|
56
|
-
"license": "ISC",
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@babel/preset-env": "^7.10.3",
|
|
59
|
-
"@babel/standalone": "^7.10.3",
|
|
60
|
-
"@mdx-js/loader": "^1.6.6",
|
|
61
|
-
"@mdx-js/mdx": "^1.6.6",
|
|
62
|
-
"@types/lodash": "^4.14.157",
|
|
63
|
-
"@types/node": "^14.0.14",
|
|
64
|
-
"@webhotelier/webpack-fast-refresh": "5.0.1",
|
|
65
|
-
"babel-loader": "^8.1.0",
|
|
66
|
-
"babel-plugin-static-fs": "^3.0.0",
|
|
67
|
-
"babel-plugin-styled-components": "^1.10.7",
|
|
68
|
-
"clean-webpack-plugin": "^3.0.0",
|
|
69
|
-
"copy-webpack-plugin": "^6.0.2",
|
|
70
|
-
"css-loader": "^3.6.0",
|
|
71
|
-
"github-slugger": "^1.3.0",
|
|
72
|
-
"html-loader": "^1.1.0",
|
|
73
|
-
"html-webpack-plugin": "^4.3.0",
|
|
74
|
-
"markdown-toc": "^1.2.0",
|
|
75
|
-
"react-refresh": "0.8.3",
|
|
76
|
-
"remark-slug": "^6.0.0",
|
|
77
|
-
"style-loader": "^1.2.1",
|
|
78
|
-
"ts-loader": "^7.0.5",
|
|
79
|
-
"ts-node": "^8.10.2",
|
|
80
|
-
"tsconfig-paths": "^3.9.0",
|
|
81
|
-
"typescript": "^3.9.5",
|
|
82
|
-
"webpack-dev-server": "^3.11.0"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare module '*.md' {
|
|
2
|
-
const MDXComponent: (props: any) => JSX.Element
|
|
3
|
-
export default MDXComponent
|
|
4
|
-
export {MDXComponent as Toc}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module '*.mdx' {
|
|
8
|
-
const MDXComponent: (props: any) => JSX.Element
|
|
9
|
-
export default MDXComponent
|
|
10
|
-
export {MDXComponent as Toc}
|
|
11
|
-
}
|
package/website/src/App.tsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import {createGlobalStyle} from 'styled-components'
|
|
3
|
-
import {rxComponent} from 'react-rx'
|
|
4
|
-
import {map} from 'rxjs/operators'
|
|
5
|
-
import {COLORS, media} from './theme'
|
|
6
|
-
import {pageTransition$} from './datastores/pageTransition'
|
|
7
|
-
|
|
8
|
-
const GlobalStyle = createGlobalStyle`
|
|
9
|
-
body {
|
|
10
|
-
${media.between('xsmall', 'small')} {
|
|
11
|
-
font-size: 12px;
|
|
12
|
-
}
|
|
13
|
-
${media.between('small', 'medium')} {
|
|
14
|
-
font-size: 14px;
|
|
15
|
-
}
|
|
16
|
-
${media.greaterThan('medium')} {
|
|
17
|
-
font-size: 16px;
|
|
18
|
-
}
|
|
19
|
-
${media.greaterThan('large')} {
|
|
20
|
-
font-size: 18px;
|
|
21
|
-
}
|
|
22
|
-
padding: 0;
|
|
23
|
-
margin: 0;
|
|
24
|
-
background: ${COLORS.background};
|
|
25
|
-
color: ${COLORS.text};
|
|
26
|
-
font-family: Inter, -apple-system, system-ui, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
|
|
27
|
-
'Droid Sans', 'Helvetica Neue', 'Fira Sans', system-ui, sans-serif;
|
|
28
|
-
font-size: 1.125rem;
|
|
29
|
-
overflow-y: scroll;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
h1::before, h2::before, h3::before, h4::before {
|
|
33
|
-
display: block;
|
|
34
|
-
content: " ";
|
|
35
|
-
visibility: hidden;
|
|
36
|
-
pointer-events: none;
|
|
37
|
-
}
|
|
38
|
-
h2::before, h3::before, h4::before {
|
|
39
|
-
margin-top: -6em;
|
|
40
|
-
height: 6em;
|
|
41
|
-
}
|
|
42
|
-
h1::before {
|
|
43
|
-
margin-top: -6em;
|
|
44
|
-
height: 6em;
|
|
45
|
-
}
|
|
46
|
-
a:link,
|
|
47
|
-
a:visited {
|
|
48
|
-
color: ${COLORS.link};
|
|
49
|
-
text-decoration: none;
|
|
50
|
-
}
|
|
51
|
-
`
|
|
52
|
-
|
|
53
|
-
export const App = rxComponent(
|
|
54
|
-
pageTransition$.pipe(
|
|
55
|
-
map((transition) => {
|
|
56
|
-
return (
|
|
57
|
-
<>
|
|
58
|
-
<GlobalStyle />
|
|
59
|
-
{transition.component ? (
|
|
60
|
-
<transition.component />
|
|
61
|
-
) : (
|
|
62
|
-
<div>Loading…</div>
|
|
63
|
-
)}
|
|
64
|
-
</>
|
|
65
|
-
)
|
|
66
|
-
})
|
|
67
|
-
)
|
|
68
|
-
)
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import {Link} from './Link'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import styled from 'styled-components'
|
|
4
|
-
import {rxComponent} from 'react-rx'
|
|
5
|
-
import {pages} from '../pages/pages'
|
|
6
|
-
|
|
7
|
-
import {map} from 'rxjs/operators'
|
|
8
|
-
import {GithubLogo} from './logos/Github'
|
|
9
|
-
import {COLORS} from '../theme'
|
|
10
|
-
import {ReactRxLogo} from './logos/ReactRxLogo'
|
|
11
|
-
import {pageTransition$} from '../datastores/pageTransition'
|
|
12
|
-
import {omit} from 'lodash'
|
|
13
|
-
|
|
14
|
-
const StyledHeader = styled.header`
|
|
15
|
-
z-index: 2000;
|
|
16
|
-
position: fixed;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
right: 0;
|
|
20
|
-
padding-bottom: 0;
|
|
21
|
-
background: ${COLORS.header.background};
|
|
22
|
-
a,
|
|
23
|
-
a:link,
|
|
24
|
-
a:visited {
|
|
25
|
-
color: ${COLORS.header.text};
|
|
26
|
-
}
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
const HeaderInner = styled.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: row;
|
|
32
|
-
justify-content: space-between;
|
|
33
|
-
align-items: center;
|
|
34
|
-
height: 5em;
|
|
35
|
-
padding: 0.5em 1em 0.5em 1em;
|
|
36
|
-
background-color: ${COLORS.header.background};
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
const LinkWrapper = styled.div`
|
|
40
|
-
color: #efefef;
|
|
41
|
-
padding: 0.5em 1.2em 0.5em 0;
|
|
42
|
-
`
|
|
43
|
-
|
|
44
|
-
const omitProps = <T extends React.ComponentType>(
|
|
45
|
-
Component: T,
|
|
46
|
-
omitProps: string[]
|
|
47
|
-
) => (props: React.ComponentProps<T>) => {
|
|
48
|
-
const omitted: any = omit(props, omitProps)
|
|
49
|
-
return <Component {...omitted} />
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const PageLink = styled(omitProps(Link, ['isActive', 'isTransitioningTo']))<{
|
|
53
|
-
isActive: boolean
|
|
54
|
-
isTransitioningTo: boolean
|
|
55
|
-
}>`
|
|
56
|
-
display: block;
|
|
57
|
-
color: ${COLORS.text};
|
|
58
|
-
font-size: 1em;
|
|
59
|
-
&:link,
|
|
60
|
-
&:visited {
|
|
61
|
-
color: ${COLORS.text};
|
|
62
|
-
text-decoration: ${(props) =>
|
|
63
|
-
(props.isActive || props.isTransitioningTo) && `underline`};
|
|
64
|
-
text-decoration-style: ${(props) => props.isTransitioningTo && `wavy`};
|
|
65
|
-
}
|
|
66
|
-
`
|
|
67
|
-
|
|
68
|
-
const LogoWrapper = styled.div`
|
|
69
|
-
font-family: Roboto, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica,
|
|
70
|
-
Arial, 'Lucida Grande', sans-serif;
|
|
71
|
-
-webkit-font-smoothing: antialiased;
|
|
72
|
-
font-weight: bold;
|
|
73
|
-
font-size: 1.3em;
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-grow: 1;
|
|
76
|
-
align-items: center;
|
|
77
|
-
`
|
|
78
|
-
const Logo = () => (
|
|
79
|
-
<LogoWrapper>
|
|
80
|
-
<Link href="/">
|
|
81
|
-
<ReactRxLogo size="2em" style={{paddingRight: '0.4em'}} />
|
|
82
|
-
ReactRx
|
|
83
|
-
</Link>
|
|
84
|
-
</LogoWrapper>
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
export const Header = rxComponent((page$) =>
|
|
88
|
-
pageTransition$.pipe(
|
|
89
|
-
map((transitionState) => (
|
|
90
|
-
<StyledHeader>
|
|
91
|
-
<HeaderInner>
|
|
92
|
-
<Logo />
|
|
93
|
-
{pages
|
|
94
|
-
.filter((page) => page.id !== 'home')
|
|
95
|
-
.map((page) => {
|
|
96
|
-
return (
|
|
97
|
-
<LinkWrapper key={page.id}>
|
|
98
|
-
<PageLink
|
|
99
|
-
href={page.route}
|
|
100
|
-
isTransitioningTo={
|
|
101
|
-
transitionState.isTransitioning &&
|
|
102
|
-
transitionState.next === page
|
|
103
|
-
}
|
|
104
|
-
isActive={transitionState.current === page}
|
|
105
|
-
>
|
|
106
|
-
{page.title}
|
|
107
|
-
</PageLink>
|
|
108
|
-
</LinkWrapper>
|
|
109
|
-
)
|
|
110
|
-
})}
|
|
111
|
-
<a href="https://github.com/sanity-io/react-rx">
|
|
112
|
-
<GithubLogo style={{color: '#fff'}} height="25" width="25" />
|
|
113
|
-
</a>
|
|
114
|
-
</HeaderInner>
|
|
115
|
-
</StyledHeader>
|
|
116
|
-
))
|
|
117
|
-
)
|
|
118
|
-
)
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import {navigate} from '../datastores/location'
|
|
3
|
-
|
|
4
|
-
export function Link(props: React.ComponentProps<'a'>) {
|
|
5
|
-
const onClick = React.useCallback(
|
|
6
|
-
event => {
|
|
7
|
-
if (props.onClick) {
|
|
8
|
-
props.onClick(event)
|
|
9
|
-
}
|
|
10
|
-
event.preventDefault()
|
|
11
|
-
if (props.href) {
|
|
12
|
-
navigate(props.href)
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
[props.href, props.onClick]
|
|
16
|
-
)
|
|
17
|
-
return <a {...props} onClick={onClick} />
|
|
18
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import {rxComponent} from 'react-rx'
|
|
2
|
-
import {map, scan, switchMap} from 'rxjs/operators'
|
|
3
|
-
import {Page} from '../pages/pages'
|
|
4
|
-
import {concat, from, of} from 'rxjs'
|
|
5
|
-
import * as React from 'react'
|
|
6
|
-
import {Header} from './Header'
|
|
7
|
-
import {Container, Content} from '../pages/styles'
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
page: Page
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface PageWrapperProps {
|
|
14
|
-
title: string
|
|
15
|
-
isLoading: boolean
|
|
16
|
-
component: React.ComponentType<any>
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const PageWrapper = (props: PageWrapperProps) => {
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
<div style={{position: 'fixed', top: 0, zIndex: 10000}}>
|
|
23
|
-
{props.isLoading ? `Loading ` : 'Loaded '}
|
|
24
|
-
{props.title}
|
|
25
|
-
</div>
|
|
26
|
-
{props.component && <props.component />}
|
|
27
|
-
</>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const INITIAL_COMPONENT = () => (
|
|
32
|
-
<>
|
|
33
|
-
<Header />
|
|
34
|
-
<Container>
|
|
35
|
-
<Content>Loading</Content>
|
|
36
|
-
</Container>
|
|
37
|
-
</>
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
export const LoadPage = rxComponent<Props>(props$ => {
|
|
41
|
-
return props$.pipe(
|
|
42
|
-
map(props => props.page),
|
|
43
|
-
switchMap(page =>
|
|
44
|
-
concat(
|
|
45
|
-
of({title: page.title, isLoading: true, component: INITIAL_COMPONENT}),
|
|
46
|
-
from(page.load()).pipe(
|
|
47
|
-
map(component => ({
|
|
48
|
-
isLoading: false,
|
|
49
|
-
title: page.title,
|
|
50
|
-
component
|
|
51
|
-
}))
|
|
52
|
-
)
|
|
53
|
-
)
|
|
54
|
-
),
|
|
55
|
-
scan((prev, next) => ({...prev, ...next})),
|
|
56
|
-
map(({isLoading, title, component}) => (
|
|
57
|
-
<PageWrapper title={title} component={component} isLoading={isLoading} />
|
|
58
|
-
))
|
|
59
|
-
)
|
|
60
|
-
})
|