@darajs/components 1.7.5 → 1.7.6

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.
@@ -22,6 +22,8 @@ interface VisualEdgeEncoderProps extends StyledComponentProps {
22
22
  on_click_node?: Action;
23
23
  /** Handler called whenever constraints are updated */
24
24
  on_update?: Action;
25
+ /** Whether focusing the graph is required before mousewheel zooming is enabled */
26
+ require_focus_to_zoom?: boolean;
25
27
  /** Optional parameter to force a tooltip to use a particular font size */
26
28
  tooltip_size?: number;
27
29
  /** Optional user-defined zoom thresholds to use instead of defaults */
@@ -1 +1 @@
1
- {"version":3,"file":"visual-edge-encoder.d.ts","sourceRoot":"","sources":["../../js/graphs/visual-edge-encoder.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,MAAM,EAEN,oBAAoB,EACpB,QAAQ,EAKX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAGH,eAAe,EAEf,cAAc,EAEd,UAAU,EACV,qBAAqB,EACrB,cAAc,EACjB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAyB,MAAM,gBAAgB,CAAC;AAG9E,UAAU,sBAAuB,SAAQ,oBAAoB;IACzD,0CAA0C;IAC1C,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC7C,sEAAsE;IACtE,iCAAiC,CAAC,EAAE,OAAO,CAAC;IAC5C,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAC9D,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,YAAY,EAAE,qBAAqB,CAAC;IACpC,+BAA+B;IAC/B,mBAAmB,CAAC,EAAE,QAAQ,CAAC,cAAc,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC;IACpE,sBAAsB;IACtB,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,M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AE,CAAC;IACpE,sBAAsB;IACtB,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACzG,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,eAAe,CAAC,EAAE,cAAc,CAAC;CACpC;AA+CD;;;GAGG;AACH,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CA2ErE;AAED,eAAe,iBAAiB,CAAC"}
@@ -88,7 +88,7 @@ function VisualEdgeEncoder(props) {
88
88
  version: 'none', // doesn't matter as we don't output a whole graph
89
89
  };
90
90
  }, [parsedNodes, parsedConstraints]);
91
- return (_jsx(StyledGraphEditor, { "$rawCss": css, additionalLegends: formattedAdditionalLegends, allowSelectionWhenNotEditable: props.allow_selection_when_not_editable, defaultLegends: formattedDefaultLegends, editable: props.editable, editorMode: EditorMode.EDGE_ENCODER, graphData: graphData, graphLayout: graphLayout, initialConstraints: parsedConstraints, onClickEdge: onClickEdge, onClickNode: onClickNode, onEdgeConstraintsUpdate: onUpdate, onNotify: pushNotification, style: style, tooltipSize: props.tooltip_size, zoomThresholds: props.zoom_thresholds }));
91
+ return (_jsx(StyledGraphEditor, { "$rawCss": css, additionalLegends: formattedAdditionalLegends, allowSelectionWhenNotEditable: props.allow_selection_when_not_editable, defaultLegends: formattedDefaultLegends, editable: props.editable, editorMode: EditorMode.EDGE_ENCODER, graphData: graphData, graphLayout: graphLayout, initialConstraints: parsedConstraints, onClickEdge: onClickEdge, onClickNode: onClickNode, onEdgeConstraintsUpdate: onUpdate, onNotify: pushNotification, requireFocusToZoom: props.require_focus_to_zoom, style: style, tooltipSize: props.tooltip_size, zoomThresholds: props.zoom_thresholds }));
92
92
  }
93
93
  export default VisualEdgeEncoder;
94
94
  //# sourceMappingURL=visual-edge-encoder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"visual-edge-encoder.js","sourceRoot":"","sources":["../../js/graphs/visual-edge-encoder.tsx"],"names":[],"mappings":";AAAA,gDAAgD;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAEH,aAAa,EAGb,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,WAAW,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAIH,iBAAiB,EAEjB,QAAQ,EACR,UAAU,GAGb,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAyB,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AA6B/C,MAAM,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAEvD;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,WAA8B;IACpD,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACd,CAAC;IAED,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACzB,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;QAC9B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QAE7B,uCACO,CAAC,KACJ,MAAM;YACN,MAAM,EACN,IAAI,EAAE,cAAc,IACtB;IACN,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,UAAU,CAAC,KAAiD;IACjE,OAAO,KAAK,CAAC,OA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AiB,CAAC,CAAC,CAAC;IAErC,OAAO,CACH,KAAC,iBAAiB,eACL,GAAG,EACZ,iBAAiB,EAAE,0BAA0B,EAC7C,6BAA6B,EAAE,KAAK,CAAC,iCAAiC,EACtE,cAAc,EAAE,uBAAuB,EACvC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,UAAU,EAAE,UAAU,CAAC,YAAY,EACnC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,iBAAiB,EACrC,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,uBAAuB,EAAE,QAAQ,EACjC,QAAQ,EAAE,gBAAgB,EAC1B,kBAAkB,EAAE,KAAK,CAAC,qBAAqB,EAC/C,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,KAAK,CAAC,YAAY,EAC/B,cAAc,EAAE,KAAK,CAAC,eAAe,GACvC,CACL,CAAC;AACN,CAAC;AAED,eAAe,iBAAiB,CAAC"}
