@gridui/motion 0.0.0-stage → 1.0.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 (40) hide show
  1. package/README.md +257 -2
  2. package/dist/chunk-MMMTUJVS.js +106 -0
  3. package/dist/chunk-MMMTUJVS.js.map +7 -0
  4. package/dist/index.d.ts +25 -0
  5. package/dist/index.js +682 -0
  6. package/dist/index.js.map +7 -0
  7. package/dist/layout-motion/layout-motion.d.ts +20 -0
  8. package/dist/motion-config/context.d.ts +2 -0
  9. package/dist/motion-config/motion-config.d.ts +2 -0
  10. package/dist/motion-config/types.d.ts +27 -0
  11. package/dist/motion-config/validate-transition.d.ts +2 -0
  12. package/dist/motion-layout-group/context.d.ts +1 -0
  13. package/dist/motion-layout-group/motion-layout-group.d.ts +6 -0
  14. package/dist/motion-reveal/motion-reveal.d.ts +9 -0
  15. package/dist/motion-scope/motion-scope.d.ts +6 -0
  16. package/dist/motion-sequence/controller.d.ts +37 -0
  17. package/dist/motion-sequence/use-motion-sequence.d.ts +4 -0
  18. package/dist/motion-size/motion-size.d.ts +8 -0
  19. package/dist/policy.d.ts +4 -0
  20. package/dist/policy.js +15 -0
  21. package/dist/policy.js.map +7 -0
  22. package/dist/presence/presence.d.ts +9 -0
  23. package/dist/shared/dom-policy.d.ts +13 -0
  24. package/dist/shared/outcome.d.ts +1 -0
  25. package/dist/shared/resolve-transition.d.ts +9 -0
  26. package/dist/shared/state.d.ts +6 -0
  27. package/dist/shared/use-motion-policy.d.ts +10 -0
  28. package/dist/shared/use-motion-style.d.ts +3 -0
  29. package/dist/spring-value/controller.d.ts +26 -0
  30. package/dist/spring-value/use-spring-value.d.ts +3 -0
  31. package/docs/catalog.json +233 -0
  32. package/docs/reference/README.md +10 -0
  33. package/docs/reference/layout-motion.md +116 -0
  34. package/docs/reference/motion-config.md +46 -0
  35. package/docs/reference/motion-layout-group.md +24 -0
  36. package/docs/reference/motion-reveal.md +110 -0
  37. package/docs/reference/motion-scope.md +60 -0
  38. package/docs/reference/motion-size.md +64 -0
  39. package/docs/reference/presence.md +42 -0
  40. package/package.json +50 -3
