@series-inc/venus-sdk 3.3.0 → 3.3.1-beta.0
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/dist/{chunk-FFDRA6ET.mjs → chunk-C6GZ5FEB.mjs} +4 -5
- package/dist/chunk-C6GZ5FEB.mjs.map +1 -0
- package/dist/index.cjs +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/venus-api/index.cjs +2 -3
- package/dist/venus-api/index.cjs.map +1 -1
- package/dist/venus-api/index.mjs +1 -1
- package/dist/vite/index.cjs +524 -9
- package/dist/vite/index.cjs.map +1 -1
- package/dist/vite/index.mjs +524 -9
- package/dist/vite/index.mjs.map +1 -1
- package/package.json +2 -1
- package/dist/chunk-FFDRA6ET.mjs.map +0 -1
package/dist/venus-api/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SDK_VERSION, createHost, initializeStorage, initializeRoomsApi, initializeAds, initializePopups, initializeAnalytics, initializeIap, initializeLeaderboard, initializeLocalNotifications, initializePreloader, initializeTime, initializeLifecycleApi, initializeHaptics, initializeCdn, initializeFeaturesApi, initializeLoggingApi, initializeProfile, initializeSystem, initializeAvatar3d, initializeStackNavigation, initializeAi, initializeSimulation, initializeSocial } from '../chunk-
|
|
1
|
+
import { SDK_VERSION, createHost, initializeStorage, initializeRoomsApi, initializeAds, initializePopups, initializeAnalytics, initializeIap, initializeLeaderboard, initializeLocalNotifications, initializePreloader, initializeTime, initializeLifecycleApi, initializeHaptics, initializeCdn, initializeFeaturesApi, initializeLoggingApi, initializeProfile, initializeSystem, initializeAvatar3d, initializeStackNavigation, initializeAi, initializeSimulation, initializeSocial } from '../chunk-C6GZ5FEB.mjs';
|
|
2
2
|
import { createProxiedObject, createProxiedMethod } from '../chunk-QABXMFND.mjs';
|
|
3
3
|
import '../chunk-NSSMTXJJ.mjs';
|
|
4
4
|
|
package/dist/vite/index.cjs
CHANGED
|
@@ -67,8 +67,7 @@ var EMBEDDED_LIBRARIES = [
|
|
|
67
67
|
globalVar: "THREE",
|
|
68
68
|
cdnPath: "three/r170/three.min.js",
|
|
69
69
|
moduleSpecifiers: [
|
|
70
|
-
{ match: "exact", value: "three", behavior: "namespace" }
|
|
71
|
-
{ match: "prefix", value: "three/examples/jsm/", behavior: "namespace" }
|
|
70
|
+
{ match: "exact", value: "three", behavior: "namespace" }
|
|
72
71
|
],
|
|
73
72
|
loadStage: 0,
|
|
74
73
|
enabled: true
|
|
@@ -141,7 +140,473 @@ var MODULE_TO_LIBRARY_SPECIFIERS = EMBEDDED_LIBRARIES.filter(
|
|
|
141
140
|
}))
|
|
142
141
|
);
|
|
143
142
|
|
|
143
|
+
// src/shared-assets/generated/threeExports.ts
|
|
144
|
+
var EMBEDDED_THREE_VERSION = "0.170.0";
|
|
145
|
+
var EMBEDDED_THREE_NAMED_EXPORTS = [
|
|
146
|
+
"ACESFilmicToneMapping",
|
|
147
|
+
"AddEquation",
|
|
148
|
+
"AdditiveAnimationBlendMode",
|
|
149
|
+
"AdditiveBlending",
|
|
150
|
+
"AddOperation",
|
|
151
|
+
"AgXToneMapping",
|
|
152
|
+
"AlphaFormat",
|
|
153
|
+
"AlwaysCompare",
|
|
154
|
+
"AlwaysDepth",
|
|
155
|
+
"AlwaysStencilFunc",
|
|
156
|
+
"AmbientLight",
|
|
157
|
+
"AnimationAction",
|
|
158
|
+
"AnimationClip",
|
|
159
|
+
"AnimationLoader",
|
|
160
|
+
"AnimationMixer",
|
|
161
|
+
"AnimationObjectGroup",
|
|
162
|
+
"AnimationUtils",
|
|
163
|
+
"ArcCurve",
|
|
164
|
+
"ArrayCamera",
|
|
165
|
+
"ArrowHelper",
|
|
166
|
+
"AttachedBindMode",
|
|
167
|
+
"Audio",
|
|
168
|
+
"AudioAnalyser",
|
|
169
|
+
"AudioContext",
|
|
170
|
+
"AudioListener",
|
|
171
|
+
"AudioLoader",
|
|
172
|
+
"AxesHelper",
|
|
173
|
+
"BackSide",
|
|
174
|
+
"BasicDepthPacking",
|
|
175
|
+
"BasicShadowMap",
|
|
176
|
+
"BatchedMesh",
|
|
177
|
+
"Bone",
|
|
178
|
+
"BooleanKeyframeTrack",
|
|
179
|
+
"Box2",
|
|
180
|
+
"Box3",
|
|
181
|
+
"Box3Helper",
|
|
182
|
+
"BoxGeometry",
|
|
183
|
+
"BoxHelper",
|
|
184
|
+
"BufferAttribute",
|
|
185
|
+
"BufferGeometry",
|
|
186
|
+
"BufferGeometryLoader",
|
|
187
|
+
"ByteType",
|
|
188
|
+
"Cache",
|
|
189
|
+
"Camera",
|
|
190
|
+
"CameraHelper",
|
|
191
|
+
"CanvasTexture",
|
|
192
|
+
"CapsuleGeometry",
|
|
193
|
+
"CatmullRomCurve3",
|
|
194
|
+
"CineonToneMapping",
|
|
195
|
+
"CircleGeometry",
|
|
196
|
+
"ClampToEdgeWrapping",
|
|
197
|
+
"Clock",
|
|
198
|
+
"Color",
|
|
199
|
+
"ColorKeyframeTrack",
|
|
200
|
+
"ColorManagement",
|
|
201
|
+
"CompressedArrayTexture",
|
|
202
|
+
"CompressedCubeTexture",
|
|
203
|
+
"CompressedTexture",
|
|
204
|
+
"CompressedTextureLoader",
|
|
205
|
+
"ConeGeometry",
|
|
206
|
+
"ConstantAlphaFactor",
|
|
207
|
+
"ConstantColorFactor",
|
|
208
|
+
"Controls",
|
|
209
|
+
"createCanvasElement",
|
|
210
|
+
"CubeCamera",
|
|
211
|
+
"CubeReflectionMapping",
|
|
212
|
+
"CubeRefractionMapping",
|
|
213
|
+
"CubeTexture",
|
|
214
|
+
"CubeTextureLoader",
|
|
215
|
+
"CubeUVReflectionMapping",
|
|
216
|
+
"CubicBezierCurve",
|
|
217
|
+
"CubicBezierCurve3",
|
|
218
|
+
"CubicInterpolant",
|
|
219
|
+
"CullFaceBack",
|
|
220
|
+
"CullFaceFront",
|
|
221
|
+
"CullFaceFrontBack",
|
|
222
|
+
"CullFaceNone",
|
|
223
|
+
"Curve",
|
|
224
|
+
"CurvePath",
|
|
225
|
+
"CustomBlending",
|
|
226
|
+
"CustomToneMapping",
|
|
227
|
+
"CylinderGeometry",
|
|
228
|
+
"Cylindrical",
|
|
229
|
+
"Data3DTexture",
|
|
230
|
+
"DataArrayTexture",
|
|
231
|
+
"DataTexture",
|
|
232
|
+
"DataTextureLoader",
|
|
233
|
+
"DataUtils",
|
|
234
|
+
"DecrementStencilOp",
|
|
235
|
+
"DecrementWrapStencilOp",
|
|
236
|
+
"DefaultLoadingManager",
|
|
237
|
+
"DepthFormat",
|
|
238
|
+
"DepthStencilFormat",
|
|
239
|
+
"DepthTexture",
|
|
240
|
+
"DetachedBindMode",
|
|
241
|
+
"DirectionalLight",
|
|
242
|
+
"DirectionalLightHelper",
|
|
243
|
+
"DiscreteInterpolant",
|
|
244
|
+
"DodecahedronGeometry",
|
|
245
|
+
"DoubleSide",
|
|
246
|
+
"DstAlphaFactor",
|
|
247
|
+
"DstColorFactor",
|
|
248
|
+
"DynamicCopyUsage",
|
|
249
|
+
"DynamicDrawUsage",
|
|
250
|
+
"DynamicReadUsage",
|
|
251
|
+
"EdgesGeometry",
|
|
252
|
+
"EllipseCurve",
|
|
253
|
+
"EqualCompare",
|
|
254
|
+
"EqualDepth",
|
|
255
|
+
"EqualStencilFunc",
|
|
256
|
+
"EquirectangularReflectionMapping",
|
|
257
|
+
"EquirectangularRefractionMapping",
|
|
258
|
+
"Euler",
|
|
259
|
+
"EventDispatcher",
|
|
260
|
+
"ExtrudeGeometry",
|
|
261
|
+
"FileLoader",
|
|
262
|
+
"Float16BufferAttribute",
|
|
263
|
+
"Float32BufferAttribute",
|
|
264
|
+
"FloatType",
|
|
265
|
+
"Fog",
|
|
266
|
+
"FogExp2",
|
|
267
|
+
"FramebufferTexture",
|
|
268
|
+
"FrontSide",
|
|
269
|
+
"Frustum",
|
|
270
|
+
"GLBufferAttribute",
|
|
271
|
+
"GLSL1",
|
|
272
|
+
"GLSL3",
|
|
273
|
+
"GreaterCompare",
|
|
274
|
+
"GreaterDepth",
|
|
275
|
+
"GreaterEqualCompare",
|
|
276
|
+
"GreaterEqualDepth",
|
|
277
|
+
"GreaterEqualStencilFunc",
|
|
278
|
+
"GreaterStencilFunc",
|
|
279
|
+
"GridHelper",
|
|
280
|
+
"Group",
|
|
281
|
+
"HalfFloatType",
|
|
282
|
+
"HemisphereLight",
|
|
283
|
+
"HemisphereLightHelper",
|
|
284
|
+
"IcosahedronGeometry",
|
|
285
|
+
"ImageBitmapLoader",
|
|
286
|
+
"ImageLoader",
|
|
287
|
+
"ImageUtils",
|
|
288
|
+
"IncrementStencilOp",
|
|
289
|
+
"IncrementWrapStencilOp",
|
|
290
|
+
"InstancedBufferAttribute",
|
|
291
|
+
"InstancedBufferGeometry",
|
|
292
|
+
"InstancedInterleavedBuffer",
|
|
293
|
+
"InstancedMesh",
|
|
294
|
+
"Int16BufferAttribute",
|
|
295
|
+
"Int32BufferAttribute",
|
|
296
|
+
"Int8BufferAttribute",
|
|
297
|
+
"InterleavedBuffer",
|
|
298
|
+
"InterleavedBufferAttribute",
|
|
299
|
+
"Interpolant",
|
|
300
|
+
"InterpolateDiscrete",
|
|
301
|
+
"InterpolateLinear",
|
|
302
|
+
"InterpolateSmooth",
|
|
303
|
+
"IntType",
|
|
304
|
+
"InvertStencilOp",
|
|
305
|
+
"KeepStencilOp",
|
|
306
|
+
"KeyframeTrack",
|
|
307
|
+
"LatheGeometry",
|
|
308
|
+
"Layers",
|
|
309
|
+
"LessCompare",
|
|
310
|
+
"LessDepth",
|
|
311
|
+
"LessEqualCompare",
|
|
312
|
+
"LessEqualDepth",
|
|
313
|
+
"LessEqualStencilFunc",
|
|
314
|
+
"LessStencilFunc",
|
|
315
|
+
"Light",
|
|
316
|
+
"LightProbe",
|
|
317
|
+
"Line",
|
|
318
|
+
"Line3",
|
|
319
|
+
"LinearFilter",
|
|
320
|
+
"LinearInterpolant",
|
|
321
|
+
"LinearMipmapLinearFilter",
|
|
322
|
+
"LinearMipMapLinearFilter",
|
|
323
|
+
"LinearMipmapNearestFilter",
|
|
324
|
+
"LinearMipMapNearestFilter",
|
|
325
|
+
"LinearSRGBColorSpace",
|
|
326
|
+
"LinearToneMapping",
|
|
327
|
+
"LinearTransfer",
|
|
328
|
+
"LineBasicMaterial",
|
|
329
|
+
"LineCurve",
|
|
330
|
+
"LineCurve3",
|
|
331
|
+
"LineDashedMaterial",
|
|
332
|
+
"LineLoop",
|
|
333
|
+
"LineSegments",
|
|
334
|
+
"Loader",
|
|
335
|
+
"LoaderUtils",
|
|
336
|
+
"LoadingManager",
|
|
337
|
+
"LOD",
|
|
338
|
+
"LoopOnce",
|
|
339
|
+
"LoopPingPong",
|
|
340
|
+
"LoopRepeat",
|
|
341
|
+
"LuminanceAlphaFormat",
|
|
342
|
+
"LuminanceFormat",
|
|
343
|
+
"Material",
|
|
344
|
+
"MaterialLoader",
|
|
345
|
+
"MathUtils",
|
|
346
|
+
"Matrix2",
|
|
347
|
+
"Matrix3",
|
|
348
|
+
"Matrix4",
|
|
349
|
+
"MaxEquation",
|
|
350
|
+
"Mesh",
|
|
351
|
+
"MeshBasicMaterial",
|
|
352
|
+
"MeshDepthMaterial",
|
|
353
|
+
"MeshDistanceMaterial",
|
|
354
|
+
"MeshLambertMaterial",
|
|
355
|
+
"MeshMatcapMaterial",
|
|
356
|
+
"MeshNormalMaterial",
|
|
357
|
+
"MeshPhongMaterial",
|
|
358
|
+
"MeshPhysicalMaterial",
|
|
359
|
+
"MeshStandardMaterial",
|
|
360
|
+
"MeshToonMaterial",
|
|
361
|
+
"MinEquation",
|
|
362
|
+
"MirroredRepeatWrapping",
|
|
363
|
+
"MixOperation",
|
|
364
|
+
"MOUSE",
|
|
365
|
+
"MultiplyBlending",
|
|
366
|
+
"MultiplyOperation",
|
|
367
|
+
"NearestFilter",
|
|
368
|
+
"NearestMipmapLinearFilter",
|
|
369
|
+
"NearestMipMapLinearFilter",
|
|
370
|
+
"NearestMipmapNearestFilter",
|
|
371
|
+
"NearestMipMapNearestFilter",
|
|
372
|
+
"NeutralToneMapping",
|
|
373
|
+
"NeverCompare",
|
|
374
|
+
"NeverDepth",
|
|
375
|
+
"NeverStencilFunc",
|
|
376
|
+
"NoBlending",
|
|
377
|
+
"NoColorSpace",
|
|
378
|
+
"NormalAnimationBlendMode",
|
|
379
|
+
"NormalBlending",
|
|
380
|
+
"NotEqualCompare",
|
|
381
|
+
"NotEqualDepth",
|
|
382
|
+
"NotEqualStencilFunc",
|
|
383
|
+
"NoToneMapping",
|
|
384
|
+
"NumberKeyframeTrack",
|
|
385
|
+
"Object3D",
|
|
386
|
+
"ObjectLoader",
|
|
387
|
+
"ObjectSpaceNormalMap",
|
|
388
|
+
"OctahedronGeometry",
|
|
389
|
+
"OneFactor",
|
|
390
|
+
"OneMinusConstantAlphaFactor",
|
|
391
|
+
"OneMinusConstantColorFactor",
|
|
392
|
+
"OneMinusDstAlphaFactor",
|
|
393
|
+
"OneMinusDstColorFactor",
|
|
394
|
+
"OneMinusSrcAlphaFactor",
|
|
395
|
+
"OneMinusSrcColorFactor",
|
|
396
|
+
"OrthographicCamera",
|
|
397
|
+
"Path",
|
|
398
|
+
"PCFShadowMap",
|
|
399
|
+
"PCFSoftShadowMap",
|
|
400
|
+
"PerspectiveCamera",
|
|
401
|
+
"Plane",
|
|
402
|
+
"PlaneGeometry",
|
|
403
|
+
"PlaneHelper",
|
|
404
|
+
"PMREMGenerator",
|
|
405
|
+
"PointLight",
|
|
406
|
+
"PointLightHelper",
|
|
407
|
+
"Points",
|
|
408
|
+
"PointsMaterial",
|
|
409
|
+
"PolarGridHelper",
|
|
410
|
+
"PolyhedronGeometry",
|
|
411
|
+
"PositionalAudio",
|
|
412
|
+
"PropertyBinding",
|
|
413
|
+
"PropertyMixer",
|
|
414
|
+
"QuadraticBezierCurve",
|
|
415
|
+
"QuadraticBezierCurve3",
|
|
416
|
+
"Quaternion",
|
|
417
|
+
"QuaternionKeyframeTrack",
|
|
418
|
+
"QuaternionLinearInterpolant",
|
|
419
|
+
"RawShaderMaterial",
|
|
420
|
+
"Ray",
|
|
421
|
+
"Raycaster",
|
|
422
|
+
"RectAreaLight",
|
|
423
|
+
"RED_GREEN_RGTC2_Format",
|
|
424
|
+
"RED_RGTC1_Format",
|
|
425
|
+
"RedFormat",
|
|
426
|
+
"RedIntegerFormat",
|
|
427
|
+
"ReinhardToneMapping",
|
|
428
|
+
"RenderTarget",
|
|
429
|
+
"RepeatWrapping",
|
|
430
|
+
"ReplaceStencilOp",
|
|
431
|
+
"ReverseSubtractEquation",
|
|
432
|
+
"REVISION",
|
|
433
|
+
"RGB_BPTC_SIGNED_Format",
|
|
434
|
+
"RGB_BPTC_UNSIGNED_Format",
|
|
435
|
+
"RGB_ETC1_Format",
|
|
436
|
+
"RGB_ETC2_Format",
|
|
437
|
+
"RGB_PVRTC_2BPPV1_Format",
|
|
438
|
+
"RGB_PVRTC_4BPPV1_Format",
|
|
439
|
+
"RGB_S3TC_DXT1_Format",
|
|
440
|
+
"RGBA_ASTC_10x10_Format",
|
|
441
|
+
"RGBA_ASTC_10x5_Format",
|
|
442
|
+
"RGBA_ASTC_10x6_Format",
|
|
443
|
+
"RGBA_ASTC_10x8_Format",
|
|
444
|
+
"RGBA_ASTC_12x10_Format",
|
|
445
|
+
"RGBA_ASTC_12x12_Format",
|
|
446
|
+
"RGBA_ASTC_4x4_Format",
|
|
447
|
+
"RGBA_ASTC_5x4_Format",
|
|
448
|
+
"RGBA_ASTC_5x5_Format",
|
|
449
|
+
"RGBA_ASTC_6x5_Format",
|
|
450
|
+
"RGBA_ASTC_6x6_Format",
|
|
451
|
+
"RGBA_ASTC_8x5_Format",
|
|
452
|
+
"RGBA_ASTC_8x6_Format",
|
|
453
|
+
"RGBA_ASTC_8x8_Format",
|
|
454
|
+
"RGBA_BPTC_Format",
|
|
455
|
+
"RGBA_ETC2_EAC_Format",
|
|
456
|
+
"RGBA_PVRTC_2BPPV1_Format",
|
|
457
|
+
"RGBA_PVRTC_4BPPV1_Format",
|
|
458
|
+
"RGBA_S3TC_DXT1_Format",
|
|
459
|
+
"RGBA_S3TC_DXT3_Format",
|
|
460
|
+
"RGBA_S3TC_DXT5_Format",
|
|
461
|
+
"RGBADepthPacking",
|
|
462
|
+
"RGBAFormat",
|
|
463
|
+
"RGBAIntegerFormat",
|
|
464
|
+
"RGBDepthPacking",
|
|
465
|
+
"RGBFormat",
|
|
466
|
+
"RGBIntegerFormat",
|
|
467
|
+
"RGDepthPacking",
|
|
468
|
+
"RGFormat",
|
|
469
|
+
"RGIntegerFormat",
|
|
470
|
+
"RingGeometry",
|
|
471
|
+
"Scene",
|
|
472
|
+
"ShaderChunk",
|
|
473
|
+
"ShaderLib",
|
|
474
|
+
"ShaderMaterial",
|
|
475
|
+
"ShadowMaterial",
|
|
476
|
+
"Shape",
|
|
477
|
+
"ShapeGeometry",
|
|
478
|
+
"ShapePath",
|
|
479
|
+
"ShapeUtils",
|
|
480
|
+
"ShortType",
|
|
481
|
+
"SIGNED_RED_GREEN_RGTC2_Format",
|
|
482
|
+
"SIGNED_RED_RGTC1_Format",
|
|
483
|
+
"Skeleton",
|
|
484
|
+
"SkeletonHelper",
|
|
485
|
+
"SkinnedMesh",
|
|
486
|
+
"Source",
|
|
487
|
+
"Sphere",
|
|
488
|
+
"SphereGeometry",
|
|
489
|
+
"Spherical",
|
|
490
|
+
"SphericalHarmonics3",
|
|
491
|
+
"SplineCurve",
|
|
492
|
+
"SpotLight",
|
|
493
|
+
"SpotLightHelper",
|
|
494
|
+
"Sprite",
|
|
495
|
+
"SpriteMaterial",
|
|
496
|
+
"SrcAlphaFactor",
|
|
497
|
+
"SrcAlphaSaturateFactor",
|
|
498
|
+
"SrcColorFactor",
|
|
499
|
+
"SRGBColorSpace",
|
|
500
|
+
"SRGBTransfer",
|
|
501
|
+
"StaticCopyUsage",
|
|
502
|
+
"StaticDrawUsage",
|
|
503
|
+
"StaticReadUsage",
|
|
504
|
+
"StereoCamera",
|
|
505
|
+
"StreamCopyUsage",
|
|
506
|
+
"StreamDrawUsage",
|
|
507
|
+
"StreamReadUsage",
|
|
508
|
+
"StringKeyframeTrack",
|
|
509
|
+
"SubtractEquation",
|
|
510
|
+
"SubtractiveBlending",
|
|
511
|
+
"TangentSpaceNormalMap",
|
|
512
|
+
"TetrahedronGeometry",
|
|
513
|
+
"Texture",
|
|
514
|
+
"TextureLoader",
|
|
515
|
+
"TextureUtils",
|
|
516
|
+
"TorusGeometry",
|
|
517
|
+
"TorusKnotGeometry",
|
|
518
|
+
"TOUCH",
|
|
519
|
+
"Triangle",
|
|
520
|
+
"TriangleFanDrawMode",
|
|
521
|
+
"TrianglesDrawMode",
|
|
522
|
+
"TriangleStripDrawMode",
|
|
523
|
+
"TubeGeometry",
|
|
524
|
+
"Uint16BufferAttribute",
|
|
525
|
+
"Uint32BufferAttribute",
|
|
526
|
+
"Uint8BufferAttribute",
|
|
527
|
+
"Uint8ClampedBufferAttribute",
|
|
528
|
+
"Uniform",
|
|
529
|
+
"UniformsGroup",
|
|
530
|
+
"UniformsLib",
|
|
531
|
+
"UniformsUtils",
|
|
532
|
+
"UnsignedByteType",
|
|
533
|
+
"UnsignedInt248Type",
|
|
534
|
+
"UnsignedInt5999Type",
|
|
535
|
+
"UnsignedIntType",
|
|
536
|
+
"UnsignedShort4444Type",
|
|
537
|
+
"UnsignedShort5551Type",
|
|
538
|
+
"UnsignedShortType",
|
|
539
|
+
"UVMapping",
|
|
540
|
+
"Vector2",
|
|
541
|
+
"Vector3",
|
|
542
|
+
"Vector4",
|
|
543
|
+
"VectorKeyframeTrack",
|
|
544
|
+
"VideoTexture",
|
|
545
|
+
"VSMShadowMap",
|
|
546
|
+
"WebGL3DRenderTarget",
|
|
547
|
+
"WebGLArrayRenderTarget",
|
|
548
|
+
"WebGLCoordinateSystem",
|
|
549
|
+
"WebGLCubeRenderTarget",
|
|
550
|
+
"WebGLMultipleRenderTargets",
|
|
551
|
+
"WebGLRenderer",
|
|
552
|
+
"WebGLRenderTarget",
|
|
553
|
+
"WebGLUtils",
|
|
554
|
+
"WebGPUCoordinateSystem",
|
|
555
|
+
"WireframeGeometry",
|
|
556
|
+
"WrapAroundEnding",
|
|
557
|
+
"ZeroCurvatureEnding",
|
|
558
|
+
"ZeroFactor",
|
|
559
|
+
"ZeroSlopeEnding",
|
|
560
|
+
"ZeroStencilOp"
|
|
561
|
+
];
|
|
562
|
+
|
|
144
563
|
// src/vite/venusLibrariesPlugin.ts
|
|
564
|
+
async function resolveInstalledPackageVersion(pluginContext, packageName, cache) {
|
|
565
|
+
if (cache.has(packageName)) {
|
|
566
|
+
return cache.get(packageName) ?? null;
|
|
567
|
+
}
|
|
568
|
+
const readVersion = (packageJsonPath) => {
|
|
569
|
+
const raw = fs__default.default.readFileSync(packageJsonPath, "utf8");
|
|
570
|
+
const parsed = JSON.parse(raw);
|
|
571
|
+
return typeof parsed?.version === "string" ? parsed.version : null;
|
|
572
|
+
};
|
|
573
|
+
const findNearestPackageJson = (fromFilePath) => {
|
|
574
|
+
let dir = path__default.default.dirname(fromFilePath);
|
|
575
|
+
while (true) {
|
|
576
|
+
const candidate = path__default.default.join(dir, "package.json");
|
|
577
|
+
if (fs__default.default.existsSync(candidate) && fs__default.default.statSync(candidate).isFile()) {
|
|
578
|
+
return candidate;
|
|
579
|
+
}
|
|
580
|
+
const parent = path__default.default.dirname(dir);
|
|
581
|
+
if (parent === dir) return null;
|
|
582
|
+
dir = parent;
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
try {
|
|
586
|
+
const pkgJsonResolved = await pluginContext.resolve(
|
|
587
|
+
`${packageName}/package.json`,
|
|
588
|
+
void 0,
|
|
589
|
+
{ skipSelf: true }
|
|
590
|
+
);
|
|
591
|
+
if (pkgJsonResolved?.id && fs__default.default.existsSync(pkgJsonResolved.id)) {
|
|
592
|
+
const v = readVersion(pkgJsonResolved.id);
|
|
593
|
+
cache.set(packageName, v);
|
|
594
|
+
return v;
|
|
595
|
+
}
|
|
596
|
+
const entryResolved = await pluginContext.resolve(packageName, void 0, {
|
|
597
|
+
skipSelf: true
|
|
598
|
+
});
|
|
599
|
+
if (entryResolved?.id) {
|
|
600
|
+
const pkgJsonPath = findNearestPackageJson(entryResolved.id);
|
|
601
|
+
const v = pkgJsonPath ? readVersion(pkgJsonPath) : null;
|
|
602
|
+
cache.set(packageName, v);
|
|
603
|
+
return v;
|
|
604
|
+
}
|
|
605
|
+
} catch {
|
|
606
|
+
}
|
|
607
|
+
cache.set(packageName, null);
|
|
608
|
+
return null;
|
|
609
|
+
}
|
|
145
610
|
function generateVirtualModule(lib, spec, importPath) {
|
|
146
611
|
const errorCheck = `
|
|
147
612
|
// Wait for shim to complete loading libraries
|
|
@@ -167,6 +632,17 @@ if (!window.__venusLibraryExports || !window.__venusLibraryExports['${lib.librar
|
|
|
167
632
|
}
|
|
168
633
|
`;
|
|
169
634
|
const libVar = `window.__venusLibraryExports['${lib.libraryKey}']`;
|
|
635
|
+
const renderForwardedNamedExports = (names, chunkSize = 50) => {
|
|
636
|
+
if (names.length === 0) return "";
|
|
637
|
+
const chunks = [];
|
|
638
|
+
for (let i = 0; i < names.length; i += chunkSize) {
|
|
639
|
+
const slice = names.slice(i, i + chunkSize).join(", ");
|
|
640
|
+
chunks.push(`export const { ${slice} } = lib;`);
|
|
641
|
+
}
|
|
642
|
+
return `
|
|
643
|
+
${chunks.join("\n")}
|
|
644
|
+
`;
|
|
645
|
+
};
|
|
170
646
|
switch (spec.behavior) {
|
|
171
647
|
case "react-jsx-runtime":
|
|
172
648
|
return `
|
|
@@ -206,9 +682,12 @@ export const {
|
|
|
206
682
|
namedExports = `
|
|
207
683
|
export const { createRoot, hydrateRoot, render, unmountComponentAtNode, findDOMNode, version } = lib;`;
|
|
208
684
|
} else if (lib.packageName === "three") {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
685
|
+
if (lib.version !== EMBEDDED_THREE_VERSION) {
|
|
686
|
+
namedExports = `
|
|
687
|
+
throw new Error('[Venus Libraries] Embedded three version mismatch: manifest has ${lib.version} but generated export list is for ${EMBEDDED_THREE_VERSION}. Run: npm run generate:embedded-three-exports (packages/api)');`;
|
|
688
|
+
} else {
|
|
689
|
+
namedExports = renderForwardedNamedExports(EMBEDDED_THREE_NAMED_EXPORTS);
|
|
690
|
+
}
|
|
212
691
|
} else {
|
|
213
692
|
namedExports = "";
|
|
214
693
|
}
|
|
@@ -244,10 +723,23 @@ function venusLibrariesPlugin(options = {}) {
|
|
|
244
723
|
let isServe = false;
|
|
245
724
|
let enabled = false;
|
|
246
725
|
let appName = options.appName;
|
|
726
|
+
const installedVersionCache = /* @__PURE__ */ new Map();
|
|
727
|
+
const loggedMismatch = /* @__PURE__ */ new Set();
|
|
247
728
|
return {
|
|
248
729
|
name: "vite-plugin-venus-libraries",
|
|
249
730
|
enforce: "pre",
|
|
250
731
|
// Run before other plugins to intercept imports
|
|
732
|
+
async buildStart() {
|
|
733
|
+
if (!enabled) return;
|
|
734
|
+
const uniquePackages = Array.from(
|
|
735
|
+
new Set(
|
|
736
|
+
EMBEDDED_LIBRARIES.filter((l) => l.enabled).map((l) => l.packageName)
|
|
737
|
+
)
|
|
738
|
+
);
|
|
739
|
+
for (const pkgName of uniquePackages) {
|
|
740
|
+
await resolveInstalledPackageVersion(this, pkgName, installedVersionCache);
|
|
741
|
+
}
|
|
742
|
+
},
|
|
251
743
|
// 0. Configure Vite build options
|
|
252
744
|
config(config) {
|
|
253
745
|
if (!enabled) return;
|
|
@@ -298,7 +790,7 @@ function venusLibrariesPlugin(options = {}) {
|
|
|
298
790
|
}
|
|
299
791
|
},
|
|
300
792
|
// 1. Intercept library imports
|
|
301
|
-
resolveId(id, importer) {
|
|
793
|
+
async resolveId(id, importer) {
|
|
302
794
|
if (!enabled) return null;
|
|
303
795
|
const match = MODULE_TO_LIBRARY_SPECIFIERS.find((spec) => {
|
|
304
796
|
if (spec.match === "exact") {
|
|
@@ -309,9 +801,28 @@ function venusLibrariesPlugin(options = {}) {
|
|
|
309
801
|
return false;
|
|
310
802
|
});
|
|
311
803
|
if (match) {
|
|
804
|
+
const lib = EMBEDDED_LIBRARY_BY_KEY[match.libraryKey];
|
|
805
|
+
if (!lib) {
|
|
806
|
+
throw new Error(
|
|
807
|
+
`[Venus Libraries] Internal error: no embedded library for key ${match.libraryKey}`
|
|
808
|
+
);
|
|
809
|
+
}
|
|
810
|
+
const installed = await resolveInstalledPackageVersion(
|
|
811
|
+
this,
|
|
812
|
+
lib.packageName,
|
|
813
|
+
installedVersionCache
|
|
814
|
+
);
|
|
815
|
+
if (installed !== lib.version) {
|
|
816
|
+
if (debug && !loggedMismatch.has(lib.packageName)) {
|
|
817
|
+
loggedMismatch.add(lib.packageName);
|
|
818
|
+
console.log(
|
|
819
|
+
`[Venus Libraries] Skipping embedded ${lib.packageName}: installed=${installed ?? "unknown"} embedded=${lib.version}`
|
|
820
|
+
);
|
|
821
|
+
}
|
|
822
|
+
return null;
|
|
823
|
+
}
|
|
312
824
|
requiredLibraries.add(match.libraryKey);
|
|
313
|
-
|
|
314
|
-
return virtualId;
|
|
825
|
+
return `\0virtual:venus-lib:${match.libraryKey}:${id}`;
|
|
315
826
|
}
|
|
316
827
|
return null;
|
|
317
828
|
},
|
|
@@ -330,7 +841,11 @@ function venusLibrariesPlugin(options = {}) {
|
|
|
330
841
|
`Unknown library: ${libraryKey}. Available libraries: ${availableKeys}`
|
|
331
842
|
);
|
|
332
843
|
}
|
|
333
|
-
const spec = lib.moduleSpecifiers.find((s) =>
|
|
844
|
+
const spec = lib.moduleSpecifiers.find((s) => {
|
|
845
|
+
if (s.match === "exact") return s.value === importPath;
|
|
846
|
+
if (s.match === "prefix") return importPath.startsWith(s.value);
|
|
847
|
+
return false;
|
|
848
|
+
});
|
|
334
849
|
if (!spec) {
|
|
335
850
|
const validSpecifiers = lib.moduleSpecifiers.map((s) => s.value).join(", ");
|
|
336
851
|
throw new Error(
|