# extendify/3.2.0/src/AutoLaunch/functions/vibes.js

Extendify, version 3.2.0. 42 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.2.0/code/src/AutoLaunch/functions/vibes.js
- Raw: https://pluginprobe.com/plugins/extendify/3.2.0/raw/src/AutoLaunch/functions/vibes.js
- Modified: 2026-08-27T17:39:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.2.0/code/src/AutoLaunch/functions/vibes.js#L10-L20`.

```javascript
import { replaceVibeBlocks } from '@shared/lib/vibe-blocks';
import { applyVibeGlobals, applyVibeStyles } from '@shared/lib/vibe-globals';
import { getVibes, vibesBySlug } from '@shared/lib/vibes';

// natural-1 is what the theme already ships, so it contributes nothing.
const isValidVibe = (selectedVibe) =>
	!!selectedVibe &&
	typeof selectedVibe === 'string' &&
	selectedVibe.trim() !== '' &&
	selectedVibe !== 'natural-1';

// Layout rides along because WordPress derives fluid type from wideSize.
export const computeVibeAdjustments = async (selectedVibe, variation) => {
	if (!isValidVibe(selectedVibe)) return null;

	const vibes = vibesBySlug(await getVibes(selectedVibe));
	const vibe = vibes[selectedVibe];
	if (!vibe) return null;

	const styles = applyVibeStyles({
		currentStyles: variation?.styles ?? {},
		vibeStyles: vibe.styles,
		vibes,
	});

	return {
		settings: applyVibeGlobals({
			currentSettings: variation?.settings ?? {},
			vibeSettings: vibe.settings,
			vibes,
		}),
		styles: {
			...styles,
			blocks: replaceVibeBlocks({
				currentBlocks: styles?.blocks,
				vibeBlocks: vibe.blocks,
				selectedVibe,
			}),
		},
	};
};

```
