New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@splinetool/react-spline

Package Overview
Dependencies
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splinetool/react-spline - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

4

dist/react-spline.cjs.js

@@ -1,2 +0,2 @@

"use strict";var I=Object.defineProperty;var a=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var R=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&R(e,r,t[r]);if(a)for(var r of a(t))x.call(t,r)&&R(e,r,t[r]);return e};var E=(e,t)=>{var r={};for(var n in e)w.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&a)for(var n of a(e))t.indexOf(n)<0&&x.call(e,n)&&(r[n]=e[n]);return r};var u=require("react"),L=require("@splinetool/runtime");function P(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var U=P(u);function N(e){return function(t){e.forEach(function(r){typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var k={exports:{}},l={};/**
"use strict";var I=Object.defineProperty;var a=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var R=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&R(e,r,t[r]);if(a)for(var r of a(t))x.call(t,r)&&R(e,r,t[r]);return e};var E=(e,t)=>{var r={};for(var n in e)w.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&a)for(var n of a(e))t.indexOf(n)<0&&x.call(e,n)&&(r[n]=e[n]);return r};var i=require("react"),L=require("@splinetool/runtime");function P(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var U=P(i);function N(e){return function(t){e.forEach(function(r){typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var k={exports:{}},l={};/**
* @license React

@@ -9,2 +9,2 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var T=U.default,C=Symbol.for("react.element"),F=Symbol.for("react.fragment"),B=Object.prototype.hasOwnProperty,H=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,r){var n,o={},f=null,c=null;r!==void 0&&(f=""+r),t.key!==void 0&&(f=""+t.key),t.ref!==void 0&&(c=t.ref);for(n in t)B.call(t,n)&&!J.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:C,type:e,key:f,ref:c,props:o,_owner:H.current}}l.Fragment=F;l.jsx=O;l.jsxs=O;k.exports=l;const W=k.exports.jsx,Y=u.forwardRef((z,h)=>{var v=z,{scene:e,style:t,onMouseDown:r,onMouseUp:n,onMouseHover:o,onKeyDown:f,onKeyUp:c,onStart:j,onLookAt:S,onFollow:$,onWheel:g,onLoad:p,autoRender:q=!1}=v,D=E(v,["scene","style","onMouseDown","onMouseUp","onMouseHover","onKeyDown","onKeyUp","onStart","onLookAt","onFollow","onWheel","onLoad","autoRender"]);const m=u.useRef(null),[A,y]=u.useState(!0);return u.useEffect(()=>{y(!0);let s;const d=[{name:"mouseDown",cb:r},{name:"mouseUp",cb:n},{name:"mouseHover",cb:o},{name:"keyDown",cb:f},{name:"keyUp",cb:c},{name:"start",cb:j},{name:"lookAt",cb:S},{name:"follow",cb:$},{name:"scroll",cb:g}];if(m.current){s=new L.Application(m.current,{autoRender:q});async function i(){await s.load(e);for(let _ of d)_.cb&&s.addEventListener(_.name,_.cb);y(!1),p==null||p(s)}i()}return()=>{for(let i of d)i.cb&&s.removeEventListener(i.name,i.cb);s.dispose()}},[e]),W("canvas",b({ref:N([h,m]),style:b({display:A?"none":"block"},t)},D))});module.exports=Y;
*/var T=U.default,C=Symbol.for("react.element"),F=Symbol.for("react.fragment"),B=Object.prototype.hasOwnProperty,H=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,r){var n,o={},u=null,c=null;r!==void 0&&(u=""+r),t.key!==void 0&&(u=""+t.key),t.ref!==void 0&&(c=t.ref);for(n in t)B.call(t,n)&&!J.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:C,type:e,key:u,ref:c,props:o,_owner:H.current}}l.Fragment=F;l.jsx=O;l.jsxs=O;k.exports=l;const W=k.exports.jsx,Y=i.forwardRef((z,h)=>{var v=z,{scene:e,style:t,onMouseDown:r,onMouseUp:n,onMouseHover:o,onKeyDown:u,onKeyUp:c,onStart:j,onLookAt:S,onFollow:$,onWheel:g,onLoad:p,renderOnDemand:q=!0}=v,D=E(v,["scene","style","onMouseDown","onMouseUp","onMouseHover","onKeyDown","onKeyUp","onStart","onLookAt","onFollow","onWheel","onLoad","renderOnDemand"]);const m=i.useRef(null),[A,y]=i.useState(!0);return i.useEffect(()=>{y(!0);let s;const d=[{name:"mouseDown",cb:r},{name:"mouseUp",cb:n},{name:"mouseHover",cb:o},{name:"keyDown",cb:u},{name:"keyUp",cb:c},{name:"start",cb:j},{name:"lookAt",cb:S},{name:"follow",cb:$},{name:"scroll",cb:g}];if(m.current){s=new L.Application(m.current,{renderOnDemand:q});async function f(){await s.load(e);for(let _ of d)_.cb&&s.addEventListener(_.name,_.cb);y(!1),p==null||p(s)}f()}return()=>{for(let f of d)f.cb&&s.removeEventListener(f.name,f.cb);s.dispose()}},[e]),W("canvas",b({ref:N([h,m]),style:b({display:A?"none":"block"},t)},D))});module.exports=Y;

@@ -87,3 +87,3 @@ var __defProp = Object.defineProperty;

onLoad,
autoRender = false
renderOnDemand = true
} = _b, props = __objRest(_b, [

@@ -102,3 +102,3 @@ "scene",

"onLoad",
"autoRender"
"renderOnDemand"
]);

@@ -140,3 +140,3 @@ const canvasRef = useRef(null);

speApp = new Application(canvasRef.current, {
autoRender
renderOnDemand
});

@@ -143,0 +143,0 @@ async function init() {

@@ -18,5 +18,5 @@ /// <reference types="react" />

onWheel?: (e: SplineEvent) => void;
autoRender?: boolean;
renderOnDemand?: boolean;
}
declare const Spline: import("react").ForwardRefExoticComponent<SplineProps & import("react").RefAttributes<HTMLCanvasElement>>;
export default Spline;
{
"name": "@splinetool/react-spline",
"version": "2.2.2",
"version": "2.2.3",
"packageManager": "yarn@3.2.0",

@@ -36,3 +36,3 @@ "files": [

"devDependencies": {
"@splinetool/runtime": "^0.9.65",
"@splinetool/runtime": "^0.9.109",
"@types/animejs": "^3.1.4",

@@ -39,0 +39,0 @@ "@types/node": "^17.0.31",

@@ -237,19 +237,20 @@ [![](https://raw.githubusercontent.com/splinetool/react-spline/main/.github/screenshots/hero.png)](https://my.spline.design/splinereactlogocopycopy-eaa074bf6b2cc82d870c96e262a625ae/)

| Name | Type | Description |
| --------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `scene` | `string` | Scene file |
| `className?` | `string` | CSS classes |
| `style?` | `object` | CSS style |
| `id?` | `string` | Canvas id |
| `ref?` | `React.Ref<HTMLDivElement>` | A ref pointing to canvas element. |
| `onLoad?` | `(spline: Application) => void` | Gets called once the scene has loaded. The `spline` parameter is an instance of the [Spline Application](#spline-app-methods) |
| `onWheel?` | `(e: SplineEvent) => void` | Gets called on the [`wheel`](https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event) event on the canvas |
| `onMouseDown?` | `(e: SplineEvent) => void` | Gets called once a Spline `Mouse Down` event is fired |
| `onMouseHover?` | `(e: SplineEvent) => void` | Gets called once a Spline `Mouse Hover` event is fired |
| `onMouseUp?` | `(e: SplineEvent) => void` | Gets called once a Spline `Mouse Up` event is fired |
| `onKeyDown?` | `(e: SplineEvent) => void` | Gets called once a Spline `Key Down` event is fired |
| `onKeyUp?` | `(e: SplineEvent) => void` | Gets called once a Spline `Key Up` event is fired |
| `onStart?` | `(e: SplineEvent) => void` | Gets called once a Spline `Start` event is fired |
| `onLookAt?` | `(e: SplineEvent) => void` | Gets called once a Spline `Look At` event is fired |
| `onFollow?` | `(e: SplineEvent) => void` | Gets called once a Spline `Mouse Up` event is fired |
| Name | Type | Description |
| ----------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `scene` | `string` | Scene file |
| `onLoad?` | `(spline: Application) => void` | Gets called once the scene has loaded. The `spline` parameter is an instance of the [Spline Application](#spline-app-methods) |
| `renderOnDemand?` | `boolean` | Wether or not to enable [on demand rendering](https://threejs.org/manual/#en/rendering-on-demand). Default `true`. |
| `className?` | `string` | CSS classes |
| `style?` | `object` | CSS style |
| `id?` | `string` | Canvas id |
| `ref?` | `React.Ref<HTMLDivElement>` | A ref pointing to canvas element. |
| `onWheel?` | `(e: SplineEvent) => void` | Gets called on the [`wheel`](https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event) event on the canvas |
| `onMouseDown?` | `(e: SplineEvent) => void` | Gets called once a Spline `Mouse Down` event is fired |
| `onMouseHover?` | `(e: SplineEvent) => void` | Gets called once a Spline `Mouse Hover` event is fired |
| `onMouseUp?` | `(e: SplineEvent) => void` | Gets called once a Spline `Mouse Up` event is fired |
| `onKeyDown?` | `(e: SplineEvent) => void` | Gets called once a Spline `Key Down` event is fired |
| `onKeyUp?` | `(e: SplineEvent) => void` | Gets called once a Spline `Key Up` event is fired |
| `onStart?` | `(e: SplineEvent) => void` | Gets called once a Spline `Start` event is fired |
| `onLookAt?` | `(e: SplineEvent) => void` | Gets called once a Spline `Look At` event is fired |
| `onFollow?` | `(e: SplineEvent) => void` | Gets called once a Spline `Mouse Up` event is fired |

@@ -256,0 +257,0 @@ ### Spline App Methods

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc