@kyralabs/m3e-motion 1.3.0 → 1.5.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.
package/NOTICE CHANGED
@@ -16,17 +16,36 @@ Copyright (C) The Android Open Source Project
16
16
  Licensed under the Apache License, Version 2.0
17
17
 
18
18
  --------------------------------------------------------------------------------
19
- AndroidX Compose Animation (animation-core: spring simulation and duration estimate)
19
+ AndroidX Compose Animation (animation-core: spring simulation and duration estimate, exponential decay)
20
20
  https://android.googlesource.com/platform/frameworks/support/+/19991f2c0858aadfcb442ce02b2c8e4743c96898/compose/animation/animation-core/
21
21
  Copyright (C) The Android Open Source Project
22
22
  Licensed under the Apache License, Version 2.0
23
23
 
24
+ --------------------------------------------------------------------------------
25
+ AndroidX Compose Foundation (anchoredDraggable: the settle target and decay / tween choice)
26
+ https://android.googlesource.com/platform/frameworks/support/+/19991f2c0858aadfcb442ce02b2c8e4743c96898/compose/foundation/foundation/
27
+ Copyright (C) The Android Open Source Project
28
+ Licensed under the Apache License, Version 2.0
29
+
24
30
  --------------------------------------------------------------------------------
25
31
  AndroidX Compose UI Graphics (Matrix: the subset MaterialShapes uses)
26
32
  https://android.googlesource.com/platform/frameworks/support/+/19991f2c0858aadfcb442ce02b2c8e4743c96898/compose/ui/ui-graphics/
27
33
  Copyright (C) The Android Open Source Project
28
34
  Licensed under the Apache License, Version 2.0
29
35
 
36
+ --------------------------------------------------------------------------------
37
+ AndroidX Compose Material3 Adaptive (window size class sets, pane scaffold directive, navigation suite type)
38
+ https://android.googlesource.com/platform/frameworks/support/+/19991f2c0858aadfcb442ce02b2c8e4743c96898/compose/material3/adaptive/
39
+ https://android.googlesource.com/platform/frameworks/support/+/19991f2c0858aadfcb442ce02b2c8e4743c96898/compose/material3/material3-adaptive-navigation-suite/
40
+ Copyright (C) The Android Open Source Project
41
+ Licensed under the Apache License, Version 2.0
42
+
43
+ --------------------------------------------------------------------------------
44
+ AndroidX WindowManager (window-core 1.5.0: WindowSizeClass breakpoints)
45
+ https://android.googlesource.com/platform/frameworks/support/+/19991f2c0858aadfcb442ce02b2c8e4743c96898/window/window-core/
46
+ Copyright (C) The Android Open Source Project
47
+ Licensed under the Apache License, Version 2.0
48
+
30
49
  --------------------------------------------------------------------------------
31
50
  AndroidX graphics-shapes (androidx.graphics:graphics-shapes 1.0.1, sources jar)
32
51
  https://dl.google.com/android/maven2/androidx/graphics/graphics-shapes/1.0.1/graphics-shapes-1.0.1-sources.jar
package/README.md CHANGED
@@ -19,4 +19,39 @@ springDurationMillis(spec, 0, 1); // settle time in ms
19
19
  springToLinear(spec); // CSS linear() easing plus its duration
20
20
  ```
21
21
 
22
+ Window size classes (ports of androidx window-core `WindowSizeClass` and Compose Material3
23
+ adaptive; sizes in CSS px):
24
+
25
+ ```ts
26
+ import {
27
+ isWidthAtLeastBreakpoint,
28
+ navigationSuiteType,
29
+ paneScaffoldDirective,
30
+ windowSizeClass,
31
+ } from '@kyralabs/m3e-motion';
32
+
33
+ const sizeClass = windowSizeClass({ width: 1280, height: 800 });
34
+ // { widthClass: 'large', heightClass: 'medium', minWidth: 1200, minHeight: 480 }
35
+ isWidthAtLeastBreakpoint(sizeClass, 'expanded'); // true
36
+ paneScaffoldDirective(sizeClass).maxHorizontalPartitions; // 3 (calculatePaneScaffoldDirective)
37
+ navigationSuiteType(sizeClass); // 'wide-navigation-rail-collapsed' (Compose's default rule)
38
+ navigationSuiteType(sizeClass, { expandedFrom: 'large' }); // 'wide-navigation-rail-expanded'
39
+ ```
40
+
41
+ `expandedFrom` (a width class or px bound) expands the collapsed rail from that width (the
42
+ navigation suite scaffold's default is `NAVIGATION_SUITE_EXPANDED_FROM`, `'large'`), to the expanded
43
+ rail or, with `expandedType: 'navigation-drawer'`, a drawer. `NavigationSuiteScaffoldAnimation`
44
+ ports Compose's `NavigationSuiteScaffoldState` show / hide with its layout progress.
45
+
46
+ `windowWidthSizeClass` / `windowHeightSizeClass` classify one axis; `{ largeAndExtraLargeWidth:
47
+ false }` keeps Compose's V1 width set (every width from 840 is `expanded`).
48
+
49
+ Three-pane scaffolds (ports of Compose Material3 adaptive `ThreePaneScaffold`, the list-detail and
50
+ supporting-pane scaffolds and their navigator): `calculateThreePaneScaffoldValue`,
51
+ `ThreePaneScaffoldNavigator` (`navigateTo`, `navigateBack` with the four back behaviors),
52
+ `threePaneScaffoldDirective` (m3.material.io's pane counts by default, two at large;
53
+ `paneRule: 'compose'` keeps Compose's three),
54
+ `threePaneScaffoldLayout` (pane bounds), `calculatePaneMotion` / `paneTransitions` /
55
+ `ThreePaneScaffoldAnimation` (pane motion) and the pane expansion anchors.
56
+
22
57
  Apache-2.0; see `LICENSE` and `NOTICE`.