Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

docs(core): a "Motion & gestures" hook category for the motion hooks (#10076)

Cindy Zhangd6c1f340bd68
diff --git a/.changeset/hook-category-motion-gestures.md b/.changeset/hook-category-motion-gestures.md
new file mode 100644
index 0000000000..008ef7693b
--- /dev/null
+++ b/.changeset/hook-category-motion-gestures.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[docs] `astryx hook --list` groups the motion hooks under one category, "Motion & gestures": `useAnimatedLayout`, `useAnimator`, `useEntryAnimation`, `usePanGesture` and `usePressFeedback`; the docs of `createAnimator` and `createPanGesture` carry the same category. The "Animation" group goes away. `useLongPress`, `useMenuPress` and the other interaction hooks stay under "Interaction".
+
+@cixzhang
diff --git a/packages/core/src/animator/createAnimator.doc.mjs b/packages/core/src/animator/createAnimator.doc.mjs
index 47c2bc05a3..e3cdf379b3 100644
--- a/packages/core/src/animator/createAnimator.doc.mjs
+++ b/packages/core/src/animator/createAnimator.doc.mjs
@@ -115,7 +115,7 @@ export const docs = {
},
relatedHooks: ['useAnimator', 'useAnimatedLayout'],
importPath: '@astryxdesign/core',
- category: 'interaction',
+ category: 'motion & gestures',
};
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
diff --git a/packages/core/src/gestures/createPanGesture.doc.mjs b/packages/core/src/gestures/createPanGesture.doc.mjs
index f233f593a1..ecd0631568 100644
--- a/packages/core/src/gestures/createPanGesture.doc.mjs
+++ b/packages/core/src/gestures/createPanGesture.doc.mjs
@@ -100,7 +100,7 @@ export const docs = {
},
relatedHooks: ['usePanGesture'],
importPath: '@astryxdesign/core',
- category: 'interaction',
+ category: 'motion & gestures',
};
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
diff --git a/packages/core/src/hooks/useAnimatedLayout.doc.mjs b/packages/core/src/hooks/useAnimatedLayout.doc.mjs
index 1ba0f81e02..2537efdb71 100644
--- a/packages/core/src/hooks/useAnimatedLayout.doc.mjs
+++ b/packages/core/src/hooks/useAnimatedLayout.doc.mjs
@@ -61,7 +61,7 @@ export const docs = {
},
relatedComponents: ['TreeList', 'Collapsible', 'ScrollableArea'],
importPath: '@astryxdesign/core/hooks',
- category: 'animation',
+ category: 'motion & gestures',
};
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
diff --git a/packages/core/src/hooks/useAnimator.doc.mjs b/packages/core/src/hooks/useAnimator.doc.mjs
index 591fcfd252..8b88a481e8 100644
--- a/packages/core/src/hooks/useAnimator.doc.mjs
+++ b/packages/core/src/hooks/useAnimator.doc.mjs
@@ -78,7 +78,7 @@ export const docs = {
},
relatedHooks: ['useAnimatedLayout'],
importPath: '@astryxdesign/core/hooks',
- category: 'interaction',
+ category: 'motion & gestures',
};
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
diff --git a/packages/core/src/hooks/useEntryAnimation.doc.mjs b/packages/core/src/hooks/useEntryAnimation.doc.mjs
index 832ddc9453..2fb13bffff 100644
--- a/packages/core/src/hooks/useEntryAnimation.doc.mjs
+++ b/packages/core/src/hooks/useEntryAnimation.doc.mjs
@@ -33,7 +33,7 @@ export const docs = {
relatedComponents: ['FieldStatus'],
relatedHooks: [],
importPath: '@astryxdesign/core/hooks',
- category: 'animation',
+ category: 'motion & gestures',
};
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
diff --git a/packages/core/src/hooks/usePanGesture.doc.mjs b/packages/core/src/hooks/usePanGesture.doc.mjs
index 41c27e4012..bfafc63df5 100644
--- a/packages/core/src/hooks/usePanGesture.doc.mjs
+++ b/packages/core/src/hooks/usePanGesture.doc.mjs
@@ -108,7 +108,7 @@ export const docs = {
relatedComponents: ['BottomSheet', 'Carousel'],
relatedHooks: ['useLongPress', 'createPanGesture'],
importPath: '@astryxdesign/core/hooks',
- category: 'interaction',
+ category: 'motion & gestures',
};
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
diff --git a/packages/core/src/hooks/usePressFeedback.doc.mjs b/packages/core/src/hooks/usePressFeedback.doc.mjs
index b749480c2a..a43ebb0f8f 100644
--- a/packages/core/src/hooks/usePressFeedback.doc.mjs
+++ b/packages/core/src/hooks/usePressFeedback.doc.mjs
@@ -52,7 +52,7 @@ export const docs = {
relatedComponents: ['Button', 'Item', 'ClickableCard'],
relatedHooks: ['useLongPress'],
importPath: '@astryxdesign/core/hooks',
- category: 'interaction',
+ category: 'motion & gestures',
};
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */