@felipe-software/react-native-gpui 0.0.0-placeholder → 1.0.1
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/.reanimated-prebuilt/react-native-reanimated.mjs +29373 -0
- package/LICENSE +21 -0
- package/README.md +658 -1
- package/cli/bin.ts +379 -0
- package/cli/bundle.ts +32 -0
- package/cli/commands/do.ts +213 -0
- package/cli/commands/flow.ts +283 -0
- package/cli/commands/get.ts +584 -0
- package/cli/commands/shot.ts +312 -0
- package/cli/commands/trace.ts +293 -0
- package/cli/host.ts +714 -0
- package/cli/hotReload.ts +210 -0
- package/cli/run.ts +66 -0
- package/cli/selectors.ts +205 -0
- package/dist/Animated.d.ts +120 -0
- package/dist/ChatList.d.ts +28 -0
- package/dist/Dimensions.d.ts +31 -0
- package/dist/StyleSheet.d.ts +18 -0
- package/dist/Window.d.ts +33 -0
- package/dist/apis.d.ts +165 -0
- package/dist/app-state.d.ts +27 -0
- package/dist/chat-list-types.d.ts +136 -0
- package/dist/colors.d.ts +32 -0
- package/dist/commands.d.ts +230 -0
- package/dist/components.d.ts +419 -0
- package/dist/hotModules.d.ts +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.development.js +14876 -0
- package/dist/index.js +12 -0
- package/dist/keyboard.d.ts +140 -0
- package/dist/native-menu.d.ts +7 -0
- package/dist/platform-driver.d.ts +32 -0
- package/dist/platform-services.d.ts +35 -0
- package/dist/portal.d.ts +43 -0
- package/dist/raf.d.ts +4 -0
- package/dist/reanimated/colors-processor-shim.d.ts +10 -0
- package/dist/reanimated/reanimated-host.d.ts +10 -0
- package/dist/reanimated/seam.d.ts +34 -0
- package/dist/reanimated/ui-entry.d.ts +2 -0
- package/dist/reanimated/worklet-channel.d.ts +10 -0
- package/dist/reanimated/worklet-runtime.d.ts +466 -0
- package/dist/reanimated/worklets.d.ts +199 -0
- package/dist/reconciler.d.ts +102 -0
- package/dist/refresh.d.ts +1 -0
- package/dist/render.d.ts +37 -0
- package/dist/runtime.d.ts +235 -0
- package/dist/surfaces.d.ts +51 -0
- package/dist/types.d.ts +276 -0
- package/dist/ui-runtime.js +42276 -0
- package/dist/window-context.d.ts +7 -0
- package/dist/window-host.d.ts +41 -0
- package/dist/wire-delta.d.ts +20 -0
- package/package.json +177 -1
- package/scripts/bundle-app.mjs +88 -0
- package/scripts/conformance-utils.mjs +293 -0
- package/scripts/hot-update-alias-plugin.mjs +88 -0
- package/scripts/native-package-exports-plugin.mjs +235 -0
- package/scripts/pixel.mjs +152 -0
- package/scripts/png.mjs +198 -0
- package/scripts/react-refresh-swc.mjs +35 -0
- package/scripts/reanimated-bun-plugin.mjs +188 -0
- package/scripts/service-binary.d.mts +27 -0
- package/scripts/service-binary.mjs +100 -0
- package/src/reanimated/colors-processor-shim.ts +119 -0
- package/src/reanimated/reanimated-host.ts +69 -0
- package/src/reanimated/rngpui-reanimated-prebuilt.d.ts +7 -0
- package/src/reanimated/seam.ts +566 -0
- package/src/reanimated/ui-entry.ts +80 -0
- package/src/reanimated/worklet-channel.ts +64 -0
- package/src/reanimated/worklet-runtime.ts +2569 -0
- package/src/reanimated/worklets.ts +1334 -0
- package/src/refresh.ts +33 -0
package/src/refresh.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import RefreshRuntime from "react-refresh/runtime";
|
|
2
|
+
|
|
3
|
+
type RefreshGlobal = typeof globalThis & {
|
|
4
|
+
$RefreshReg$?: (type: unknown, id: string) => void;
|
|
5
|
+
$RefreshSig$?: () => (type: unknown, key?: string, forceReset?: boolean, getCustomHooks?: () => unknown[]) => unknown;
|
|
6
|
+
__rngpuiBeginHotUpdate?: () => void;
|
|
7
|
+
__rngpuiEndHotUpdate?: () => void;
|
|
8
|
+
__rngpuiHotUpdateDepth?: number;
|
|
9
|
+
__rngpuiPerformReactRefresh?: () => unknown;
|
|
10
|
+
__rngpuiRefreshReady?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const g = globalThis as RefreshGlobal;
|
|
14
|
+
let installed = false;
|
|
15
|
+
|
|
16
|
+
export function installRefreshRuntime() {
|
|
17
|
+
if (installed) return;
|
|
18
|
+
RefreshRuntime.injectIntoGlobalHook(globalThis);
|
|
19
|
+
g.$RefreshReg$ = (type, id) => RefreshRuntime.register(type, id);
|
|
20
|
+
g.$RefreshSig$ = () => RefreshRuntime.createSignatureFunctionForTransform();
|
|
21
|
+
g.__rngpuiBeginHotUpdate = () => {
|
|
22
|
+
g.__rngpuiHotUpdateDepth = (g.__rngpuiHotUpdateDepth ?? 0) + 1;
|
|
23
|
+
};
|
|
24
|
+
g.__rngpuiEndHotUpdate = () => {
|
|
25
|
+
g.__rngpuiHotUpdateDepth = Math.max(0, (g.__rngpuiHotUpdateDepth ?? 1) - 1);
|
|
26
|
+
if (g.__rngpuiHotUpdateDepth === 0) RefreshRuntime.performReactRefresh();
|
|
27
|
+
};
|
|
28
|
+
g.__rngpuiPerformReactRefresh = () => RefreshRuntime.performReactRefresh();
|
|
29
|
+
installed = true;
|
|
30
|
+
g.__rngpuiRefreshReady = true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
installRefreshRuntime();
|