@@ -12305,6 +12305,7 @@
12305
12305
  display: flex;
12306
12306
  width: 100%;
12307
12307
  color: ${(props) => props.theme.colors.text};
12308
+ overflow-wrap: break-word;
12308
12309
  `;
12309
12310
  const DeleteIcon = styled__default.default(Trash)`
12310
12311
  height: 0.8rem;
@@ -12346,9 +12347,10 @@
12346
12347
  if (editMessage === localMessage.message) {
12347
12348
  return;
12348
12349
  }
12349
- const newMessage = Object.assign(Object.assign({}, localMessage), { message: editMessage });
12350
+ const newMessage = Object.assign(Object.assign({}, localMessage), { message: editMessage.replace(/\n/g, " ").trim() });
12350
12351
  props === null || props === void 0 ? void 0 : props.onChange(newMessage);
12351
12352
  setLocalMessage(newMessage);
12353
+ setEditMessage(newMessage.message);
12352
12354
  setEditMode(false);
12353
12355
  };
12354
12356
  const onDelete = () => {
@@ -12448,7 +12450,7 @@
12448
12450
  if (reply) {
12449
12451
  const newMessage = {
12450
12452
  id: nanoid(),
12451
- message: reply,
12453
+ message: reply.replace(/\n/g, " ").trim(),
12452
12454
  timestamp: getFormattedTimestamp()
12453
12455
  };
12454
12456
  const newMessages = [...localMessages, newMessage];
@@ -72494,10 +72496,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
72494
72496
  y: bw + scrollBoxY
72495
72497
  });
72496
72498
  Drawing.setClipUrl(scrollBox, clipId, gd);
72497
- scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio);
72499
+ scrollHandler2(scrollBoxY, scrollBarHeight, scrollRatio);
72498
72500
  legend.on("wheel", function() {
72499
72501
  scrollBoxY = Lib.constrain(legendObj._scrollY + d3.event.deltaY / scrollBarYMax * scrollBoxYMax, 0, scrollBoxYMax);
72500
- scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio);
72502
+ scrollHandler2(scrollBoxY, scrollBarHeight, scrollRatio);
72501
72503
  if (scrollBoxY !== 0 && scrollBoxY !== scrollBoxYMax) {
72502
72504
  d3.event.preventDefault();
72503
72505
  }
@@ -72529,7 +72531,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
72529
72531
  eventY1 = e3.clientY;
72530
72532
  }
72531
72533
  scrollBoxY = getScrollBarDragY(scrollBoxY0, eventY0, eventY1);
72532
- scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio);
72534
+ scrollHandler2(scrollBoxY, scrollBarHeight, scrollRatio);
72533
72535
  });
72534
72536
  scrollBar.call(scrollBarDrag);
72535
72537
  var scrollBoxTouchDrag = d3.behavior.drag().on("dragstart", function() {
@@ -72543,12 +72545,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
72543
72545
  if (e3.type === "touchmove") {
72544
72546
  eventY1 = e3.changedTouches[0].clientY;
72545
72547
  scrollBoxY = getNaturalDragY(scrollBoxY0, eventY0, eventY1);
72546
- scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio);
72548
+ scrollHandler2(scrollBoxY, scrollBarHeight, scrollRatio);
72547
72549
  }
72548
72550
  });
72549
72551
  scrollBox.call(scrollBoxTouchDrag);
72550
72552
  }
