dara-core 1.14.1__py3-none-any.whl → 1.14.3__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.
dara/core/auth/routes.py CHANGED
@@ -19,15 +19,7 @@ from inspect import iscoroutinefunction
19
19
  from typing import Union, cast
20
20
 
21
21
  import jwt
22
- from fastapi import (
23
- APIRouter,
24
- BackgroundTasks,
25
- Cookie,
26
- Depends,
27
- HTTPException,
28
- Request,
29
- Response,
30
- )
22
+ from fastapi import APIRouter, Cookie, Depends, HTTPException, Request, Response
31
23
  from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
32
24
 
33
25
  from dara.core.auth.base import BaseAuthConfig
@@ -116,7 +108,6 @@ async def _revoke_session(response: Response, credentials: HTTPAuthorizationCred
116
108
  @auth_router.post('/refresh-token')
117
109
  async def handle_refresh_token(
118
110
  response: Response,
119
- background_tasks: BackgroundTasks,
120
111
  dara_refresh_token: Union[str, None] = Cookie(default=None),
121
112
  credentials: HTTPAuthorizationCredentials = Depends(HTTPBearer()),
122
113
  ):
@@ -18483,6 +18483,25 @@ var __privateWrapper = (obj, member, setter, getter) => ({
18483
18483
  y: y2
18484
18484
  });
18485
18485
  }
18486
+ function getWindowScrollBarX$1(element, rect) {
18487
+ const leftScroll = getNodeScroll$1(element).scrollLeft;
18488
+ if (!rect) {
18489
+ return getBoundingClientRect$1(getDocumentElement$1(element)).left + leftScroll;
18490
+ }
18491
+ return rect.left + leftScroll;
18492
+ }
18493
+ function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
18494
+ if (ignoreScrollbarX === void 0) {
18495
+ ignoreScrollbarX = false;
18496
+ }
18497
+ const htmlRect = documentElement.getBoundingClientRect();
18498
+ const x2 = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : getWindowScrollBarX$1(documentElement, htmlRect));
18499
+ const y2 = htmlRect.top + scroll.scrollTop;
18500
+ return {
18501
+ x: x2,
18502
+ y: y2
18503
+ };
18504
+ }
18486
18505
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref2) {
18487
18506
  let {
18488
18507
  elements,
@@ -18514,23 +18533,17 @@ var __privateWrapper = (obj, member, setter, getter) => ({
18514
18533
  offsets.y = offsetRect.y + offsetParent.clientTop;
18515
18534
  }
18516
18535
  }
18536
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
18517
18537
  return {
18518
18538
  width: rect.width * scale.x,
18519
18539
  height: rect.height * scale.y,
18520
- x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
18521
- y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
18540
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
18541
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
18522
18542
  };
18523
18543
  }
18524
18544
  function getClientRects(element) {
18525
18545
  return Array.from(element.getClientRects());
18526
18546
  }
18527
- function getWindowScrollBarX$1(element, rect) {
18528
- const leftScroll = getNodeScroll$1(element).scrollLeft;
18529
- if (!rect) {
18530
- return getBoundingClientRect$1(getDocumentElement$1(element)).left + leftScroll;
18531
- }
18532
- return rect.left + leftScroll;
18533
- }
18534
18547
  function getDocumentRect$1(element) {
18535
18548
  const html = getDocumentElement$1(element);
18536
18549
  const scroll = getNodeScroll$1(element);
@@ -18600,9 +18613,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
18600
18613
  } else {
18601
18614
  const visualOffsets = getVisualOffsets(element);
18602
18615
  rect = {
18603
- ...clippingAncestor,
18604
18616
  x: clippingAncestor.x - visualOffsets.x,
18605
- y: clippingAncestor.y - visualOffsets.y
18617
+ y: clippingAncestor.y - visualOffsets.y,
18618
+ width: clippingAncestor.width,
18619
+ height: clippingAncestor.height
18606
18620
  };
18607
18621
  }
18608
18622
  return rectToClientRect$1(rect);
@@ -18697,15 +18711,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
18697
18711
  offsets.x = getWindowScrollBarX$1(documentElement);
18698
18712
  }
18699
18713
  }