@@ -0,0 +1,10 @@
1
+ <!-- Generated by pnpm docs:storybook. -->
2
+ # Component reference
3
+
4
+ - [LayoutMotion](layout-motion.md)
5
+ - [MotionConfig](motion-config.md)
6
+ - [MotionLayoutGroup](motion-layout-group.md)
7
+ - [MotionReveal](motion-reveal.md)
8
+ - [MotionScope](motion-scope.md)
9
+ - [MotionSize](motion-size.md)
10
+ - [Presence](presence.md)
@@ -0,0 +1,116 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # LayoutMotion
3
+
4
+ Public LayoutMotion component from @gridui/motion. See the package guide for its composition contract.
5
+
6
+ Import from ``@gridui/motion`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { LayoutMotion } from "@gridui/motion";
10
+ import "@gridui/theme/styles.css";
11
+ ```
12
+
13
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/motion/README.md) for shared behavior and stylesheet dependencies.
14
+
15
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/storybook/scenarios/motion/layout-motion.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+
17
+ ## API
18
+
19
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
20
+
21
+ ### children
22
+
23
+ ``ReactNode`` · Optional
24
+
25
+ Content rendered inside the component.
26
+
27
+ ### onFocus
28
+
29
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
30
+
31
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
32
+
33
+ ### onBlur
34
+
35
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
36
+
37
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
38
+
39
+ ### onChange
40
+
41
+ ``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
42
+
43
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
44
+
45
+ ### onSubmit
46
+
47
+ ``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
48
+
49
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
50
+
51
+ ### onClick
52
+
53
+ ``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
54
+
55
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
56
+
57
+ ### style
58
+
59
+ ``Omit<CSSProperties, "translate" | "opacity" | "rotate" | "scale" | "transform"> | undefined`` · Optional
60
+
61
+ ### layout
62
+
63
+ ``boolean | "size" | "position" | undefined`` · Optional
64
+
65
+ Default: ``true``
66
+
67
+ Layout within the containing region.
68
+
69
+ ### layoutId
70
+
71
+ ``string | undefined`` · Optional
72
+
73
+ ### layoutScroll
74
+
75
+ ``boolean | undefined`` · Optional
76
+
77
+ Mark the scrolling element used by descendant layout measurements.
78
+
79
+ ### layoutRoot
80
+
81
+ ``boolean | undefined`` · Optional
82
+
83
+ Mark a fixed-position root used by descendant layout measurements.
84
+
85
+ ### enter
86
+
87
+ ``MotionState | undefined`` · Optional
88
+
89
+ ### animate
90
+
91
+ ``MotionState | undefined`` · Optional
92
+
93
+ ### exit
94
+
95
+ ``MotionState | undefined`` · Optional
96
+
97
+ ### transition
98
+
99
+ ``MotionTransition | undefined`` · Optional
100
+
101
+ ### exitTransition
102
+
103
+ ``MotionTransition | undefined`` · Optional
104
+
105
+ ### onAnimationComplete
106
+
107
+ ``(): void`` · Optional
108
+
109
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
110
+
111
+ ### onLayoutAnimationComplete
112
+
113
+ ``(): void`` · Optional
114
+
115
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
116
+
@@ -0,0 +1,46 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # MotionConfig
3
+
4
+ Public MotionConfig component from @gridui/motion. See the package guide for its composition contract.
5
+
6
+ Import from ``@gridui/motion`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { MotionConfig } from "@gridui/motion";
10
+ import "@gridui/theme/styles.css";
11
+ ```
12
+
13
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/motion/README.md) for shared behavior and stylesheet dependencies.
14
+
15
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/storybook/scenarios/motion/layout-motion.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+
17
+ ## API
18
+
19
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
20
+
21
+ ### children
22
+
23
+ ``ReactNode`` · Required
24
+
25
+ Content rendered inside the component.
26
+
27
+ ### tempo
28
+
29
+ ``number | undefined`` · Optional
30
+
31
+ Absolute pace in this scope: 0.8 is faster, 1.2 is slower.
32
+
33
+ ### reducedMotion
34
+
35
+ ``"always" | "user" | undefined`` · Optional
36
+
37
+ ### disabled
38
+
39
+ ``boolean | undefined`` · Optional
40
+
41
+ Prevents interaction when enabled.
42
+
43
+ ### transition
44
+
45
+ ``MotionTransition | undefined`` · Optional
46
+
@@ -0,0 +1,24 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # MotionLayoutGroup
3
+
4
+ Public MotionLayoutGroup component from @gridui/motion. See the package guide for its composition contract.
5
+
6
+ Import from ``@gridui/motion`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { MotionLayoutGroup } from "@gridui/motion";
10
+ import "@gridui/theme/styles.css";
11
+ ```
12
+
13
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/motion/README.md) for shared behavior and stylesheet dependencies.
14
+
15
+ ## API
16
+
17
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
18
+
19
+ ### children
20
+
21
+ ``ReactNode`` · Required
22
+
23
+ Content rendered inside the component.
24
+
@@ -0,0 +1,110 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # MotionReveal
3
+
4
+ Public MotionReveal component from @gridui/motion. See the package guide for its composition contract.
5
+
6
+ Import from ``@gridui/motion`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { MotionReveal } from "@gridui/motion";
10
+ import "@gridui/theme/styles.css";
11
+ ```
12
+
13
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/motion/README.md) for shared behavior and stylesheet dependencies.
14
+
15
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/motion/stories/motion.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+
17
+ ## API
18
+
19
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
20
+
21
+ ### style
22
+
23
+ ``Omit<CSSProperties, "translate" | "opacity" | "rotate" | "scale" | "transform"> | undefined`` · Optional
24
+
25
+ ### children
26
+
27
+ ``ReactNode`` · Optional
28
+
29
+ Content rendered inside the component.
30
+
31
+ ### enter
32
+
33
+ ``MotionState | undefined`` · Optional
34
+
35
+ Default: ``{ opacity: 0, y: 12 }``
36
+
37
+ ### onFocus
38
+
39
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
40
+
41
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
42
+
43
+ ### onBlur
44
+
45
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
46
+
47
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
48
+
49
+ ### onChange
50
+
51
+ ``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
52
+
53
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
54
+
55
+ ### onSubmit
56
+
57
+ ``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
58
+
59
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
60
+
61
+ ### onClick
62
+
63
+ ``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
64
+
65
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
66
+
67
+ ### transition
68
+
69
+ ``MotionTransition | undefined`` · Optional
70
+
71
+ ### exitTransition
72
+
73
+ ``MotionTransition | undefined`` · Optional
74
+
75
+ ### onAnimationComplete
76
+
77
+ ``(): void`` · Optional
78
+
79
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
80
+
81
+ ### onLayoutAnimationComplete
82
+
83
+ ``(): void`` · Optional
84
+
85
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
86
+
87
+ ### once
88
+
89
+ ``boolean | undefined`` · Optional
90
+
91
+ Default: ``true``
92
+
93
+ ### amount
94
+
95
+ ``number | undefined`` · Optional
96
+
97
+ Default: ``0``
98
+
99
+ ### root
100
+
101
+ ``Element | null | undefined`` · Optional
102
+
103
+ Default: ``null``
104
+
105
+ ### rootMargin
106
+
107
+ ``string | undefined`` · Optional
108
+
109
+ Default: ``"0px"``
110
+
@@ -0,0 +1,60 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # MotionScope
3
+
4
+ Public MotionScope component from @gridui/motion. See the package guide for its composition contract.
5
+
6
+ Import from ``@gridui/motion`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { MotionScope } from "@gridui/motion";
10
+ import "@gridui/theme/styles.css";
11
+ ```
12
+
13
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/motion/README.md) for shared behavior and stylesheet dependencies.
14
+
15
+ ## API
16
+
17
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
18
+
19
+ ### children
20
+
21
+ ``ReactNode`` · Optional
22
+
23
+ Content rendered inside the component.
24
+
25
+ ### onFocus
26
+
27
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
28
+
29
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
30
+
31
+ ### onBlur
32
+
33
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
34
+
35
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
36
+
37
+ ### onChange
38
+
39
+ ``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
40
+
41
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
42
+
43
+ ### onSubmit
44
+
45
+ ``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
46
+
47
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
48
+
49
+ ### onClick
50
+
51
+ ``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
52
+
53
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
54
+
55
+ ### asChild
56
+
57
+ ``boolean | undefined`` · Optional
58
+
59
+ Default: ``false``
60
+
@@ -0,0 +1,64 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # MotionSize
3
+
4
+ Compose MotionSize with Tabs inside the same @gridui/motion component family.
5
+
6
+ Import from ``@gridui/motion`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { MotionSize } from "@gridui/motion";
10
+ import "@gridui/theme/styles.css";
11
+ ```
12
+
13
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/motion/README.md) for shared behavior and stylesheet dependencies.
14
+
15
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/tabs/stories/tabs.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+
17
+ ## API
18
+
19
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
20
+
21
+ ### children
22
+
23
+ ``ReactNode`` · Optional
24
+
25
+ Content rendered inside the component.
26
+
27
+ ### onFocus
28
+
29
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
30
+
31
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
32
+
33
+ ### onBlur
34
+
35
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
36
+
37
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
38
+
39
+ ### onChange
40
+
41
+ ``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
42
+
43
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
44
+
45
+ ### onSubmit
46
+
47
+ ``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
48
+
49
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
50
+
51
+ ### onClick
52
+
53
+ ``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
54
+
55
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
56
+
57
+ ### style
58
+
59
+ ``Omit<CSSProperties, "height" | "overflow" | "overflowY"> | undefined`` · Optional
60
+
61
+ ### spring
62
+
63
+ ``SpringValueOptions | undefined`` · Optional
64
+
@@ -0,0 +1,42 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # Presence
3
+
4
+ Public Presence component from @gridui/motion. See the package guide for its composition contract.
5
+
6
+ Import from ``@gridui/motion`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { Presence } from "@gridui/motion";
10
+ import "@gridui/theme/styles.css";
11
+ ```
12
+
13
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/motion/README.md) for shared behavior and stylesheet dependencies.
14
+
15
+ ## API
16
+
17
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
18
+
19
+ ### children
20
+
21
+ ``ReactNode`` · Required
22
+
23
+ Content rendered inside the component.
24
+
25
+ ### mode
26
+
27
+ ``"sync" | "wait" | "popLayout" | undefined`` · Optional
28
+
29
+ Default: ``"sync"``
30
+
31
+ ### initial
32
+
33
+ ``boolean | undefined`` · Optional
34
+
35
+ Default: ``false``
36
+
37
+ ### onExitComplete
38
+
39
+ ``(): void`` · Optional
40
+
41
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
42
+
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "@gridui/motion",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "Shared GridUI motion policy, layout, springs, and scoped animation",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "files": [
8
+ "dist",
9
+ "README.md",
10
+ "docs"
11
+ ],
12
+ "sideEffects": false,
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ },
18
+ "./policy": {
19
+ "types": "./dist/policy.d.ts",
20
+ "import": "./dist/policy.js"
21
+ }
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "dependencies": {
27
+ "@gridui/theme": "^3.0.0",
28
+ "motion": "14.13.0",
29
+ "@radix-ui/react-slot": "1.5.0"
30
+ },
31
+ "devDependencies": {
32
+ "@gridui-internal/configuration": "0.0.0-internal",
33
+ "@jest/globals": "30.5.2",
34
+ "@storybook/react-vite": "10.6.7",
35
+ "@types/jest": "30.0.0",
36
+ "@types/node": "26.6.6",
37
+ "@types/react": "19.3.0",
38
+ "@types/react-dom": "19.3.0",
39
+ "jest": "30.5.2",
40
+ "react": "19.3.1",
41
+ "react-dom": "19.3.1",
42
+ "typescript": "6.0.3"
43
+ },
44
+ "peerDependencies": {
45
+ "react": "^19.2.0",
46
+ "react-dom": "^19.2.0"
47
+ },
48
+ "scripts": {
49
+ "build": "node ../../scripts/compilation/package.ts",
50
+ "compile": "tsc --project tsconfig.json",
51
+ "test": "jest"
52
+ }
6
53
  }