solara 1.7.0__py2.py3-none-any.whl → 1.7.1__py2.py3-none-any.whl

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.
solara/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """Build webapps using IPywidgets"""
2
- __version__ = "1.7.0"
2
+ __version__ = "1.7.1"
3
3
  github_url = "https://github.com/widgetti/solara"
4
4
  git_branch = "master"
5
5
 
@@ -119,7 +119,7 @@ async def main():
119
119
  ]
120
120
  for dep in requirements:
121
121
  await micropip.install(dep, keep_going=True)
122
- await micropip.install("/wheels/solara-1.7.0-py2.py3-none-any.whl", keep_going=True)
122
+ await micropip.install("/wheels/solara-1.7.1-py2.py3-none-any.whl", keep_going=True)
123
123
  import solara
124
124
 
125
125
  el = solara.Warning("lala")
@@ -1,4 +1,6 @@
1
- <template><span></span></template>
1
+ <template>
2
+ <span></span>
3
+ </template>
2
4
 
3
5
  <script>
4
6
  modules.export = {
@@ -23,7 +25,7 @@ modules.export = {
23
25
  if (location.indexOf("#") !== -1) {
24
26
  location = location.slice(0, location.indexOf("#"));
25
27
  }
26
- this.location = location;
28
+ this.location = location + window.location.search;
27
29
  window.addEventListener("popstate", this.onPopState);
28
30
  window.addEventListener("scroll", this.onScroll);
29
31
  },
@@ -40,7 +42,7 @@ modules.export = {
40
42
  );
41
43
  },
