@plasmicpkgs/react-parallax-tilt 0.0.1 → 0.0.2
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/index.d.ts +6 -1
- package/dist/react-parallax-tilt.cjs.development.js +13 -3
- package/dist/react-parallax-tilt.cjs.development.js.map +1 -1
- package/dist/react-parallax-tilt.cjs.production.min.js +1 -1
- package/dist/react-parallax-tilt.cjs.production.min.js.map +1 -1
- package/dist/react-parallax-tilt.esm.js +13 -3
- package/dist/react-parallax-tilt.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
1
2
|
import { ComponentProps } from "react";
|
|
2
3
|
import ReactParallaxTilt from "react-parallax-tilt";
|
|
3
|
-
export
|
|
4
|
+
export declare type TiltProps = ComponentProps<typeof ReactParallaxTilt>;
|
|
5
|
+
export default function Tilt(props: TiltProps): JSX.Element;
|
|
6
|
+
export declare function registerTilt(loader?: {
|
|
7
|
+
registerComponent: typeof registerComponent;
|
|
8
|
+
}, customTiltMeta?: ComponentMeta<TiltProps>): void;
|
|
@@ -35,8 +35,10 @@ function Tilt(props) {
|
|
|
35
35
|
}, (_props$style = props.style) != null ? _props$style : {})
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
name: "
|
|
38
|
+
var parallaxTiltMeta = {
|
|
39
|
+
name: "hostless-parallax-tilt",
|
|
40
|
+
displayName: "Tilt",
|
|
41
|
+
importName: "Tilt",
|
|
40
42
|
importPath: "@plasmicpkgs/react-parallax-tilt",
|
|
41
43
|
props: {
|
|
42
44
|
children: {
|
|
@@ -166,7 +168,15 @@ registerComponent(Tilt, {
|
|
|
166
168
|
defaultStyles: {
|
|
167
169
|
maxWidth: "100%"
|
|
168
170
|
}
|
|
169
|
-
}
|
|
171
|
+
};
|
|
172
|
+
function registerTilt(loader, customTiltMeta) {
|
|
173
|
+
if (loader) {
|
|
174
|
+
loader.registerComponent(Tilt, customTiltMeta != null ? customTiltMeta : parallaxTiltMeta);
|
|
175
|
+
} else {
|
|
176
|
+
registerComponent(Tilt, customTiltMeta != null ? customTiltMeta : parallaxTiltMeta);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
170
179
|
|
|
171
180
|
exports.default = Tilt;
|
|
181
|
+
exports.registerTilt = registerTilt;
|
|
172
182
|
//# sourceMappingURL=react-parallax-tilt.cjs.development.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-parallax-tilt.cjs.development.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps } from \"react\";\nimport ReactParallaxTilt from \"react-parallax-tilt\";\n\nexport default function Tilt(props:
|
|
1
|
+
{"version":3,"file":"react-parallax-tilt.cjs.development.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps } from \"react\";\nimport ReactParallaxTilt from \"react-parallax-tilt\";\n\nexport type TiltProps = ComponentProps<typeof ReactParallaxTilt>;\n\nexport default function Tilt(props: TiltProps) {\n return (\n <ReactParallaxTilt\n {...props}\n style={{\n transformStyle: \"preserve-3d\",\n ...(props.style ?? {}),\n }}\n ></ReactParallaxTilt>\n );\n}\n\nconst parallaxTiltMeta: ComponentMeta<TiltProps> = {\n name: \"hostless-parallax-tilt\",\n displayName: \"Tilt\",\n importName: \"Tilt\",\n importPath: \"@plasmicpkgs/react-parallax-tilt\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: {\n type: \"img\",\n src: \"https://placekitten.com/300/200\",\n style: {\n maxWidth: \"100%\",\n },\n },\n },\n tiltEnable: {\n type: \"boolean\",\n // defaultValueHint: true,\n description: \"Enable tilt effect\",\n },\n tiltReverse: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reverse tilt direction\",\n },\n tiltAngleXInitial: {\n type: \"number\",\n // defaultValueHint: 0,\n description: \"Initial tilt angle in degrees on X axis\",\n },\n tiltAngleYInitial: {\n type: \"number\",\n // defaultValueHint: 0,\n description: \"Initial tilt angle in degrees on Y axis\",\n },\n tiltMaxAngleX: {\n type: \"number\",\n // defaultValueHint: 20,\n description: \"Maximum tilt angle in degrees on X axis\",\n },\n tiltMaxAngleY: {\n type: \"number\",\n // defaultValueHint: 20,\n description: \"Maximum tilt angle in degrees on Y axis\",\n },\n tiltAxis: {\n type: \"choice\",\n options: [\"x\", \"y\"],\n description:\n \"Which axis should be enabled (unset means both are enabled)\",\n },\n glareEnable: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Enable glare effect\",\n },\n glareMaxOpacity: {\n type: \"number\",\n // defaultValueHint: 0.7,\n description: \"Maximum opacity of glare effect\",\n },\n glareColor: {\n // TODO replace with color picker\n type: \"string\",\n // defaultValueHint: \"#ffffff\",\n description: \"Color of glare effect\",\n },\n glareBorderRadius: {\n type: \"string\",\n // defaultValueHint: '0',\n description: \"Border radius of glare effect\",\n },\n glarePosition: {\n type: \"choice\",\n options: [\"top\", \"bottom\", \"left\", \"right\", \"all\"],\n // defaultValueHint: 'bottom',\n description: \"Position of the glare effect\",\n },\n glareReverse: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reverse glare direction\",\n },\n scale: {\n type: \"number\",\n // defaultValueHint: 1,\n description: \"Scale of the element\",\n },\n perspective: {\n type: \"number\",\n // defaultValueHint: 1000,\n description:\n \"The perspective property defines how far the object (wrapped/child component) is away from the user. The lower the more extreme the tilt gets.\",\n },\n flipVertically: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Flip the element vertically\",\n },\n flipHorizontally: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Flip the element horizontally\",\n },\n reset: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reset the element to its original state\",\n },\n transitionEasing: {\n type: \"string\",\n // defaultValueHint: 'cubic-bezier(.03,.98,.52,.99)',\n description: \"Easing function for the transition\",\n },\n transitionSpeed: {\n type: \"number\",\n // defaultValueHint: 400,\n description: \"Transition speed in milliseconds\",\n },\n trackOnWindow: {\n type: \"boolean\",\n // defaultValueHint: false,\n description:\n \"Track the mouse position on the whole window, not just on the element\",\n },\n gyroscope: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Enable device orientation detection\",\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerTilt(\n loader?: { registerComponent: typeof registerComponent },\n customTiltMeta?: ComponentMeta<TiltProps>\n) {\n if (loader) {\n loader.registerComponent(Tilt, customTiltMeta ?? parallaxTiltMeta);\n } else {\n registerComponent(Tilt, customTiltMeta ?? parallaxTiltMeta);\n }\n}\n"],"names":["Tilt","props","React","ReactParallaxTilt","style","transformStyle","parallaxTiltMeta","name","displayName","importName","importPath","children","type","defaultValue","src","maxWidth","tiltEnable","description","tiltReverse","tiltAngleXInitial","tiltAngleYInitial","tiltMaxAngleX","tiltMaxAngleY","tiltAxis","options","glareEnable","glareMaxOpacity","glareColor","glareBorderRadius","glarePosition","glareReverse","scale","perspective","flipVertically","flipHorizontally","reset","transitionEasing","transitionSpeed","trackOnWindow","gyroscope","isDefaultExport","defaultStyles","registerTilt","loader","customTiltMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;SAQwBA,KAAKC;;;AAC3B,SACEC,mBAAA,CAACC,iBAAD,oBACMF;AACJG,IAAAA,KAAK;AACHC,MAAAA,cAAc,EAAE;AADb,uBAECJ,KAAK,CAACG,KAFP,2BAEgB,EAFhB;IAFP,CADF;AASD;AAED,IAAME,gBAAgB,GAA6B;AACjDC,EAAAA,IAAI,EAAE,wBAD2C;AAEjDC,EAAAA,WAAW,EAAE,MAFoC;AAGjDC,EAAAA,UAAU,EAAE,MAHqC;AAIjDC,EAAAA,UAAU,EAAE,kCAJqC;AAKj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W,EAAE;AAHE,KA9GZ;AAmHLqB,IAAAA,aAAa,EAAE;AACb1B,MAAAA,IAAI,EAAE,SADO;AAEb;AACAK,MAAAA,WAAW,EACT;AAJW,KAnHV;AAyHLsB,IAAAA,SAAS,EAAE;AACT3B,MAAAA,IAAI,EAAE,SADG;AAET;AACAK,MAAAA,WAAW,EAAE;AAHJ;AAzHN,GAL0C;AAoIjDuB,EAAAA,eAAe,EAAE,IApIgC;AAqIjDC,EAAAA,aAAa,EAAE;AACb1B,IAAAA,QAAQ,EAAE;AADG;AArIkC,CAAnD;SA0IgB2B,aACdC,QACAC;AAEA,MAAID,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyB7C,IAAzB,EAA+B4C,cAA/B,WAA+BA,cAA/B,GAAiDtC,gBAAjD;AACD,GAFD,MAEO;AACLuC,IAAAA,iBAAiB,CAAC7C,IAAD,EAAO4C,cAAP,WAAOA,cAAP,GAAyBtC,gBAAzB,CAAjB;AACD;AACF;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@plasmicapp/host/registerComponent")),i=e(require("react")),n=e(require("react-parallax-tilt"));function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function o(e){var t;return i.createElement(n,Object.assign({},e,{style:r({transformStyle:"preserve-3d"},null!=(t=e.style)?t:{})}))}
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@plasmicapp/host/registerComponent")),i=e(require("react")),n=e(require("react-parallax-tilt"));function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function o(e){var t;return i.createElement(n,Object.assign({},e,{style:r({transformStyle:"preserve-3d"},null!=(t=e.style)?t:{})}))}var l={name:"hostless-parallax-tilt",displayName:"Tilt",importName:"Tilt",importPath:"@plasmicpkgs/react-parallax-tilt",props:{children:{type:"slot",defaultValue:{type:"img",src:"https://placekitten.com/300/200",style:{maxWidth:"100%"}}},tiltEnable:{type:"boolean",description:"Enable tilt effect"},tiltReverse:{type:"boolean",description:"Reverse tilt direction"},tiltAngleXInitial:{type:"number",description:"Initial tilt angle in degrees on X axis"},tiltAngleYInitial:{type:"number",description:"Initial tilt angle in degrees on Y axis"},tiltMaxAngleX:{type:"number",description:"Maximum tilt angle in degrees on X axis"},tiltMaxAngleY:{type:"number",description:"Maximum tilt angle in degrees on Y axis"},tiltAxis:{type:"choice",options:["x","y"],description:"Which axis should be enabled (unset means both are enabled)"},glareEnable:{type:"boolean",description:"Enable glare effect"},glareMaxOpacity:{type:"number",description:"Maximum opacity of glare effect"},glareColor:{type:"string",description:"Color of glare effect"},glareBorderRadius:{type:"string",description:"Border radius of glare effect"},glarePosition:{type:"choice",options:["top","bottom","left","right","all"],description:"Position of the glare effect"},glareReverse:{type:"boolean",description:"Reverse glare direction"},scale:{type:"number",description:"Scale of the element"},perspective:{type:"number",description:"The perspective property defines how far the object (wrapped/child component) is away from the user. The lower the more extreme the tilt gets."},flipVertically:{type:"boolean",description:"Flip the element vertically"},flipHorizontally:{type:"boolean",description:"Flip the element horizontally"},reset:{type:"boolean",description:"Reset the element to its original state"},transitionEasing:{type:"string",description:"Easing function for the transition"},transitionSpeed:{type:"number",description:"Transition speed in milliseconds"},trackOnWindow:{type:"boolean",description:"Track the mouse position on the whole window, not just on the element"},gyroscope:{type:"boolean",description:"Enable device orientation detection"}},isDefaultExport:!0,defaultStyles:{maxWidth:"100%"}};exports.default=o,exports.registerTilt=function(e,i){e?e.registerComponent(o,null!=i?i:l):t(o,null!=i?i:l)};
|
|
2
2
|
//# sourceMappingURL=react-parallax-tilt.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-parallax-tilt.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps } from \"react\";\nimport ReactParallaxTilt from \"react-parallax-tilt\";\n\nexport default function Tilt(props:
|
|
1
|
+
{"version":3,"file":"react-parallax-tilt.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps } from \"react\";\nimport ReactParallaxTilt from \"react-parallax-tilt\";\n\nexport type TiltProps = ComponentProps<typeof ReactParallaxTilt>;\n\nexport default function Tilt(props: TiltProps) {\n return (\n <ReactParallaxTilt\n {...props}\n style={{\n transformStyle: \"preserve-3d\",\n ...(props.style ?? {}),\n }}\n ></ReactParallaxTilt>\n );\n}\n\nconst parallaxTiltMeta: ComponentMeta<TiltProps> = {\n name: \"hostless-parallax-tilt\",\n displayName: \"Tilt\",\n importName: \"Tilt\",\n importPath: \"@plasmicpkgs/react-parallax-tilt\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: {\n type: \"img\",\n src: \"https://placekitten.com/300/200\",\n style: {\n maxWidth: \"100%\",\n },\n },\n },\n tiltEnable: {\n type: \"boolean\",\n // defaultValueHint: true,\n description: \"Enable tilt effect\",\n },\n tiltReverse: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reverse tilt direction\",\n },\n tiltAngleXInitial: {\n type: \"number\",\n // defaultValueHint: 0,\n description: \"Initial tilt angle in degrees on X axis\",\n },\n tiltAngleYInitial: {\n type: \"number\",\n // defaultValueHint: 0,\n description: \"Initial tilt angle in degrees on Y axis\",\n },\n tiltMaxAngleX: {\n type: \"number\",\n // defaultValueHint: 20,\n description: \"Maximum tilt angle in degrees on X axis\",\n },\n tiltMaxAngleY: {\n type: \"number\",\n // defaultValueHint: 20,\n description: \"Maximum tilt angle in degrees on Y axis\",\n },\n tiltAxis: {\n type: \"choice\",\n options: [\"x\", \"y\"],\n description:\n \"Which axis should be enabled (unset means both are enabled)\",\n },\n glareEnable: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Enable glare effect\",\n },\n glareMaxOpacity: {\n type: \"number\",\n // defaultValueHint: 0.7,\n description: \"Maximum opacity of glare effect\",\n },\n glareColor: {\n // TODO replace with color picker\n type: \"string\",\n // defaultValueHint: \"#ffffff\",\n description: \"Color of glare effect\",\n },\n glareBorderRadius: {\n type: \"string\",\n // defaultValueHint: '0',\n description: \"Border radius of glare effect\",\n },\n glarePosition: {\n type: \"choice\",\n options: [\"top\", \"bottom\", \"left\", \"right\", \"all\"],\n // defaultValueHint: 'bottom',\n description: \"Position of the glare effect\",\n },\n glareReverse: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reverse glare direction\",\n },\n scale: {\n type: \"number\",\n // defaultValueHint: 1,\n description: \"Scale of the element\",\n },\n perspective: {\n type: \"number\",\n // defaultValueHint: 1000,\n description:\n \"The perspective property defines how far the object (wrapped/child component) is away from the user. The lower the more extreme the tilt gets.\",\n },\n flipVertically: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Flip the element vertically\",\n },\n flipHorizontally: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Flip the element horizontally\",\n },\n reset: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reset the element to its original state\",\n },\n transitionEasing: {\n type: \"string\",\n // defaultValueHint: 'cubic-bezier(.03,.98,.52,.99)',\n description: \"Easing function for the transition\",\n },\n transitionSpeed: {\n type: \"number\",\n // defaultValueHint: 400,\n description: \"Transition speed in milliseconds\",\n },\n trackOnWindow: {\n type: \"boolean\",\n // defaultValueHint: false,\n description:\n \"Track the mouse position on the whole window, not just on the element\",\n },\n gyroscope: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Enable device orientation detection\",\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerTilt(\n loader?: { registerComponent: typeof registerComponent },\n customTiltMeta?: ComponentMeta<TiltProps>\n) {\n if (loader) {\n loader.registerComponent(Tilt, customTiltMeta ?? parallaxTiltMeta);\n } else {\n registerComponent(Tilt, customTiltMeta ?? parallaxTiltMeta);\n }\n}\n"],"names":["Tilt","props","React","ReactParallaxTilt","style","transformStyle","parallaxTiltMeta","name","displayName","importName","importPath","children","type","defaultValue","src","maxWidth","tiltEnable","description","tiltReverse","tiltAngleXInitial","tiltAngleYInitial","tiltMaxAngleX","tiltMaxAngleY","tiltAxis","options","glareEnable","glareMaxOpacity","glareColor","glareBorderRadius","glarePosition","glareReverse","scale","perspective","flipVertically","flipHorizontally","reset","transitionEasing","transitionSpeed","trackOnWindow","gyroscope","isDefaultExport","defaultStyles","loader","customTiltMeta","registerComponent"],"mappings":"mdAQwBA,EAAKC,gBAEzBC,gBAACC,mBACKF,GACJG,SACEC,eAAgB,wBACZJ,EAAMG,SAAS,OAM3B,IAAME,EAA6C,CACjDC,KAAM,yBACNC,YAAa,OACbC,WAAY,OACZC,WAAY,mCACZT,MAAO,CACLU,SAAU,CACRC,KAAM,OACNC,aAAc,CACZD,KAAM,MACNE,IAAK,kCACLV,MAAO,CACLW,SAAU,UAIhBC,WAAY,CACVJ,KAAM,UAENK,YAAa,sBAEfC,YAAa,CACXN,KAAM,UAENK,YAAa,0BAEfE,kBAAmB,CACjBP,KAAM,SAENK,YAAa,2CAEfG,kBAAmB,CACjBR,KAAM,SAENK,YAAa,2CAEfI,cAAe,CACbT,KAAM,SAENK,YAAa,2CAEfK,cAAe,CACbV,KAAM,SAENK,YAAa,2CAEfM,SAAU,CACRX,KAAM,SACNY,QAAS,CAAC,IAAK,KACfP,YACE,+DAEJQ,YAAa,CACXb,KAAM,UAENK,YAAa,uBAEfS,gBAAiB,CACfd,KAAM,SAENK,YAAa,mCAEfU,WAAY,CAEVf,KAAM,SAENK,YAAa,yBAEfW,kBAAmB,CACjBhB,KAAM,SAENK,YAAa,iCAEfY,cAAe,CACbjB,KAAM,SACNY,QAAS,CAAC,MAAO,SAAU,OAAQ,QAAS,OAE5CP,YAAa,gCAEfa,aAAc,CACZlB,KAAM,UAENK,YAAa,2BAEfc,MAAO,CACLnB,KAAM,SAENK,YAAa,wBAEfe,YAAa,CACXpB,KAAM,SAENK,YACE,kJAEJgB,eAAgB,CACdrB,KAAM,UAENK,YAAa,+BAEfiB,iBAAkB,CAChBtB,KAAM,UAENK,YAAa,iCAEfkB,MAAO,CACLvB,KAAM,UAENK,YAAa,2CAEfmB,iBAAkB,CAChBxB,KAAM,SAENK,YAAa,sCAEfoB,gBAAiB,CACfzB,KAAM,SAENK,YAAa,oCAEfqB,cAAe,CACb1B,KAAM,UAENK,YACE,yEAEJsB,UAAW,CACT3B,KAAM,UAENK,YAAa,wCAGjBuB,iBAAiB,EACjBC,cAAe,CACb1B,SAAU,yDAKZ2B,EACAC,GAEID,EACFA,EAAOE,kBAAkB5C,QAAM2C,EAAAA,EAAkBrC,GAEjDsC,EAAkB5C,QAAM2C,EAAAA,EAAkBrC"}
|
|
@@ -29,8 +29,10 @@ function Tilt(props) {
|
|
|
29
29
|
}, (_props$style = props.style) != null ? _props$style : {})
|
|
30
30
|
}));
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
name: "
|
|
32
|
+
var parallaxTiltMeta = {
|
|
33
|
+
name: "hostless-parallax-tilt",
|
|
34
|
+
displayName: "Tilt",
|
|
35
|
+
importName: "Tilt",
|
|
34
36
|
importPath: "@plasmicpkgs/react-parallax-tilt",
|
|
35
37
|
props: {
|
|
36
38
|
children: {
|
|
@@ -160,7 +162,15 @@ registerComponent(Tilt, {
|
|
|
160
162
|
defaultStyles: {
|
|
161
163
|
maxWidth: "100%"
|
|
162
164
|
}
|
|
163
|
-
}
|
|
165
|
+
};
|
|
166
|
+
function registerTilt(loader, customTiltMeta) {
|
|
167
|
+
if (loader) {
|
|
168
|
+
loader.registerComponent(Tilt, customTiltMeta != null ? customTiltMeta : parallaxTiltMeta);
|
|
169
|
+
} else {
|
|
170
|
+
registerComponent(Tilt, customTiltMeta != null ? customTiltMeta : parallaxTiltMeta);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
164
173
|
|
|
165
174
|
export default Tilt;
|
|
175
|
+
export { registerTilt };
|
|
166
176
|
//# sourceMappingURL=react-parallax-tilt.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-parallax-tilt.esm.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps } from \"react\";\nimport ReactParallaxTilt from \"react-parallax-tilt\";\n\nexport default function Tilt(props:
|
|
1
|
+
{"version":3,"file":"react-parallax-tilt.esm.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps } from \"react\";\nimport ReactParallaxTilt from \"react-parallax-tilt\";\n\nexport type TiltProps = ComponentProps<typeof ReactParallaxTilt>;\n\nexport default function Tilt(props: TiltProps) {\n return (\n <ReactParallaxTilt\n {...props}\n style={{\n transformStyle: \"preserve-3d\",\n ...(props.style ?? {}),\n }}\n ></ReactParallaxTilt>\n );\n}\n\nconst parallaxTiltMeta: ComponentMeta<TiltProps> = {\n name: \"hostless-parallax-tilt\",\n displayName: \"Tilt\",\n importName: \"Tilt\",\n importPath: \"@plasmicpkgs/react-parallax-tilt\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: {\n type: \"img\",\n src: \"https://placekitten.com/300/200\",\n style: {\n maxWidth: \"100%\",\n },\n },\n },\n tiltEnable: {\n type: \"boolean\",\n // defaultValueHint: true,\n description: \"Enable tilt effect\",\n },\n tiltReverse: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reverse tilt direction\",\n },\n tiltAngleXInitial: {\n type: \"number\",\n // defaultValueHint: 0,\n description: \"Initial tilt angle in degrees on X axis\",\n },\n tiltAngleYInitial: {\n type: \"number\",\n // defaultValueHint: 0,\n description: \"Initial tilt angle in degrees on Y axis\",\n },\n tiltMaxAngleX: {\n type: \"number\",\n // defaultValueHint: 20,\n description: \"Maximum tilt angle in degrees on X axis\",\n },\n tiltMaxAngleY: {\n type: \"number\",\n // defaultValueHint: 20,\n description: \"Maximum tilt angle in degrees on Y axis\",\n },\n tiltAxis: {\n type: \"choice\",\n options: [\"x\", \"y\"],\n description:\n \"Which axis should be enabled (unset means both are enabled)\",\n },\n glareEnable: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Enable glare effect\",\n },\n glareMaxOpacity: {\n type: \"number\",\n // defaultValueHint: 0.7,\n description: \"Maximum opacity of glare effect\",\n },\n glareColor: {\n // TODO replace with color picker\n type: \"string\",\n // defaultValueHint: \"#ffffff\",\n description: \"Color of glare effect\",\n },\n glareBorderRadius: {\n type: \"string\",\n // defaultValueHint: '0',\n description: \"Border radius of glare effect\",\n },\n glarePosition: {\n type: \"choice\",\n options: [\"top\", \"bottom\", \"left\", \"right\", \"all\"],\n // defaultValueHint: 'bottom',\n description: \"Position of the glare effect\",\n },\n glareReverse: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reverse glare direction\",\n },\n scale: {\n type: \"number\",\n // defaultValueHint: 1,\n description: \"Scale of the element\",\n },\n perspective: {\n type: \"number\",\n // defaultValueHint: 1000,\n description:\n \"The perspective property defines how far the object (wrapped/child component) is away from the user. The lower the more extreme the tilt gets.\",\n },\n flipVertically: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Flip the element vertically\",\n },\n flipHorizontally: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Flip the element horizontally\",\n },\n reset: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Reset the element to its original state\",\n },\n transitionEasing: {\n type: \"string\",\n // defaultValueHint: 'cubic-bezier(.03,.98,.52,.99)',\n description: \"Easing function for the transition\",\n },\n transitionSpeed: {\n type: \"number\",\n // defaultValueHint: 400,\n description: \"Transition speed in milliseconds\",\n },\n trackOnWindow: {\n type: \"boolean\",\n // defaultValueHint: false,\n description:\n \"Track the mouse position on the whole window, not just on the element\",\n },\n gyroscope: {\n type: \"boolean\",\n // defaultValueHint: false,\n description: \"Enable device orientation detection\",\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerTilt(\n loader?: { registerComponent: typeof registerComponent },\n customTiltMeta?: ComponentMeta<TiltProps>\n) {\n if (loader) {\n loader.registerComponent(Tilt, customTiltMeta ?? parallaxTiltMeta);\n } else {\n registerComponent(Tilt, customTiltMeta ?? parallaxTiltMeta);\n }\n}\n"],"names":["Tilt","props","React","ReactParallaxTilt","style","transformStyle","parallaxTiltMeta","name","displayName","importName","importPath","children","type","defaultValue","src","maxWidth","tiltEnable","description","tiltReverse","tiltAngleXInitial","tiltAngleYInitial","tiltMaxAngleX","tiltMaxAngleY","tiltAxis","options","glareEnable","glareMaxOpacity","glareColor","glareBorderRadius","glarePosition","glareReverse","scale","perspective","flipVertically","flipHorizontally","reset","transitionEasing","transitionSpeed","trackOnWindow","gyroscope","isDefaultExport","defaultStyles","registerTilt","loader","customTiltMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;SAQwBA,KAAKC;;;AAC3B,SACEC,mBAAA,CAACC,iBAAD,oBACMF;AACJG,IAAAA,KAAK;AACHC,MAAAA,cAAc,EAAE;AADb,uBAECJ,KAAK,CAACG,KAFP,2BAEgB,EAFhB;IAFP,CADF;AASD;AAED,IAAME,gBAAgB,GAA6B;AACjDC,EAAAA,IAAI,EAAE,wBAD2C;AAEjDC,EAAAA,WAAW,EAAE,MAFoC;AAGjDC,EAAAA,UAAU,EAAE,MAHqC;AAIjDC,EAAAA,UAAU,EAAE,kCAJqC;AAKjDT,EAAAA,KAAK,EAAE;AACLU,IAAAA,QAAQ,EAAE;AACRC,MAAAA,IAAI,EAAE,MADE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