@plasmicpkgs/react-scroll-parallax
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,1 +0,3 @@ | ||
import "./ParallaxWrapper"; | ||
export * from "./ParallaxWrapper"; | ||
export { default as ParallaxWrapper } from "./ParallaxWrapper"; | ||
export * from "./ParallaxProvider"; |
@@ -1,2 +0,3 @@ | ||
/// <reference types="react" /> | ||
import registerComponent, { ComponentMeta } from "@plasmicapp/host/registerComponent"; | ||
import React from "react"; | ||
export interface ParallaxWrapperProps { | ||
@@ -9,3 +10,7 @@ xStart?: string; | ||
previewInEditor?: boolean; | ||
children: React.ReactNode; | ||
} | ||
export default function ParallaxWrapper({ xStart, xEnd, yStart, yEnd, disabled, previewInEditor, }: ParallaxWrapperProps): JSX.Element; | ||
export default function ParallaxWrapper({ xStart, xEnd, yStart, yEnd, disabled, previewInEditor, children, }: ParallaxWrapperProps): JSX.Element; | ||
export declare function registerParallaxWrapper(loader?: { | ||
registerComponent: typeof registerComponent; | ||
}, customParallaxWrapperMeta?: ComponentMeta<ParallaxWrapperProps>): void; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var host = require('@plasmicapp/host'); | ||
var registerComponent = _interopDefault(require('@plasmicapp/host/registerComponent')); | ||
var host = require('@plasmicapp/host'); | ||
var React = require('react'); | ||
@@ -21,3 +23,4 @@ var React__default = _interopDefault(React); | ||
disabled = _ref.disabled, | ||
previewInEditor = _ref.previewInEditor; | ||
previewInEditor = _ref.previewInEditor, | ||
children = _ref.children; | ||
var inEditor = React.useContext(host.PlasmicCanvasContext); | ||
@@ -28,7 +31,7 @@ return React__default.createElement(reactScrollParallax.Parallax, { | ||
y: [yStart, yEnd] | ||
}); | ||
}, children); | ||
} | ||
registerComponent(ParallaxWrapper, { | ||
var parallaxWrapperMeta = { | ||
name: "Parallax", | ||
importPath: "@plasmicpkgs/react-scroll-parallax/ParallaxWrapper", | ||
importPath: "@plasmicpkgs/react-scroll-parallax", | ||
props: { | ||
@@ -65,7 +68,35 @@ children: "slot", | ||
}, | ||
isDefaultExport: true, | ||
defaultStyles: { | ||
maxWidth: "100%" | ||
} | ||
}); | ||
}; | ||
function registerParallaxWrapper(loader, customParallaxWrapperMeta) { | ||
if (loader) { | ||
loader.registerComponent(ParallaxWrapper, customParallaxWrapperMeta != null ? customParallaxWrapperMeta : parallaxWrapperMeta); | ||
} else { | ||
registerComponent(ParallaxWrapper, customParallaxWrapperMeta != null ? customParallaxWrapperMeta : parallaxWrapperMeta); | ||
} | ||
} | ||
var parallaxProviderMeta = { | ||
name: "hostless-parallax-provider", | ||
displayName: "Parallax Provider", | ||
importName: "ParallaxProvider", | ||
importPath: "react-scroll-parallax", | ||
props: { | ||
children: "slot" | ||
} | ||
}; | ||
function registerParallaxProvider(loader, customParallaxProviderMeta) { | ||
if (loader) { | ||
loader.registerComponent(reactScrollParallax.ParallaxProvider, customParallaxProviderMeta != null ? customParallaxProviderMeta : parallaxProviderMeta); | ||
} else { | ||
registerComponent(reactScrollParallax.ParallaxProvider, customParallaxProviderMeta != null ? customParallaxProviderMeta : parallaxProviderMeta); | ||
} | ||
} | ||
exports.ParallaxWrapper = ParallaxWrapper; | ||
exports.parallaxProviderMeta = parallaxProviderMeta; | ||
exports.registerParallaxProvider = registerParallaxProvider; | ||
exports.registerParallaxWrapper = registerParallaxWrapper; | ||
//# sourceMappingURL=react-scroll-parallax.cjs.development.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@plasmicapp/host/registerComponent")),a=require("@plasmicapp/host"),r=require("react"),i=e(r),l=require("react-scroll-parallax");t((function(e){var t=e.xStart,o=void 0===t?"0":t,n=e.xEnd,s=void 0===n?"0":n,p=e.yStart,d=void 0===p?"0":p,c=e.yEnd,u=void 0===c?"0":c,f=e.disabled,h=e.previewInEditor,x=r.useContext(a.PlasmicCanvasContext);return i.createElement(l.Parallax,{disabled:f||x&&!h,x:[o,s],y:[d,u]})}),{name:"Parallax",importPath:"@plasmicpkgs/react-scroll-parallax/ParallaxWrapper",props:{children:"slot",yStart:{type:"string",defaultValue:"-50%",description:"The vertical offset at the start (when just scrolling into view). Can be % or px."},yEnd:{type:"string",defaultValue:"50%",description:"The vertical offset at the end (when just scrolling out of view). Can be % or px."},xStart:{type:"string",defaultValue:"50%",description:"The horizontal offset at the start (when just scrolling into view). Can be % or px."},xEnd:{type:"string",defaultValue:"-50%",description:"The horizontal offset at the end (when just scrolling out of view). Can be % or px."},disabled:{type:"boolean",description:"Disables the parallax effect."},previewInEditor:{type:"boolean",description:"Enable the parallax effect in the editor."}},isDefaultExport:!0,defaultStyles:{maxWidth:"100%"}}); | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@plasmicapp/host"),t=e(require("@plasmicapp/host/registerComponent")),a=require("react"),l=e(a),o=require("react-scroll-parallax");function i(e){var t=e.xStart,i=void 0===t?"0":t,n=e.xEnd,s=void 0===n?"0":n,p=e.yStart,d=void 0===p?"0":p,c=e.yEnd,u=void 0===c?"0":c,x=e.disabled,f=e.previewInEditor,h=e.children,v=a.useContext(r.PlasmicCanvasContext);return l.createElement(o.Parallax,{disabled:x||v&&!f,x:[i,s],y:[d,u]},h)}var n={name:"Parallax",importPath:"@plasmicpkgs/react-scroll-parallax",props:{children:"slot",yStart:{type:"string",defaultValue:"-50%",description:"The vertical offset at the start (when just scrolling into view). Can be % or px."},yEnd:{type:"string",defaultValue:"50%",description:"The vertical offset at the end (when just scrolling out of view). Can be % or px."},xStart:{type:"string",defaultValue:"50%",description:"The horizontal offset at the start (when just scrolling into view). Can be % or px."},xEnd:{type:"string",defaultValue:"-50%",description:"The horizontal offset at the end (when just scrolling out of view). Can be % or px."},disabled:{type:"boolean",description:"Disables the parallax effect."},previewInEditor:{type:"boolean",description:"Enable the parallax effect in the editor."}},defaultStyles:{maxWidth:"100%"}},s={name:"hostless-parallax-provider",displayName:"Parallax Provider",importName:"ParallaxProvider",importPath:"react-scroll-parallax",props:{children:"slot"}};exports.ParallaxWrapper=i,exports.parallaxProviderMeta=s,exports.registerParallaxProvider=function(e,r){e?e.registerComponent(o.ParallaxProvider,null!=r?r:s):t(o.ParallaxProvider,null!=r?r:s)},exports.registerParallaxWrapper=function(e,r){e?e.registerComponent(i,null!=r?r:n):t(i,null!=r?r:n)}; | ||
//# sourceMappingURL=react-scroll-parallax.cjs.production.min.js.map |
@@ -0,5 +1,5 @@ | ||
import { PlasmicCanvasContext } from '@plasmicapp/host'; | ||
import registerComponent from '@plasmicapp/host/registerComponent'; | ||
import { PlasmicCanvasContext } from '@plasmicapp/host'; | ||
import React, { useContext } from 'react'; | ||
import { Parallax } from 'react-scroll-parallax'; | ||
import { Parallax, ParallaxProvider } from 'react-scroll-parallax'; | ||
@@ -16,3 +16,4 @@ function ParallaxWrapper(_ref) { | ||
disabled = _ref.disabled, | ||
previewInEditor = _ref.previewInEditor; | ||
previewInEditor = _ref.previewInEditor, | ||
children = _ref.children; | ||
var inEditor = useContext(PlasmicCanvasContext); | ||
@@ -23,7 +24,7 @@ return React.createElement(Parallax, { | ||
y: [yStart, yEnd] | ||
}); | ||
}, children); | ||
} | ||
registerComponent(ParallaxWrapper, { | ||
var parallaxWrapperMeta = { | ||
name: "Parallax", | ||
importPath: "@plasmicpkgs/react-scroll-parallax/ParallaxWrapper", | ||
importPath: "@plasmicpkgs/react-scroll-parallax", | ||
props: { | ||
@@ -60,7 +61,32 @@ children: "slot", | ||
}, | ||
isDefaultExport: true, | ||
defaultStyles: { | ||
maxWidth: "100%" | ||
} | ||
}); | ||
}; | ||
function registerParallaxWrapper(loader, customParallaxWrapperMeta) { | ||
if (loader) { | ||
loader.registerComponent(ParallaxWrapper, customParallaxWrapperMeta != null ? customParallaxWrapperMeta : parallaxWrapperMeta); | ||
} else { | ||
registerComponent(ParallaxWrapper, customParallaxWrapperMeta != null ? customParallaxWrapperMeta : parallaxWrapperMeta); | ||
} | ||
} | ||
var parallaxProviderMeta = { | ||
name: "hostless-parallax-provider", | ||
displayName: "Parallax Provider", | ||
importName: "ParallaxProvider", | ||
importPath: "react-scroll-parallax", | ||
props: { | ||
children: "slot" | ||
} | ||
}; | ||
function registerParallaxProvider(loader, customParallaxProviderMeta) { | ||
if (loader) { | ||
loader.registerComponent(ParallaxProvider, customParallaxProviderMeta != null ? customParallaxProviderMeta : parallaxProviderMeta); | ||
} else { | ||
registerComponent(ParallaxProvider, customParallaxProviderMeta != null ? customParallaxProviderMeta : parallaxProviderMeta); | ||
} | ||
} | ||
export { ParallaxWrapper, parallaxProviderMeta, registerParallaxProvider, registerParallaxWrapper }; | ||
//# sourceMappingURL=react-scroll-parallax.esm.js.map |
{ | ||
"name": "@plasmicpkgs/react-scroll-parallax", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Plasmic registration call for the HTML5 video element", | ||
@@ -9,4 +9,3 @@ "main": "dist/index.js", | ||
"files": [ | ||
"dist", | ||
"ParallaxWrapper" | ||
"dist" | ||
], | ||
@@ -24,3 +23,3 @@ "size-limit": [ | ||
"scripts": { | ||
"build": "tsdx build && rollup -c", | ||
"build": "tsdx build", | ||
"start": "tsdx watch", | ||
@@ -34,8 +33,4 @@ "test": "tsdx test --passWithNoTests", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@size-limit/preset-small-lib": "^4.11.0", | ||
"@types/node": "^14.0.26", | ||
"rollup": "^2.47.0", | ||
"rollup-plugin-typescript2": "^0.30.0", | ||
"size-limit": "^4.11.0", | ||
@@ -42,0 +37,0 @@ "tsdx": "^0.14.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6
28083
12
217
1