If anybody needs animated webP support with Expo (Custom Dev Client) for the native <Image /> and <FastImage /> (read comments):
// create a file like plugins/withAnimatedWebPSupport.js -> this is for the native <Image />
const {| <?php | |
| /** | |
| * @author Atanas Vasilev | |
| * @link http://pastebin.com/dHbqjUNy | |
| */ | |
| define('STR_BOM', "\xEF\xBB\xBF"); | |
| $file = null; | |
| $directory = getcwd(); |
| // Based on: https://stackoverflow.com/a/46814952/283851 | |
| /** | |
| * Create a Base64 Image URL, with rotation applied to compensate for EXIF orientation, if needed. | |
| * | |
| * Optionally resize to a smaller maximum width - to improve performance for larger image thumbnails. | |
| */ | |
| export async function getImageUrl(file: File, maxWidth: number|undefined) { | |
| return readOrientation(file).then(orientation => applyRotation(file, orientation || 1, maxWidth || 999999)); | |
| } |
| // Expo SDK40 | |
| // expo-blur: ~8.2.2 | |
| // expo-haptics: ~8.4.0 | |
| // react-native-gesture-handler: ~1.8.0 | |
| // react-native-reanimated: ^2.0.0-rc.0 | |
| // react-native-safe-area-context: 3.1.9 | |
| import React, { useState } from 'react'; | |
| import { | |
| Image, |
| // credit to https://gist.github.com/ianmartorell/32bb7df95e5eff0a5ee2b2f55095e6a6 | |
| // this file was repurosed from there | |
| // via this issue https://gist.github.com/necolas/1c494e44e23eb7f8c5864a2fac66299a | |
| // because RNW's pressable doesn't bubble events to parent pressables: https://github.com/necolas/react-native-web/issues/1875 | |
| /* eslint-disable no-inner-declarations */ | |
| import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment' | |
| let isEnabled = false |
| // DEPRECATED | |
| const { | |
| withDangerousMod, | |
| WarningAggregator, | |
| AndroidConfig, | |
| withAppBuildGradle, | |
| } = require("@expo/config-plugins"); | |
| const path = require("path"); | |
| const fs = require("fs"); |
If anybody needs animated webP support with Expo (Custom Dev Client) for the native <Image /> and <FastImage /> (read comments):
// create a file like plugins/withAnimatedWebPSupport.js -> this is for the native <Image />
const {| import React from "react"; | |
| import { Dimensions, TextInput, ScrollView } from "react-native"; | |
| import Animated, { | |
| useAnimatedKeyboard, | |
| useAnimatedReaction, | |
| runOnJS, | |
| KeyboardState, | |
| useAnimatedProps, | |
| useAnimatedScrollHandler, |
| import { useEffect, useRef } from "react"; | |
| import { View } from "react-native"; | |
| import Animated, { | |
| useAnimatedStyle, | |
| useSharedValue, | |
| } from "react-native-reanimated"; | |
| // Example | |
| export default function App() { |
Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.
Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1