dara-core 1.14.2__py3-none-any.whl → 1.14.4__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.
@@ -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();
@@ -36522,6 +36530,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
36522
36530
 
36523
36531
  overflow: hidden;
36524
36532
 
36533
+ display: flex;
36534
+ justify-content: space-between;
36535
+ align-items: center;
36525
36536
  width: 100%;
36526
36537
  min-height: 2rem;
36527
36538
  padding: 0.25rem 1rem;
@@ -36566,10 +36577,16 @@ var __privateWrapper = (obj, member, setter, getter) => ({
36566
36577
  border-radius: 0 0 0.25rem 0.25rem;
36567
36578
  outline: 0;
36568
36579
  box-shadow: ${(props) => props.theme.shadow.light};
36580
+ `;
36581
+ const InnerItem = styled__default.default.span`
36582
+ min-width: 0;
36583
+ overflow: hidden;
36584
+ text-overflow: ellipsis;
36585
+ white-space: nowrap;
36569
36586
  `;
36570
36587
  const DropdownList = React__default.default.forwardRef(({ items, getItemProps, getFloatingProps, isOpen, getMenuProps, size: size2, style, maxItems, itemClass, className, children, selectedItem, kbdHighlightIdx }, ref) => jsxRuntime.exports.jsx(StyledDropdownList$1, Object.assign({}, getMenuProps ? getMenuProps({ ref }) : { ref }, getFloatingProps(), { isOpen, maxItems, style: Object.assign(Object.assign({}, style), { zIndex: 9999 }), className, children: !lodash$2.exports.isEmpty(items) ? items.map((item, index2) => {
36571
36588
  const isSelected = (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.label) === item.label;
36572
- return children ? children(item, index2) : jsxRuntime.exports.jsx(ListItem$1, { getItemProps, size: size2, title: item.label, item, index: index2, itemClass, isHighlighted: isOpen && kbdHighlightIdx !== void 0 && kbdHighlightIdx === index2, isSelected, children: item.label }, `item-${index2}-${isOpen && isSelected}`);
36589
+ return children ? children(item, index2) : jsxRuntime.exports.jsxs(ListItem$1, { getItemProps, size: size2, title: item.label, item, index: index2, itemClass, isHighlighted: isOpen && kbdHighlightIdx !== void 0 && kbdHighlightIdx === index2, isSelected, children: [jsxRuntime.exports.jsx(InnerItem, { children: item.label }), item.icon] }, `item-${index2}-${isOpen && isSelected}`);
36573
36590
  }) : jsxRuntime.exports.jsx(NoItemsLabel, { children: "No Items" }) })));
36574
36591
  DropdownList.displayName = "DropdownList";
36575
36592
  const DropdownList$1 = React__default.default.memo(DropdownList);
@@ -59208,7 +59225,7 @@ Inferred class string: "${iconClasses}."`
59208
59225
  childToRender = fallbackRender(props);
59209
59226
  } else if (FallbackComponent) {
59210
59227
  childToRender = React.createElement(FallbackComponent, props);
59211
- } else if (fallback === null || React.isValidElement(fallback)) {
59228
+ } else if (fallback !== void 0) {
59212
59229
  childToRender = fallback;
59213
59230
  } else {
59214
59231
  throw error;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.14.2
3
+ Version: 1.14.4
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.2)
23
+ Requires-Dist: create-dara-app (==1.14.4)
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.2) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.14.4) ; 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.2/img/dara_light.svg?raw=true">
54
+ <img src="https://github.com/causalens/dara/blob/v1.14.4/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.2/img/components_gallery.png?raw=true)
99
+ ![Dara App](https://github.com/causalens/dara/blob/v1.14.4/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.2/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.2/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.2/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.4/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.4/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.4/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.2/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.4/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.2/LICENSE).
149
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.14.4/LICENSE).
150
150
 
@@ -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=tKXGvAz2QMypS1jccgAlZiyO3mERdzdRqhPqJ5LGlfg,4877507
84
+ dara/core/umd/dara.core.umd.js,sha256=G4PJcloF4i2VPJvRxjE2ACk9CKkoLY0wm-0Yx0pA6EE,4878257
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.2.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
- dara_core-1.14.2.dist-info/METADATA,sha256=j6suOxjKVn_HOFJ_J9SwtPpl_GchXjv02nmb4wz6xBI,7383
110
- dara_core-1.14.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
- dara_core-1.14.2.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
- dara_core-1.14.2.dist-info/RECORD,,
108
+ dara_core-1.14.4.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
+ dara_core-1.14.4.dist-info/METADATA,sha256=qhIorm6FB5Archjzvz_htUrVrj67YAScouZope18A1s,7383
110
+ dara_core-1.14.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
+ dara_core-1.14.4.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
+ dara_core-1.14.4.dist-info/RECORD,,