koboyo 0.2.0 → 0.3.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.
Files changed (49) hide show
  1. package/README.md +6 -1
  2. package/assets/editor/assets/IconCornerDownRight-BerbioFY.js +1 -0
  3. package/assets/editor/assets/IconLink-ze4g4Lrj.js +1 -0
  4. package/assets/editor/assets/build-pips-q_Fq10ov.js +1 -0
  5. package/assets/editor/assets/flow-layer-B7mlx0G4.js +1 -0
  6. package/assets/editor/assets/flow-panel-DoK6VIJ4.js +1 -0
  7. package/assets/editor/assets/flow-start-BKN48uke.js +1 -0
  8. package/assets/editor/assets/{index-CC2h28V_.css → index-e23lIFZB.css} +1 -1
  9. package/assets/editor/assets/{index-DfNbwHl_.js → index-mhi0Z6gG.js} +7 -7
  10. package/assets/editor/assets/slides-panel-hozTMSMk.js +26 -0
  11. package/assets/editor/assets/tool-catalog-CHq6TJ2q.js +1 -0
  12. package/assets/editor/assets/{tool-drawer-CG7-cnML.js → tool-drawer-DEEqsKSN.js} +1 -1
  13. package/assets/editor/assets/tree-BbSzMkPL.js +1 -0
  14. package/assets/editor/assets/use-drag-reorder-CTTvTwza.js +1 -0
  15. package/assets/editor/assets/use-key-held-38H1v73f.js +1 -0
  16. package/assets/editor/index.html +7 -7
  17. package/dist/koboyo.js +203 -201
  18. package/package.json +5 -5
  19. package/skills/koboyo/SKILL.md +1 -1
  20. package/skills/koboyo/references/architecture.md +1 -1
  21. package/skills/koboyo/references/bpmn.md +1 -1
  22. package/skills/koboyo/references/chart.md +1 -1
  23. package/skills/koboyo/references/cycle.md +1 -1
  24. package/skills/koboyo/references/erd.md +1 -1
  25. package/skills/koboyo/references/flowchart.md +1 -1
  26. package/skills/koboyo/references/funnel.md +1 -1
  27. package/skills/koboyo/references/gantt.md +1 -1
  28. package/skills/koboyo/references/gitgraph.md +1 -1
  29. package/skills/koboyo/references/journey.md +1 -1
  30. package/skills/koboyo/references/matrix.md +1 -1
  31. package/skills/koboyo/references/mindmap.md +1 -1
  32. package/skills/koboyo/references/orgchart.md +1 -1
  33. package/skills/koboyo/references/pyramid.md +1 -1
  34. package/skills/koboyo/references/sankey.md +1 -1
  35. package/skills/koboyo/references/sequence.md +1 -1
  36. package/skills/koboyo/references/statemachine.md +1 -1
  37. package/skills/koboyo/references/timeline.md +1 -1
  38. package/skills/koboyo/references/venn.md +1 -1
  39. package/skills/koboyo/references/wireframe.md +1 -1
  40. package/assets/editor/assets/IconArrowBackUp-Brd2WpCh.js +0 -1
  41. package/assets/editor/assets/IconNote-CSELvWzx.js +0 -1
  42. package/assets/editor/assets/build-pips-CIaHaEPB.js +0 -1
  43. package/assets/editor/assets/flow-layer-BC35drcK.js +0 -1
  44. package/assets/editor/assets/flow-panel-D_K9wgZi.js +0 -1
  45. package/assets/editor/assets/flow-start-ccYJ2KB9.js +0 -1
  46. package/assets/editor/assets/slides-panel-DV-zQJhV.js +0 -26
  47. package/assets/editor/assets/tool-catalog-ChSwaLIq.js +0 -1
  48. package/assets/editor/assets/tree-rq4RTGgw.js +0 -1
  49. package/assets/editor/assets/use-drag-reorder-C3h4ZMoZ.js +0 -1
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-2Zwg-L3c.js";import{Sr as t}from"./slides-D9bnXqtf.js";import{r as n}from"./frames-CRP8oPP8.js";import{t as r}from"./createReactComponent-9UsI5fmM.js";import{t as i}from"./IconAlertTriangle-CxPhYpe-.js";import{t as a}from"./IconEraser-DlZQe3-r.js";import{n as o,t as s}from"./IconNote-CSELvWzx.js";import{t as ee}from"./IconMinus-y4ejub-s.js";import{t as te}from"./IconMoodSmile-Bic_fw54.js";import{t as c}from"./IconPencil-C5Y-Y4dC.js";import{t as l}from"./IconPhoto-CR36IK-b.js";import{t as u}from"./IconSearch-C1K0_Pq_.js";import{t as d}from"./IconSparkles-WDcg8BA9.js";import{C as f,b as p,c as m,f as h,g as ne,h as re,p as ie,s as ae,v as oe,x as se,y as ce}from"./PopoverPopup-BqGWd_uB.js";import{t as le}from"./keys-DrjiT9FL.js";var g=r(`outline`,`adjustments-horizontal`,`AdjustmentsHorizontal`,[[`path`,{d:`M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M4 6l8 0`,key:`svg-1`}],[`path`,{d:`M16 6l4 0`,key:`svg-2`}],[`path`,{d:`M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M4 12l2 0`,key:`svg-4`}],[`path`,{d:`M10 12l10 0`,key:`svg-5`}],[`path`,{d:`M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-6`}],[`path`,{d:`M4 18l11 0`,key:`svg-7`}],[`path`,{d:`M19 18l1 0`,key:`svg-8`}]]),ue=r(`outline`,`align-justified`,`AlignJustified`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l12 0`,key:`svg-2`}]]),de=r(`outline`,`antenna-bars-5`,`AntennaBars5`,[[`path`,{d:`M6 18l0 -3`,key:`svg-0`}],[`path`,{d:`M10 18l0 -6`,key:`svg-1`}],[`path`,{d:`M14 18l0 -9`,key:`svg-2`}],[`path`,{d:`M18 18l0 -12`,key:`svg-3`}]]),fe=r(`outline`,`app-window`,`AppWindow`,[[`path`,{d:`M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10`,key:`svg-0`}],[`path`,{d:`M6 8h.01`,key:`svg-1`}],[`path`,{d:`M9 8h.01`,key:`svg-2`}]]),pe=r(`outline`,`box-margin`,`BoxMargin`,[[`path`,{d:`M8 8h8v8h-8l0 -8`,key:`svg-0`}],[`path`,{d:`M4 4v.01`,key:`svg-1`}],[`path`,{d:`M8 4v.01`,key:`svg-2`}],[`path`,{d:`M12 4v.01`,key:`svg-3`}],[`path`,{d:`M16 4v.01`,key:`svg-4`}],[`path`,{d:`M20 4v.01`,key:`svg-5`}],[`path`,{d:`M4 20v.01`,key:`svg-6`}],[`path`,{d:`M8 20v.01`,key:`svg-7`}],[`path`,{d:`M12 20v.01`,key:`svg-8`}],[`path`,{d:`M16 20v.01`,key:`svg-9`}],[`path`,{d:`M20 20v.01`,key:`svg-10`}],[`path`,{d:`M20 16v.01`,key:`svg-11`}],[`path`,{d:`M20 12v.01`,key:`svg-12`}],[`path`,{d:`M20 8v.01`,key:`svg-13`}],[`path`,{d:`M4 16v.01`,key:`svg-14`}],[`path`,{d:`M4 12v.01`,key:`svg-15`}],[`path`,{d:`M4 8v.01`,key:`svg-16`}]]),_=r(`outline`,`brackets-contain`,`BracketsContain`,[[`path`,{d:`M7 4h-4v16h4`,key:`svg-0`}],[`path`,{d:`M17 4h4v16h-4`,key:`svg-1`}],[`path`,{d:`M8 16h.01`,key:`svg-2`}],[`path`,{d:`M12 16h.01`,key:`svg-3`}],[`path`,{d:`M16 16h.01`,key:`svg-4`}]]),me=r(`outline`,`browser`,`Browser`,[[`path`,{d:`M4 8h16`,key:`svg-0`}],[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-1`}],[`path`,{d:`M8 4v4`,key:`svg-2`}]]),he=r(`outline`,`calendar`,`Calendar`,[[`path`,{d:`M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12`,key:`svg-0`}],[`path`,{d:`M16 3v4`,key:`svg-1`}],[`path`,{d:`M8 3v4`,key:`svg-2`}],[`path`,{d:`M4 11h16`,key:`svg-3`}],[`path`,{d:`M11 15h1`,key:`svg-4`}],[`path`,{d:`M12 15v3`,key:`svg-5`}]]),ge=r(`outline`,`cards`,`Cards`,[[`path`,{d:`M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304l0 .001`,key:`svg-0`}],[`path`,{d:`M15 4h1a1 1 0 0 1 1 1v3.5`,key:`svg-1`}],[`path`,{d:`M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374`,key:`svg-2`}]]),v=r(`outline`,`chart-area-line`,`ChartAreaLine`,[[`path`,{d:`M4 19l4 -6l4 2l4 -5l4 4l0 5l-16 0`,key:`svg-0`}],[`path`,{d:`M4 12l3 -4l4 2l5 -6l4 4`,key:`svg-1`}]]),y=r(`outline`,`chart-bar`,`ChartBar`,[[`path`,{d:`M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6`,key:`svg-0`}],[`path`,{d:`M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10`,key:`svg-1`}],[`path`,{d:`M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14`,key:`svg-2`}],[`path`,{d:`M4 20h14`,key:`svg-3`}]]),b=r(`outline`,`chart-dots`,`ChartDots`,[[`path`,{d:`M3 3v18h18`,key:`svg-0`}],[`path`,{d:`M7 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M17 7a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M12 15a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M10.16 10.62l2.34 2.88`,key:`svg-4`}],[`path`,{d:`M15.088 13.328l2.837 -4.586`,key:`svg-5`}]]),x=r(`outline`,`chart-grid-dots`,`ChartGridDots`,[[`path`,{d:`M16 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M4 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M4 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M16 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M8 18h8`,key:`svg-4`}],[`path`,{d:`M18 20v1`,key:`svg-5`}],[`path`,{d:`M18 3v1`,key:`svg-6`}],[`path`,{d:`M6 20v1`,key:`svg-7`}],[`path`,{d:`M6 10v-7`,key:`svg-8`}],[`path`,{d:`M12 3v18`,key:`svg-9`}],[`path`,{d:`M18 8v8`,key:`svg-10`}],[`path`,{d:`M8 12h13`,key:`svg-11`}],[`path`,{d:`M21 6h-1`,key:`svg-12`}],[`path`,{d:`M16 6h-13`,key:`svg-13`}],[`path`,{d:`M3 12h1`,key:`svg-14`}],[`path`,{d:`M20 18h1`,key:`svg-15`}],[`path`,{d:`M3 18h1`,key:`svg-16`}],[`path`,{d:`M6 14v2`,key:`svg-17`}]]),S=r(`outline`,`chart-line`,`ChartLine`,[[`path`,{d:`M4 19l16 0`,key:`svg-0`}],[`path`,{d:`M4 15l4 -6l4 2l4 -5l4 4`,key:`svg-1`}]]),C=r(`outline`,`chart-pie`,`ChartPie`,[[`path`,{d:`M10 3.2a9 9 0 1 0 10.8 10.8a1 1 0 0 0 -1 -1h-6.8a2 2 0 0 1 -2 -2v-7a.9 .9 0 0 0 -1 -.8`,key:`svg-0`}],[`path`,{d:`M15 3.5a9 9 0 0 1 5.5 5.5h-4.5a1 1 0 0 1 -1 -1v-4.5`,key:`svg-1`}]]),w=r(`outline`,`checkbox`,`Checkbox`,[[`path`,{d:`M9 11l3 3l8 -8`,key:`svg-0`}],[`path`,{d:`M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9`,key:`svg-1`}]]),T=r(`outline`,`chevrons-right`,`ChevronsRight`,[[`path`,{d:`M7 7l5 5l-5 5`,key:`svg-0`}],[`path`,{d:`M13 7l5 5l-5 5`,key:`svg-1`}]]),E=r(`outline`,`circle-dashed`,`CircleDashed`,[[`path`,{d:`M8.56 3.69a9 9 0 0 0 -2.92 1.95`,key:`svg-0`}],[`path`,{d:`M3.69 8.56a9 9 0 0 0 -.69 3.44`,key:`svg-1`}],[`path`,{d:`M3.69 15.44a9 9 0 0 0 1.95 2.92`,key:`svg-2`}],[`path`,{d:`M8.56 20.31a9 9 0 0 0 3.44 .69`,key:`svg-3`}],[`path`,{d:`M15.44 20.31a9 9 0 0 0 2.92 -1.95`,key:`svg-4`}],[`path`,{d:`M20.31 15.44a9 9 0 0 0 .69 -3.44`,key:`svg-5`}],[`path`,{d:`M20.31 8.56a9 9 0 0 0 -1.95 -2.92`,key:`svg-6`}],[`path`,{d:`M15.44 3.69a9 9 0 0 0 -3.44 -.69`,key:`svg-7`}]]),D=r(`outline`,`circle-dot`,`CircleDot`,[[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-1`}]]),O=r(`outline`,`circle-number-1`,`CircleNumber1`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M10 10l2 -2v8`,key:`svg-1`}]]),k=r(`outline`,`circle-plus`,`CirclePlus`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 12h6`,key:`svg-1`}],[`path`,{d:`M12 9v6`,key:`svg-2`}]]),A=r(`outline`,`circle`,`Circle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}]]),j=r(`outline`,`device-mobile`,`DeviceMobile`,[[`path`,{d:`M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M11 4h2`,key:`svg-1`}],[`path`,{d:`M12 17v.01`,key:`svg-2`}]]),M=r(`outline`,`device-tablet`,`DeviceTablet`,[[`path`,{d:`M5 4a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1v-16`,key:`svg-0`}],[`path`,{d:`M11 17a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}]]),N=r(`outline`,`forms`,`Forms`,[[`path`,{d:`M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3`,key:`svg-0`}],[`path`,{d:`M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3`,key:`svg-1`}],[`path`,{d:`M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7`,key:`svg-2`}],[`path`,{d:`M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1`,key:`svg-3`}],[`path`,{d:`M17 12h.01`,key:`svg-4`}],[`path`,{d:`M13 12h.01`,key:`svg-5`}]]),P=r(`outline`,`hand-stop`,`HandStop`,[[`path`,{d:`M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5`,key:`svg-0`}],[`path`,{d:`M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5`,key:`svg-1`}],[`path`,{d:`M14 5.5a1.5 1.5 0 0 1 3 0v6.5`,key:`svg-2`}],[`path`,{d:`M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47`,key:`svg-3`}]]),F=r(`outline`,`heading`,`Heading`,[[`path`,{d:`M7 12h10`,key:`svg-0`}],[`path`,{d:`M7 5v14`,key:`svg-1`}],[`path`,{d:`M17 5v14`,key:`svg-2`}],[`path`,{d:`M15 19h4`,key:`svg-3`}],[`path`,{d:`M15 5h4`,key:`svg-4`}],[`path`,{d:`M5 19h4`,key:`svg-5`}],[`path`,{d:`M5 5h4`,key:`svg-6`}]]),I=r(`outline`,`highlight`,`Highlight`,[[`path`,{d:`M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4`,key:`svg-0`}],[`path`,{d:`M12.5 5.5l4 4`,key:`svg-1`}],[`path`,{d:`M4.5 13.5l4 4`,key:`svg-2`}],[`path`,{d:`M21 15v4h-8l4 -4l4 0`,key:`svg-3`}]]),L=r(`outline`,`lasso`,`Lasso`,[[`path`,{d:`M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255`,key:`svg-0`}],[`path`,{d:`M3 15a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M5 17c0 1.42 .316 2.805 1 4`,key:`svg-2`}]]),_e=r(`outline`,`layout-bottombar`,`LayoutBottombar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 15l16 0`,key:`svg-1`}]]),R=r(`outline`,`layout-columns`,`LayoutColumns`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M12 4l0 16`,key:`svg-1`}]]),ve=r(`outline`,`layout-kanban`,`LayoutKanban`,[[`path`,{d:`M4 4l6 0`,key:`svg-0`}],[`path`,{d:`M14 4l6 0`,key:`svg-1`}],[`path`,{d:`M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8`,key:`svg-2`}],[`path`,{d:`M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2`,key:`svg-3`}]]),ye=r(`outline`,`layout-navbar`,`LayoutNavbar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 9l16 0`,key:`svg-1`}]]),be=r(`outline`,`layout-rows`,`LayoutRows`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}]]),xe=r(`outline`,`layout-sidebar`,`LayoutSidebar`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M9 4l0 16`,key:`svg-1`}]]),z=r(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),B=r(`outline`,`menu-2`,`Menu2`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l16 0`,key:`svg-2`}]]),V=r(`outline`,`message`,`Message`,[[`path`,{d:`M8 9h8`,key:`svg-0`}],[`path`,{d:`M8 13h6`,key:`svg-1`}],[`path`,{d:`M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12`,key:`svg-2`}]]),Se=r(`outline`,`north-star`,`NorthStar`,[[`path`,{d:`M3 12h18`,key:`svg-0`}],[`path`,{d:`M12 21v-18`,key:`svg-1`}],[`path`,{d:`M7.5 7.5l9 9`,key:`svg-2`}],[`path`,{d:`M7.5 16.5l9 -9`,key:`svg-3`}]]),Ce=r(`outline`,`numbers`,`Numbers`,[[`path`,{d:`M8 10v-7l-2 2`,key:`svg-0`}],[`path`,{d:`M6 16a2 2 0 1 1 4 0c0 .591 -.601 1.46 -1 2l-3 3h4`,key:`svg-1`}],[`path`,{d:`M15 14a2 2 0 1 0 2 -2a2 2 0 1 0 -2 -2`,key:`svg-2`}],[`path`,{d:`M6.5 10h3`,key:`svg-3`}]]),we=r(`outline`,`pointer`,`Pointer`,[[`path`,{d:`M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563`,key:`svg-0`}]]),Te=r(`outline`,`polygon`,`Polygon`,[[`path`,{d:`M10 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M17 8a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M3 11a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M13 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M6.5 9.5l3.5 -3`,key:`svg-4`}],[`path`,{d:`M14 5.5l3 1.5`,key:`svg-5`}],[`path`,{d:`M18.5 10l-2.5 7`,key:`svg-6`}],[`path`,{d:`M13.5 17.5l-7 -5`,key:`svg-7`}]]),Ee=r(`outline`,`select`,`Select`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M9 11l3 3l3 -3`,key:`svg-1`}]]),De=r(`outline`,`separator-horizontal`,`SeparatorHorizontal`,[[`path`,{d:`M4 12l16 0`,key:`svg-0`}],[`path`,{d:`M8 8l4 -4l4 4`,key:`svg-1`}],[`path`,{d:`M16 16l-4 4l-4 -4`,key:`svg-2`}]]),H=r(`outline`,`square`,`Square`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}]]),Oe=r(`outline`,`star`,`Star`,[[`path`,{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245`,key:`svg-0`}]]),U=r(`outline`,`table`,`Table`,[[`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14`,key:`svg-0`}],[`path`,{d:`M3 10h18`,key:`svg-1`}],[`path`,{d:`M10 3v18`,key:`svg-2`}]]),ke=r(`outline`,`tag`,`Tag`,[[`path`,{d:`M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3`,key:`svg-1`}]]),Ae=r(`outline`,`toggle-right`,`ToggleRight`,[[`path`,{d:`M14 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6`,key:`svg-1`}]]),je=r(`outline`,`typography`,`Typography`,[[`path`,{d:`M4 20l3 0`,key:`svg-0`}],[`path`,{d:`M14 20l7 0`,key:`svg-1`}],[`path`,{d:`M6.9 15l6.9 0`,key:`svg-2`}],[`path`,{d:`M10.2 6.3l5.8 13.7`,key:`svg-3`}],[`path`,{d:`M5 20l6 -16l2 0l7 16`,key:`svg-4`}]]),Me=r(`outline`,`user-circle`,`UserCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-1`}],[`path`,{d:`M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855`,key:`svg-2`}]]),Ne=r(`outline`,`vector-spline`,`VectorSpline`,[[`path`,{d:`M17 4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2`,key:`svg-0`}],[`path`,{d:`M3 18a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2`,key:`svg-1`}],[`path`,{d:`M17 5c-6.627 0 -12 5.373 -12 12`,key:`svg-2`}]]),Pe=r(`outline`,`window-maximize`,`WindowMaximize`,[[`path`,{d:`M3 17a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1l0 -3`,key:`svg-0`}],[`path`,{d:`M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6`,key:`svg-1`}],[`path`,{d:`M12 8h4v4`,key:`svg-2`}],[`path`,{d:`M16 8l-5 5`,key:`svg-3`}]]),W={select:{label:`Select`,chord:`v`,icon:we,tool:`select`,viewSafe:!0},lasso:{label:`Lasso select`,chord:`q`,icon:L,tool:`lasso`},hand:{label:`Hand`,help:`Hand (pan)`,chord:`h`,icon:P,tool:`hand`,viewSafe:!0},rectangle:{label:`Rectangle`,chord:`r`,icon:H,tool:`rectangle`},ellipse:{label:`Ellipse`,chord:`o`,icon:A},arrow:{label:`Arrow`,chord:`a`,icon:m,tool:`arrow`},line:{label:`Line`,chord:`l`,icon:ee,tool:`line`},polyline:{label:`Multi-point line`,chord:`Shift+KeyC`,icon:Ne,tool:`polyline`},polygon:{label:`Polygon`,chord:`y`,icon:Te,tool:`polygon`},draw:{label:`Draw`,chord:`p`,icon:c,tool:`draw`},highlight:{label:`Highlighter`,chord:`Shift+KeyP`,icon:I,tool:`highlight`},laser:{label:`Laser pointer`,chord:`k`,icon:Se,tool:`laser`,viewSafe:!0},text:{label:`Text`,chord:`t`,icon:je,tool:`text`},sticky:{label:`Sticky note`,chord:`n`,icon:s,tool:`sticky`},figure:{label:`Frame`,chord:`f`,tool:`figure`},image:{label:`Image`,chord:`i`,icon:l,tool:`image`},icon:{label:`Icons`,chord:`s`,icon:te,tool:`icon`},imageLibrary:{label:`Image library`,chord:`Shift+KeyS`},chart:{label:`Chart`,chord:`g`,tool:`chart`},stepbadge:{label:`Step badge`,chord:`b`,icon:O},eraser:{label:`Eraser`,chord:`e`,icon:a,tool:`eraser`},comment:{label:`Comment`,chord:`c`,icon:V,viewSafe:!0}};function G(e){return le(W[e].chord)}var Fe=Object.fromEntries(Object.values(W).flatMap(e=>e.tool?[[e.chord,e.tool]]:[])),K=[{kind:`simple`,icon:ie},{kind:`phone`,icon:j},{kind:`tablet`,icon:M},{kind:`browser`,icon:me},{kind:`window`,icon:fe},{kind:`lanes`,icon:be},{kind:`vlanes`,icon:R},{kind:`boundary`,icon:pe}],q=[{value:`table`,label:`Table`,icon:U},{value:`bar`,label:`Bar chart`,icon:y},{value:`line`,label:`Line chart`,icon:S},{value:`area`,label:`Area chart`,icon:v},{value:`scatter`,label:`Scatter chart`,icon:b},{value:`pie`,label:`Pie chart`,icon:C},{value:`donut`,label:`Donut chart`,icon:E},{value:`radar`,label:`Radar chart`,icon:p},{value:`quadrant`,label:`Quadrant chart`,icon:x}],J=[{kind:`button`,label:`Button`,icon:H},{kind:`input`,label:`Input`,icon:N},{kind:`search`,label:`Search field`,icon:u},{kind:`checkbox`,label:`Checkbox`,icon:w},{kind:`radio`,label:`Radio`,icon:D},{kind:`toggle`,label:`Toggle`,icon:Ae},{kind:`dropdown`,label:`Dropdown`,icon:Ee},{kind:`slider`,label:`Slider`,icon:g},{kind:`navbar`,label:`Navbar`,icon:ye},{kind:`tabs`,label:`Tabs`,icon:ve},{kind:`image`,label:`Image placeholder`,icon:l},{kind:`avatar`,label:`Avatar`,icon:Me},{kind:`heading`,label:`Heading`,icon:F},{kind:`paragraph`,label:`Paragraph`,icon:ue},{kind:`divider`,label:`Divider`,icon:De},{kind:`link`,label:`Link`,icon:o},{kind:`textarea`,label:`Text area`,icon:f},{kind:`stepper`,label:`Number stepper`,icon:Ce},{kind:`badge`,label:`Badge`,icon:ke},{kind:`progress`,label:`Progress bar`,icon:ce},{kind:`breadcrumbs`,label:`Breadcrumbs`,icon:T},{kind:`pagination`,label:`Pagination`,icon:oe},{kind:`rating`,label:`Rating`,icon:Oe},{kind:`card`,label:`Card`,icon:ge},{kind:`list`,label:`List`,icon:z},{kind:`alert`,label:`Alert`,icon:i},{kind:`modal`,label:`Modal dialog`,icon:Pe},{kind:`menu`,label:`Menu`,icon:B},{kind:`tooltip`,label:`Tooltip`,icon:V},{kind:`accordion`,label:`Accordion`,icon:ae},{kind:`datepicker`,label:`Date picker`,icon:he},{kind:`sidebar`,label:`Sidebar`,icon:xe},{kind:`scrollbar`,label:`Scrollbar`,icon:se},{kind:`segmented`,label:`Segmented control`,icon:R},{kind:`tabbar`,label:`Bottom tab bar`,icon:_e},{kind:`statusbar`,label:`Status bar`,icon:de},{kind:`fab`,label:`Floating button`,icon:k}],Y={rectangle:`Rectangle`,ellipse:`Ellipse`,diamond:`Diamond`,triangle:`Triangle`,oval:`Oval`,parallelogram:`Parallelogram`,trapezoid:`Trapezoid`,cylinder:`Cylinder`,note:`Note`,hexagon:`Hexagon`,star:`Star`,checkbox:`Checkbox`,crossbox:`Crossed box`,heart:`Heart`,cloud:`Cloud`,"arrow-up":`Arrow up`,"arrow-down":`Arrow down`,"arrow-left":`Arrow left`,"arrow-right":`Arrow right`,plus:`Plus`,"speech-bubble":`Speech bubble`,bolt:`Lightning bolt`,queue:`Queue`,callout:`Callout`,document:`Document`,"predefined-process":`Predefined process`,"manual-input":`Manual input`,pentagon:`Pentagon`,chevron:`Chevron`,octagon:`Octagon`,cube:`Cube`,actor:`Actor`,"double-circle":`Double circle`,card:`Card`,delay:`Delay`,"fork-join":`Fork / join`,"multi-document":`Multi-document`,"multi-process":`Multi-process`,package:`Package`,component:`Component`,brace:`Brace`},X=t.filter(e=>e!==`rectangle`&&e!==`ellipse`&&e!==`actor`),Ie=e();function Le(e){return t=>(0,Ie.jsx)(re,{kind:e,size:t.size})}function Z(e,t,n,r){let i=W[e];return{id:e,label:i.label,group:t,shortcut:G(e),keywords:n,icon:i.icon??H,action:r??{kind:`tool`,tool:i.tool??`select`}}}var Re=[Z(`select`,`Basic`),Z(`hand`,`Basic`,`pan`),Z(`lasso`,`Basic`,`freehand select`),Z(`eraser`,`Basic`),Z(`laser`,`Basic`,`present`),Z(`comment`,`Basic`,`review note feedback pin annotate`,{kind:`tool`,tool:`comment`})],Q=[{id:`ask-ai`,label:`Ask AI`,group:`AI`,keywords:`assistant chat sparkles help`,icon:d,action:{kind:`ai`}},{id:`ai-diagram`,label:`Generate diagram with AI`,group:`AI`,keywords:`assistant architecture flowchart create`,icon:d,action:{kind:`ai`,prompt:`Draw a diagram of `,send:!1}},{id:`ai-deck`,label:`Generate slides with AI`,group:`AI`,keywords:`assistant deck presentation create`,icon:d,action:{kind:`ai`,prompt:`Create a short deck about `,send:!1}},{id:`ai-image`,label:`Generate image with AI`,group:`AI`,keywords:`assistant picture photo create`,icon:d,action:{kind:`ai`,prompt:`Generate an image of `,send:!1}}],ze=[Z(`rectangle`,`Shapes`,`box square`,{kind:`shape`,shape:`rectangle`}),Z(`ellipse`,`Shapes`,`circle oval`,{kind:`shape`,shape:`ellipse`}),...X.map(e=>({id:`shape-${e}`,label:Y[e],group:`Shapes`,keywords:`shape`,icon:Le(e),action:{kind:`shape`,shape:e}})),Z(`stepbadge`,`Shapes`,`number step`,{kind:`control`,control:`stepbadge`}),{id:`entity`,label:`Class / entity`,group:`Shapes`,keywords:`erd uml class table attributes fields`,icon:h,action:{kind:`control`,control:`entity`}},{id:`lifeline`,label:`Lifeline`,group:`Shapes`,keywords:`sequence uml participant`,icon:ne,action:{kind:`control`,control:`lifeline`}},{id:`fragment`,label:`Fragment`,group:`Shapes`,keywords:`sequence uml combined opt alt loop par frame container`,icon:_,action:{kind:`control`,control:`fragment`}}],Be=[Z(`arrow`,`Connectors`,`connector`),Z(`line`,`Connectors`,`connector`),Z(`polyline`,`Connectors`,`connector elbow path`),Z(`polygon`,`Connectors`,`shape filled closed outline area band`)],Ve=[Z(`text`,`Text & media`),Z(`sticky`,`Text & media`,`note`),Z(`draw`,`Text & media`,`pen pencil freehand`),Z(`highlight`,`Text & media`,`marker highlight pen freehand`),Z(`image`,`Text & media`,`photo picture`),Z(`icon`,`Text & media`,`emoji sticker symbol`)],He=q.map(e=>({id:`data-${e.value}`,label:e.label,group:`Charts & data`,keywords:e.value===`table`?`grid data`:`chart graph data`,icon:e.icon,action:e.value===`table`?{kind:`table`}:{kind:`chart`,chart:e.value}})),Ue=K.map(e=>({id:`frame-${e.kind}`,label:n[e.kind],group:`Frames`,shortcut:e.kind===`simple`?G(`figure`):void 0,keywords:`frame container device mockup`,icon:e.icon,action:{kind:`frame`,frame:e.kind}})),We=J.map(e=>({id:`control-${e.kind}`,label:e.label,group:`UI controls`,keywords:`wireframe mockup ui widget`,icon:e.icon,action:{kind:`control`,control:e.kind}})),$=[...Re,...Q,...ze,...Be,...Ve,...He,...Ue,...We],Ge=new Map($.map(e=>[e.id,e]));function Ke(e,t){let n=$.filter(e=>e.group===`AI`?t.ai:e.id!==`comment`||t.comments),r=new Set(n.map(e=>e.id)),i=e.map(e=>Ge.get(e)).filter(e=>e!==void 0&&r.has(e.id)),a=new Set(i.map(e=>e.id));return{recent:i,rest:n.filter(e=>!a.has(e.id))}}function qe(e,t){if(e.kind===`ai`){t.askAi(e.prompt??``,e.send??!1);return}if(e.kind===`tool`){t.selectTool(e.tool);return}if(e.kind===`shape`){t.selectTool(`rectangle`),t.setShapeKind(e.shape);return}if(e.kind===`chart`){t.selectTool(`chart`),t.setChartKind(e.chart);return}if(e.kind===`table`){t.selectTool(`table`);return}if(e.kind===`frame`){t.selectTool(`figure`),t.setFrameKind(e.frame);return}t.insertControl(e.control)}export{v as C,y as S,g as T,E as _,X as a,x as b,Fe as c,U as d,H as f,A as g,z as h,q as i,W as l,B as m,Ke as n,K as o,V as p,J as r,Y as s,qe as t,G as u,C as v,_ as w,b as x,S as y};
@@ -1 +0,0 @@
1
- import{o as e}from"./reflow-Cv75wPSh.js";import{an as t}from"./slides-D9bnXqtf.js";import{t as n}from"./createReactComponent-9UsI5fmM.js";import{i as r,n as i}from"./core-CBnmD9hT.js";import{i as a,t as o}from"./flow-start-ccYJ2KB9.js";import{c as s,i as c,n as l,s as u}from"./flows-GGbkNqs8.js";var d=n(`outline`,`arrow-fork`,`ArrowFork`,[[`path`,{d:`M16 3h5v5`,key:`svg-0`}],[`path`,{d:`M8 3h-5v5`,key:`svg-1`}],[`path`,{d:`M21 3l-7.536 7.536a5 5 0 0 0 -1.464 3.534v6.93`,key:`svg-2`}],[`path`,{d:`M3 3l7.536 7.536a5 5 0 0 1 1.464 3.534v.93`,key:`svg-3`}]]),f=24;function p(e,t,n){let r=new Set([...t,...n]),i=e.filter(e=>r.has(e.id)&&e.type!==`arrow`),a=e=>i.find(t=>m(t,e))?.id??null,o=(e,r)=>t.includes(e)&&n.includes(r)||n.includes(e)&&t.includes(r),s=null;for(let t of e){if(t.type!==`arrow`)continue;let e={x:t.x,y:t.y},n={x:t.x2,y:t.y2},r=t.startBinding?.shapeId??a(e),i=t.endBinding?.shapeId??a(n);if(!r||!i||r===i||!o(r,i))continue;if(t.startBinding&&t.endBinding)return null;let c=[];t.startBinding||c.push({end:`start`,shapeId:r,point:e}),t.endBinding||c.push({end:`end`,shapeId:i,point:n}),s??={arrow:t,ends:c}}return s}function m(e,n){let r=t(e);return n.x>=r.x-f&&n.x<=r.x+r.width+f&&n.y>=r.y-f&&n.y<=r.y+r.height+f}function h(e,t,n){let r=b(t,e.length);return e[r-1]?.target===n.target?e:[...e.slice(0,r),n,...e.slice(r)]}function g(e,t,n){let r=Math.min(Math.max(n,0),e.length-1);if(t===r||!e[t])return e;let i=[...e],[a]=i.splice(t,1);return i.splice(r,0,a),i}function _(e,t){return e[t]?e.filter((e,n)=>n!==t):e}function v(e,t,n,r){let i=e[t];if(!i||i.target===n)return e;let a={...i,target:n};r!==void 0&&(a.title=r);let o=(i.also??[]).filter(e=>e!==n);return o.length>0?a.also=o:delete a.also,e.map((e,n)=>n===t?a:e)}function y(e,t,n){let r=e[t];if(!r||r.target===n)return e;let i=r.also??[],a={...r,also:i.includes(n)?i.filter(e=>e!==n):[...i,n]};return a.also?.length===0&&delete a.also,e.map((e,n)=>n===t?a:e)}function b(e,t){return Math.min(Math.max(e,0),t)}function x(e,t,n,r){let i=o(e,t);i&&a(e,i,(i.flows??[]).flatMap(e=>{if(e.id!==n)return[e];let t=r(e);return t?[t]:[]}))}function S(e,t,n,i){let s=o(e,t);if(!s)return;let c=s.flows??[],l=r(c);e.history.withTransaction(()=>{a(e,s,[...c.map(e=>e.id===n?{...e,steps:e.steps.map((e,t)=>t===i?{...e,branches:[...e.branches??[],l.id]}:e)}:e),l])}),e.store.getState().setFlowEdit({frameId:t,flowId:l.id})}function C(e,t,n){let{flowEdit:r,flowPlay:i,flowPreview:a,setFlowEdit:s,setFlowPlay:c,setFlowPreview:l}=e.store.getState();if(x(e,t,n,()=>null),i?.flowId===n&&c(null),a?.flowId===n&&l(null),r?.flowId!==n)return;let u=o(e,t)?.flows?.[0];s(u?{frameId:t,flowId:u.id}:null)}function w(e,t,n){let r=e.store.getState();r.setFlowPlay(null),r.setFlowEdit({frameId:t,flowId:n})}function T(e,t){let n=e.slot;return n==null||n>=t?t:Math.max(n,0)}function E(e,t){return T(e,t)<t}function D(e,t){let n=e.selected;return n==null||n<0||n>=t?null:n}function O(e,t){let n=D(e,t);if(n!==null)return n;let r=T(e,t)-1;return r>=0?r:null}function k(e,t,n){return{selected:t,slot:E(e,n)?t+1:null,picking:null}}function A(e,t){let n=e=>e==null?null:e>t?e-1:e;return{selected:e.selected===t?null:n(e.selected),slot:n(e.slot),hovered:null,picking:null}}function j(e,t,n){let r=e=>e==null?e:e===t?n:t<e&&e<=n?e-1:n<=e&&e<t?e+1:e,i={};return e.selected!==null&&e.selected!==void 0&&(i.selected=r(e.selected)),e.picking!==null&&e.picking!==void 0&&(i.picking=r(e.picking)),i}function M(e,t,n){let r=o(e,t),a=r?.flows?.find(e=>e.id===n);if(!r||!a)return null;let s=e.store.getState().shapes;return u(a,i(s,r)).steps}function N(e,t,n,r){let i=M(e,t,n);if(!i)return!1;let a=r(i);return a===i?!1:(x(e,t,n,e=>({...e,steps:a})),!0)}function P(e,t,n){let r=e.store.getState().flowEdit;return r&&r.frameId===t&&r.flowId===n?r:null}function F(e,t,n,r){P(e,t,n)&&e.store.getState().patchFlowEdit(r)}function I(e,t,n,r){let i=M(e,t,n);if(!i)return;let a=P(e,t,n)??{},o=T(a,i.length),s=e.store.getState().shapes,l={target:r.id,title:c(s,r)};N(e,t,n,e=>h(e,o,l))&&F(e,t,n,k(a,o,i.length))}function L(e,t,n,r){let i=M(e,t,n);if(!i)return;let a=O(P(e,t,n)??{},i.length);a!==null&&(N(e,t,n,e=>y(e,a,r.id)),F(e,t,n,{selected:a}))}function R(e,t,n,r,i){let a=M(e,t,n),o=a?.[r];if(!a||!o){F(e,t,n,{picking:null});return}let s=e.store.getState().shapes,l=s.find(e=>e.id===o.target),u=l&&o.title===c(s,l)?c(s,i):void 0;N(e,t,n,e=>v(e,r,i.id,u)),F(e,t,n,{picking:null,selected:r})}function z(e,t,n,r){let i=P(e,t,n);N(e,t,n,e=>_(e,r))&&i&&F(e,t,n,A(i,r))}function B(e,t,n,r,i){let a=P(e,t,n);N(e,t,n,e=>g(e,r,i))&&a&&F(e,t,n,j(a,r,i))}function V(e,t,n,r,i){N(e,t,n,e=>e.map((e,t)=>t===r?H({...e,...i}):e))}function H(e){let t={...e};return t.text||delete t.text,(!t.kind||t.kind===`call`)&&delete t.kind,t.payload||delete t.payload,t.also?.length||delete t.also,t.branches?.length||delete t.branches,t.fails||delete t.fails,t}function U(e,t,n){let r=new Map;return t.forEach((i,a)=>{let o=a===0?n:t[a-1];if(!o)return;let c=p(e,s(o),s(i));c&&r.set(a,c)}),r}function W(e,t){return e.ends.map(e=>t.get(e.shapeId)??`the box`).join(` and `)}function G(t,n){let r=t.store.getState(),i=r.shapes.find(e=>e.id===n.arrow.id);if(i?.type!==`arrow`)return;let a={};for(let t of n.ends){let n=r.shapes.find(e=>e.id===t.shapeId);n&&(t.end===`start`?a.startBinding=e(n,{x:i.x,y:i.y}):a.endBinding=e(n,{x:i.x2,y:i.y2}))}Object.keys(a).length>0&&r.updateShape(i.id,a)}function K(e){let t=new Map,n=new Map,r=[];for(let i of e){let a=l(e,i.id);a?(t.set(a.flow.id,[...t.get(a.flow.id)??[],i]),n.set(i.id,{flowId:a.flow.id,index:a.index})):r.push(i)}let i=[],a=new Set,o=(e,r)=>{if(!a.has(e.id)){a.add(e.id),i.push({flow:e,depth:r,origin:r>0?n.get(e.id)??null:null});for(let n of t.get(e.id)??[])o(n,r+1)}};return r.forEach(e=>o(e,0)),e.forEach(e=>o(e,0)),i}function q(e){return K(e).filter(e=>e.depth===0).map(e=>e.flow)}export{C as _,U as a,d as b,L as c,R as d,E as f,S as g,T as h,W as i,B as l,D as m,q as n,I as o,O as p,G as r,V as s,K as t,z as u,w as v,x as y};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t}from"./jsx-runtime-2Zwg-L3c.js";import{t as n}from"./createReactComponent-9UsI5fmM.js";var r=n(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),i=n(`outline`,`row-insert-bottom`,`RowInsertBottom`,[[`path`,{d:`M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1`,key:`svg-0`}],[`path`,{d:`M12 15l0 4`,key:`svg-1`}],[`path`,{d:`M14 17l-4 0`,key:`svg-2`}]]),a=n(`outline`,`row-insert-top`,`RowInsertTop`,[[`path`,{d:`M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1`,key:`svg-0`}],[`path`,{d:`M12 9v-4`,key:`svg-1`}],[`path`,{d:`M10 7l4 0`,key:`svg-2`}]]),o=e(t(),1),s=5,c=48,l=16;function u(e,t,n){let r=e[0]-e[t],i=e[e.length-1]-e[t];return Math.max(r,Math.min(i,n))}function d(e,t,n){let r=e[t]+n;if(r<=e[0])return 0;for(let t=0;t<e.length;t+=1)if(r<e[t])return t;return e.length}function f(e,t){return e.gap===null?0:t<e.index&&e.gap<=t?e.lift:t>e.index&&e.gap>t?-e.lift:0}function p(e){let{count:t,gap:n,disabled:r,onReorder:i,onPress:a,canDrag:p}=e,[m,h]=(0,o.useState)(null),g=(0,o.useRef)(null),_=(0,o.useRef)([]),v=(0,o.useRef)(0);(0,o.useEffect)(()=>{if(!m?.dragging)return;let e=0,t=()=>{e=requestAnimationFrame(t);let n=g.current;if(!n)return;let r=n.getBoundingClientRect(),i=v.current,a=0;if(i<r.top+c?a=-Math.min(l,Math.ceil((r.top+c-i)/4)):i>r.bottom-c&&(a=Math.min(l,Math.ceil((i-(r.bottom-c))/4))),a===0)return;let o=n.scrollTop;n.scrollTop=o+a,n.scrollTop!==o&&h(e=>{if(!e?.dragging)return e;let t=v.current-e.startY+(n.scrollTop-e.startScroll),r=u(e.homes,e.index,t);return{...e,dy:r,gap:d(e.homes,e.index,r)}})};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[m?.dragging]);let y=(0,o.useCallback)(e=>t=>{_.current[e]=t},[]);function b(e,r){if(e.button!==0||p?.(r)===!1)return;let i=g.current;if(!i)return;e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),v.current=e.clientY;let a=i.getBoundingClientRect().top-i.scrollTop,o=_.current.slice(0,t).map(e=>{if(!e)return 1/0;let t=e.getBoundingClientRect();return t.top-a+t.height/2}),s=_.current[r]?.getBoundingClientRect().height??0;h({index:r,startY:e.clientY,startScroll:i.scrollTop,dy:0,dragging:!1,gap:null,homes:o,lift:s+n})}function x(e){if(!m)return;v.current=e.clientY;let t=g.current?.scrollTop??m.startScroll,n=e.clientY-m.startY+(t-m.startScroll),i=!r&&(m.dragging||Math.abs(n)>s),a=u(m.homes,m.index,n);h({...m,dy:a,dragging:i,gap:i?d(m.homes,m.index,a):null})}function S(e){if(!m)return;let{index:t,dragging:n,gap:r}=m;if(h(null),!n){a?.(t);return}if(r===null)return;let o=r>t?r-1:r;o!==t&&(e.stopPropagation(),i(t,o))}function C(e){return{onPointerDown:t=>b(t,e),onPointerMove:x,onPointerUp:S,onPointerCancel:()=>h(null)}}function w(e){if(m?.dragging&&m.index===e)return{transform:`translateY(${m.dy}px)`,zIndex:10,opacity:.7};if(m?.dragging)return{transform:`translateY(${f(m,e)}px)`,transition:`transform 150ms ease`}}return{listRef:g,setItemRef:y,rowHandlers:C,rowStyle:w,dragging:!!m?.dragging,cancel:()=>h(null)}}export{r as i,a as n,i as r,p as t};