@syncedco/motion 0.1.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/CHANGELOG.md +106 -0
- package/CODE_OF_CONDUCT.md +26 -0
- package/CONTRIBUTING.md +100 -0
- package/LICENSE +22 -0
- package/README.md +278 -0
- package/SECURITY.md +36 -0
- package/SUPPORT.md +38 -0
- package/TRADEMARKS.md +14 -0
- package/bin/synced-motion.mjs +5 -0
- package/dist/astro.d.ts +15 -0
- package/dist/astro.js +51 -0
- package/dist/astro.js.map +1 -0
- package/dist/chunk-24KKECMK.js +281 -0
- package/dist/chunk-24KKECMK.js.map +1 -0
- package/dist/chunk-3WUVBPYX.js +162 -0
- package/dist/chunk-3WUVBPYX.js.map +1 -0
- package/dist/chunk-HCWQV65E.js +20 -0
- package/dist/chunk-HCWQV65E.js.map +1 -0
- package/dist/chunk-JET2MYEG.js +2287 -0
- package/dist/chunk-JET2MYEG.js.map +1 -0
- package/dist/chunk-KA3OPI4F.js +40 -0
- package/dist/chunk-KA3OPI4F.js.map +1 -0
- package/dist/chunk-ML7HTCZT.js +642 -0
- package/dist/chunk-ML7HTCZT.js.map +1 -0
- package/dist/chunk-NIXAEIHN.js +23 -0
- package/dist/chunk-NIXAEIHN.js.map +1 -0
- package/dist/chunk-VOIQPPQZ.js +299 -0
- package/dist/chunk-VOIQPPQZ.js.map +1 -0
- package/dist/chunk-WCG7TQSH.js +31 -0
- package/dist/chunk-WCG7TQSH.js.map +1 -0
- package/dist/cli.js +382 -0
- package/dist/cli.js.map +1 -0
- package/dist/full.d.ts +13 -0
- package/dist/full.js +201 -0
- package/dist/full.js.map +1 -0
- package/dist/index.d.ts +249 -0
- package/dist/index.js +183 -0
- package/dist/index.js.map +1 -0
- package/dist/lenis.d.ts +19 -0
- package/dist/lenis.js +7 -0
- package/dist/lenis.js.map +1 -0
- package/dist/mcp.d.ts +16 -0
- package/dist/mcp.js +82 -0
- package/dist/mcp.js.map +1 -0
- package/dist/plugins.d.ts +14 -0
- package/dist/plugins.js +17 -0
- package/dist/plugins.js.map +1 -0
- package/dist/react.d.ts +7 -0
- package/dist/react.js +32 -0
- package/dist/react.js.map +1 -0
- package/dist/recipes.d.ts +76 -0
- package/dist/recipes.js +129 -0
- package/dist/recipes.js.map +1 -0
- package/dist/styles.css +57 -0
- package/dist/styles.css.map +1 -0
- package/dist/svelte.d.ts +10 -0
- package/dist/svelte.js +30 -0
- package/dist/svelte.js.map +1 -0
- package/dist/vue.d.ts +13 -0
- package/dist/vue.js +35 -0
- package/dist/vue.js.map +1 -0
- package/dist/wordpress.d.ts +15 -0
- package/dist/wordpress.js +49 -0
- package/dist/wordpress.js.map +1 -0
- package/docs/API.md +176 -0
- package/docs/ATTRIBUTE-API.md +358 -0
- package/docs/CAPABILITIES.md +82 -0
- package/docs/INTEGRATIONS.md +92 -0
- package/docs/PERFORMANCE.md +150 -0
- package/docs/README.md +35 -0
- package/docs/RECIPE-REFERENCE.md +1358 -0
- package/docs/RECIPES.md +115 -0
- package/docs/TOOLING.md +65 -0
- package/docs/WEBFLOW-MIGRATION.md +39 -0
- package/package.json +167 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
export type MotionTriggerType = 'load' | 'viewport' | 'scroll' | 'hover' | 'focus' | 'pointer' | 'click' | 'route' | 'state'
|
|
2
|
+
export type MotionPerformanceClass = 'low' | 'medium' | 'high'
|
|
3
|
+
|
|
4
|
+
export interface MotionRecipeSlot {
|
|
5
|
+
name: string
|
|
6
|
+
selector?: string
|
|
7
|
+
required?: boolean
|
|
8
|
+
multiple?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface MotionRecipeParameter {
|
|
12
|
+
type: 'boolean' | 'number' | 'string' | 'enum'
|
|
13
|
+
default: unknown
|
|
14
|
+
min?: number
|
|
15
|
+
max?: number
|
|
16
|
+
values?: unknown[]
|
|
17
|
+
description?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface MotionRecipeContext {
|
|
21
|
+
gsap: unknown
|
|
22
|
+
ScrollTrigger: unknown
|
|
23
|
+
/** Present only when supplied through `dependencies`. */
|
|
24
|
+
SplitText?: unknown
|
|
25
|
+
Flip?: unknown
|
|
26
|
+
DrawSVGPlugin?: unknown
|
|
27
|
+
MorphSVGPlugin?: unknown
|
|
28
|
+
MotionPathPlugin?: unknown
|
|
29
|
+
root: Element
|
|
30
|
+
scope: Element
|
|
31
|
+
slots: Record<string, Element[]>
|
|
32
|
+
parameters: Record<string, unknown>
|
|
33
|
+
reduced: boolean
|
|
34
|
+
debug: boolean
|
|
35
|
+
recipe: MotionRecipe
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface MotionRecipe {
|
|
39
|
+
schemaVersion: '1'
|
|
40
|
+
id: string
|
|
41
|
+
version: string
|
|
42
|
+
title: string
|
|
43
|
+
description: string
|
|
44
|
+
intent: string
|
|
45
|
+
family: string
|
|
46
|
+
tags: string[]
|
|
47
|
+
root: { selector: string }
|
|
48
|
+
slots: MotionRecipeSlot[]
|
|
49
|
+
parameters: Record<string, MotionRecipeParameter>
|
|
50
|
+
triggers: Array<{ type: MotionTriggerType; [key: string]: unknown }>
|
|
51
|
+
timeline?: { steps: Array<Record<string, unknown>> }
|
|
52
|
+
responsive?: Record<string, unknown>
|
|
53
|
+
reducedMotion: { strategy: 'skip' | 'final' | 'custom'; [key: string]: unknown }
|
|
54
|
+
noJs: { behavior: string; [key: string]: unknown }
|
|
55
|
+
accessibility: { notes: string; [key: string]: unknown }
|
|
56
|
+
performance: { class: MotionPerformanceClass; allowLayout?: boolean; [key: string]: unknown }
|
|
57
|
+
dependencies: string[]
|
|
58
|
+
preview: {
|
|
59
|
+
fixture: string
|
|
60
|
+
viewport?: 'compact' | 'standard' | 'wide' | 'scroll'
|
|
61
|
+
activation?: 'auto' | 'manual'
|
|
62
|
+
[key: string]: unknown
|
|
63
|
+
}
|
|
64
|
+
fixtures: MotionRecipeFixture[]
|
|
65
|
+
setup?(context: MotionRecipeContext): void | false | (() => void) | { destroy(): void }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface MotionRecipeFixture {
|
|
69
|
+
id: string
|
|
70
|
+
label: string
|
|
71
|
+
markup: string
|
|
72
|
+
instructions?: string
|
|
73
|
+
parameters?: Record<string, unknown>
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A recipe with only the fields the browser runtime reads. Authoring metadata
|
|
78
|
+
* (title, description, intent, family, tags, accessibility, noJs, preview,
|
|
79
|
+
* fixtures) is omitted so it never reaches a page bundle.
|
|
80
|
+
*/
|
|
81
|
+
export type MotionRuntimeRecipe =
|
|
82
|
+
Omit<MotionRecipe, 'title' | 'description' | 'intent' | 'family' | 'tags' | 'accessibility' | 'noJs' | 'preview' | 'fixtures'>
|
|
83
|
+
|
|
84
|
+
export type MotionRegistryMode = 'complete' | 'runtime'
|
|
85
|
+
|
|
86
|
+
export interface MotionRegistryOptions {
|
|
87
|
+
/** `runtime` accepts lean specs; `complete` (default) requires full manifests. */
|
|
88
|
+
mode?: MotionRegistryMode
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface MotionRegistry {
|
|
92
|
+
mode: MotionRegistryMode
|
|
93
|
+
register(recipe: MotionRecipe | MotionRuntimeRecipe): MotionRecipe
|
|
94
|
+
has(id: string): boolean
|
|
95
|
+
get(id: string): MotionRecipe | undefined
|
|
96
|
+
list(): MotionRecipe[]
|
|
97
|
+
resolve(ids?: string[]): MotionRecipe[]
|
|
98
|
+
catalog(): { schemaVersion: '1'; count: number; recipes: Array<Record<string, unknown>> }
|
|
99
|
+
validate(): { ok: boolean; issues: Array<Record<string, unknown>> }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface MotionRuntimeOptions {
|
|
103
|
+
root?: Document | Element
|
|
104
|
+
recipes?: MotionRecipe[]
|
|
105
|
+
registry?: MotionRegistry
|
|
106
|
+
debug?: boolean
|
|
107
|
+
strict?: boolean
|
|
108
|
+
autoMount?: boolean
|
|
109
|
+
reducedMotionQuery?: string
|
|
110
|
+
reducedMotion?: 'system' | 'reduce'
|
|
111
|
+
parameterOverrides?: Record<string, Record<string, unknown>>
|
|
112
|
+
dependencies?: { gsap?: unknown; ScrollTrigger?: unknown; SplitText?: unknown; Flip?: unknown; DrawSVGPlugin?: unknown; MorphSVGPlugin?: unknown; MotionPathPlugin?: unknown }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface MotionRuntime {
|
|
116
|
+
gsap: unknown
|
|
117
|
+
ScrollTrigger: unknown
|
|
118
|
+
registry: MotionRegistry
|
|
119
|
+
mount(): MotionRuntime
|
|
120
|
+
mountRecipe(id: string, root?: Element, parameters?: Record<string, unknown>): string[]
|
|
121
|
+
refresh(): void
|
|
122
|
+
inspect(): Record<string, unknown>
|
|
123
|
+
destroy(): void
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface SyncedMotionOptions {
|
|
127
|
+
root?: Document | Element
|
|
128
|
+
debug?: boolean
|
|
129
|
+
smoothScroll?: boolean | Record<string, unknown>
|
|
130
|
+
revealStart?: string
|
|
131
|
+
reducedMotionQuery?: string
|
|
132
|
+
reducedMotion?: 'system' | 'reduce'
|
|
133
|
+
parameterOverrides?: Record<string, Record<string, unknown>>
|
|
134
|
+
dependencies?: MotionRuntimeOptions['dependencies']
|
|
135
|
+
strict?: boolean
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface SyncedMotionInstance {
|
|
139
|
+
gsap: unknown
|
|
140
|
+
ScrollTrigger: unknown
|
|
141
|
+
smoothScroll?: unknown
|
|
142
|
+
registry: MotionRegistry
|
|
143
|
+
inspect(): Record<string, unknown>
|
|
144
|
+
mountRecipe(id: string, root?: Element, parameters?: Record<string, unknown>): string[]
|
|
145
|
+
refresh(): void
|
|
146
|
+
destroy(): void
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export declare const MOTION_RECIPE_SCHEMA_VERSION: '1'
|
|
150
|
+
export declare const MOTION_TRIGGER_TYPES: readonly MotionTriggerType[]
|
|
151
|
+
export declare class MotionRecipeValidationError extends TypeError {
|
|
152
|
+
issues: string[]
|
|
153
|
+
recipeId: string
|
|
154
|
+
}
|
|
155
|
+
export declare function defineMotionRecipe(recipe: MotionRecipe, options?: MotionRegistryOptions): Readonly<MotionRecipe>
|
|
156
|
+
export declare function validateMotionRecipe(recipe: unknown, options?: MotionRegistryOptions): { ok: boolean; issues: string[] }
|
|
157
|
+
export declare function createMotionRegistry(
|
|
158
|
+
recipes?: Array<MotionRecipe | MotionRuntimeRecipe>,
|
|
159
|
+
options?: MotionRegistryOptions,
|
|
160
|
+
): MotionRegistry
|
|
161
|
+
export declare function resolveMotionRecipes(registry: MotionRegistry, ids?: string[]): MotionRecipe[]
|
|
162
|
+
export declare const builtinMotionRecipes: readonly MotionRecipe[]
|
|
163
|
+
export declare function createBuiltinMotionRegistry(): MotionRegistry
|
|
164
|
+
export declare const builtinMotionSpecs: readonly MotionRuntimeRecipe[]
|
|
165
|
+
export declare function createRuntimeMotionRegistry(specs?: readonly MotionRuntimeRecipe[]): MotionRegistry
|
|
166
|
+
/** Plugin names the core does not import; supply them via `dependencies`. */
|
|
167
|
+
export declare const OPTIONAL_MOTION_PLUGINS: readonly string[]
|
|
168
|
+
export declare function compileMotionRecipe(recipe: MotionRecipe): Record<string, unknown>
|
|
169
|
+
export declare function createMotionRuntime(options?: MotionRuntimeOptions): MotionRuntime
|
|
170
|
+
export declare function createDefaultMotionRuntime(options?: MotionRuntimeOptions): MotionRuntime
|
|
171
|
+
export declare function createMotionService(registry: MotionRegistry): Record<string, (...args: any[]) => unknown>
|
|
172
|
+
export declare function createDefaultMotionService(): Record<string, (...args: any[]) => unknown>
|
|
173
|
+
export declare function filterMotionCatalog(recipes: Array<Record<string, any>>, filters?: { query?: string; family?: string; performance?: string }): Array<Record<string, any>>
|
|
174
|
+
export declare function coerceMotionParameter(parameter: MotionRecipeParameter, value: unknown): unknown
|
|
175
|
+
export declare function createMotionInspector(options?: { registry?: MotionRegistry; runtime?: MotionRuntime }): {
|
|
176
|
+
catalog: ReturnType<MotionRegistry['catalog']>
|
|
177
|
+
select(id: string, fixtureId?: string): Record<string, unknown>
|
|
178
|
+
setParameter(name: string, value: unknown): Record<string, unknown>
|
|
179
|
+
reset(): Record<string, unknown>
|
|
180
|
+
attachRuntime(runtime?: MotionRuntime): Record<string, unknown>
|
|
181
|
+
subscribe(listener: (snapshot: Record<string, unknown>) => void): () => void
|
|
182
|
+
snapshot(): Record<string, unknown>
|
|
183
|
+
destroy(): void
|
|
184
|
+
}
|
|
185
|
+
export declare function createSyncedMotion(options?: SyncedMotionOptions): SyncedMotionInstance
|
|
186
|
+
export declare function createLenisAdapter(options: Record<string, unknown>): unknown
|
|
187
|
+
export declare function createMarquees(options: Record<string, unknown>): Array<() => void>
|
|
188
|
+
export declare function createValueCounters(options: Record<string, unknown>): Array<() => void>
|
|
189
|
+
export declare function createProgressRings(options: Record<string, unknown>): Array<() => void>
|
|
190
|
+
export declare function createAmbientFloats(options: Record<string, unknown>): Array<() => void>
|
|
191
|
+
export declare function createLoopingLogoBelts(options: Record<string, unknown>): Array<() => void>
|
|
192
|
+
export declare function createFlipListReorders(options: Record<string, unknown>): Array<() => void>
|
|
193
|
+
export declare function createFlipCardDetails(options: Record<string, unknown>): Array<() => void>
|
|
194
|
+
export declare function createFlipFilterGrids(options: Record<string, unknown>): Array<() => void>
|
|
195
|
+
export declare function createFlipNavIndicators(options: Record<string, unknown>): Array<() => void>
|
|
196
|
+
export declare function createLayoutAccordionGrids(options: Record<string, unknown>): Array<() => void>
|
|
197
|
+
export declare function createSvgLineDraws(options: Record<string, unknown>): unknown[]
|
|
198
|
+
export declare function createSvgPathMorphs(options: Record<string, unknown>): Array<() => void>
|
|
199
|
+
export declare function createSvgIconStates(options: Record<string, unknown>): Array<() => void>
|
|
200
|
+
export declare function createSvgOrbits(options: Record<string, unknown>): unknown[]
|
|
201
|
+
export declare function createSvgSignatureReveals(options: Record<string, unknown>): unknown[]
|
|
202
|
+
export declare function createPageLoadHeroes(options: Record<string, unknown>): unknown[]
|
|
203
|
+
export declare function createPageLoadBrandMarks(options: Record<string, unknown>): unknown[]
|
|
204
|
+
export declare function createRouteFades(options: Record<string, unknown>): Array<() => void>
|
|
205
|
+
export declare function createRouteSharedMedia(options: Record<string, unknown>): Array<() => void>
|
|
206
|
+
export declare function createRouteScrollRestores(options: Record<string, unknown>): Array<() => void>
|
|
207
|
+
export declare function createDirectionalReveals(options: Record<string, unknown>): unknown[]
|
|
208
|
+
export declare function createScaleReveals(options: Record<string, unknown>): unknown[]
|
|
209
|
+
export declare function createClipWipeReveals(options: Record<string, unknown>): unknown[]
|
|
210
|
+
export declare function createCharacterShimmers(options: Record<string, unknown>): Array<() => void>
|
|
211
|
+
export declare function createTypewriterAnnouncements(options: Record<string, unknown>): Array<() => void>
|
|
212
|
+
export declare function createTextHighlightSweeps(options: Record<string, unknown>): unknown[]
|
|
213
|
+
export declare function createScrollProgressMeters(options: Record<string, unknown>): unknown[]
|
|
214
|
+
export declare function createScrollDepthStacks(options: Record<string, unknown>): unknown[]
|
|
215
|
+
export declare function createPinnedChapterCrossfades(options: Record<string, unknown>): Array<() => void>
|
|
216
|
+
export declare function createPinnedProductExplainers(options: Record<string, unknown>): Array<() => void>
|
|
217
|
+
export declare function createHorizontalGalleryScrubs(options: Record<string, unknown>): unknown[]
|
|
218
|
+
export declare function createHorizontalGallerySnaps(options: Record<string, unknown>): unknown[]
|
|
219
|
+
export declare function createHorizontalFeatureRails(options: Record<string, unknown>): unknown[]
|
|
220
|
+
export declare function createHorizontalLogoReels(options: Record<string, unknown>): unknown[]
|
|
221
|
+
export declare function createHorizontalComparisonSliders(options: Record<string, unknown>): Array<() => void>
|
|
222
|
+
export declare function createHoverLifts(options: Record<string, unknown>): Array<() => void>
|
|
223
|
+
export declare function createMagneticActions(options: Record<string, unknown>): Array<() => void>
|
|
224
|
+
export declare function createPointerSpotlights(options: Record<string, unknown>): Array<() => void>
|
|
225
|
+
export declare function createDialogOverlays(options: Record<string, unknown>): Array<() => void>
|
|
226
|
+
export declare function createCommandPalettes(options: Record<string, unknown>): Array<() => void>
|
|
227
|
+
export declare function createNavActiveIndicators(options: Record<string, unknown>): Array<() => void>
|
|
228
|
+
export declare function createAccordionDisclosures(options: Record<string, unknown>): Array<() => void>
|
|
229
|
+
export declare function createMediaClipReveals(options: Record<string, unknown>): unknown[]
|
|
230
|
+
export declare function createMediaCurtainSplits(options: Record<string, unknown>): unknown[]
|
|
231
|
+
export declare function createImageFocusPans(options: Record<string, unknown>): unknown[]
|
|
232
|
+
export declare function createVideoPosterPlayers(options: Record<string, unknown>): Array<() => void>
|
|
233
|
+
export declare function createExpandPanels(options: Record<string, unknown>): Array<() => void>
|
|
234
|
+
export declare function createFounderScenes(options: Record<string, unknown>): unknown[]
|
|
235
|
+
export declare function createHoverMedia(options: Record<string, unknown>): Array<() => void>
|
|
236
|
+
export declare function createMediaExpansions(options: Record<string, unknown>): unknown[]
|
|
237
|
+
export declare function createMenus(options: Record<string, unknown>): Array<() => void>
|
|
238
|
+
export declare function createParallax(options: Record<string, unknown>): unknown[]
|
|
239
|
+
export declare function createReveals(options: Record<string, unknown>): unknown[]
|
|
240
|
+
export declare function createScrollDrifts(options: Record<string, unknown>): unknown[]
|
|
241
|
+
export declare function createScrollExits(options: Record<string, unknown>): unknown[]
|
|
242
|
+
export declare function createScrollStatements(options: Record<string, unknown>): unknown[]
|
|
243
|
+
export declare function createScrollSteps(options: Record<string, unknown>): Array<() => void>
|
|
244
|
+
export declare function createSplitText(options: Record<string, unknown>): unknown[]
|
|
245
|
+
export declare function createStaggers(options: Record<string, unknown>): unknown[]
|
|
246
|
+
export declare function clampIndex(progress: number, length: number): number
|
|
247
|
+
export declare function setActiveState(elements: Element[], activeIndex: number, options?: Record<string, unknown>): void
|
|
248
|
+
export declare const defaults: Readonly<Record<string, unknown>>
|
|
249
|
+
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import {
|
|
2
|
+
coerceMotionParameter,
|
|
3
|
+
createMotionInspector,
|
|
4
|
+
createSyncedMotion,
|
|
5
|
+
filterMotionCatalog
|
|
6
|
+
} from "./chunk-3WUVBPYX.js";
|
|
7
|
+
import {
|
|
8
|
+
createLenisAdapter
|
|
9
|
+
} from "./chunk-WCG7TQSH.js";
|
|
10
|
+
import {
|
|
11
|
+
builtinMotionRecipes,
|
|
12
|
+
createBuiltinMotionRegistry,
|
|
13
|
+
createDefaultMotionService,
|
|
14
|
+
createMotionService
|
|
15
|
+
} from "./chunk-ML7HTCZT.js";
|
|
16
|
+
import {
|
|
17
|
+
OPTIONAL_MOTION_PLUGINS,
|
|
18
|
+
compileMotionRecipe,
|
|
19
|
+
createDefaultMotionRuntime,
|
|
20
|
+
createMotionRuntime,
|
|
21
|
+
createRuntimeMotionRegistry
|
|
22
|
+
} from "./chunk-VOIQPPQZ.js";
|
|
23
|
+
import {
|
|
24
|
+
MOTION_RECIPE_SCHEMA_VERSION,
|
|
25
|
+
MOTION_TRIGGER_TYPES,
|
|
26
|
+
MotionRecipeValidationError,
|
|
27
|
+
createMotionRegistry,
|
|
28
|
+
defineMotionRecipe,
|
|
29
|
+
resolveMotionRecipes,
|
|
30
|
+
validateMotionRecipe
|
|
31
|
+
} from "./chunk-24KKECMK.js";
|
|
32
|
+
import {
|
|
33
|
+
builtinMotionSpecs,
|
|
34
|
+
clampIndex,
|
|
35
|
+
createAccordionDisclosures,
|
|
36
|
+
createAmbientFloats,
|
|
37
|
+
createCharacterShimmers,
|
|
38
|
+
createClipWipeReveals,
|
|
39
|
+
createCommandPalettes,
|
|
40
|
+
createDialogOverlays,
|
|
41
|
+
createDirectionalReveals,
|
|
42
|
+
createExpandPanels,
|
|
43
|
+
createFlipCardDetails,
|
|
44
|
+
createFlipFilterGrids,
|
|
45
|
+
createFlipListReorders,
|
|
46
|
+
createFlipNavIndicators,
|
|
47
|
+
createFounderScenes,
|
|
48
|
+
createHorizontalComparisonSliders,
|
|
49
|
+
createHorizontalFeatureRails,
|
|
50
|
+
createHorizontalGalleryScrubs,
|
|
51
|
+
createHorizontalGallerySnaps,
|
|
52
|
+
createHorizontalLogoReels,
|
|
53
|
+
createHoverLifts,
|
|
54
|
+
createHoverMedia,
|
|
55
|
+
createImageFocusPans,
|
|
56
|
+
createLayoutAccordionGrids,
|
|
57
|
+
createLoopingLogoBelts,
|
|
58
|
+
createMagneticActions,
|
|
59
|
+
createMarquees,
|
|
60
|
+
createMediaClipReveals,
|
|
61
|
+
createMediaCurtainSplits,
|
|
62
|
+
createMediaExpansions,
|
|
63
|
+
createMenus,
|
|
64
|
+
createNavActiveIndicators,
|
|
65
|
+
createPageLoadBrandMarks,
|
|
66
|
+
createPageLoadHeroes,
|
|
67
|
+
createParallax,
|
|
68
|
+
createPinnedChapterCrossfades,
|
|
69
|
+
createPinnedProductExplainers,
|
|
70
|
+
createPointerSpotlights,
|
|
71
|
+
createProgressRings,
|
|
72
|
+
createReveals,
|
|
73
|
+
createRouteFades,
|
|
74
|
+
createRouteScrollRestores,
|
|
75
|
+
createRouteSharedMedia,
|
|
76
|
+
createScaleReveals,
|
|
77
|
+
createScrollDepthStacks,
|
|
78
|
+
createScrollDrifts,
|
|
79
|
+
createScrollExits,
|
|
80
|
+
createScrollProgressMeters,
|
|
81
|
+
createScrollStatements,
|
|
82
|
+
createScrollSteps,
|
|
83
|
+
createSplitText,
|
|
84
|
+
createStaggers,
|
|
85
|
+
createSvgIconStates,
|
|
86
|
+
createSvgLineDraws,
|
|
87
|
+
createSvgOrbits,
|
|
88
|
+
createSvgPathMorphs,
|
|
89
|
+
createSvgSignatureReveals,
|
|
90
|
+
createTextHighlightSweeps,
|
|
91
|
+
createTypewriterAnnouncements,
|
|
92
|
+
createValueCounters,
|
|
93
|
+
createVideoPosterPlayers,
|
|
94
|
+
defaults,
|
|
95
|
+
setActiveState
|
|
96
|
+
} from "./chunk-JET2MYEG.js";
|
|
97
|
+
export {
|
|
98
|
+
MOTION_RECIPE_SCHEMA_VERSION,
|
|
99
|
+
MOTION_TRIGGER_TYPES,
|
|
100
|
+
MotionRecipeValidationError,
|
|
101
|
+
OPTIONAL_MOTION_PLUGINS,
|
|
102
|
+
builtinMotionRecipes,
|
|
103
|
+
builtinMotionSpecs,
|
|
104
|
+
clampIndex,
|
|
105
|
+
coerceMotionParameter,
|
|
106
|
+
compileMotionRecipe,
|
|
107
|
+
createAccordionDisclosures,
|
|
108
|
+
createAmbientFloats,
|
|
109
|
+
createBuiltinMotionRegistry,
|
|
110
|
+
createCharacterShimmers,
|
|
111
|
+
createClipWipeReveals,
|
|
112
|
+
createCommandPalettes,
|
|
113
|
+
createDefaultMotionRuntime,
|
|
114
|
+
createDefaultMotionService,
|
|
115
|
+
createDialogOverlays,
|
|
116
|
+
createDirectionalReveals,
|
|
117
|
+
createExpandPanels,
|
|
118
|
+
createFlipCardDetails,
|
|
119
|
+
createFlipFilterGrids,
|
|
120
|
+
createFlipListReorders,
|
|
121
|
+
createFlipNavIndicators,
|
|
122
|
+
createFounderScenes,
|
|
123
|
+
createHorizontalComparisonSliders,
|
|
124
|
+
createHorizontalFeatureRails,
|
|
125
|
+
createHorizontalGalleryScrubs,
|
|
126
|
+
createHorizontalGallerySnaps,
|
|
127
|
+
createHorizontalLogoReels,
|
|
128
|
+
createHoverLifts,
|
|
129
|
+
createHoverMedia,
|
|
130
|
+
createImageFocusPans,
|
|
131
|
+
createLayoutAccordionGrids,
|
|
132
|
+
createLenisAdapter,
|
|
133
|
+
createLoopingLogoBelts,
|
|
134
|
+
createMagneticActions,
|
|
135
|
+
createMarquees,
|
|
136
|
+
createMediaClipReveals,
|
|
137
|
+
createMediaCurtainSplits,
|
|
138
|
+
createMediaExpansions,
|
|
139
|
+
createMenus,
|
|
140
|
+
createMotionInspector,
|
|
141
|
+
createMotionRegistry,
|
|
142
|
+
createMotionRuntime,
|
|
143
|
+
createMotionService,
|
|
144
|
+
createNavActiveIndicators,
|
|
145
|
+
createPageLoadBrandMarks,
|
|
146
|
+
createPageLoadHeroes,
|
|
147
|
+
createParallax,
|
|
148
|
+
createPinnedChapterCrossfades,
|
|
149
|
+
createPinnedProductExplainers,
|
|
150
|
+
createPointerSpotlights,
|
|
151
|
+
createProgressRings,
|
|
152
|
+
createReveals,
|
|
153
|
+
createRouteFades,
|
|
154
|
+
createRouteScrollRestores,
|
|
155
|
+
createRouteSharedMedia,
|
|
156
|
+
createRuntimeMotionRegistry,
|
|
157
|
+
createScaleReveals,
|
|
158
|
+
createScrollDepthStacks,
|
|
159
|
+
createScrollDrifts,
|
|
160
|
+
createScrollExits,
|
|
161
|
+
createScrollProgressMeters,
|
|
162
|
+
createScrollStatements,
|
|
163
|
+
createScrollSteps,
|
|
164
|
+
createSplitText,
|
|
165
|
+
createStaggers,
|
|
166
|
+
createSvgIconStates,
|
|
167
|
+
createSvgLineDraws,
|
|
168
|
+
createSvgOrbits,
|
|
169
|
+
createSvgPathMorphs,
|
|
170
|
+
createSvgSignatureReveals,
|
|
171
|
+
createSyncedMotion,
|
|
172
|
+
createTextHighlightSweeps,
|
|
173
|
+
createTypewriterAnnouncements,
|
|
174
|
+
createValueCounters,
|
|
175
|
+
createVideoPosterPlayers,
|
|
176
|
+
defaults,
|
|
177
|
+
defineMotionRecipe,
|
|
178
|
+
filterMotionCatalog,
|
|
179
|
+
resolveMotionRecipes,
|
|
180
|
+
setActiveState,
|
|
181
|
+
validateMotionRecipe
|
|
182
|
+
};
|
|
183
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"mappings":"","names":[]}
|
package/dist/lenis.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type Lenis from 'lenis'
|
|
2
|
+
|
|
3
|
+
export interface LenisAdapterOptions {
|
|
4
|
+
gsap: {
|
|
5
|
+
ticker: { add(callback: (time: number) => void): void; remove(callback: (time: number) => void): void; lagSmoothing(value: number): void }
|
|
6
|
+
}
|
|
7
|
+
ScrollTrigger: { update(): void }
|
|
8
|
+
options?: ConstructorParameters<typeof Lenis>[0]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface LenisAdapter {
|
|
12
|
+
lenis: Lenis
|
|
13
|
+
start(): void
|
|
14
|
+
stop(): void
|
|
15
|
+
scrollTo(...args: Parameters<Lenis['scrollTo']>): ReturnType<Lenis['scrollTo']>
|
|
16
|
+
destroy(): void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare function createLenisAdapter(options: LenisAdapterOptions): LenisAdapter
|
package/dist/lenis.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"mappings":"","names":[]}
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
|
|
2
|
+
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js'
|
|
3
|
+
|
|
4
|
+
export interface MotionToolHandlers {
|
|
5
|
+
catalog(): Promise<unknown>
|
|
6
|
+
recipe(input: { id: string }): Promise<unknown>
|
|
7
|
+
suggest(input: { brief: string; limit?: number }): Promise<unknown>
|
|
8
|
+
validate(input?: { recipe?: Record<string, unknown> }): Promise<unknown>
|
|
9
|
+
plan(input: { ids: string[] }): Promise<unknown>
|
|
10
|
+
scan(input: { markup: string }): Promise<unknown>
|
|
11
|
+
compose(input: { brief: string; markup?: string; limit?: number }): Promise<unknown>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare function createMotionToolHandlers(service?: Record<string, (...args: any[]) => any>): Readonly<MotionToolHandlers>
|
|
15
|
+
export declare function createMotionMcpServer(options?: { service?: Record<string, (...args: any[]) => any> }): McpServer
|
|
16
|
+
export declare function startMotionMcpServer(options?: { service?: Record<string, (...args: any[]) => any>; transport?: Transport }): Promise<McpServer>
|
package/dist/mcp.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
packageVersion
|
|
3
|
+
} from "./chunk-HCWQV65E.js";
|
|
4
|
+
import {
|
|
5
|
+
createDefaultMotionService
|
|
6
|
+
} from "./chunk-ML7HTCZT.js";
|
|
7
|
+
import "./chunk-24KKECMK.js";
|
|
8
|
+
import "./chunk-JET2MYEG.js";
|
|
9
|
+
|
|
10
|
+
// src/mcp.js
|
|
11
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
13
|
+
import * as z from "zod/v4";
|
|
14
|
+
function response(value, arrayKey = "items") {
|
|
15
|
+
return {
|
|
16
|
+
content: [{ type: "text", text: JSON.stringify(value, null, 2) }],
|
|
17
|
+
structuredContent: Array.isArray(value) ? { [arrayKey]: value } : value
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function createMotionToolHandlers(service = createDefaultMotionService()) {
|
|
21
|
+
return Object.freeze({
|
|
22
|
+
catalog: async () => service.catalog(),
|
|
23
|
+
recipe: async ({ id }) => {
|
|
24
|
+
const recipe = service.recipe(id);
|
|
25
|
+
if (!recipe) throw new Error(`Unknown motion recipe "${id}".`);
|
|
26
|
+
return recipe;
|
|
27
|
+
},
|
|
28
|
+
suggest: async ({ brief, limit }) => service.suggest(brief, { limit }),
|
|
29
|
+
validate: async ({ recipe } = {}) => service.validate(recipe),
|
|
30
|
+
plan: async ({ ids }) => service.plan(ids),
|
|
31
|
+
scan: async ({ markup }) => service.scanMarkup(markup),
|
|
32
|
+
compose: async ({ brief, markup, limit }) => service.compose(brief, { markup, limit })
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function createMotionMcpServer({ service = createDefaultMotionService() } = {}) {
|
|
36
|
+
const server = new McpServer({ name: "synced-motion", version: packageVersion });
|
|
37
|
+
const handlers = createMotionToolHandlers(service);
|
|
38
|
+
server.registerTool("motion_catalog", {
|
|
39
|
+
description: "List the machine-readable Synced Motion recipe catalog.",
|
|
40
|
+
inputSchema: {}
|
|
41
|
+
}, async () => response(await handlers.catalog()));
|
|
42
|
+
server.registerTool("motion_recipe", {
|
|
43
|
+
description: "Get one motion recipe manifest, including slots, parameters, fallbacks, and performance metadata.",
|
|
44
|
+
inputSchema: { id: z.string().min(1) }
|
|
45
|
+
}, async (input) => response(await handlers.recipe(input)));
|
|
46
|
+
server.registerTool("motion_suggest", {
|
|
47
|
+
description: "Suggest registered motion recipes for a natural-language animation brief.",
|
|
48
|
+
inputSchema: { brief: z.string().min(1), limit: z.number().int().min(1).max(20).optional() }
|
|
49
|
+
}, async (input) => response(await handlers.suggest(input), "suggestions"));
|
|
50
|
+
server.registerTool("motion_validate", {
|
|
51
|
+
description: "Validate the active built-in registry or one supplied declarative motion recipe.",
|
|
52
|
+
inputSchema: { recipe: z.record(z.string(), z.unknown()).optional() }
|
|
53
|
+
}, async (input) => response(await handlers.validate(input)));
|
|
54
|
+
server.registerTool("motion_plan", {
|
|
55
|
+
description: "Create a deterministic integration plan for selected recipe ids.",
|
|
56
|
+
inputSchema: { ids: z.array(z.string().min(1)).min(1) }
|
|
57
|
+
}, async (input) => response(await handlers.plan(input)));
|
|
58
|
+
server.registerTool("motion_scan", {
|
|
59
|
+
description: "Inspect supplied HTML or template markup for registered recipe roots and missing semantic slots.",
|
|
60
|
+
inputSchema: { markup: z.string().min(1) }
|
|
61
|
+
}, async (input) => response(await handlers.scan(input)));
|
|
62
|
+
server.registerTool("motion_compose", {
|
|
63
|
+
description: "Compose a constrained motion plan from a natural-language brief and optional existing markup.",
|
|
64
|
+
inputSchema: {
|
|
65
|
+
brief: z.string().min(1),
|
|
66
|
+
markup: z.string().optional(),
|
|
67
|
+
limit: z.number().int().min(1).max(20).optional()
|
|
68
|
+
}
|
|
69
|
+
}, async (input) => response(await handlers.compose(input)));
|
|
70
|
+
return server;
|
|
71
|
+
}
|
|
72
|
+
async function startMotionMcpServer({ service, transport = new StdioServerTransport() } = {}) {
|
|
73
|
+
const server = createMotionMcpServer({ service });
|
|
74
|
+
await server.connect(transport);
|
|
75
|
+
return server;
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
createMotionMcpServer,
|
|
79
|
+
createMotionToolHandlers,
|
|
80
|
+
startMotionMcpServer
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=mcp.js.map
|
package/dist/mcp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mcp.js"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Every optional GSAP plugin the built-in recipes can use. */
|
|
2
|
+
export declare const motionPlugins: Readonly<{
|
|
3
|
+
SplitText: unknown
|
|
4
|
+
Flip: unknown
|
|
5
|
+
DrawSVGPlugin: unknown
|
|
6
|
+
MorphSVGPlugin: unknown
|
|
7
|
+
MotionPathPlugin: unknown
|
|
8
|
+
}>
|
|
9
|
+
|
|
10
|
+
export declare const SplitText: unknown
|
|
11
|
+
export declare const Flip: unknown
|
|
12
|
+
export declare const DrawSVGPlugin: unknown
|
|
13
|
+
export declare const MorphSVGPlugin: unknown
|
|
14
|
+
export declare const MotionPathPlugin: unknown
|
package/dist/plugins.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DrawSVGPlugin,
|
|
3
|
+
Flip,
|
|
4
|
+
MorphSVGPlugin,
|
|
5
|
+
MotionPathPlugin,
|
|
6
|
+
SplitText,
|
|
7
|
+
motionPlugins
|
|
8
|
+
} from "./chunk-NIXAEIHN.js";
|
|
9
|
+
export {
|
|
10
|
+
DrawSVGPlugin,
|
|
11
|
+
Flip,
|
|
12
|
+
MorphSVGPlugin,
|
|
13
|
+
MotionPathPlugin,
|
|
14
|
+
SplitText,
|
|
15
|
+
motionPlugins
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"mappings":"","names":[]}
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MotionRuntime, MotionRuntimeOptions } from './index.js'
|
|
2
|
+
|
|
3
|
+
export declare function useSyncedMotion(
|
|
4
|
+
rootRef: { current: Element | null },
|
|
5
|
+
options?: Omit<MotionRuntimeOptions, 'root'>,
|
|
6
|
+
watch?: readonly unknown[],
|
|
7
|
+
): { readonly current: MotionRuntime | undefined }
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createMotionController,
|
|
3
|
+
resolveMotionRoot
|
|
4
|
+
} from "./chunk-KA3OPI4F.js";
|
|
5
|
+
import "./chunk-VOIQPPQZ.js";
|
|
6
|
+
import "./chunk-24KKECMK.js";
|
|
7
|
+
import "./chunk-JET2MYEG.js";
|
|
8
|
+
|
|
9
|
+
// src/adapters/react.js
|
|
10
|
+
import { useGSAP } from "@gsap/react";
|
|
11
|
+
import { useRef } from "react";
|
|
12
|
+
import { gsap } from "gsap";
|
|
13
|
+
gsap.registerPlugin(useGSAP);
|
|
14
|
+
function useSyncedMotion(rootRef, options = {}, watch = []) {
|
|
15
|
+
const controllerRef = useRef();
|
|
16
|
+
useGSAP(() => {
|
|
17
|
+
const root = resolveMotionRoot(rootRef);
|
|
18
|
+
if (!root) return void 0;
|
|
19
|
+
const controller = createMotionController(root, options);
|
|
20
|
+
controller.mount();
|
|
21
|
+
controllerRef.current = controller;
|
|
22
|
+
return () => {
|
|
23
|
+
controller.destroy();
|
|
24
|
+
if (controllerRef.current === controller) controllerRef.current = void 0;
|
|
25
|
+
};
|
|
26
|
+
}, { scope: rootRef, dependencies: watch, revertOnUpdate: true });
|
|
27
|
+
return controllerRef;
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
useSyncedMotion
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/adapters/react.js"],"mappings":";;;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,YAAY;AAGrB,KAAK,eAAe,OAAO;AAEpB,SAAS,gBAAgB,SAAS,UAAU,CAAC,GAAG,QAAQ,CAAC,GAAG;AACjE,QAAM,gBAAgB,OAAO;AAC7B,UAAQ,MAAM;AACZ,UAAM,OAAO,kBAAkB,OAAO;AACtC,QAAI,CAAC,KAAM,QAAO;AAClB,UAAM,aAAa,uBAAuB,MAAM,OAAO;AACvD,eAAW,MAAM;AACjB,kBAAc,UAAU;AACxB,WAAO,MAAM;AACX,iBAAW,QAAQ;AACnB,UAAI,cAAc,YAAY,WAAY,eAAc,UAAU;AAAA,IACpE;AAAA,EACF,GAAG,EAAE,OAAO,SAAS,cAAc,OAAO,gBAAgB,KAAK,CAAC;AAChE,SAAO;AACT;","names":[]}
|