42
44
  onPopState(event) {
43
- console.log("pop state!", event.state, window.location.pathname);
45
+ console.log("pop state!", event.state, window.location.href);
44
46
  if (!window.location.pathname.startsWith(solara.rootPath)) {
45
47
  throw `window.location.pathname = ${window.location.pathname}, but it should start with the solara.rootPath = ${solara.rootPath}`;
46
48
  }
@@ -49,7 +51,7 @@ modules.export = {
49
51
  if (newLocation.indexOf("#") !== -1) {
50
52
  newLocation = newLocation.slice(0, newLocation.indexOf("#"));
51
53
  }
52
- this.location = newLocation;
54
+ this.location = newLocation + window.location.search;
53
55
  if (event.state) {
54
56
  const top = event.state.top;
55
57
  /*
@@ -65,13 +67,15 @@ modules.export = {
65
67
  watch: {
66
68
  location(value) {
67
69
  console.log("changed", this.location, value);
70
+ pathnameNew = (new URL(value, window.location)).pathname
71
+ pathnameOld = window.location.pathname
68
72
  // if we use the back navigation, this watch will trigger,
69
73
  // but we don't want to push the history
70
74
  // otherwise we cannot go forward
71
75
  if (!window.location.pathname.startsWith(solara.rootPath)) {
72
76
  throw `window.location.pathname = ${window.location.pathname}, but it should start with the solara.rootPath = ${solara.rootPath}`;
73
77
  }
74
- const oldLocation = window.location.pathname.slice(solara.rootPath.length);
78
+ const oldLocation = window.location.pathname.slice(solara.rootPath.length) + window.location.search;
75
79
  console.log(
76
80
  "location changed",
77
81
  oldLocation,
@@ -80,7 +84,11 @@ modules.export = {
80
84
  );
81
85
  if (oldLocation != this.location) {
82
86
  window.history.pushState({ top: 0 }, null, solara.rootPath + this.location);
83
- window.scrollTo(0, 0);
87
+ if (pathnameNew != pathnameOld) {
88
+ // we scroll to the top only when we change page, not when we change
89
+ // the search string
90
+ window.scrollTo(0, 0);
91
+ }
84
92
  const event = new Event('solara.router');
85
93
  window.dispatchEvent(event);
86
94
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: solara
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: Build webapps using IPywidgets
5
5
  Author-email: "Maarten A. Breddels" <maartenbreddels@gmail.com>
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -33,7 +33,7 @@ Requires-Dist: jupyter_client>=7.0.0
33
33
  Requires-Dist: watchdog
34
34
  Requires-Dist: requests
35
35
  Requires-Dist: pygments==2.10; python_version < '3.7'
36
- Requires-Dist: solara-assets==1.7.0 ; extra == "assets"
36
+ Requires-Dist: solara-assets==1.7.1 ; extra == "assets"
37
37
  Requires-Dist: flake8 ; extra == "dev"
38
38
  Requires-Dist: bqplot ; extra == "dev"
39
39
  Requires-Dist: bqplot-image-gl ; extra == "dev"
@@ -1,4 +1,4 @@
1
- solara/__init__.py,sha256=O_Pl62uZgKDjJ9gmMfgS2Od0EowPjjINmSmX2bxWrRg,3091
1
+ solara/__init__.py,sha256=yvKCSAKUXMUrUCNf2wuFheR6FcMPvbRiVBjx2MjCYag,3091
2
2
  solara/__main__.py,sha256=ztXaMuWiQdyc4hEmws7ABy-E-CuaRkKhiArMP72M7ak,21260
3
3
  solara/alias.py,sha256=9vfLzud77NP8in3OID9b5mmIO8NyrnFjN2_aE0lSb1k,216
4
4
  solara/autorouting.py,sha256=njdkEoJMSAPJlG1R2sj3c9aFfzi0tqIF5t4oVm7OYYw,17763
@@ -103,7 +103,7 @@ solara/server/static/highlight-dark.css,sha256=gmC3pr3x2BqJgTswNoN6AkqfEhBk24hPF
103
103
  solara/server/static/highlight.css,sha256=k8ZdT5iwrGQ5tXTQHAXuxvZrSUq3kwCdEpy3mlFoZjs,2637
104
104
  solara/server/static/main-vuetify.js,sha256=-twJ3DaObXPToFk-s4guHtXrMtlrtFUVhnAuOSSHFbk,7981
105
105
  solara/server/static/main.js,sha256=mcx4JNQ4Lg4pNdUIqMoZos1mZyYFS48yd_JNFFJUqIE,5679
106
- solara/server/static/solara_bootstrap.py,sha256=v0ygQ0hQaGPx20ZFm1-1qY7EcuBsu501oP-hXlaMsQ0,3194
106
+ solara/server/static/solara_bootstrap.py,sha256=saSn_brryciMNW5OyHw0gNZSTe3uOWVo8b4OVxtrxz4,3194
107
107
  solara/server/static/sun.svg,sha256=jEKBAGCr7b9zNYv0VUb7lMWKjnU2dX69_Ye_DZWGXJI,6855
108
108
  solara/server/static/webworker.js,sha256=cjAFz7-SygStHJnYlJUlJs-gE_7YQeQ-WBDcmKYyjvo,1372
109
109
  solara/server/templates/index.html.j2,sha256=JXQo1M-STFHLBOFetgG7509cAq8xUP0VAEtYDzz35fY,31
@@ -289,12 +289,12 @@ solara/widgets/__init__.py,sha256=D3RfEez9dllmst64_nyzzII-NZXoNMEPDnEog4ov3VE,43
289
289
  solara/widgets/widgets.py,sha256=dZNRxJp1JRh3S5HRUR3FnN_dsYX45139kf5kEJiJ98Q,1894
290
290
  solara/widgets/vue/gridlayout.vue,sha256=EGeq8RmdRSd8AD2Us6L80zGFefh7TaQqJSnazX7YyDw,3559
291
291
  solara/widgets/vue/html.vue,sha256=9vaHrddQU1J9zgnhy0W1-YXJ0JH68fet1rDEHoe539Q,404
292
- solara/widgets/vue/navigator.vue,sha256=JIC8y329MBZrMV1SEVjr7nH025dkQod0ESK6ss8EUDk,3120
292
+ solara/widgets/vue/navigator.vue,sha256=-1CINPrZbLBpZhYcG0R1_nU7HTOF0KZL8RXAgR20D4c,3467
293
293
  solara/widgets/vue/vegalite.vue,sha256=Dr4i6fXayDxdo8FqByTlJshQSQ6vawecDq7AHZL93TI,3231
294
- solara-1.7.0.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
295
- solara-1.7.0.data/data/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
296
- solara-1.7.0.dist-info/entry_points.txt,sha256=AXTWXiaLDBs0LuR81mrek-v6m8xU1J7JYgc-Ob40OoU,47
297
- solara-1.7.0.dist-info/LICENSE,sha256=fFJUz-CWzZ9nEc4QZKu44jMEoDr5fEW-SiqljKpD82E,1086
298
- solara-1.7.0.dist-info/WHEEL,sha256=kdeDBNPvBI0w3meLKPoGgAnEr54n1jzrZWUoaLmGzVY,99
299
- solara-1.7.0.dist-info/METADATA,sha256=zWsa_AKwSlFY1eavg7o0e-nMO3R552WlDv_RC__l8t8,2754
300
- solara-1.7.0.dist-info/RECORD,,
294
+ solara-1.7.1.data/data/etc/jupyter/jupyter_notebook_config.d/solara.json,sha256=3UhTBQi6z7F7pPjmqXxfddv79c8VGR9H7zStDLp6AwY,115
295
+ solara-1.7.1.data/data/etc/jupyter/jupyter_server_config.d/solara.json,sha256=D9J-rYxAzyD5GOqWvuPjacGUVFHsYtTfZ4FUbRzRvIA,113
296
+ solara-1.7.1.dist-info/entry_points.txt,sha256=AXTWXiaLDBs0LuR81mrek-v6m8xU1J7JYgc-Ob40OoU,47
297
+ solara-1.7.1.dist-info/LICENSE,sha256=fFJUz-CWzZ9nEc4QZKu44jMEoDr5fEW-SiqljKpD82E,1086
298
+ solara-1.7.1.dist-info/WHEEL,sha256=kdeDBNPvBI0w3meLKPoGgAnEr54n1jzrZWUoaLmGzVY,99
299
+ solara-1.7.1.dist-info/METADATA,sha256=MjHc0mqmXUbzSW5E-zvGSK6pAJyh0PcMteZNEqYMZyk,2754
300
+ solara-1.7.1.dist-info/RECORD,,
File without changes