@olddevs/ui 4.2.1 → 4.2.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @olddevs/ui
2
2
 
3
+ ## 4.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 13e5a7a: The "Where it comes from" section of the `MegaMenu` reference page shows the original animation of Amazon's triangle from Ben Kamens's post, served from the documentation site (ui.olddevs.ru) rather than a third-party host.
8
+
3
9
  ## 4.2.1
4
10
 
5
11
  ### Patch Changes
@@ -5,7 +5,7 @@ category: navigation
5
5
  status: stable
6
6
  source: src/components/navigation/MegaMenu.tsx
7
7
  story: src/components/navigation/MegaMenu.stories.tsx
8
- sourceHash: 731dae1c43c3
8
+ sourceHash: 4c7401326a3f
9
9
  ---
10
10
 
11
11
  # MegaMenu
@@ -177,6 +177,11 @@ triangle with corners at the pointer itself and at the top and bottom corners of
177
177
  inside the triangle, the user is heading for the submenu, and items brushed on the way don't take it over. Once the
178
178
  pointer leaves the triangle, the submenu switches immediately. Kamens published his analysis on 6 March 2013.
179
179
 
180
+ ![Amazon's menu: the triangle from the pointer to the top and bottom corners of the submenu](https://ui.olddevs.ru/images/mega-menu/amazon-triangle.gif)
181
+
182
+ _Animation from [Ben Kamens's post](https://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown), as
183
+ reproduced in the Habr retelling._
184
+
180
185
  **The plugin and the math.** Kamens turned the idea into a jQuery plugin, `jQuery-menu-aim`, and used it in Khan
181
186
  Academy's new "Learn" menu. Whether a point lies inside a triangle can be checked with cross products, and Sophie
182
187
  Alpert helped him with that bit of linear algebra, but in the plugin Kamens went with something simpler: comparing
@@ -166,6 +166,11 @@ import { MegaMenu, MegaMenuCategory, MegaMenuGroup, MegaMenuLink } from "@olddev
166
166
  внутри треугольника значит, что человек ведёт курсор к подменю, и пункты, задетые по пути, его не перехватывают.
167
167
  Курсор вышел из треугольника — подменю меняется сразу. Свой разбор Каменс опубликовал 6 марта 2013 года.
168
168
 
169
+ ![Меню Amazon: треугольник от курсора к верхнему и нижнему углам подменю](https://ui.olddevs.ru/images/mega-menu/amazon-triangle.gif)
170
+
171
+ _Анимация из [поста Бена Каменса](https://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown), в
172
+ пересказе на Хабре._
173
+
169
174
  **Плагин и математика.** По этому принципу Каменс написал jQuery-плагин `jQuery-menu-aim` и поставил его в
170
175
  новое меню «Learn» на Khan Academy. Попадание точки в треугольник проверяется векторным произведением — с этой
171
176
  линейной алгеброй ему помогла Софи Алперт, — но в плагине Каменс выбрал способ попроще: сравнение наклонов прямых.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olddevs/ui",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "Olddevs UI — design system: tokens, themes and accessible UI primitives",
5
5
  "license": "MIT",
6
6
  "private": false,