Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7877d11

Browse files
committed
include origin explicitely
1 parent fbe019f commit 7877d11

File tree

2 files changed

+157
-15
lines changed

2 files changed

+157
-15
lines changed

‎notebooks/introduction.ipynb‎

Lines changed: 154 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
{
3636
"cell_type": "code",
37-
"execution_count": null,
37+
"execution_count": 1,
3838
"metadata": {
3939
"tags": []
4040
},
@@ -54,11 +54,36 @@
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": null,
57+
"execution_count": 2,
5858
"metadata": {
5959
"tags": []
6060
},
61-
"outputs": [],
61+
"outputs": [
62+
{
63+
"data": {
64+
"text/plain": [
65+
"App(7fddbc3c7520)"
66+
]
67+
},
68+
"execution_count": 2,
69+
"metadata": {},
70+
"output_type": "execute_result"
71+
},
72+
{
73+
"data": {
74+
"application/vnd.jupyter.widget-view+json": {
75+
"model_id": "3a492cbddebd4240bee68d567ee504a1",
76+
"version_major": 2,
77+
"version_minor": 0
78+
},
79+
"text/plain": [
80+
"LayoutWidget(Layout(App(7fddbc3c7520)))"
81+
]
82+
},
83+
"metadata": {},
84+
"output_type": "display_data"
85+
}
86+
],
6287
"source": [
6388
"from reactpy import component, html, run\n",
6489
"\n",
@@ -84,11 +109,36 @@
84109
},
85110
{
86111
"cell_type": "code",
87-
"execution_count": null,
112+
"execution_count": 3,
88113
"metadata": {
89114
"tags": []
90115
},
91-
"outputs": [],
116+
"outputs": [
117+
{
118+
"data": {
119+
"text/plain": [
120+
"TodoList(7fdda0a0dea0)"
121+
]
122+
},
123+
"execution_count": 3,
124+
"metadata": {},
125+
"output_type": "execute_result"
126+
},
127+
{
128+
"data": {
129+
"application/vnd.jupyter.widget-view+json": {
130+
"model_id": "741e25bca51b400baedaf5ad683012fc",
131+
"version_major": 2,
132+
"version_minor": 0
133+
},
134+
"text/plain": [
135+
"LayoutWidget(Layout(TodoList(7fdda0a0dea0)))"
136+
]
137+
},
138+
"metadata": {},
139+
"output_type": "display_data"
140+
}
141+
],
92142
"source": [
93143
"from reactpy import component, html\n",
94144
"\n",
@@ -137,11 +187,36 @@
137187
},
138188
{
139189
"cell_type": "code",
140-
"execution_count": null,
190+
"execution_count": 4,
141191
"metadata": {
142192
"tags": []
143193
},
144-
"outputs": [],
194+
"outputs": [
195+
{
196+
"data": {
197+
"text/plain": [
198+
"Gallery(7fdda0a0e560)"
199+
]
200+
},
201+
"execution_count": 4,
202+
"metadata": {},
203+
"output_type": "execute_result"
204+
},
205+
{
206+
"data": {
207+
"application/vnd.jupyter.widget-view+json": {
208+
"model_id": "599b9afb8ca94319b7153f23e137308f",
209+
"version_major": 2,
210+
"version_minor": 0
211+
},
212+
"text/plain": [
213+
"LayoutWidget(Layout(Gallery(7fdda0a0e560)))"
214+
]
215+
},
216+
"metadata": {},
217+
"output_type": "display_data"
218+
}
219+
],
145220
"source": [
146221
"import json\n",
147222
"from pathlib import Path\n",
@@ -191,7 +266,7 @@
191266
},
192267
{
193268
"cell_type": "code",
194-
"execution_count": null,
269+
"execution_count": 5,
195270
"metadata": {
196271
"tags": []
197272
},
@@ -227,11 +302,27 @@
227302
},
228303
{
229304
"cell_type": "code",
230-
"execution_count": null,
305+
"execution_count": 9,
231306
"metadata": {
232307
"tags": []
233308
},
234-
"outputs": [],
309+
"outputs": [
310+
{
311+
"data": {
312+
"application/vnd.jupyter.widget-view+json": {
313+
"model_id": "f6fbf01c66dc42b0b53d15ecf64ddc73",
314+
"version_major": 2,
315+
"version_minor": 0
316+
},
317+
"text/plain": [
318+
"Box(children=(IntSlider(value=0, readout=False), LayoutWidget(Layout(SliderObserver(7fe2e19e7e20, slider=IntSl..."
319+
]
320+
},
321+
"execution_count": 9,
322+
"metadata": {},
323+
"output_type": "execute_result"
324+
}
325+
],
235326
"source": [
236327
"from ipywidgets import Box, IntSlider\n",
237328
"from reactpy_jupyter import LayoutWidget\n",
@@ -251,11 +342,27 @@
251342
},
252343
{
253344
"cell_type": "code",
254-
"execution_count": null,
345+
"execution_count": 7,
255346
"metadata": {
256347
"tags": []
257348
},
258-
"outputs": [],
349+
"outputs": [
350+
{
351+
"data": {
352+
"application/vnd.jupyter.widget-view+json": {
353+
"model_id": "3b018482270d4a7482aaed36e6ea2334",
354+
"version_major": 2,
355+
"version_minor": 0
356+
},
357+
"text/plain": [
358+
"Box(children=(IntSlider(value=0, readout=False), LayoutWidget(Layout(SliderObserver(7fdda0a0e6e0, slider=IntSl..."
359+
]
360+
},
361+
"execution_count": 7,
362+
"metadata": {},
363+
"output_type": "execute_result"
364+
}
365+
],
259366
"source": [
260367
"from reactpy_jupyter import widgetize\n",
261368
"\n",
@@ -287,11 +394,44 @@
287394
},
288395
{
289396
"cell_type": "code",
290-
"execution_count": null,
397+
"execution_count": 8,
291398
"metadata": {
292399
"tags": []
293400
},
294-
"outputs": [],
401+
"outputs": [
402+
{
403+
"name": "stderr",
404+
"output_type": "stream",
405+
"text": [
406+
"/tmp/ipykernel_304396/2504933715.py:4: DeprecationWarning: module_from_template() is deprecated due to instability - use the Javascript Components API instead. This function will be removed in a future release.\n",
407+
" victory = web.module_from_template(\"react\", \"victory-bar\", fallback=\"\")\n"
408+
]
409+
},
410+
{
411+
"data": {
412+
"text/plain": [
413+
"Demo(7fdda0a0fdc0)"
414+
]
415+
},
416+
"execution_count": 8,
417+
"metadata": {},
418+
"output_type": "execute_result"
419+
},
420+
{
421+
"data": {
422+
"application/vnd.jupyter.widget-view+json": {
423+
"model_id": "6d8207d9bfd844719d49d94595493d76",
424+
"version_major": 2,
425+
"version_minor": 0
426+
},
427+
"text/plain": [
428+
"LayoutWidget(Layout(Demo(7fdda0a0fdc0)))"
429+
]
430+
},
431+
"metadata": {},
432+
"output_type": "display_data"
433+
}
434+
],
295435
"source": [
296436
"from reactpy import component, web\n",
297437
"\n",

‎src/index.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ class JupyterReactPyClient extends BaseReactPyClient {
6767

6868
/** @param moduleName {string} */
6969
loadModule(moduleName) {
70-
return import(`${this.importSourceBaseUrl}/${moduleName}`);
70+
return import(
71+
`${window.location.origin}${this.importSourceBaseUrl}/${moduleName}`
72+
);
7173
}
7274
}
7375

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /