@darajs/components 1.10.2 → 1.10.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../js/common/input/input.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAyD,MAAM,cAAc,CAAC;AAI/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,UAAW,SAAQ,kBAAkB;IAC3C,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAE/C,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC5B;AAQD;;;;GAIG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA+D7C;AAED,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../js/common/input/input.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAyD,MAAM,cAAc,CAAC;AAI/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,UAAW,SAAQ,kBAAkB;IAC3C,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAE/C,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC5B;AAQD;;;;GAIG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA8D7C;AAED,eAAe,KAAK,CAAC"}
@@ -21,9 +21,9 @@ function Input(props) {
21
21
  const [value, setValue] = useVariable(formCtx.resolveInitialValue());
22
22
  const [internalValue, setInternalValue] = useState(value);
23
23
  const onInputAction = useAction(props.onchange);
24
- const debouncedAction = useMemo(() => _debounce(onInputAction, 500), [onInputAction]);
25
- const debouncedSetValue = useMemo(() => _debounce(setValue, 500), [setValue]);
26
- const debouncedUpdateForm = useMemo(() => _debounce(formCtx.updateForm, 500), [formCtx.updateForm]);
24
+ const debouncedAction = useMemo(() => _debounce(onInputAction, 300), [onInputAction]);
25
+ const debouncedSetValue = useMemo(() => _debounce(setValue, 300), [setValue]);
26
+ const debouncedUpdateForm = useMemo(() => _debounce(formCtx.updateForm, 300), [formCtx.updateForm]);
27
27
  function handleChange(val) {
28
28
  let newValue = val;
29
29
  if (props.type === 'number') {
@@ -37,8 +37,7 @@ function Input(props) {
37
37
  debouncedUpdateForm(val);
38
38
  }
39
39
  useEffect(() => {
40
- // cancel in-progress debounced actions to make sure the variable value takes precedence
41
- debouncedAction.cancel();
40
+ // cancel in-progress debounced updates to make sure the variable value takes precedence
42
41
  debouncedSetValue.cancel();
43
42
  debouncedUpdateForm.cancel();
44
43
  // If value has been coerced to string convert it back to number for NumericInput
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../js/common/input/input.tsx"],"names":[],"mappings":";AAAA,gDAAgD;AAChD,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAY,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEzF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAe5C,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC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":"textarea.d.ts","sourceRoot":"","sources":["../../../js/common/textarea/textarea.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAyD,MAAM,cAAc,CAAC;AAI/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,aAAc,SAAQ,kBAAkB;IAC9C,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC;IACnB,wGAAwG;IACxG,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC1E,uFAAuF;IAEvF,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC5B;AAID;;;;;GAKG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAwCnD;AAED,eAAe,QAAQ,CAAC"}
@@ -18,9 +18,9 @@ function Textarea(props) {
18
18
  const [value, setValue] = useVariable(formCtx.resolveInitialValue());
19
19
  const [internalValue, setInternalValue] = useState(value);
20
20
  const onInputAction = useAction(props.onchange);
21
- const debouncedAction = useMemo(() => _debounce(onInputAction, 500), [onInputAction]);
22
- const debouncedSetValue = useMemo(() => _debounce(setValue, 500), [setValue]);
23
- const debouncedUpdateForm = useMemo(() => _debounce(formCtx.updateForm, 500), [formCtx.updateForm]);
21
+ const debouncedAction = useMemo(() => _debounce(onInputAction, 300), [onInputAction]);
22
+ const debouncedSetValue = useMemo(() => _debounce(setValue, 300), [setValue]);
23
+ const debouncedUpdateForm = useMemo(() => _debounce(formCtx.updateForm, 300), [formCtx.updateForm]);
24
24
  function handleChange(val) {
25
25
  // immediately update internal state
26
26
  setInternalValue(val);
@@ -30,8 +30,7 @@ function Textarea(props) {
30
30
  debouncedUpdateForm(val);
31
31
  }
32
32
  useEffect(() => {
33
- // cancel in-progress debounced actions to make sure the variable value takes precedence
34
- debouncedAction.cancel();
33
+ // cancel in-progress debounced updates to make sure the variable value takes precedence
35
34
  debouncedSetValue.cancel();
36
35
  debouncedUpdateForm.cancel();
37
36
  // Sync the internal value with the variable value when the variable value changes
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../js/common/textarea/textarea.tsx"],"names":[],"mappings":";AAAA,gDAAgD;AAChD,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAY,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAa5C,MAAM,cAAc,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AAE7C;;;;;GAKG;AACH,SAAS,QAAQ,CAAC,KAAoB;IAClC,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IACrE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,aAAa,GAAG,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAEhD,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IACtF,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,QAAQ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E;QACX,wFAAwF;QACxF,iBAAiB,CAAC,MAAM,EAAE,CAAC;QAC3B,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAE7B,kFAAkF;QAClF,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACH,KAAC,cAAc,eACF,GAAG,EACZ,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,aAAa,GACtB,CACL,CAAC;AACN,CAAC;AAED,eAAe,QAAQ,CAAC"}
@@ -5727,6 +5727,15 @@
5727
5727
  function isTableElement$1(element2) {
5728
5728
  return ["table", "td", "th"].includes(getNodeName$1(element2));
5729
5729
  }
5730
+ function isTopLayer(element2) {
5731
+ return [":popover-open", ":modal"].some((selector2) => {
5732
+ try {
5733
+ return element2.matches(selector2);
5734
+ } catch (e3) {
5735
+ return false;
5736
+ }
5737
+ });
5738
+ }
5730
5739
  function isContainingBlock(element2) {
5731
5740
  const webkit2 = isWebKit();
5732
5741
  const css2 = getComputedStyle$2(element2);
@@ -5735,6 +5744,9 @@
5735
5744
  function getContainingBlock$1(element2) {
5736
5745
  let currentNode = getParentNode$1(element2);
5737
5746
  while (isHTMLElement$1(currentNode) && !isLastTraversableNode(currentNode)) {
5747
+ if (isTopLayer(currentNode)) {
5748
+ return null;
5749
+ }
5738
5750
  if (isContainingBlock(currentNode)) {
5739
5751
  return currentNode;
5740
5752
  }
@@ -6359,10 +6371,12 @@
6359
6371
  return {};
6360
6372
  }
6361
6373
  const side = getSide(placement);
6374
+ const initialSideAxis = getSideAxis(initialPlacement);
6362
6375
  const isBasePlacement = getSide(initialPlacement) === initialPlacement;
6363
6376
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
6364
6377
  const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement$1(initialPlacement)] : getExpandedPlacements(initialPlacement));
6365
- if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
6378
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
6379
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
6366
6380
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
6367
6381
  }
6368
6382
  const placements2 = [initialPlacement, ...fallbackPlacements];
@@ -6399,8 +6413,14 @@
6399
6413
  if (!resetPlacement) {
6400
6414
  switch (fallbackStrategy) {
6401
6415
  case "bestFit": {
6402
- var _overflowsData$map$so;
6403
- const placement2 = (_overflowsData$map$so = overflowsData.map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
6416
+ var _overflowsData$filter2;
6417
+ const placement2 = (_overflowsData$filter2 = overflowsData.filter((d2) => {
6418
+ if (hasFallbackAxisSideDirection) {
6419
+ const currentSideAxis = getSideAxis(d2.placement);
6420
+ return currentSideAxis === initialSideAxis || currentSideAxis === "y";
6421
+ }
6422
+ return true;
6423
+ }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
6404
6424
  if (placement2) {
6405
6425
  resetPlacement = placement2;
6406
6426
  }
@@ -6995,16 +7015,6 @@
6995
7015
  y: y2
6996
7016
  });
6997
7017
  }
6998
- const topLayerSelectors = [":popover-open", ":modal"];
6999
- function isTopLayer(element2) {
7000
- return topLayerSelectors.some((selector2) => {
7001
- try {
7002
- return element2.matches(selector2);
7003
- } catch (e3) {
7004
- return false;
7005
- }
7006
- });
7007
- }
7008
7018
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref2) {
7009
7019
  let {
7010
7020
  elements,
@@ -7788,78 +7798,73 @@
7788
7798
  } = props;
7789
7799
  const pointerTypeRef = React__namespace.useRef();
7790
7800
  const didKeyDownRef = React__namespace.useRef(false);
7791
- return React__namespace.useMemo(() => {
7792
- if (!enabled)
7793
- return {};
7794
- return {
7795
- reference: {
7796
- onPointerDown(event2) {
7797
- pointerTypeRef.current = event2.pointerType;
7798
- },
7799
- onMouseDown(event2) {
7800
- if (event2.button !== 0) {
7801
- return;
7802
- }
7803
- if (isMouseLikePointerType(pointerTypeRef.current, true) && ignoreMouse) {
7804
- return;
7805
- }
7806
- if (eventOption === "click") {
7807
- return;
7808
- }
7809
- if (open && toggle && (dataRef.current.openEvent ? dataRef.current.openEvent.type === "mousedown" : true)) {
7810
- onOpenChange(false, event2.nativeEvent, "click");
7811
- } else {
7812
- event2.preventDefault();
7813
- onOpenChange(true, event2.nativeEvent, "click");
7814
- }
7815
- },
7816
- onClick(event2) {
7817
- if (eventOption === "mousedown" && pointerTypeRef.current) {
7818
- pointerTypeRef.current = void 0;
7819
- return;
7820
- }
7821
- if (isMouseLikePointerType(pointerTypeRef.current, true) && ignoreMouse) {
7822
- return;
7823
- }
7824
- if (open && toggle && (dataRef.current.openEvent ? dataRef.current.openEvent.type === "click" : true)) {
7825
- onOpenChange(false, event2.nativeEvent, "click");
7826
- } else {
7827
- onOpenChange(true, event2.nativeEvent, "click");
7828
- }
7829
- },
7830
- onKeyDown(event2) {
7831
- pointerTypeRef.current = void 0;
7832
- if (event2.defaultPrevented || !keyboardHandlers || isButtonTarget(event2)) {
7833
- return;
7834
- }
7835
- if (event2.key === " " && !isSpaceIgnored(domReference)) {
7836
- event2.preventDefault();
7837
- didKeyDownRef.current = true;
7838
- }
7839
- if (event2.key === "Enter") {
7840
- if (open && toggle) {
7841
- onOpenChange(false, event2.nativeEvent, "click");
7842
- } else {
7843
- onOpenChange(true, event2.nativeEvent, "click");
7844
- }
7845
- }
7846
- },
7847
- onKeyUp(event2) {
7848
- if (event2.defaultPrevented || !keyboardHandlers || isButtonTarget(event2) || isSpaceIgnored(domReference)) {
7849
- return;
7850
- }
7851
- if (event2.key === " " && didKeyDownRef.current) {
7852
- didKeyDownRef.current = false;
7853
- if (open && toggle) {
7854
- onOpenChange(false, event2.nativeEvent, "click");
7855
- } else {
7856
- onOpenChange(true, event2.nativeEvent, "click");
7857
- }
7858
- }
7801
+ const reference2 = React__namespace.useMemo(() => ({
7802
+ onPointerDown(event2) {
7803
+ pointerTypeRef.current = event2.pointerType;
7804
+ },
7805
+ onMouseDown(event2) {
7806
+ const pointerType = pointerTypeRef.current;
7807
+ if (event2.button !== 0)
7808
+ return;
7809
+ if (eventOption === "click")
7810
+ return;
7811
+ if (isMouseLikePointerType(pointerType, true) && ignoreMouse)
7812
+ return;
7813
+ if (open && toggle && (dataRef.current.openEvent ? dataRef.current.openEvent.type === "mousedown" : true)) {
7814
+ onOpenChange(false, event2.nativeEvent, "click");
7815
+ } else {
7816
+ event2.preventDefault();
7817
+ onOpenChange(true, event2.nativeEvent, "click");
7818
+ }
7819
+ },
7820
+ onClick(event2) {
7821
+ const pointerType = pointerTypeRef.current;
7822
+ if (eventOption === "mousedown" && pointerTypeRef.current) {
7823
+ pointerTypeRef.current = void 0;
7824
+ return;
7825
+ }
7826
+ if (isMouseLikePointerType(pointerType, true) && ignoreMouse)
7827
+ return;
7828
+ if (open && toggle && (dataRef.current.openEvent ? dataRef.current.openEvent.type === "click" : true)) {
7829
+ onOpenChange(false, event2.nativeEvent, "click");
7830
+ } else {
7831
+ onOpenChange(true, event2.nativeEvent, "click");
7832
+ }
7833
+ },
7834
+ onKeyDown(event2) {
7835
+ pointerTypeRef.current = void 0;
7836
+ if (event2.defaultPrevented || !keyboardHandlers || isButtonTarget(event2)) {
7837
+ return;
7838
+ }
7839
+ if (event2.key === " " && !isSpaceIgnored(domReference)) {
7840
+ event2.preventDefault();
7841
+ didKeyDownRef.current = true;
7842
+ }
7843
+ if (event2.key === "Enter") {
7844
+ if (open && toggle) {
7845
+ onOpenChange(false, event2.nativeEvent, "click");
7846
+ } else {
7847
+ onOpenChange(true, event2.nativeEvent, "click");
7859
7848
  }
7860
7849
  }
7861
- };
7862
- }, [enabled, dataRef, eventOption, ignoreMouse, keyboardHandlers, domReference, toggle, open, onOpenChange]);
7850
+ },
7851
+ onKeyUp(event2) {
7852
+ if (event2.defaultPrevented || !keyboardHandlers || isButtonTarget(event2) || isSpaceIgnored(domReference)) {
7853
+ return;
7854
+ }
7855
+ if (event2.key === " " && didKeyDownRef.current) {
7856
+ didKeyDownRef.current = false;
7857
+ if (open && toggle) {
7858
+ onOpenChange(false, event2.nativeEvent, "click");
7859
+ } else {
7860
+ onOpenChange(true, event2.nativeEvent, "click");
7861
+ }
7862
+ }
7863
+ }
7864
+ }), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, toggle]);
7865
+ return React__namespace.useMemo(() => enabled ? {
7866
+ reference: reference2
7867
+ } : {}, [enabled, reference2]);
7863
7868
  }
7864
7869
  const bubbleHandlerKeys = {
7865
7870
  pointerdown: "onPointerDown",
@@ -7885,11 +7890,7 @@
7885
7890
  const {
7886
7891
  open,
7887
7892
  onOpenChange,
7888
- elements: {
7889
- reference: reference2,
7890
- domReference,
7891
- floating
7892
- },
7893
+ elements,
7893
7894
  dataRef
7894
7895
  } = context2;
7895
7896
  const {
@@ -7967,7 +7968,7 @@
7967
7968
  }
7968
7969
  const target = getTarget(event2);
7969
7970
  const inertSelector = "[" + createAttribute("inert") + "]";
7970
- const markers = getDocument(floating).querySelectorAll(inertSelector);
7971
+ const markers = getDocument(elements.floating).querySelectorAll(inertSelector);
7971
7972
  let targetRootAncestor = isElement$4(target) ? target : null;
7972
7973
  while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
7973
7974
  const nextParent = getParentNode$1(targetRootAncestor);
@@ -7976,7 +7977,7 @@
7976
7977
  }
7977
7978
  targetRootAncestor = nextParent;
7978
7979
  }
7979
- if (markers.length && isElement$4(target) && !isRootElement(target) && !contains$2(target, floating) && Array.from(markers).every((marker) => !contains$2(targetRootAncestor, marker))) {
7980
+ if (markers.length && isElement$4(target) && !isRootElement(target) && !contains$2(target, elements.floating) && Array.from(markers).every((marker) => !contains$2(targetRootAncestor, marker))) {
7980
7981
  return;
7981
7982
  }
7982
7983
  if (isHTMLElement$1(target) && floating) {
@@ -7998,7 +7999,7 @@
7998
7999
  var _node$context;
7999
8000
  return isEventTargetWithin(event2, (_node$context = node2.context) == null ? void 0 : _node$context.elements.floating);
8000
8001
  });
8001
- if (isEventTargetWithin(event2, floating) || isEventTargetWithin(event2, domReference) || targetIsInsideChildren) {
8002
+ if (isEventTargetWithin(event2, elements.floating) || isEventTargetWithin(event2, elements.domReference) || targetIsInsideChildren) {
8002
8003
  return;
8003
8004
  }
8004
8005
  const children2 = tree ? getChildren$3(tree.nodesRef.current, nodeId) : [];
@@ -8035,19 +8036,19 @@
8035
8036
  function onScroll(event2) {
8036
8037
  onOpenChange(false, event2, "ancestor-scroll");
8037
8038
  }
8038
- const doc2 = getDocument(floating);
8039
+ const doc2 = getDocument(elements.floating);
8039
8040
  escapeKey && doc2.addEventListener("keydown", escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);
8040
8041
  outsidePress && doc2.addEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);
8041
8042
  let ancestors = [];
8042
8043
  if (ancestorScroll) {
8043
- if (isElement$4(domReference)) {
8044
- ancestors = getOverflowAncestors(domReference);
8044
+ if (isElement$4(elements.domReference)) {
8045
+ ancestors = getOverflowAncestors(elements.domReference);
8045
8046
  }
8046
- if (isElement$4(floating)) {
8047
- ancestors = ancestors.concat(getOverflowAncestors(floating));
8047
+ if (isElement$4(elements.floating)) {
8048
+ ancestors = ancestors.concat(getOverflowAncestors(elements.floating));
8048
8049
  }
8049
- if (!isElement$4(reference2) && reference2 && reference2.contextElement) {
8050
- ancestors = ancestors.concat(getOverflowAncestors(reference2.contextElement));
8050
+ if (!isElement$4(elements.reference) && elements.reference && elements.reference.contextElement) {
8051
+ ancestors = ancestors.concat(getOverflowAncestors(elements.reference.contextElement));
8051
8052
  }
8052
8053
  }
8053
8054
  ancestors = ancestors.filter((ancestor) => {
@@ -8066,37 +8067,34 @@
8066
8067
  ancestor.removeEventListener("scroll", onScroll);
8067
8068
  });
8068
8069
  };
8069
- }, [dataRef, floating, domReference, reference2, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture]);
8070
+ }, [dataRef, elements, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture]);
8070
8071
  React__namespace.useEffect(() => {
8071
8072
  insideReactTreeRef.current = false;
8072
8073
  }, [outsidePress, outsidePressEvent]);
8073
- return React__namespace.useMemo(() => {
8074
- if (!enabled) {
8075
- return {};
8074
+ const reference2 = React__namespace.useMemo(() => ({
8075
+ onKeyDown: closeOnEscapeKeyDown,
8076
+ [bubbleHandlerKeys[referencePressEvent]]: (event2) => {
8077
+ if (referencePress) {
8078
+ onOpenChange(false, event2.nativeEvent, "reference-press");
8079
+ }
8080
+ }
8081
+ }), [closeOnEscapeKeyDown, onOpenChange, referencePress, referencePressEvent]);
8082
+ const floating = React__namespace.useMemo(() => ({
8083
+ onKeyDown: closeOnEscapeKeyDown,
8084
+ onMouseDown() {
8085
+ endedOrStartedInsideRef.current = true;
8086
+ },
8087
+ onMouseUp() {
8088
+ endedOrStartedInsideRef.current = true;
8089
+ },
8090
+ [captureHandlerKeys[outsidePressEvent]]: () => {
8091
+ insideReactTreeRef.current = true;
8076
8092
  }
8077
- return {
8078
- reference: {
8079
- onKeyDown: closeOnEscapeKeyDown,
8080
- [bubbleHandlerKeys[referencePressEvent]]: (event2) => {
8081
- if (referencePress) {
8082
- onOpenChange(false, event2.nativeEvent, "reference-press");
8083
- }
8084
- }
8085
- },
8086
- floating: {
8087
- onKeyDown: closeOnEscapeKeyDown,
8088
- onMouseDown() {
8089
- endedOrStartedInsideRef.current = true;
8090
- },
8091
- onMouseUp() {
8092
- endedOrStartedInsideRef.current = true;
8093
- },
8094
- [captureHandlerKeys[outsidePressEvent]]: () => {
8095
- insideReactTreeRef.current = true;
8096
- }
8097
- }
8098
- };
8099
- }, [enabled, referencePress, outsidePressEvent, referencePressEvent, onOpenChange, closeOnEscapeKeyDown]);
8093
+ }), [closeOnEscapeKeyDown, outsidePressEvent]);
8094
+ return React__namespace.useMemo(() => enabled ? {
8095
+ reference: reference2,
8096
+ floating
8097
+ } : {}, [enabled, reference2, floating]);
8100
8098
  }
8101
8099
  function useFloatingRootContext(options) {
8102
8100
  const {
@@ -8283,18 +8281,20 @@
8283
8281
  if (propsList === void 0) {
8284
8282
  propsList = [];
8285
8283
  }
8286
- const deps = propsList;
8284
+ const referenceDeps = propsList.map((key) => key == null ? void 0 : key.reference);
8285
+ const floatingDeps = propsList.map((key) => key == null ? void 0 : key.floating);
8286
+ const itemDeps = propsList.map((key) => key == null ? void 0 : key.item);
8287
8287
  const getReferenceProps = React__namespace.useCallback(
8288
8288
  (userProps) => mergeProps(userProps, propsList, "reference"),
8289
- deps
8289
+ referenceDeps
8290
8290
  );
8291
8291
  const getFloatingProps = React__namespace.useCallback(
8292
8292
  (userProps) => mergeProps(userProps, propsList, "floating"),
8293
- deps
8293
+ floatingDeps
8294
8294
  );
8295
8295
  const getItemProps = React__namespace.useCallback(
8296
8296
  (userProps) => mergeProps(userProps, propsList, "item"),
8297
- propsList.map((key) => key == null ? void 0 : key.item)
8297
+ itemDeps
8298
8298
  );
8299
8299
  return React__namespace.useMemo(() => ({
8300
8300
  getReferenceProps,
@@ -8320,9 +8320,34 @@
8320
8320
  const referenceId = useId();
8321
8321
  const parentId = useFloatingParentNodeId();
8322
8322
  const isNested = parentId != null;
8323
- return React__namespace.useMemo(() => {
8324
- if (!enabled)
8325
- return {};
8323
+ const reference2 = React__namespace.useMemo(() => {
8324
+ if (ariaRole === "tooltip" || role === "label") {
8325
+ return {
8326
+ ["aria-" + (role === "label" ? "labelledby" : "describedby")]: open ? floatingId : void 0
8327
+ };
8328
+ }
8329
+ return {
8330
+ "aria-expanded": open ? "true" : "false",
8331
+ "aria-haspopup": ariaRole === "alertdialog" ? "dialog" : ariaRole,
8332
+ "aria-controls": open ? floatingId : void 0,
8333
+ ...ariaRole === "listbox" && {
8334
+ role: "combobox"
8335
+ },
8336
+ ...ariaRole === "menu" && {
8337
+ id: referenceId
8338
+ },
8339
+ ...ariaRole === "menu" && isNested && {
8340
+ role: "menuitem"
8341
+ },
8342
+ ...role === "select" && {
8343
+ "aria-autocomplete": "none"
8344
+ },
8345
+ ...role === "combobox" && {
8346
+ "aria-autocomplete": "list"
8347
+ }
8348
+ };
8349
+ }, [ariaRole, floatingId, isNested, open, referenceId, role]);
8350
+ const floating = React__namespace.useMemo(() => {
8326
8351
  const floatingProps = {
8327
8352
  id: floatingId,
8328
8353
  ...ariaRole && {
@@ -8330,70 +8355,48 @@
8330
8355
  }
8331
8356
  };
8332
8357
  if (ariaRole === "tooltip" || role === "label") {
8333
- return {
8334
- reference: {
8335
- ["aria-" + (role === "label" ? "labelledby" : "describedby")]: open ? floatingId : void 0
8336
- },
8337
- floating: floatingProps
8338
- };
8358
+ return floatingProps;
8339
8359
  }
8340
8360
  return {
8341
- reference: {
8342
- "aria-expanded": open ? "true" : "false",
8343
- "aria-haspopup": ariaRole === "alertdialog" ? "dialog" : ariaRole,
8344
- "aria-controls": open ? floatingId : void 0,
8345
- ...ariaRole === "listbox" && {
8346
- role: "combobox"
8347
- },
8348
- ...ariaRole === "menu" && {
8349
- id: referenceId
8350
- },
8351
- ...ariaRole === "menu" && isNested && {
8352
- role: "menuitem"
8353
- },
8354
- ...role === "select" && {
8355
- "aria-autocomplete": "none"
8356
- },
8357
- ...role === "combobox" && {
8358
- "aria-autocomplete": "list"
8359
- }
8360
- },
8361
- floating: {
8362
- ...floatingProps,
8363
- ...ariaRole === "menu" && {
8364
- "aria-labelledby": referenceId
8365
- }
8366
- },
8367
- item(_ref2) {
8368
- let {
8369
- active,
8370
- selected
8371
- } = _ref2;
8372
- const commonProps = {
8373
- role: "option",
8361
+ ...floatingProps,
8362
+ ...ariaRole === "menu" && {
8363
+ "aria-labelledby": referenceId
8364
+ }
8365
+ };
8366
+ }, [ariaRole, floatingId, referenceId, role]);
8367
+ const item = React__namespace.useCallback((_ref2) => {
8368
+ let {
8369
+ active,
8370
+ selected
8371
+ } = _ref2;
8372
+ const commonProps = {
8373
+ role: "option",
8374
+ ...active && {
8375
+ id: floatingId + "-option"
8376
+ }
8377
+ };
8378
+ switch (role) {
8379
+ case "select":
8380
+ return {
8381
+ ...commonProps,
8382
+ "aria-selected": active && selected
8383
+ };
8384
+ case "combobox": {
8385
+ return {
8386
+ ...commonProps,
8374
8387
  ...active && {
8375
- id: floatingId + "-option"
8388
+ "aria-selected": true
8376
8389
  }
8377
8390
  };
8378
- switch (role) {
8379
- case "select":
8380
- return {
8381
- ...commonProps,
8382
- "aria-selected": active && selected
8383
- };
8384
- case "combobox": {
8385
- return {
8386
- ...commonProps,
8387
- ...active && {
8388
- "aria-selected": true
8389
- }
8390
- };
8391
- }
8392
- }
8393
- return {};
8394
8391
  }
8395
- };
8396
- }, [enabled, role, ariaRole, open, floatingId, referenceId, isNested]);
8392
+ }
8393
+ return {};
8394
+ }, [floatingId, role]);
8395
+ return React__namespace.useMemo(() => enabled ? {
8396
+ reference: reference2,
8397
+ floating,
8398
+ item
8399
+ } : {}, [enabled, reference2, floating, item]);
8397
8400
  }
8398
8401
  const matchWidthToReference = (delta = 0) => size$1({
8399
8402
  apply({ rects, elements }) {
@@ -56416,9 +56419,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
56416
56419
  const [value, setValue] = core$2.useVariable(formCtx2.resolveInitialValue());
56417
56420
  const [internalValue, setInternalValue] = React.useState(value);
56418
56421
  const onInputAction = core$2.useAction(props.onchange);
56419
- const debouncedAction = React.useMemo(() => debounce_1$1(onInputAction, 500), [onInputAction]);
56420
- const debouncedSetValue = React.useMemo(() => debounce_1$1(setValue, 500), [setValue]);
56421
- const debouncedUpdateForm = React.useMemo(() => debounce_1$1(formCtx2.updateForm, 500), [formCtx2.updateForm]);
56422
+ const debouncedAction = React.useMemo(() => debounce_1$1(onInputAction, 300), [onInputAction]);
56423
+ const debouncedSetValue = React.useMemo(() => debounce_1$1(setValue, 300), [setValue]);
56424
+ const debouncedUpdateForm = React.useMemo(() => debounce_1$1(formCtx2.updateForm, 300), [formCtx2.updateForm]);
56422
56425
  function handleChange(val) {
56423
56426
  let newValue = val;
56424
56427
  if (props.type === "number") {
@@ -56430,7 +56433,6 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
56430
56433
  debouncedUpdateForm(val);
56431
56434
  }
56432
56435
  React.useEffect(() => {
56433
- debouncedAction.cancel();
56434
56436
  debouncedSetValue.cancel();
56435
56437
  debouncedUpdateForm.cancel();
56436
56438
  let newValue = value;
@@ -64632,9 +64634,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
64632
64634
  const [value, setValue] = core$2.useVariable(formCtx2.resolveInitialValue());
64633
64635
  const [internalValue, setInternalValue] = React.useState(value);
64634
64636
  const onInputAction = core$2.useAction(props.onchange);
64635
- const debouncedAction = React.useMemo(() => debounce_1$1(onInputAction, 500), [onInputAction]);
64636
- const debouncedSetValue = React.useMemo(() => debounce_1$1(setValue, 500), [setValue]);
64637
- const debouncedUpdateForm = React.useMemo(() => debounce_1$1(formCtx2.updateForm, 500), [formCtx2.updateForm]);
64637
+ const debouncedAction = React.useMemo(() => debounce_1$1(onInputAction, 300), [onInputAction]);
64638
+ const debouncedSetValue = React.useMemo(() => debounce_1$1(setValue, 300), [setValue]);
64639
+ const debouncedUpdateForm = React.useMemo(() => debounce_1$1(formCtx2.updateForm, 300), [formCtx2.updateForm]);
64638
64640
  function handleChange(val) {
64639
64641
  setInternalValue(val);
64640
64642
  debouncedSetValue(val);
@@ -64642,7 +64644,6 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
64642
64644
  debouncedUpdateForm(val);
64643
64645
  }
64644
64646
  React.useEffect(() => {
64645
- debouncedAction.cancel();
64646
64647
  debouncedSetValue.cancel();
64647
64648
  debouncedUpdateForm.cancel();
64648
64649
  setInternalValue(value);
@@ -295240,8 +295241,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
295240
295241
  }
295241
295242
  return rect;
295242
295243
  }
295243
- become(_other) {
295244
- return false;
295244
+ become(other) {
295245
+ return other instanceof LineView && this.children.length == 0 && other.children.length == 0 && attrsEq(this.attrs, other.attrs) && this.breakAfter == other.breakAfter;
295245
295246
  }
295246
295247
  covers() {
295247
295248
  return true;
@@ -299798,7 +299799,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
299798
299799
  else
299799
299800
  this.flush();
299800
299801
  });
299801
- if (window.EditContext && view.constructor.EDIT_CONTEXT === true) {
299802
+ if (window.EditContext && view.constructor.EDIT_CONTEXT !== false && !(browser.chrome && browser.chrome_version < 126)) {
299802
299803
  this.editContext = new EditContextManager(view);
299803
299804
  if (view.state.facet(editable))
299804
299805
  view.contentDOM.editContext = this.editContext.editContext;
@@ -388036,9 +388037,6 @@ void main(void){
388036
388037
  class GroupContainerObject extends EventEmitter$1 {
388037
388038
  constructor() {
388038
388039
  super();
388039
- this.state = {
388040
- hover: false
388041
- };
388042
388040
  this.groupContainerGfx = this.createGroupContainer();
388043
388041
  }
388044
388042
  createGroupContainer() {
@@ -389004,7 +389002,6 @@ ${letters.join("\n")}`;
389004
389002
  this.groupContainerLayer.addChild(groupContainer.groupContainerGfx);
389005
389003
  this.groupContainerMap.set(id2, groupContainer);
389006
389004
  groupContainer.addListener("mouseover", (event2) => {
389007
- this.hoverGroupContainer(id2, nodes);
389008
389005
  if (!this.mousedownNodeKey) {
389009
389006
  this.emit("groupMouseover", event2, id2);
389010
389007
  }
@@ -389013,7 +389010,6 @@ ${letters.join("\n")}`;
389013
389010
  const local = groupContainer.groupContainerGfx.toLocal(event2.global);
389014
389011
  const isInGroupContainer = groupContainer.groupContainerGfx.hitArea.contains(local.x, local.y);
389015
389012
  if (!isInGroupContainer) {
389016
- this.unhoverGroupContainer(id2, nodes);
389017
389013
  this.emit("groupMouseout", event2, id2);
389018
389014
  }
389019
389015
  if (!this.editable && !this.isMovingNode && !this.isCreatingEdge) {
@@ -389127,15 +389123,6 @@ ${letters.join("\n")}`;
389127
389123
  this.updateEdgeStyleByKey(id2);
389128
389124
  this.requestRender();
389129
389125
  }
389130
- hoverGroupContainer(id2, nodes) {
389131
- const groupContainer = this.groupContainerMap.get(id2);
389132
- if (groupContainer.state.hover) {
389133
- return;
389134
- }
389135
- groupContainer.state.hover = true;
389136
- this.updateGroupContainerStyle(id2, nodes);
389137
- this.requestRender();
389138
- }
389139
389126
  hoverNode(id2) {
389140
389127
  const node2 = this.nodeMap.get(id2);
389141
389128
  if (node2.state.hover) {
@@ -389279,15 +389266,6 @@ ${letters.join("\n")}`;
389279
389266
  this.updateNodeStyleByKey(id2);
389280
389267
  this.requestRender();
389281
389268
  }
389282
- unhoverGroupContainer(id2, nodes) {
389283
- const groupContainer = this.groupContainerMap.get(id2);
389284
- if (!groupContainer.state.hover) {
389285
- return;
389286
- }
389287
- groupContainer.state.hover = false;
389288
- this.updateGroupContainerStyle(id2, nodes);
389289
- this.requestRender();
389290
- }
389291
389269
  updateEdgeStyle(id2, attributes2, source, target, sourceNodeAttributes, targetNodeAttributes) {
389292
389270
  const edge = this.edgeMap.get(id2);
389293
389271
  if (edge && this.viewport) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darajs/components",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "Components for the Dara framework",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -29,9 +29,9 @@
29
29
  "prettier": "@darajs/prettier-config",
30
30
  "devDependencies": {
31
31
  "@babel/core": "^7.23.5",
32
- "@darajs/eslint-config": "~1.10.0",
33
- "@darajs/prettier-config": "~1.10.0",
34
- "@darajs/stylelint-config": "~1.10.0",
32
+ "@darajs/eslint-config": "~1.10.2",
33
+ "@darajs/prettier-config": "~1.10.2",
34
+ "@darajs/stylelint-config": "~1.10.2",
35
35
  "@testing-library/react-hooks": "^3.4.2",
36
36
  "@types/lodash": "^4.14.155",
37
37
  "@types/react": "18.2.60",
@@ -54,14 +54,14 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@bokeh/bokehjs": "~3.1.1",
57
- "@darajs/core": "1.10.2",
58
- "@darajs/styled-components": "~1.10.0",
59
- "@darajs/ui-causal-graph-editor": "~1.10.0",
60
- "@darajs/ui-code-editor": "~1.10.0",
61
- "@darajs/ui-components": "~1.10.0",
62
- "@darajs/ui-hierarchy-viewer": "~1.10.0",
63
- "@darajs/ui-icons": "~1.10.0",
64
- "@darajs/ui-utils": "~1.10.0",
57
+ "@darajs/core": "1.10.3",
58
+ "@darajs/styled-components": "~1.10.2",
59
+ "@darajs/ui-causal-graph-editor": "~1.10.2",
60
+ "@darajs/ui-code-editor": "~1.10.2",
61
+ "@darajs/ui-components": "~1.10.2",
62
+ "@darajs/ui-hierarchy-viewer": "~1.10.2",
63
+ "@darajs/ui-icons": "~1.10.2",
64
+ "@darajs/ui-utils": "~1.10.2",
65
65
  "@popperjs/core": "2.4.0",
66
66
  "date-fns": "2.9.0",
67
67
  "immer": "^10.0.0",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "b202900e7ed991a58945cdf936ca0e14758418f2"
86
+ "gitHead": "7d528d1d369b25f98e3f34cd34900105b34b020d"
87
87
  }