18700
- let htmlX = 0;
18701
- let htmlY = 0;
18702
- if (documentElement && !isOffsetParentAnElement && !isFixed) {
18703
- const htmlRect = documentElement.getBoundingClientRect();
18704
- htmlY = htmlRect.top + scroll.scrollTop;
18705
- htmlX = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX$1(documentElement, htmlRect);
18706
- }
18707
- const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlX;
18708
- const y2 = rect.top + scroll.scrollTop - offsets.y - htmlY;
18714
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
18715
+ const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
18716
+ const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
18709
18717
  return {
18710
18718
  x: x2,
18711
18719
  y: y2,
@@ -19665,7 +19673,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
19665
19673
  const computedElements = rootContext.elements;
19666
19674
  const [_domReference, setDomReference] = React__namespace.useState(null);
19667
19675
  const [positionReference, _setPositionReference] = React__namespace.useState(null);
19668
- const optionDomReference = computedElements == null ? void 0 : computedElements.reference;
19676
+ const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
19669
19677
  const domReference = optionDomReference || _domReference;
19670
19678
  const domReferenceRef = React__namespace.useRef(null);
19671
19679
  const tree = useFloatingTree();
@@ -55073,7 +55081,6 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
55073
55081
  const refreshedToken = await store.replaceValue(getTokenKey(), async () => {
55074
55082
  const refreshResponse = await fetch(`${baseUrl}/api/auth/refresh-token`, {
55075
55083
  headers: headersInterface,
55076
- ...other,
55077
55084
  method: "POST"
55078
55085
  });
55079
55086
  if (refreshResponse.ok) {
@@ -59209,7 +59216,7 @@ Inferred class string: "${iconClasses}."`
59209
59216
  childToRender = fallbackRender(props);
59210
59217
  } else if (FallbackComponent) {
59211
59218
  childToRender = React.createElement(FallbackComponent, props);
59212
- } else if (fallback === null || React.isValidElement(fallback)) {
59219
+ } else if (fallback !== void 0) {
59213
59220
  childToRender = fallback;
59214
59221
  } else {
59215
59222
  throw error;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.14.1
3
+ Version: 1.14.3
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -20,10 +20,10 @@ Requires-Dist: async-asgi-testclient (>=1.4.11,<2.0.0)
20
20
  Requires-Dist: certifi (>=2024.7.4)
21
21
  Requires-Dist: click (==8.1.3)
22
22
  Requires-Dist: colorama (>=0.4.6,<0.5.0)
23
- Requires-Dist: create-dara-app (==1.14.1)
23
+ Requires-Dist: create-dara-app (==1.14.3)
24
24
  Requires-Dist: croniter (>=1.0.15,<2.0.0)
25
25
  Requires-Dist: cryptography (>=42.0.4)
26
- Requires-Dist: dara-components (==1.14.1) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.14.3) ; extra == "all"
27
27
  Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
28
28
  Requires-Dist: fastapi (==0.109.0)
29
29
  Requires-Dist: fastapi-vite (==0.3.1)
@@ -51,7 +51,7 @@ Description-Content-Type: text/markdown
51
51
 
52
52
  # Dara Application Framework
53
53
 
54
- <img src="https://github.com/causalens/dara/blob/v1.14.1/img/dara_light.svg?raw=true">
54
+ <img src="https://github.com/causalens/dara/blob/v1.14.3/img/dara_light.svg?raw=true">
55
55
 
56
56
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
57
57
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -96,7 +96,7 @@ source .venv/bin/activate
96
96
  dara start
97
97
  ```
98
98
 
99
- ![Dara App](https://github.com/causalens/dara/blob/v1.14.1/img/components_gallery.png?raw=true)
99
+ ![Dara App](https://github.com/causalens/dara/blob/v1.14.3/img/components_gallery.png?raw=true)
100
100
 
101
101
  Note: `pip` installation uses [PEP 660](https://peps.python.org/pep-0660/) `pyproject.toml`-based editable installs which require `pip >= 21.3` and `setuptools >= 64.0.0`. You can upgrade both with:
102
102
 
@@ -113,9 +113,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
113
113
 
114
114
  | Dara App | Description |
115
115
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
116
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.14.1/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
117
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.14.1/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
118
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.14.1/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
116
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.14.3/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
117
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.14.3/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
118
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.14.3/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
119
119
 
120
120
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
121
121
 
@@ -142,9 +142,9 @@ And the supporting UI packages and tools.
142
142
  - `ui-utils` - miscellaneous utility functions
143
143
  - `ui-widgets` - widget components
144
144
 
145
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.14.1/CONTRIBUTING.md) file.
145
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.14.3/CONTRIBUTING.md) file.
146
146
 
147
147
  ## License
148
148
 
149
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.14.1/LICENSE).
149
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.14.3/LICENSE).
150
150
 
@@ -4,7 +4,7 @@ dara/core/auth/__init__.py,sha256=H0bJoXff5wIRZmHvvQ3y9p5SXA9lM8OuLCGceYGqfb0,85
4
4
  dara/core/auth/base.py,sha256=jZNuCMoBHQcxWeLpTUzcxdbkbWUJ42jbtKgnnrwvNVA,3201
5
5
  dara/core/auth/basic.py,sha256=IMkoC1OeeRmnmjIqPHpybs8zSdbLlNKYLRvj08ajirg,4692
6
6
  dara/core/auth/definitions.py,sha256=fx-VCsElP9X97gM0Eql-4lFpLa0UryokmGZhQQat2NU,3511
7
- dara/core/auth/routes.py,sha256=k5y9G-mBDNM3sYX3rk1p1khZPKBD97rPdrs8PV2LSJs,7269
7
+ dara/core/auth/routes.py,sha256=1gOe1Z2Vv5MtpW5uvUYvyYWTJ_BDoLRllji1Plk4nss,7180
8
8
  dara/core/auth/utils.py,sha256=_iyS_FExxlYZVDvnHJO5uhFpOW-g8YlhBH9zz8oPsPE,7314
9
9
  dara/core/base_definitions.py,sha256=r_W_qk6_VvvskbPEPjTF6xUh3o_lkNBWMFhN1Pic8Ks,14868
10
10
  dara/core/cli.py,sha256=ycTB7QHCB-74OnKnjXqkXq-GBqyjBqo7u4v1kTgv2jE,7656
@@ -81,7 +81,7 @@ dara/core/metrics/cache.py,sha256=ybofUhZO0TCHeyhB_AtldWk1QTmTKh7GucTXpOkeTFA,25
81
81
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
82
82
  dara/core/metrics/utils.py,sha256=rYlBinxFc7VehFT5cTNXLk8gC74UEj7ZGq6vLgIDpSg,2247
83
83
  dara/core/persistence.py,sha256=TO94rPAN7jxZKVCC5YA4eE7GGDoNlCPe-BkkItV2VUE,10379
84
- dara/core/umd/dara.core.umd.js,sha256=h7NVytgGpX9sRWUhRa44Vai12T0VqF7t1nAjV_HAQGE,4877529
84
+ dara/core/umd/dara.core.umd.js,sha256=7CR0lMbFtw0EZQ7xA3m6tGzTB4Ha0gbI2nbMTix5VBM,4877967
85
85
  dara/core/umd/style.css,sha256=YQtQ4veiSktnyONl0CU1iU1kKfcQhreH4iASi1MP7Ak,4095007
86
86
  dara/core/visual/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
87
87
  dara/core/visual/components/__init__.py,sha256=O-Em_glGdZNO0LLl2RWmJSrQiXKxliXg_PuhVXGT81I,1811
@@ -105,8 +105,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
105
105
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
106
106
  dara/core/visual/themes/definitions.py,sha256=m3oN0txs65MZepqjj7AKMMxybf2aq5fTjcTwJmHqEbk,2744
107
107
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
108
- dara_core-1.14.1.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
- dara_core-1.14.1.dist-info/METADATA,sha256=9TBuOfX5YHGR7BfIrIulINEVpUmno2GoOzrV3upD0RM,7383
110
- dara_core-1.14.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
- dara_core-1.14.1.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
- dara_core-1.14.1.dist-info/RECORD,,
108
+ dara_core-1.14.3.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
+ dara_core-1.14.3.dist-info/METADATA,sha256=30bCHgL27HCfZrshzF5ELDVjVr5v-5mLmP8haYx_Q0Y,7383
110
+ dara_core-1.14.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
+ dara_core-1.14.3.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
+ dara_core-1.14.3.dist-info/RECORD,,