@react-three/drei 10.8.0-alpha.1 → 11.0.0-alpha.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/core/_chunks/libs/tunnel-rat.mjs +11 -11
- package/core/_chunks/libs/zustand.mjs +3 -3
- package/core/core/index.d.mts +150 -150
- package/core/core/index.mjs +646 -646
- package/index.d.mts +5 -5
- package/native/_chunks/libs/tunnel-rat.mjs +11 -11
- package/native/_chunks/libs/zustand.mjs +3 -3
- package/native/native/index.d.mts +164 -164
- package/native/native/index.mjs +765 -765
- package/package.json +1 -1
- package/webgpu/webgpu/index.d.mts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __export, t as __commonJSMin } from "../rolldown-runtime.mjs";
|
|
2
|
-
import
|
|
2
|
+
import ReactExports from "react";
|
|
3
3
|
|
|
4
4
|
//#region node_modules/tunnel-rat/node_modules/zustand/esm/vanilla.mjs
|
|
5
5
|
var createStoreImpl, createStore;
|
|
@@ -108,8 +108,8 @@ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJ
|
|
|
108
108
|
if (process.env.NODE_ENV !== "production") (function() {
|
|
109
109
|
"use strict";
|
|
110
110
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(/* @__PURE__ */ new Error());
|
|
111
|
-
var React$
|
|
112
|
-
var ReactSharedInternals = React$
|
|
111
|
+
var React$1 = __require("react");
|
|
112
|
+
var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
113
113
|
function error(format) {
|
|
114
114
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
|
|
115
115
|
printWarning("error", format, args);
|
|
@@ -134,12 +134,12 @@ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJ
|
|
|
134
134
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
135
135
|
}
|
|
136
136
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
137
|
-
var useState$1 = React$
|
|
137
|
+
var useState$1 = React$1.useState, useEffect$1 = React$1.useEffect, useLayoutEffect$1 = React$1.useLayoutEffect, useDebugValue$1 = React$1.useDebugValue;
|
|
138
138
|
var didWarnOld18Alpha = false;
|
|
139
139
|
var didWarnUncachedGetSnapshot = false;
|
|
140
140
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
141
141
|
if (!didWarnOld18Alpha) {
|
|
142
|
-
if (React$
|
|
142
|
+
if (React$1.startTransition !== void 0) {
|
|
143
143
|
didWarnOld18Alpha = true;
|
|
144
144
|
error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.");
|
|
145
145
|
}
|
|
@@ -187,7 +187,7 @@ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJ
|
|
|
187
187
|
return getSnapshot();
|
|
188
188
|
}
|
|
189
189
|
var shim = !!!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined") ? useSyncExternalStore$1 : useSyncExternalStore;
|
|
190
|
-
var useSyncExternalStore$2 = React$
|
|
190
|
+
var useSyncExternalStore$2 = React$1.useSyncExternalStore !== void 0 ? React$1.useSyncExternalStore : shim;
|
|
191
191
|
exports.useSyncExternalStore = useSyncExternalStore$2;
|
|
192
192
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(/* @__PURE__ */ new Error());
|
|
193
193
|
})();
|
|
@@ -282,7 +282,7 @@ var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
282
282
|
if (process.env.NODE_ENV !== "production") (function() {
|
|
283
283
|
"use strict";
|
|
284
284
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(/* @__PURE__ */ new Error());
|
|
285
|
-
var React$
|
|
285
|
+
var React$1 = __require("react");
|
|
286
286
|
var shim = require_shim();
|
|
287
287
|
/**
|
|
288
288
|
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
@@ -293,7 +293,7 @@ var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
293
293
|
}
|
|
294
294
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
295
295
|
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
296
|
-
var useRef$1 = React$
|
|
296
|
+
var useRef$1 = React$1.useRef, useEffect$1 = React$1.useEffect, useMemo$1 = React$1.useMemo, useDebugValue$1 = React$1.useDebugValue;
|
|
297
297
|
function useSyncExternalStoreWithSelector$1(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
298
298
|
var instRef = useRef$1(null);
|
|
299
299
|
var inst;
|
|
@@ -389,7 +389,7 @@ var init_esm = __esmMin((() => {
|
|
|
389
389
|
init_vanilla();
|
|
390
390
|
init_vanilla();
|
|
391
391
|
import_with_selector = /* @__PURE__ */ __toESM(require_with_selector());
|
|
392
|
-
({useDebugValue} =
|
|
392
|
+
({useDebugValue} = ReactExports);
|
|
393
393
|
({useSyncExternalStoreWithSelector} = import_with_selector.default);
|
|
394
394
|
didWarnAboutEqualityFn = false;
|
|
395
395
|
createImpl = (createState) => {
|
|
@@ -409,12 +409,12 @@ var init_esm = __esmMin((() => {
|
|
|
409
409
|
//#endregion
|
|
410
410
|
//#region node_modules/tunnel-rat/dist/index.cjs.js
|
|
411
411
|
var require_index_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
412
|
-
var React
|
|
412
|
+
var React = __require("react");
|
|
413
413
|
var zustand = (init_esm(), __toCommonJS(esm_exports));
|
|
414
414
|
function _interopDefaultLegacy(e$1) {
|
|
415
415
|
return e$1 && typeof e$1 === "object" && "default" in e$1 ? e$1 : { "default": e$1 };
|
|
416
416
|
}
|
|
417
|
-
var React__default = /* @__PURE__ */ _interopDefaultLegacy(React
|
|
417
|
+
var React__default = /* @__PURE__ */ _interopDefaultLegacy(React);
|
|
418
418
|
var _window$document, _window$navigator;
|
|
419
419
|
/**
|
|
420
420
|
* An SSR-friendly useLayoutEffect.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReactExports from "react";
|
|
2
2
|
|
|
3
3
|
//#region node_modules/zustand/esm/vanilla.mjs
|
|
4
4
|
const createStoreImpl = (createState) => {
|
|
@@ -33,8 +33,8 @@ const createStore = (createState) => createState ? createStoreImpl(createState)
|
|
|
33
33
|
//#region node_modules/zustand/esm/react.mjs
|
|
34
34
|
const identity = (arg) => arg;
|
|
35
35
|
function useStore(api, selector = identity) {
|
|
36
|
-
const slice =
|
|
37
|
-
|
|
36
|
+
const slice = ReactExports.useSyncExternalStore(api.subscribe, () => selector(api.getState()), () => selector(api.getInitialState()));
|
|
37
|
+
ReactExports.useDebugValue(slice);
|
|
38
38
|
return slice;
|
|
39
39
|
}
|
|
40
40
|
const createImpl = (createState) => {
|