index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples | petrpan-code/Shopify/react-native-skia/example/src/Examples/Vertices/index.ts | export { Demo as Vertices } from "./Vertices";
| 6,700 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/Math.ts | import type { Vector, PathCommand } from "@shopify/react-native-skia";
import {
cartesian2Polar,
PathVerb,
vec,
Skia,
} from "@shopify/react-native-skia";
import { exhaustiveCheck } from "@shopify/react-native-skia/src/renderer/typeddash";
const round = (value: number, precision = 0) => {
"worklet";
const ... | 6,701 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/Model.ts | import type { SkPath } from "@shopify/react-native-skia";
import data from "./data.json";
import { curveLines } from "./Math";
export const PADDING = 16;
export const COLORS = ["#F69D69", "#FFC37D", "#61E0A1", "#31CBD1"];
interface Amount {
amount: string;
currency: string;
scale: string;
}
interface Percent... | 6,702 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/Wallet.tsx | import React, { useMemo } from "react";
import { View, StyleSheet, useWindowDimensions } from "react-native";
import {
Canvas,
Path,
Group,
LinearGradient,
vec,
} from "@shopify/react-native-skia";
import Animated, {
useAnimatedStyle,
useDerivedValue,
useSharedValue,
} from "react-native-reanimated";
im... | 6,703 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/data.json | {
"data":{
"base":"BTC",
"base_id":"5b71fc48-3dd3-540c-809b-f8c94d0e68b5",
"unit_price_scale":2,
"currency":"CHF",
"prices":{
"latest":"10404.19502652",
"latest_price":{
"amount":{
"amount":"10404.19502652",
"currency":"CHF",
... | 6,704 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/index.ts | export * from "./Wallet";
| 6,705 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/components/Cursor.tsx | import { Circle, Group, Paint } from "@shopify/react-native-skia";
import React from "react";
import type { SharedValue } from "react-native-reanimated";
import {
interpolateColor,
useDerivedValue,
// In react-native-reanimated <= 3.1.0, convertToRGBA is not exported yet
// eslint-disable-next-line @typescript-... | 6,706 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/components/Header.tsx | /* eslint-disable max-len */
import React from "react";
import { View, StyleSheet, Text, TouchableWithoutFeedback } from "react-native";
import { useNavigation } from "@react-navigation/native";
import { Canvas, Path } from "@shopify/react-native-skia";
const styles = StyleSheet.create({
container: {
padding: 16... | 6,707 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/components/Label.tsx | import { useFont, Text } from "@shopify/react-native-skia";
import React from "react";
import type { SharedValue } from "react-native-reanimated";
import { interpolate, useDerivedValue } from "react-native-reanimated";
import type { Graphs } from "../Model";
import { PADDING } from "../Model";
import type { GraphStat... | 6,708 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/components/List.tsx | /* eslint-disable max-len */
import { Canvas, Circle, Path } from "@shopify/react-native-skia";
import type { ReactNode } from "react";
import React from "react";
import { ScrollView, View, Text, StyleSheet } from "react-native";
interface IconProps {
path: string;
color: string;
}
const Icon = ({ path, color }: ... | 6,709 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/components/Selection.tsx | import React from "react";
import { Text, View, StyleSheet, TouchableWithoutFeedback } from "react-native";
import {
Canvas,
Group,
LinearGradient,
RoundedRect,
mix,
vec,
} from "@shopify/react-native-skia";
import type { SharedValue } from "react-native-reanimated";
import { useDerivedValue, withTiming } f... | 6,710 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallet/components/useGraphTouchHandler.ts | import type { SharedValue } from "react-native-reanimated";
import { withDecay } from "react-native-reanimated";
import { Gesture } from "react-native-gesture-handler";
import { useMemo } from "react";
export const useGraphTouchHandler = (x: SharedValue<number>, width: number) => {
const gesture = useMemo(
() =>... | 6,711 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallpaper/Wallpaper.tsx | import {
Canvas,
Group,
LinearGradient,
Fill,
vec,
Rect,
interpolate,
Mask,
Shadow,
Turbulence,
} from "@shopify/react-native-skia";
import React from "react";
import { useWindowDimensions } from "react-native";
const length = 9;
const STRIPES = new Array(length).fill(0).map((_, i) => i);
export c... | 6,712 |
0 | petrpan-code/Shopify/react-native-skia/example/src/Examples | petrpan-code/Shopify/react-native-skia/example/src/Examples/Wallpaper/index.ts | export * from "./Wallpaper";
| 6,713 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/Home/HomeScreen.tsx | import React from "react";
import { ScrollView } from "react-native";
import { HomeScreenButton } from "./HomeScreenButton";
export const HomeScreen = () => {
return (
<ScrollView>
<HomeScreenButton
title="API"
description="API examples"
route="API"
testId="API"
/>
... | 6,714 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/Home/HomeScreenButton.tsx | import { useNavigation, CommonActions } from "@react-navigation/native";
import React, { useCallback } from "react";
import { TouchableOpacity, View, Text, StyleSheet } from "react-native";
type Props = {
title: string;
description: string;
route: string;
testId?: string;
};
export const HomeScreenButton: Rea... | 6,715 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/Home/index.ts | export * from "./HomeScreen";
| 6,716 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/Tests/Tests.tsx | /* eslint-disable @typescript-eslint/no-explicit-any */
import type { SkiaDomView } from "@shopify/react-native-skia";
import { Group, Canvas, Skia } from "@shopify/react-native-skia";
import React, { useEffect, useRef, useState } from "react";
import { PixelRatio, Platform, Text, View } from "react-native";
import ty... | 6,717 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/Tests/deserialize.ts | import { Skia } from "@shopify/react-native-skia";
import React from "react";
/* eslint-disable @typescript-eslint/no-explicit-any */
interface SerializedProps {
[key: string]: any;
}
export interface SerializedNode {
type: string;
props: SerializedProps;
children: SerializedNode[];
}
type Assets = { [name: ... | 6,718 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/Tests/index.ts | export * from "./Tests";
| 6,719 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/Tests/useAssets.ts | import { useImage, useTypeface } from "@shopify/react-native-skia";
import { useCallback, useState } from "react";
import { Platform } from "react-native";
const SkiaLogo =
Platform.OS === "web" ? require("./assets/skia_logo.png") : "skia_logo";
const SkiaLogoJpeg =
Platform.OS === "web"
? require("./assets/sk... | 6,720 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/Tests/useClient.ts | import { useEffect, useState } from "react";
import { Platform } from "react-native";
const ANDROID_WS_HOST = "10.0.2.2";
const IOS_WS_HOST = "localhost";
const url = `ws://${
Platform.OS === "android" ? ANDROID_WS_HOST : IOS_WS_HOST
}:4242`;
export const useClient = () => {
const [client, setClient] = useState<W... | 6,721 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/assets/icons8-github.svg | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path fill="#fff" d="M41,24c0,9.4-7.6,17-17,17S7,33.4,7,24S14.6,7,24,7S41,14.6,41,24z"/><path fill="#455a64" d="M21 41v-5.5c0-.3.2-.5.5-.5s.5.2.5.5V41h2v-6.5c0-.3.2-.5.5-.5s.5.2.5.5V41h2v-5.5c0-.3.2-.5.5-.5s.5.2.5.5V41h1.8c.2-.3.2-.... | 6,722 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/assets/icons8-octocat.svg | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path fill="#455A64" d="M40.3,15.7c0.6-1.7,1.2-5-0.4-8.7c-4.5,0-8.3,3.2-8.9,3.8c-2.2-0.5-4.6-0.7-7-0.7c-2.5,0-4.9,0.3-7.2,0.8C13.7,7.7,9.6,7,8,7c0,0-0.9,1.8-0.9,5c0,2,0.5,3.2,0.8,3.8C5.5,18.3,4,21.7,4,26.1c0,11.2,7.1,15,20,15s20-3.8... | 6,723 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/assets/icons8-stack-exchange.svg | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path fill="#33afec" d="M6,13v7h25.2l6.4-7H6z"/><path fill="#0084d7" d="M6,22v7h17.1l6.3-7H6z"/><path fill="#0262b8" d="M6,31v2c0,3.3,2.7,6,6,6h2l7.3-8H6z"/><path fill="#0084d7" d="M42,13h-4.4l-6.4,7H42V13z"/><path fill="#027ad4" d=... | 6,724 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/assets/icons8-stack-overflow.svg | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path fill="#727d86" d="M32,28.5V39H12V28.5c0-0.276-0.224-0.5-0.5-0.5h-2C9.224,28,9,28.224,9,28.5V41c0,0.552,0.448,1,1,1 h24c0.552,0,1-0.448,1-1V28.5c0-0.276-0.224-0.5-0.5-0.5h-2C32.224,28,32,28.224,32,28.5z"/><rect width="14" heigh... | 6,725 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/assets/tiger.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="800" width="800">
<g transform="translate(200,200)" style="fill-opacity:1; fill:none;">
<g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
<path d="M-122.304 84.285C-122.304 84.285 -122.203 86.1... | 6,726 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/components/Animations.tsx | import { useEffect } from "react";
import {
Easing,
cancelAnimation,
useSharedValue,
withRepeat,
withTiming,
} from "react-native-reanimated";
export const useLoop = ({ duration }: { duration: number }) => {
const progress = useSharedValue(0);
useEffect(() => {
progress.value = withRepeat(
with... | 6,727 |
0 | petrpan-code/Shopify/react-native-skia/example/src | petrpan-code/Shopify/react-native-skia/example/src/components/ExportableCanvas.tsx | import type { CanvasProps, SkiaDomView } from "@shopify/react-native-skia";
import { ImageFormat, Canvas } from "@shopify/react-native-skia";
import React, { useCallback, useRef } from "react";
import { Alert, Pressable, Share } from "react-native";
export const ExportableCanvas = ({ children, style }: CanvasProps) =>... | 6,728 |
0 | petrpan-code/Shopify/react-native-skia/example/src/components | petrpan-code/Shopify/react-native-skia/example/src/components/ShaderLib/Tags.tsx | import { Skia } from "@shopify/react-native-skia";
type Value = string | number;
type Values = Value[];
export const glsl = (source: TemplateStringsArray, ...values: Values) => {
const processed = source.flatMap((s, i) => [s, values[i]]).filter(Boolean);
return processed.join("");
};
export const frag = (source:... | 6,729 |
0 | petrpan-code/Shopify/react-native-skia/example/src/components | petrpan-code/Shopify/react-native-skia/example/src/components/ShaderLib/index.ts | export * from "./Tags";
| 6,730 |
0 | petrpan-code/Shopify/react-native-skia/externals | petrpan-code/Shopify/react-native-skia/externals/bin/python | #!/bin/bash
/usr/bin/python3 "$@" | 6,731 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/.eslintrc.json | {
"extends": "react-native-wcandillon",
"plugins": ["reanimated"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"prefer-destructuring": [
"error",
{
"object": true,
"array": false
}
],
"no-bitwise": "off",
"no-var": "off",
"@typescript... | 6,732 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/.watchmanconfig | {}
| 6,733 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/Gemfile | source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.13'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
| 6,734 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/README.md | This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
# Getting Started
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instruc... | 6,735 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/app.json | {
"name": "fabricexample",
"displayName": "fabricexample"
}
| 6,736 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/babel.config.js | module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'transform-inline-environment-variables',
'react-native-reanimated/plugin',
],
};
| 6,737 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/index.js | /**
* @format
*/
import { AppRegistry } from "react-native";
import App from "./src/App";
import { name as appName } from "./app.json";
AppRegistry.registerComponent(appName, () => App);
| 6,738 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/jest.config.js | module.exports = {
preset: 'react-native',
};
| 6,739 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/metro.config.js | // metro.config.js
//
// with multiple workarounds for this issue with symlinks:
// https://github.com/facebook/metro/issues/1
//
// with thanks to @johnryan (<https://github.com/johnryan>)
// for the pointers to multiple workaround solutions here:
// https://github.com/facebook/metro/issues/1#issuecomment-541642857
//... | 6,740 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/package.json | {
"name": "fabricexample",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint . --ext .ts,.tsx --max-warnings 0 --cache",
"start": "react-native start",
"test": "jest",
"pod-install": "cd ios && pod ins... | 6,741 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/tsconfig.json | {
"extends": "eslint-config-react-native-wcandillon/tsconfig.base",
"compilerOptions": {
"noUncheckedIndexedAccess": false,
}
}
| 6,742 |
0 | petrpan-code/Shopify/react-native-skia | petrpan-code/Shopify/react-native-skia/fabricexample/yarn.lock | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@aashutoshrathi/word-wrap@^1.2.3":
version "1.2.6"
resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf"
integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A... | 6,743 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/.bundle/config | BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
| 6,744 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/android/build.gradle | // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
// We use NDK 23 which has both M1 support and is the side-by... | 6,745 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/android/gradle.properties | # Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies ... | 6,746 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/android/gradlew | #!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 6,747 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/android/gradlew.bat | @rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unles... | 6,748 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/android/settings.gradle | rootProject.name = 'fabricexample'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
| 6,749 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/build.gradle | apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
*/
react {
/* Folders */
// The root of your project, i.e.... | 6,750 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/proguard-rules.pro | # Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# ... | 6,751 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/debug/AndroidManifest.xml | <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:usesCleartextTraffic="true"
tools:target... | 6,752 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/debug/java/com | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/debug/java/com/fabricexample/ReactNativeFlipper.java | /**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.fabricexample;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import c... | 6,753 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/AndroidManifest.xml | <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_r... | 6,754 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/java/com | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/java/com/fabricexample/MainActivity.java | package com.fabricexample;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
public class MainActivity extends ReactActivity {
/**
* Retur... | 6,755 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/java/com | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/java/com/fabricexample/MainApplication.java | package com.fabricexample;
import android.app.Application;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react... | 6,756 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/res | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/res/drawable/rn_edit_text_material.xml | <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/license... | 6,757 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/res | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/res/values/strings.xml | <resources>
<string name="app_name">fabricexample</string>
</resources>
| 6,758 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/res | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/main/res/values/styles.xml | <resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
</style>
</resources>
| 6,759 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/release/java/com | petrpan-code/Shopify/react-native-skia/fabricexample/android/app/src/release/java/com/fabricexample/ReactNativeFlipper.java | /**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.fabricexample;
import android.content.Context;
import com.facebook.react.ReactInstanceManager;
/**
* Class resp... | 6,760 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/android/gradle | petrpan-code/Shopify/react-native-skia/fabricexample/android/gradle/wrapper/gradle-wrapper.properties | distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
| 6,761 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/ios/.xcode.env | export NODE_BINARY=$(command -v node)
| 6,762 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/ios/Podfile | # Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
# If y... | 6,763 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/ios/Podfile.lock | PODS:
- boost (1.76.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- FBLazyVector (0.72.6)
- Flipper (0.182.0):
- Flipper-Folly (~> 2.6)
- Flipper-Boost-iOSX (1.76.0.1.11)
- Flipper-DoubleConversion (3.2.0.1)
- Flipper-Fmt (7.1.7)
- Flipper-Folly (2.6.10):
- Flipper-Boost-iOSX
- ... | 6,764 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/ios/_xcode.env | # This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.
# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_B... | 6,765 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample.xcworkspace/contents.xcworkspacedata | <?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:fabricexample.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
| 6,766 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample.xcworkspace | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
| 6,767 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/AppDelegate.h | #import <RCTAppDelegate.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : RCTAppDelegate
@end
| 6,768 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/AppDelegate.mm | #import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"fabricexample";
// You can add your custom initial props in the dictionary below.
// They... | 6,769 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Info.plist | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>fabricexample</string>
<key>CFBundleExecutable</... | 6,770 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/LaunchScreen.storyboard | <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewC... | 6,771 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/main.m | #import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
| 6,772 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets/Contents.json | {
"info" : {
"author" : "xcode",
"version" : 1
}
}
| 6,773 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets/AppIcon.appiconset/Contents.json | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120"... | 6,774 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets/Logo.imageset/Contents.json | {
"images" : [
{
"filename" : "1024-2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "1024-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "1024.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
... | 6,775 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets/skia_logo.imageset/Contents.json | {
"images" : [
{
"filename" : "1024-2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "1024-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "1024.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
... | 6,776 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexample/Images.xcassets/skia_logo_jpeg.imageset/Contents.json | {
"images" : [
{
"filename" : "1024 1.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "1024 2.jpg",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "1024.jpg",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
... | 6,777 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexampleTests/Info.plist | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifi... | 6,778 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/ios | petrpan-code/Shopify/react-native-skia/fabricexample/ios/fabricexampleTests/fabricexampleTests.m | #import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <React/RCTLog.h>
#import <React/RCTRootView.h>
#define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React"
@interface fabricexampleTests : XCTestCase
@end
@implementation fabricexampleTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BO... | 6,779 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/src/App.spec.tsx | import "react-native";
import React from "react";
// Test renderer must be required after react-native.
import { cleanup, render } from "@testing-library/react-native";
import App from "./App";
it("renders correctly", () => {
render(<App />);
});
afterEach(cleanup);
| 6,780 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/src/App.tsx | /* eslint-disable import/no-default-export */
import type { LinkingOptions } from "@react-navigation/native";
import { NavigationContainer, useNavigation } from "@react-navigation/native";
import React from "react";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { StatusBar } from "... | 6,781 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample | petrpan-code/Shopify/react-native-skia/fabricexample/src/types.ts | export type StackParamList = {
Home: undefined;
Vertices: undefined;
API: undefined;
Breathe: undefined;
Filters: undefined;
Gooey: undefined;
Hue: undefined;
Matrix: undefined;
Severance: undefined;
Aurora: undefined;
Glassmorphism: undefined;
Neumorphism: undefined;
Wallpaper: undefined;
W... | 6,782 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/Examples.test.tsx | import "react-native";
import React from "react";
// Test renderer must be required after react-native.
import { cleanup, render } from "@testing-library/react-native";
import { Breathe } from "./Breathe";
import { Gooey } from "./Gooey";
import { Aurora } from "./Aurora";
import { Wallet } from "./Wallet";
import { V... | 6,783 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/index.ts | export * from "./Reanimated";
export * from "./API";
export * from "./Breathe";
export * from "./Filters";
export * from "./Gooey";
export * from "./Matrix";
export * from "./Graphs";
export * from "./API";
export * from "./Breathe";
export * from "./Filters";
export * from "./Gooey";
export * from "./Hue";
export * fr... | 6,784 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/AnimatedImages.tsx | import React from "react";
import { ScrollView, useWindowDimensions } from "react-native";
import {
Canvas,
Image,
useAnimatedImageValue,
} from "@shopify/react-native-skia";
export const AnimatedImages = () => {
const { width: wWidth } = useWindowDimensions();
const SIZE = wWidth / 3;
const S2 = 60;
con... | 6,785 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/BlendModes.tsx | /* eslint-disable max-len */
import React from "react";
import {
BlendMode,
Canvas,
Circle,
Group,
Path,
Skia,
Text,
useFont,
enumKey,
} from "@shopify/react-native-skia";
const r = 50;
const blendModes = [
"clear",
"src",
"dst",
"srcOver",
"dstOver",
"srcIn",
"dstIn",
"srcOut",
"d... | 6,786 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/Clipping.tsx | /* eslint-disable max-len */
import React, { useMemo } from "react";
import { ScrollView, useWindowDimensions } from "react-native";
import {
Skia,
Canvas,
Image,
Group,
Circle,
Rect,
Mask,
useImage,
mix,
} from "@shopify/react-native-skia";
import { useDerivedValue } from "react-native-reanimated";
... | 6,787 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/ColorFilter.tsx | import React, { useMemo } from "react";
import { ScrollView, useWindowDimensions } from "react-native";
import {
Skia,
useDrawCallback,
SkiaView,
PaintStyle,
useImage,
TileMode,
Canvas,
Group,
BlendColor,
Circle,
Image,
Lerp,
ColorMatrix,
LinearToSRGBGamma,
SRGBToLinearGamma,
} from "@shop... | 6,788 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/Data.tsx | import React from "react";
import { useWindowDimensions } from "react-native";
import {
AlphaType,
Canvas,
ColorType,
Image,
Skia,
} from "@shopify/react-native-skia";
const pixels = new Uint8Array(256 * 256 * 4);
pixels.fill(255);
let i = 0;
for (let x = 0; x < 256 * 4; x++) {
for (let y = 0; y < 256 * 4;... | 6,789 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/FontMgr.tsx | import React from "react";
import { ScrollView, useWindowDimensions } from "react-native";
import {
Canvas,
Skia,
Text,
matchFont,
useFonts,
} from "@shopify/react-native-skia";
const PADDING = 16;
const titleFontSize = 32;
const titleText = "Fonts from the System";
const titleY = titleFontSize + PADDING;
... | 6,790 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/Freeze.tsx | import React from "react";
import { useFont, Canvas, Group, Rect, Text } from "@shopify/react-native-skia";
import { useDerivedValue } from "react-native-reanimated";
import { useClock } from "../../components/Animations";
const size = 200;
const n = 49;
export const FreezeExample = () => {
const font = useFont(re... | 6,791 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/Gradients.tsx | import React, { useMemo } from "react";
import { ScrollView, useWindowDimensions } from "react-native";
import {
bottomRight,
center,
topLeft,
Skia,
rect,
Canvas,
Rect,
LinearGradient,
RadialGradient,
TwoPointConicalGradient,
SweepGradient,
vec,
Turbulence,
ColorShader,
Blend,
} from "@sho... | 6,792 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/ImageFilters.tsx | import {
Fill,
Image,
Offset,
Text,
useImage,
Morphology,
Group,
DisplacementMap,
Turbulence,
RuntimeShader,
Circle,
Skia,
useFont,
} from "@shopify/react-native-skia";
import React from "react";
import { Examples, SIZE } from "./components/Examples";
const DisplacementMapDemo = () => {
co... | 6,793 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/Images.tsx | import React, { useMemo } from "react";
import { ScrollView, useWindowDimensions } from "react-native";
import { useImage, Canvas, Image, Rect } from "@shopify/react-native-skia";
import { Title } from "./components/Title";
const fits = [
"contain",
"fill",
"cover",
"fitHeight",
"fitWidth",
"scaleDown",
... | 6,794 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/List.tsx | import * as React from "react";
import { ScrollView, StyleSheet, Text, View, Pressable } from "react-native";
import { useNavigation } from "@react-navigation/native";
import type { NativeStackNavigationProp } from "@react-navigation/native-stack";
import type { Routes } from "./Routes";
export const examples = [
{... | 6,795 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/OnLayout.tsx | import React, { useState } from "react";
import type { LayoutRectangle } from "react-native";
import { Text } from "react-native";
import { Canvas, Fill } from "@shopify/react-native-skia";
export const OnLayoutDemo = () => {
const [layout, setLayout] = useState<LayoutRectangle>();
return (
<>
<Text>{`On... | 6,796 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/Path.tsx | /* eslint-disable max-len */
import React, { useMemo } from "react";
import {
StyleSheet,
ScrollView,
View,
useWindowDimensions,
Platform,
} from "react-native";
import {
Skia,
PathOp,
Canvas,
Path,
Group,
rect,
TextPath,
useFont,
FitBox,
interpolatePaths,
} from "@shopify/react-native-ski... | 6,797 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/PathEffect.tsx | /* eslint-disable max-len */
import React, { useMemo } from "react";
import { ScrollView, useWindowDimensions } from "react-native";
import type { Vector } from "@shopify/react-native-skia";
import {
Rect,
transformOrigin,
sub,
Canvas,
Circle,
translate,
Skia,
PaintStyle,
DiscretePathEffect,
DashPat... | 6,798 |
0 | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples | petrpan-code/Shopify/react-native-skia/fabricexample/src/Examples/API/Picture.tsx | import React, { useMemo } from "react";
import { StyleSheet } from "react-native";
import {
createPicture,
Canvas,
Picture,
Skia,
Group,
} from "@shopify/react-native-skia";
// Create picture
const picture = createPicture(
{ x: 0, y: 0, width: 100, height: 100 },
(canvas) => {
const paint = Skia.Pain... | 6,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.