72551
- function scrollHandler(scrollBoxY2, scrollBarHeight2, scrollRatio2) {
72553
+ function scrollHandler2(scrollBoxY2, scrollBarHeight2, scrollRatio2) {
72552
72554
  legendObj._scrollY = gd._fullLayout[legendId]._scrollY = scrollBoxY2;
72553
72555
  Drawing.setTranslate(scrollBox, 0, -scrollBoxY2);
72554
72556
  Drawing.setRect(scrollBar, legendObj._width, constants.scrollBarMargin + scrollBoxY2 * scrollRatio2, constants.scrollBarWidth, scrollBarHeight2);
@@ -291322,6 +291324,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
291322
291324
  return { left: x2, right: x2, top: rect.top, bottom: rect.bottom };
291323
291325
  }
291324
291326
  function windowRect(win) {
291327
+ let vp = win.visualViewport;
291328
+ if (vp)
291329
+ return {
291330
+ left: 0,
291331
+ right: vp.width,
291332
+ top: 0,
291333
+ bottom: vp.height
291334
+ };
291325
291335
  return {
291326
291336
  left: 0,
291327
291337
  right: win.innerWidth,
@@ -291503,8 +291513,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
291503
291513
  range2.setStart(node2, from);
291504
291514
  return range2;
291505
291515
  }
291506
- function dispatchKey(elt, name2, code2) {
291516
+ function dispatchKey(elt, name2, code2, mods) {
291507
291517
  let options = { key: name2, code: name2, keyCode: code2, which: code2, cancelable: true };
291518
+ if (mods)
291519
+ ({ altKey: options.altKey, ctrlKey: options.ctrlKey, shiftKey: options.shiftKey, metaKey: options.metaKey } = mods);
291508
291520
  let down = new KeyboardEvent("keydown", options);
291509
291521
  down.synthetic = true;
291510
291522
  elt.dispatchEvent(down);
@@ -293256,6 +293268,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
293256
293268
  const nativeSelectionHidden = /* @__PURE__ */ Facet.define({
293257
293269
  combine: (values) => values.some((x2) => x2)
293258
293270
  });
293271
+ const scrollHandler = /* @__PURE__ */ Facet.define();
293259
293272
  class ScrollTarget {
293260
293273
  constructor(range2, y2 = "nearest", x2 = "nearest", yMargin = 5, xMargin = 5, isSnapshot = false) {
293261
293274
  this.range = range2;
@@ -293970,6 +293983,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
293970
293983
  this.view.scrollDOM.scrollLeft = target.xMargin;
293971
293984
  return;
293972
293985
  }
293986
+ for (let handler of this.view.state.facet(scrollHandler)) {
293987
+ try {
293988
+ if (handler(this.view, target.range, target))
293989
+ return true;
293990
+ } catch (e3) {
293991
+ logException(this.view.state, e3, "scroll handler");
293992
+ }
293993
+ }
293973
293994
  let { range: range2 } = target;
293974
293995
  let rect = this.coordsAt(range2.head, range2.empty ? range2.assoc : range2.head > range2.anchor ? -1 : 1), other;
293975
293996
  if (!rect)
@@ -294552,12 +294573,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
294552
294573
  this.view.observer.forceFlush();
294553
294574
  return false;
294554
294575
  }
294555
- flushIOSKey() {
294576
+ flushIOSKey(change) {
294556
294577
  let key = this.pendingIOSKey;
294557
294578
  if (!key)
294558
294579
  return false;
294580
+ if (key.key == "Enter" && change && change.from < change.to && /^\S+$/.test(change.insert.toString()))
294581
+ return false;
294559
294582
  this.pendingIOSKey = void 0;
294560
- return dispatchKey(this.view.contentDOM, key.key, key.keyCode);
294583
+ return dispatchKey(this.view.contentDOM, key.key, key.keyCode, key instanceof KeyboardEvent ? key : void 0);
294561
294584
  }
294562
294585
  ignoreDuringComposition(event2) {
294563
294586
  if (!/^key/.test(event2.type))
@@ -295035,7 +295058,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
295035
295058
  view.observer.flush();
295036
295059
  let data2 = brokenClipboardAPI ? null : event2.clipboardData;
295037
295060
  if (data2) {
295038
- doPaste(view, data2.getData("text/plain") || data2.getData("text/uri-text"));
295061
+ doPaste(view, data2.getData("text/plain") || data2.getData("text/uri-list"));
295039
295062
  return true;
295040
295063
  } else {
295041
295064
  capturePaste(view);
@@ -295181,6 +295204,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
295181
295204
  }, 100);
295182
295205
  }
295183
295206
  }
295207
+ if (browser.ios && event2.inputType == "deleteContentForward") {
295208
+ view.observer.flushSoon();
295209
+ }
295184
295210
  return false;
295185
295211
  };
295186
295212
  const appliedFirefoxHack = /* @__PURE__ */ new Set();
@@ -296024,7 +296050,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
296024
296050
  let result = 0, bias = 0;
296025
296051
  if (domRect.width && domRect.height) {
296026
296052
  let { scaleX, scaleY } = getScale(dom2, domRect);
296027
- if (this.scaleX != scaleX || this.scaleY != scaleY) {
296053
+ if (scaleX > 5e-3 && Math.abs(this.scaleX - scaleX) > 5e-3 || scaleY > 5e-3 && Math.abs(this.scaleY - scaleY) > 5e-3) {
296028
296054
  this.scaleX = scaleX;
296029
296055
  this.scaleY = scaleY;
296030
296056
  result |= 8;
@@ -296826,7 +296852,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
296826
296852
  change = { from: sel.from, to: sel.to, insert: Text$1.of([" "]) };
296827
296853
  }
296828
296854
  if (change) {
296829
- if (browser.ios && view.inputState.flushIOSKey())
296855
+ if (browser.ios && view.inputState.flushIOSKey(change))
296830
296856
  return true;
296831
296857
  if (browser.android && (change.to == sel.to && (change.from == sel.from || change.from == sel.from - 1 && view.state.sliceDoc(change.from, sel.from) == " ") && change.insert.length == 1 && change.insert.lines == 2 && dispatchKey(view.contentDOM, "Enter", 13) || (change.from == sel.from - 1 && change.to == sel.to && change.insert.length == 0 || lastKey == 8 && change.insert.length < change.to - change.from && change.to > sel.head) && dispatchKey(view.contentDOM, "Backspace", 8) || change.from == sel.from && change.to == sel.to + 1 && change.insert.length == 0 && dispatchKey(view.contentDOM, "Delete", 46)))
296832
296858
  return true;
@@ -296973,6 +296999,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
296973
296999
  this.intersecting = false;
296974
297000
  this.gapIntersection = null;
296975
297001
  this.gaps = [];
297002
+ this.printQuery = null;
296976
297003
  this.parentCheck = -1;
296977
297004
  this.dom = view.contentDOM;
296978
297005
  this.observer = new MutationObserver((mutations) => {
@@ -296996,6 +297023,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
296996
297023
  this.onResize = this.onResize.bind(this);
296997
297024
  this.onPrint = this.onPrint.bind(this);
296998
297025
  this.onScroll = this.onScroll.bind(this);
297026
+ if (window.matchMedia)
297027
+ this.printQuery = window.matchMedia("print");
296999
297028
  if (typeof ResizeObserver == "function") {
297000
297029
  this.resizeScroll = new ResizeObserver(() => {
297001
297030
  var _a3;
@@ -297042,7 +297071,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
297042
297071
  this.view.requestMeasure();
297043
297072
  }, 50);
297044
297073
  }
297045
- onPrint() {
297074
+ onPrint(event2) {
297075
+ if (event2.type == "change" && !event2.matches)
297076
+ return;
297046
297077
  this.view.viewState.printing = true;
297047
297078
  this.view.measure();
297048
297079
  setTimeout(() => {
@@ -297284,14 +297315,20 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
297284
297315
  }
297285
297316
  addWindowListeners(win) {
297286
297317
  win.addEventListener("resize", this.onResize);
297287
- win.addEventListener("beforeprint", this.onPrint);
297318
+ if (this.printQuery)
297319
+ this.printQuery.addEventListener("change", this.onPrint);
297320
+ else
297321
+ win.addEventListener("beforeprint", this.onPrint);
297288
297322
  win.addEventListener("scroll", this.onScroll);
297289
297323
  win.document.addEventListener("selectionchange", this.onSelectionChange);
297290
297324
  }
297291
297325
  removeWindowListeners(win) {
297292
297326
  win.removeEventListener("scroll", this.onScroll);
297293
297327
  win.removeEventListener("resize", this.onResize);
297294
- win.removeEventListener("beforeprint", this.onPrint);
297328
+ if (this.printQuery)
297329
+ this.printQuery.removeEventListener("change", this.onPrint);
297330
+ else
297331
+ win.removeEventListener("beforeprint", this.onPrint);
297295
297332
  win.document.removeEventListener("selectionchange", this.onSelectionChange);
297296
297333
  }
297297
297334
  destroy() {
@@ -297914,6 +297951,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
297914
297951
  }
297915
297952
  EditorView.styleModule = styleModule;
297916
297953
  EditorView.inputHandler = inputHandler$1;
297954
+ EditorView.scrollHandler = scrollHandler;
297917
297955
  EditorView.focusChangeEffect = focusChangeEffect;
297918
297956
  EditorView.perLineTextDirection = perLineTextDirection;
297919
297957
  EditorView.exceptionSink = exceptionSink;
@@ -304448,7 +304486,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
304448
304486
  }
304449
304487
  }
304450
304488
  });
304451
- const cx_Bracketed = 1, cx_DoubleQuote = 2, cx_Long = 4, cx_Raw = 8, cx_Format = 16;
304489
+ const cx_Bracketed = 1, cx_String = 2, cx_DoubleQuote = 4, cx_Long = 8, cx_Raw = 16, cx_Format = 32;
304452
304490
  function Context(parent, indent2, flags) {
304453
304491
  this.parent = parent;
304454
304492
  this.indent = indent2;
@@ -304462,7 +304500,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
304462
304500
  depth += space2.charCodeAt(i2) == tab ? 8 - depth % 8 : 1;
304463
304501
  return depth;
304464
304502
  }
304465
- const stringFlags = /* @__PURE__ */ new Map([
304503
+ const stringFlags = new Map([
304466
304504
  [stringStart, 0],
304467
304505
  [stringStartD, cx_DoubleQuote],
304468
304506
  [stringStartL, cx_Long],
@@ -304479,11 +304517,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
304479
304517
  [stringStartFRD, cx_Format | cx_Raw | cx_DoubleQuote],
304480
304518
  [stringStartFRL, cx_Format | cx_Raw | cx_Long],
304481
304519
  [stringStartFRLD, cx_Format | cx_Raw | cx_Long | cx_DoubleQuote]
304482
- ]);
304520
+ ].map(([term, flags]) => [term, flags | cx_String]));
304483
304521
  const trackIndent = new ContextTracker({
304484
304522
  start: topIndent,
304485
- reduce(context2, term) {
304486
- if (context2.flags & cx_Bracketed && bracketed.has(term) || (term == String$1 || term == FormatString) && context2.flags && context2.flags != cx_Bracketed)
304523
+ reduce(context2, term, _2, input) {
304524
+ if (context2.flags & cx_Bracketed && bracketed.has(term) || (term == String$1 || term == FormatString) && context2.flags & cx_String)
304487
304525
  return context2.parent;
304488
304526
  return context2;
304489
304527
  },
@@ -365952,7 +365990,7 @@ ${e3}`);
365952
365990
  }
365953
365991
  };
365954
365992
  r2.registerBinding(r2.container, "wheel", wheelHandler, true);
365955
- r2.registerBinding(containerWindow, "scroll", function scrollHandler(e3) {
365993
+ r2.registerBinding(containerWindow, "scroll", function scrollHandler2(e3) {
365956
365994
  r2.scrollingPage = true;
365957
365995
  clearTimeout(r2.scrollingPageTimeout);
365958
365996
  r2.scrollingPageTimeout = setTimeout(function() {
@@ -391804,6 +391842,7 @@ ${letters.join("\n")}`;
391804
391842
  onClickNode,
391805
391843
  onEdgeConstraintsUpdate: onUpdate,
391806
391844
  onNotify: pushNotification,
391845
+ requireFocusToZoom: props.require_focus_to_zoom,
391807
391846
  style: style2,
391808
391847
  tooltipSize: props.tooltip_size,
391809
391848
  zoomThresholds: props.zoom_thresholds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darajs/components",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "description": "Components for the Dara framework",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -52,14 +52,14 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@bokeh/bokehjs": "~3.1.1",
55
- "@darajs/core": "1.7.5",
56
- "@darajs/styled-components": "~1.7.1",
57
- "@darajs/ui-causal-graph-editor": "~1.7.1",
58
- "@darajs/ui-code-editor": "~1.7.1",
59
- "@darajs/ui-components": "~1.7.1",
60
- "@darajs/ui-hierarchy-viewer": "~1.7.1",
61
- "@darajs/ui-icons": "~1.7.1",
62
- "@darajs/ui-utils": "~1.7.1",
55
+ "@darajs/core": "1.7.6",
56
+ "@darajs/styled-components": "~1.7.2",
57
+ "@darajs/ui-causal-graph-editor": "~1.7.2",
58
+ "@darajs/ui-code-editor": "~1.7.2",
59
+ "@darajs/ui-components": "~1.7.2",
60
+ "@darajs/ui-hierarchy-viewer": "~1.7.2",
61
+ "@darajs/ui-icons": "~1.7.2",
62
+ "@darajs/ui-utils": "~1.7.2",
63
63
  "@popperjs/core": "2.4.0",
64
64
  "date-fns": "2.9.0",
65
65
  "immer": "^9.0.6",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "f74ae52f47c0fcf6777364d1e624ac519dc25f41"
86
+ "gitHead": "973101cc894e93e07055338daa189e798c80eee0"
87
87
  }