@pixerate/editor-svelte 0.12.0 → 0.14.0

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.
@@ -1673,22 +1673,23 @@ function FloatingHorizontalScrollbar($$anchor, $$props) {
1673
1673
  import "svelte/internal/disclose-version";
1674
1674
  import * as $10 from "svelte/internal/client";
1675
1675
  var root2 = $10.from_html(`<span class="opacity-80 text-[10px]"> </span>`);
1676
- var root_1 = $10.from_html(`<div class="absolute transition-transform duration-75 ease-out"><svg class="h-5 w-5 drop-shadow-md" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.65376 12.3673H5.46026L5.31717 12.4976L0.500002 16.8829L0.500002 1.19841L11.7841 12.3673H5.65376Z" stroke="white" stroke-width="1"></path></svg> <div class="mt-1 flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium text-white shadow-md whitespace-nowrap"><span> </span> <!></div></div>`);
1677
- var root_2 = $10.from_html(`<div aria-hidden="true"></div>`);
1676
+ var root_1 = $10.from_html(`<div class="mt-1 max-w-xs rounded-lg bg-white/95 backdrop-blur-sm border border-slate-200 px-2.5 py-1.5 text-xs text-slate-800 shadow-lg dark:bg-slate-900/95 dark:border-slate-700 dark:text-slate-100"> </div>`);
1677
+ var root_2 = $10.from_html(`<div class="absolute transition-transform duration-75 ease-out"><svg class="h-5 w-5 drop-shadow-md" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.65376 12.3673H5.46026L5.31717 12.4976L0.500002 16.8829L0.500002 1.19841L11.7841 12.3673H5.65376Z" stroke="white" stroke-width="1"></path></svg> <div class="mt-1 flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium text-white shadow-md whitespace-nowrap"><span> </span> <!></div> <!></div>`);
1678
+ var root_3 = $10.from_html(`<div aria-hidden="true"></div>`);
1678
1679
  function AgentPresenceLayer($$anchor, $$props) {
1679
1680
  $10.push($$props, true);
1680
1681
  let presences = $10.prop($$props, "presences", 19, () => []), className = $10.prop($$props, "class", 3, "");
1681
1682
  var fragment = $10.comment();
1682
1683
  var node = $10.first_child(fragment);
1683
1684
  {
1684
- var consequent_2 = ($$anchor2) => {
1685
- var div = root_2();
1685
+ var consequent_3 = ($$anchor2) => {
1686
+ var div = root_3();
1686
1687
  $10.each(div, 21, presences, (agent) => agent.agentId, ($$anchor3, agent) => {
1687
1688
  var fragment_1 = $10.comment();
1688
1689
  var node_1 = $10.first_child(fragment_1);
1689
1690
  {
1690
- var consequent_1 = ($$anchor4) => {
1691
- var div_1 = root_1();
1691
+ var consequent_2 = ($$anchor4) => {
1692
+ var div_1 = root_2();
1692
1693
  var svg = $10.child(div_1);
1693
1694
  var path = $10.only_child(svg);
1694
1695
  var div_2 = $10.sibling(svg, 2);
@@ -1707,6 +1708,18 @@ function AgentPresenceLayer($$anchor, $$props) {
1707
1708
  });
1708
1709
  }
1709
1710
  $10.reset(div_2);
1711
+ var node_3 = $10.sibling(div_2, 2);
1712
+ {
1713
+ var consequent_1 = ($$anchor5) => {
1714
+ var div_3 = root_1();
1715
+ var text_2 = $10.only_child(div_3, true);
1716
+ $10.template_effect(() => $10.set_text(text_2, $10.get(agent).note));
1717
+ $10.append($$anchor5, div_3);
1718
+ };
1719
+ $10.if(node_3, ($$render) => {
1720
+ if ($10.get(agent).note) $$render(consequent_1);
1721
+ });
1722
+ }
1710
1723
  $10.reset(div_1);
1711
1724
  $10.template_effect(() => {
1712
1725
  $10.set_style(div_1, `transform: translate3d(${$10.get(agent).cursorPosition.x ?? ""}px, ${$10.get(agent).cursorPosition.y ?? ""}px, 0);`);
@@ -1717,17 +1730,17 @@ function AgentPresenceLayer($$anchor, $$props) {
1717
1730
  $10.append($$anchor4, div_1);
1718
1731
  };
1719
1732
  $10.if(node_1, ($$render) => {
1720
- if ($10.get(agent).cursorPosition) $$render(consequent_1);
1733
+ if ($10.get(agent).cursorPosition) $$render(consequent_2);
1721
1734
  });
1722
1735
  }
1723
1736
  $10.append($$anchor3, fragment_1);
1724
1737
  });
1725
1738
  $10.reset(div);
1726
- $10.template_effect(() => $10.set_class(div, 1, `pixerate-agent-presence-layer pointer-events-none absolute inset-0 z-50 overflow-hidden ${className() ?? ""}`));
1739
+ $10.template_effect(() => $10.set_class(div, 1, `pixerate-presence agent-presence pixerate-agent-presence-layer pointer-events-none absolute inset-0 z-50 overflow-hidden ${className() ?? ""}`));
1727
1740
  $10.append($$anchor2, div);
1728
1741
  };
1729
1742
  $10.if(node, ($$render) => {
1730
- if (presences().length > 0) $$render(consequent_2);
1743
+ if (presences().length > 0) $$render(consequent_3);
1731
1744
  });
1732
1745
  }
1733
1746
  $10.append($$anchor, fragment);
@@ -1742,6 +1755,8 @@ function createStreamingCanvas(options = {}) {
1742
1755
  const manager = new StreamingLayoutManager({
1743
1756
  throttleMs: options.throttleMs,
1744
1757
  glideDurationMs: options.glideDurationMs,
1758
+ connectedOnly: options.connectedOnly,
1759
+ clock: options.clock,
1745
1760
  layoutOptions: options.layoutOptions,
1746
1761
  onLayoutUpdated: (updated) => {
1747
1762
  $11.set(positions, updated, true);
@@ -1763,14 +1778,29 @@ function createStreamingCanvas(options = {}) {
1763
1778
  }
1764
1779
  };
1765
1780
  }
1781
+
1782
+ // src/canvas/index.ts
1783
+ import {
1784
+ realClock,
1785
+ ManualClock,
1786
+ layoutBounds,
1787
+ canvasHeight,
1788
+ estimateCanvasHeight,
1789
+ blendLayout,
1790
+ connectedOnly
1791
+ } from "@pixerate/editor/canvas";
1766
1792
  export {
1767
1793
  AgentPresenceLayer,
1768
1794
  FloatingHorizontalScrollbar,
1795
+ ManualClock,
1796
+ blendLayout,
1769
1797
  calculateDirectionalDisplacement,
1770
1798
  calculateGraphDifferences,
1771
1799
  calculateReflowDisplacement,
1800
+ canvasHeight,
1772
1801
  centerNodes,
1773
1802
  computeNodesBoundingBox,
1803
+ connectedOnly,
1774
1804
  createBezierTrajectory,
1775
1805
  createCanvasClipboard,
1776
1806
  createCanvasDocking,
@@ -1784,6 +1814,7 @@ export {
1784
1814
  createStreamingCanvas,
1785
1815
  defaultSvelteFlowPreset,
1786
1816
  ensureLayout,
1817
+ estimateCanvasHeight,
1787
1818
  estimateNodeSize,
1788
1819
  flowSide,
1789
1820
  getCenteredNodePosition,
@@ -1793,12 +1824,14 @@ export {
1793
1824
  isEventFromTextInput,
1794
1825
  isValidCanvasNode,
1795
1826
  isValidUrl,
1827
+ layoutBounds,
1796
1828
  linearPositionTrajectory,
1797
1829
  linearTrajectory,
1798
1830
  miroCompatiblePreset,
1799
1831
  normalizeNodeHandles,
1800
1832
  placeBeside,
1801
1833
  preserveNodeMeasurements,
1834
+ realClock,
1802
1835
  replaceNodeInGraph,
1803
1836
  restorePanelPointerEvents,
1804
1837
  runMultiNodeTransition