@plasmicpkgs/plasmic-keen-slider 0.0.91 → 0.0.93

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 CHANGED
@@ -1,18 +1,18 @@
1
- import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
- import { KeenSliderOptions } from "keen-slider";
3
- import React from "react";
4
- interface KeenSliderProps extends KeenSliderOptions {
5
- }
6
- export declare const sliderMeta: CodeComponentMeta<KeenSliderProps>;
7
- export declare const SliderWrapper: React.ForwardRefExoticComponent<KeenSliderProps & {
8
- className?: string | undefined;
9
- editingSlide?: number | undefined;
10
- children?: any;
11
- setControlContextData?: ((data: {
12
- editingSlide: number | undefined;
13
- }) => void) | undefined;
14
- } & React.RefAttributes<HTMLDivElement>>;
15
- export declare function registerSlider(loader?: {
16
- registerComponent: typeof registerComponent;
17
- }, customSliderMeta?: CodeComponentMeta<KeenSliderOptions>): void;
18
- export {};
1
+ import registerComponent, { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
+ import { KeenSliderOptions } from "keen-slider";
3
+ import React from "react";
4
+ interface KeenSliderProps extends KeenSliderOptions {
5
+ }
6
+ export declare const sliderMeta: CodeComponentMeta<KeenSliderProps>;
7
+ export declare const SliderWrapper: React.ForwardRefExoticComponent<KeenSliderProps & {
8
+ className?: string | undefined;
9
+ editingSlide?: number | undefined;
10
+ children?: any;
11
+ setControlContextData?: ((data: {
12
+ editingSlide: number | undefined;
13
+ }) => void) | undefined;
14
+ } & React.RefAttributes<HTMLDivElement>>;
15
+ export declare function registerSlider(loader?: {
16
+ registerComponent: typeof registerComponent;
17
+ }, customSliderMeta?: CodeComponentMeta<KeenSliderOptions>): void;
18
+ export {};
@@ -285,7 +285,7 @@ var SliderWrapper = /*#__PURE__*/React.forwardRef(function SliderWrapper_(_ref5,
285
285
  }, [editingSlide]);
286
286
  return React__default.createElement("div", {
287
287
  className: className
288
- }, React__default.createElement("div", Object.assign({
288
+ }, React__default.createElement("div", _extends({
289
289
  ref: composeRefs(sliderRef, userRef),
290
290
  className: "keen-slider"
291
291
  }, props, {
@@ -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("@seznam/compose-react-refs")),n=require("antd"),r=require("keen-slider/react"),l=require("react"),o=e(l);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(null,arguments)}var s=["editingSlide","children","className","setControlContextData"],d=n.Select.Option,c=function(e){var t=new ResizeObserver((function(){e.update()}));e.on("created",(function(){t.observe(e.container)})),e.on("destroyed",(function(){t.unobserve(e.container)}))},p={name:"hostless-keen-slider",displayName:"Keen Slider",importName:"Slider",importPath:"@plasmicpkgs/plasmic-keen-slider",actions:[{type:"custom-action",control:function(e){var t,i,r=e.componentProps,l=e.studioOps,a=null!=(t=r.editingSlide)?t:0,s=null!=(i=r.children.length)?i:"img"===r.children.type?1:0,c=Array.from({length:s},(function(e,t){return t})).map((function(e){return o.createElement(d,{value:e.toString()},"Slide ",e+1)}));return o.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",gap:"10px",justifyContent:"space-between"}},o.createElement("div",null,"Current slide:"),o.createElement(n.Select,{defaultValue:a.toString(),style:{width:"100%"},onChange:function(e){var t=Number(e);l.updateProps({editingSlide:t%s})},value:a.toString()},c))}},{type:"custom-action",control:function(e){var t,i=e.componentProps,r=e.studioOps,l=i.children.length,a=null!=(t=i.editingSlide)?t:0;return o.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",gap:"10px",justifyContent:"space-between"}},o.createElement(n.Button,{style:{width:"100%"},onClick:function(){r.updateProps({editingSlide:(a-1+l)%l})}},"Prev slide"),o.createElement(n.Button,{style:{width:"100%"},onClick:function(){r.updateProps({editingSlide:(a+1)%l})}},"Next slide"))}},{type:"button-action",label:"Append new slide",onClick:function(e){var t=e.studioOps,i=e.componentProps.children.length;t.appendToSlot({type:"img",src:""},"children"),t.updateProps({editingSlide:i})}},{type:"button-action",label:"Delete current slide",onClick:function(e){var t,i=e.componentProps,n=e.studioOps,r=null!=(t=e.contextData.editingSlide)?t:0;n.removeFromSlotAt(r,"children");var l=i.children.length-1;n.updateProps({editingSlide:(r-1+l)%l})}},{type:"custom-action",control:function(){return o.createElement("div",null,"* To re-arrange slides, use the Outline panel")}}],props:{children:{type:"slot",defaultValue:[0,1,2].map((function(e){return{type:"vbox",children:{type:"img",src:"https://static1.plasmic.app/components/react-slick/slide"+(e+1)+".png",styles:{maxWidth:"100%"}}}}))},editingSlide:{displayName:"Currently edited slide",type:"number",description:"Switch to the specified slide (first is 0). Only affects the editor, not the final page.",defaultValueHint:0,editOnly:!0,hidden:function(){return!0}},disabled:{displayName:"Disabled",type:"boolean",description:"Disable or enable slider",defaultValueHint:!1},drag:{displayName:"Drag",type:"boolean",description:"Enables or disables mouse and touch control",defaultValueHint:!0},dragSpeed:{displayName:"Drag Speed",type:"number",description:"Set the speed that is applied to the slider when dragging it.",defaultValueHint:1},initial:{displayName:"Initial slide",type:"number",description:"Sets the index of initially visible slide",defaultValueHint:1},loop:{displayName:"Loop",type:"boolean",description:"Enable or disables carousel/loop functionality of the slider",defaultValueHint:!1},mode:{displayName:"Carousel mode",type:"choice",options:["snap","free","free-snap"],description:"Sets the animation that is applied after a drag ends",defaultValueHint:"snap"},renderMode:{displayName:"Render mode",type:"choice",options:["precision","performance","custom"],description:"It is possible that the render performance of the browser slows down, if you have slides with some complexity in markup and CSS. To counteract this problem, you can set this option to 'performance'. If you want to create your own renderer, you can set this options to 'custom'. Default is 'precision'.",defaultValueHint:"precision"},rtl:{displayName:"Reverse",type:"boolean",description:"Reverses the slide order",defaultValueHint:!1},rubberband:{displayName:"Rubberband ",type:"boolean",description:"Enables or disables rubberband behavior for dragging and animation after a drag.",defaultValueHint:!0},slides:{displayName:"Number of slides",type:"number",description:"Specifies number of slider "},vertical:{displayName:"Vertical",type:"boolean",description:"Vertical slide mode",defaultValueHint:!1,helpText:"(Note: The height of the container must be defined if vertical is true)"}},defaultStyles:{width:"stretch",maxWidth:"100%",flexDirection:"column"}},u=l.forwardRef((function(e,t){var n=e.editingSlide,d=e.children,p=e.className,u=e.setControlContextData,f=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,s);null==u||u({editingSlide:n});var m=r.useKeenSlider(a({},f),[c]),h=m[0],y=m[1];return l.useEffect((function(){void 0!==n&&y.current.moveToIdx(n)}),[n]),o.createElement("div",{className:p},o.createElement("div",Object.assign({ref:i(h,t),className:"keen-slider"},f,{style:{height:"100%"}}),o.Children.map(d,(function(e){return o.cloneElement(e,{className:"keen-slider__slide "+p})})),d))}));exports.SliderWrapper=u,exports.registerSlider=function(e,i){e?e.registerComponent(u,null!=i?i:p):t(u,null!=i?i:p)},exports.sliderMeta=p;
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("@seznam/compose-react-refs")),n=require("antd"),r=require("keen-slider/react"),l=require("react"),o=e(l);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(null,arguments)}var s=["editingSlide","children","className","setControlContextData"],d=n.Select.Option,c=function(e){var t=new ResizeObserver((function(){e.update()}));e.on("created",(function(){t.observe(e.container)})),e.on("destroyed",(function(){t.unobserve(e.container)}))},p={name:"hostless-keen-slider",displayName:"Keen Slider",importName:"Slider",importPath:"@plasmicpkgs/plasmic-keen-slider",actions:[{type:"custom-action",control:function(e){var t,i,r=e.componentProps,l=e.studioOps,a=null!=(t=r.editingSlide)?t:0,s=null!=(i=r.children.length)?i:"img"===r.children.type?1:0,c=Array.from({length:s},(function(e,t){return t})).map((function(e){return o.createElement(d,{value:e.toString()},"Slide ",e+1)}));return o.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",gap:"10px",justifyContent:"space-between"}},o.createElement("div",null,"Current slide:"),o.createElement(n.Select,{defaultValue:a.toString(),style:{width:"100%"},onChange:function(e){var t=Number(e);l.updateProps({editingSlide:t%s})},value:a.toString()},c))}},{type:"custom-action",control:function(e){var t,i=e.componentProps,r=e.studioOps,l=i.children.length,a=null!=(t=i.editingSlide)?t:0;return o.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",gap:"10px",justifyContent:"space-between"}},o.createElement(n.Button,{style:{width:"100%"},onClick:function(){r.updateProps({editingSlide:(a-1+l)%l})}},"Prev slide"),o.createElement(n.Button,{style:{width:"100%"},onClick:function(){r.updateProps({editingSlide:(a+1)%l})}},"Next slide"))}},{type:"button-action",label:"Append new slide",onClick:function(e){var t=e.studioOps,i=e.componentProps.children.length;t.appendToSlot({type:"img",src:""},"children"),t.updateProps({editingSlide:i})}},{type:"button-action",label:"Delete current slide",onClick:function(e){var t,i=e.componentProps,n=e.studioOps,r=null!=(t=e.contextData.editingSlide)?t:0;n.removeFromSlotAt(r,"children");var l=i.children.length-1;n.updateProps({editingSlide:(r-1+l)%l})}},{type:"custom-action",control:function(){return o.createElement("div",null,"* To re-arrange slides, use the Outline panel")}}],props:{children:{type:"slot",defaultValue:[0,1,2].map((function(e){return{type:"vbox",children:{type:"img",src:"https://static1.plasmic.app/components/react-slick/slide"+(e+1)+".png",styles:{maxWidth:"100%"}}}}))},editingSlide:{displayName:"Currently edited slide",type:"number",description:"Switch to the specified slide (first is 0). Only affects the editor, not the final page.",defaultValueHint:0,editOnly:!0,hidden:function(){return!0}},disabled:{displayName:"Disabled",type:"boolean",description:"Disable or enable slider",defaultValueHint:!1},drag:{displayName:"Drag",type:"boolean",description:"Enables or disables mouse and touch control",defaultValueHint:!0},dragSpeed:{displayName:"Drag Speed",type:"number",description:"Set the speed that is applied to the slider when dragging it.",defaultValueHint:1},initial:{displayName:"Initial slide",type:"number",description:"Sets the index of initially visible slide",defaultValueHint:1},loop:{displayName:"Loop",type:"boolean",description:"Enable or disables carousel/loop functionality of the slider",defaultValueHint:!1},mode:{displayName:"Carousel mode",type:"choice",options:["snap","free","free-snap"],description:"Sets the animation that is applied after a drag ends",defaultValueHint:"snap"},renderMode:{displayName:"Render mode",type:"choice",options:["precision","performance","custom"],description:"It is possible that the render performance of the browser slows down, if you have slides with some complexity in markup and CSS. To counteract this problem, you can set this option to 'performance'. If you want to create your own renderer, you can set this options to 'custom'. Default is 'precision'.",defaultValueHint:"precision"},rtl:{displayName:"Reverse",type:"boolean",description:"Reverses the slide order",defaultValueHint:!1},rubberband:{displayName:"Rubberband ",type:"boolean",description:"Enables or disables rubberband behavior for dragging and animation after a drag.",defaultValueHint:!0},slides:{displayName:"Number of slides",type:"number",description:"Specifies number of slider "},vertical:{displayName:"Vertical",type:"boolean",description:"Vertical slide mode",defaultValueHint:!1,helpText:"(Note: The height of the container must be defined if vertical is true)"}},defaultStyles:{width:"stretch",maxWidth:"100%",flexDirection:"column"}},u=l.forwardRef((function(e,t){var n=e.editingSlide,d=e.children,p=e.className,u=e.setControlContextData,f=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,s);null==u||u({editingSlide:n});var m=r.useKeenSlider(a({},f),[c]),h=m[0],y=m[1];return l.useEffect((function(){void 0!==n&&y.current.moveToIdx(n)}),[n]),o.createElement("div",{className:p},o.createElement("div",a({ref:i(h,t),className:"keen-slider"},f,{style:{height:"100%"}}),o.Children.map(d,(function(e){return o.cloneElement(e,{className:"keen-slider__slide "+p})})),d))}));exports.SliderWrapper=u,exports.registerSlider=function(e,i){e?e.registerComponent(u,null!=i?i:p):t(u,null!=i?i:p)},exports.sliderMeta=p;
2
2
  //# sourceMappingURL=plasmic-keen-slider.cjs.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-keen-slider.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ActionProps,\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport composeRefs from \"@seznam/compose-react-refs\";\nimport { Button, Select } from \"antd\";\nimport { KeenSliderOptions } from \"keen-slider\";\nimport { KeenSliderPlugin, useKeenSlider } from \"keen-slider/react\";\nimport React, { forwardRef, Ref, useEffect } from \"react\";\n\nconst { Option } = Select;\n\nconst ResizePlugin: KeenSliderPlugin = (slider) => {\n const observer = new ResizeObserver(function () {\n slider.update();\n });\n\n slider.on(\"created\", () => {\n observer.observe(slider.container);\n });\n slider.on(\"destroyed\", () => {\n observer.unobserve(slider.container);\n });\n};\n\nfunction CurrentSlideDropdown({ componentProps, studioOps }: ActionProps<any>) {\n const editingSlide = componentProps.editingSlide ?? 0;\n const slidesCnt =\n componentProps.children.length ??\n (componentProps.children.type === \"img\" ? 1 : 0);\n\n const options = Array.from({ length: slidesCnt }, (_, i) => i).map((i) => {\n return <Option value={i.toString()}>Slide {i + 1}</Option>;\n });\n\n const handleChange = (value: string) => {\n const slideIdx = Number(value);\n studioOps.updateProps({ editingSlide: slideIdx % slidesCnt });\n };\n\n return (\n <div\n style={{\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"row\",\n gap: \"10px\",\n justifyContent: \"space-between\",\n }}\n >\n <div>Current slide:</div>\n <Select\n defaultValue={editingSlide.toString()}\n style={{ width: \"100%\" }}\n onChange={handleChange}\n value={editingSlide.toString()}\n >\n {options}\n </Select>\n </div>\n );\n}\n\nfunction NavigateSlides({ componentProps, studioOps }: ActionProps<any>) {\n const slidesCnt = componentProps.children.length;\n const editingSlide = componentProps.editingSlide ?? 0;\n\n return (\n <div\n style={{\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"row\",\n gap: \"10px\",\n justifyContent: \"space-between\",\n }}\n >\n <Button\n style={{ width: \"100%\" }}\n onClick={() => {\n const prevSlide = (editingSlide - 1 + slidesCnt) % slidesCnt;\n studioOps.updateProps({ editingSlide: prevSlide });\n }}\n >\n Prev slide\n </Button>\n <Button\n style={{ width: \"100%\" }}\n onClick={() => {\n const nextSlide = (editingSlide + 1) % slidesCnt;\n studioOps.updateProps({ editingSlide: nextSlide });\n }}\n >\n Next slide\n </Button>\n </div>\n );\n}\n\nfunction OutlineMessage() {\n return <div>* To re-arrange slides, use the Outline panel</div>;\n}\n\ninterface KeenSliderProps extends KeenSliderOptions {}\n\nexport const sliderMeta: CodeComponentMeta<KeenSliderProps> = {\n name: \"hostless-keen-slider\",\n displayName: \"Keen Slider\",\n importName: \"Slider\",\n importPath: \"@plasmicpkgs/plasmic-keen-slider\",\n actions: [\n {\n type: \"custom-action\",\n control: CurrentSlideDropdown,\n },\n {\n type: \"custom-action\",\n control: NavigateSlides,\n },\n {\n type: \"button-action\",\n label: \"Append new slide\",\n onClick: ({ componentProps, studioOps }: ActionProps<any>) => {\n const slidesCnt = componentProps.children.length;\n studioOps.appendToSlot(\n {\n type: \"img\",\n src: \"\",\n },\n \"children\"\n );\n studioOps.updateProps({ editingSlide: slidesCnt });\n },\n },\n {\n type: \"button-action\",\n label: \"Delete current slide\",\n onClick: ({\n componentProps,\n contextData,\n studioOps,\n }: ActionProps<any>) => {\n const editingSlide = contextData.editingSlide ?? 0;\n studioOps.removeFromSlotAt(editingSlide, \"children\");\n const slidesCnt = componentProps.children.length - 1;\n studioOps.updateProps({\n editingSlide: (editingSlide - 1 + slidesCnt) % slidesCnt,\n });\n },\n },\n {\n type: \"custom-action\",\n control: OutlineMessage,\n },\n ],\n props: {\n children: {\n type: \"slot\",\n defaultValue: [0, 1, 2].map((i) => ({\n type: \"vbox\",\n children: {\n type: \"img\",\n src:\n \"https://static1.plasmic.app/components/react-slick/slide\" +\n (i + 1) +\n \".png\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n })),\n },\n editingSlide: {\n displayName: \"Currently edited slide\",\n type: \"number\",\n description:\n \"Switch to the specified slide (first is 0). Only affects the editor, not the final page.\",\n defaultValueHint: 0,\n editOnly: true,\n hidden: () => true,\n },\n disabled: {\n displayName: \"Disabled\",\n type: \"boolean\",\n description: \"Disable or enable slider\",\n defaultValueHint: false,\n },\n drag: {\n displayName: \"Drag\",\n type: \"boolean\",\n description: \"Enables or disables mouse and touch control\",\n defaultValueHint: true,\n },\n dragSpeed: {\n displayName: \"Drag Speed\",\n type: \"number\",\n description:\n \"Set the speed that is applied to the slider when dragging it.\",\n defaultValueHint: 1,\n },\n initial: {\n displayName: \"Initial slide\",\n type: \"number\",\n description: \"Sets the index of initially visible slide\",\n defaultValueHint: 1,\n },\n loop: {\n displayName: \"Loop\",\n type: \"boolean\",\n description:\n \"Enable or disables carousel/loop functionality of the slider\",\n defaultValueHint: false,\n },\n\n mode: {\n displayName: \"Carousel mode\",\n type: \"choice\",\n options: [\"snap\", \"free\", \"free-snap\"],\n description: \"Sets the animation that is applied after a drag ends\",\n defaultValueHint: \"snap\",\n },\n renderMode: {\n displayName: \"Render mode\",\n type: \"choice\",\n options: [\"precision\", \"performance\", \"custom\"],\n description:\n \"It is possible that the render performance of the browser slows down, if you have slides with some complexity in markup and CSS. To counteract this problem, you can set this option to 'performance'. If you want to create your own renderer, you can set this options to 'custom'. Default is 'precision'.\",\n defaultValueHint: \"precision\",\n },\n rtl: {\n displayName: \"Reverse\",\n type: \"boolean\",\n description: \"Reverses the slide order\",\n defaultValueHint: false,\n },\n\n rubberband: {\n displayName: \"Rubberband \",\n type: \"boolean\",\n description:\n \"Enables or disables rubberband behavior for dragging and animation after a drag.\",\n defaultValueHint: true,\n },\n slides: {\n displayName: \"Number of slides\",\n type: \"number\",\n description: \"Specifies number of slider \",\n },\n\n vertical: {\n displayName: \"Vertical\",\n type: \"boolean\",\n description: \"Vertical slide mode\",\n defaultValueHint: false,\n helpText:\n \"(Note: The height of the container must be defined if vertical is true)\",\n },\n },\n\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n flexDirection: \"column\",\n },\n};\n\nexport const SliderWrapper = forwardRef(function SliderWrapper_(\n {\n editingSlide,\n children,\n\n className,\n setControlContextData,\n ...props\n }: KeenSliderProps & {\n className?: string;\n editingSlide?: number;\n children?: any;\n setControlContextData?: (data: {\n editingSlide: number | undefined;\n }) => void;\n },\n userRef?: Ref<HTMLDivElement>\n) {\n setControlContextData?.({ editingSlide: editingSlide });\n const [sliderRef, instanceRef] = useKeenSlider<HTMLDivElement>(\n {\n ...props,\n },\n [ResizePlugin]\n );\n\n useEffect(() => {\n if (editingSlide !== undefined) {\n instanceRef.current!.moveToIdx(editingSlide);\n }\n }, [editingSlide]);\n\n return (\n <div className={className}>\n <div\n ref={composeRefs(sliderRef, userRef)}\n className=\"keen-slider\"\n {...props}\n style={{ height: \"100%\" }}\n >\n {React.Children.map(children, (child) =>\n React.cloneElement(child, {\n className: `keen-slider__slide ${className}`,\n })\n )}\n {children}\n </div>\n </div>\n );\n});\n\nexport function registerSlider(\n loader?: { registerComponent: typeof registerComponent },\n customSliderMeta?: CodeComponentMeta<KeenSliderOptions>\n) {\n if (loader) {\n loader.registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n } else {\n registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n }\n}\n"],"names":["Option","Select","ResizePlugin","slider","observer","ResizeObserver","update","on","observe","container","unobserve","sliderMeta","name","displayName","importName","importPath","actions","type","control","_ref","componentProps","studioOps","editingSlide","_componentProps$editi","slidesCnt","_componentProps$child","children","length","options","Array","from","_","i","map","React","value","toString","style","width","display","flexDirection","gap","justifyContent","defaultValue","onChange","slideIdx","Number","updateProps","_ref2","_componentProps$editi2","Button","onClick","label","_ref3","appendToSlot","src","_ref4","_contextData$editingS","contextData","removeFromSlotAt","props","styles","maxWidth","description","defaultValueHint","editOnly","hidden","disabled","drag","dragSpeed","initial","loop","mode","renderMode","rtl","rubberband","slides","vertical","helpText","defaultStyles","SliderWrapper","forwardRef","_ref5","userRef","className","setControlContextData","_objectWithoutPropertiesLoose","_excluded","_useKeenSlider","useKeenSlider","_extends","sliderRef","instanceRef","useEffect","undefined","current","moveToIdx","ref","composeRefs","height","Children","child","cloneElement","loader","customSliderMeta","registerComponent"],"mappings":"olBAUQA,EAAWC,SAAXD,OAEFE,EAAiC,SAACC,GACtC,IAAMC,EAAW,IAAIC,gBAAe,WAClCF,EAAOG,YAGTH,EAAOI,GAAG,WAAW,WACnBH,EAASI,QAAQL,EAAOM,cAE1BN,EAAOI,GAAG,aAAa,WACrBH,EAASM,UAAUP,EAAOM,eAoFjBE,EAAiD,CAC5DC,KAAM,uBACNC,YAAa,cACbC,WAAY,SACZC,WAAY,mCACZC,QAAS,CACP,CACEC,KAAM,gBACNC,QAxFN,SAA6BC,WAAGC,EAAcD,EAAdC,eAAgBC,EAASF,EAATE,UACxCC,SAAYC,EAAGH,EAAeE,cAAYC,EAAI,EAC9CC,SAASC,EACbL,EAAeM,SAASC,QAAMF,EACI,QAAjCL,EAAeM,SAAST,KAAiB,EAAI,EAE1CW,EAAUC,MAAMC,KAAK,CAAEH,OAAQH,IAAa,SAACO,EAAGC,GAAC,OAAKA,KAAGC,KAAI,SAACD,GAClE,OAAOE,gBAAClC,GAAOmC,MAAOH,EAAEI,qBAAmBJ,EAAI,MAQjD,OACEE,uBACEG,MAAO,CACLC,MAAO,OACPC,QAAS,OACTC,cAAe,MACfC,IAAK,OACLC,eAAgB,kBAGlBR,6CACAA,gBAACjC,UACC0C,aAAcrB,EAAac,WAC3BC,MAAO,CAAEC,MAAO,QAChBM,SAnBe,SAACT,GACpB,IAAMU,EAAWC,OAAOX,GACxBd,EAAU0B,YAAY,CAAEzB,aAAcuB,EAAWrB,KAkB7CW,MAAOb,EAAac,YAEnBR,MA0DL,CACEX,KAAM,gBACNC,QAtDN,SAAuB8B,SAAG5B,EAAc4B,EAAd5B,eAAgBC,EAA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AU1E,KAEhC,CAACA,IAGFY,uBAAKkD,UAAWA,GACdlD,qCACE+D,IAAKC,EAAYP,EAAWR,GAC5BC,UAAU,eACNxB,GACJvB,MAAO,CAAE8D,OAAQ,UAEhBjE,EAAMkE,SAASnE,IAAIP,GAAU,SAAC2E,GAAK,OAClCnE,EAAMoE,aAAaD,EAAO,CACxBjB,gCAAiCA,OAGpC1D,+DAOP6E,EACAC,GAEID,EACFA,EAAOE,kBAAkBzB,QAAewB,EAAAA,EAAoB7F,GAE5D8F,EAAkBzB,QAAewB,EAAAA,EAAoB7F"}
1
+ {"version":3,"file":"plasmic-keen-slider.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ActionProps,\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport composeRefs from \"@seznam/compose-react-refs\";\nimport { Button, Select } from \"antd\";\nimport { KeenSliderOptions } from \"keen-slider\";\nimport { KeenSliderPlugin, useKeenSlider } from \"keen-slider/react\";\nimport React, { forwardRef, Ref, useEffect } from \"react\";\n\nconst { Option } = Select;\n\nconst ResizePlugin: KeenSliderPlugin = (slider) => {\n const observer = new ResizeObserver(function () {\n slider.update();\n });\n\n slider.on(\"created\", () => {\n observer.observe(slider.container);\n });\n slider.on(\"destroyed\", () => {\n observer.unobserve(slider.container);\n });\n};\n\nfunction CurrentSlideDropdown({ componentProps, studioOps }: ActionProps<any>) {\n const editingSlide = componentProps.editingSlide ?? 0;\n const slidesCnt =\n componentProps.children.length ??\n (componentProps.children.type === \"img\" ? 1 : 0);\n\n const options = Array.from({ length: slidesCnt }, (_, i) => i).map((i) => {\n return <Option value={i.toString()}>Slide {i + 1}</Option>;\n });\n\n const handleChange = (value: string) => {\n const slideIdx = Number(value);\n studioOps.updateProps({ editingSlide: slideIdx % slidesCnt });\n };\n\n return (\n <div\n style={{\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"row\",\n gap: \"10px\",\n justifyContent: \"space-between\",\n }}\n >\n <div>Current slide:</div>\n <Select\n defaultValue={editingSlide.toString()}\n style={{ width: \"100%\" }}\n onChange={handleChange}\n value={editingSlide.toString()}\n >\n {options}\n </Select>\n </div>\n );\n}\n\nfunction NavigateSlides({ componentProps, studioOps }: ActionProps<any>) {\n const slidesCnt = componentProps.children.length;\n const editingSlide = componentProps.editingSlide ?? 0;\n\n return (\n <div\n style={{\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"row\",\n gap: \"10px\",\n justifyContent: \"space-between\",\n }}\n >\n <Button\n style={{ width: \"100%\" }}\n onClick={() => {\n const prevSlide = (editingSlide - 1 + slidesCnt) % slidesCnt;\n studioOps.updateProps({ editingSlide: prevSlide });\n }}\n >\n Prev slide\n </Button>\n <Button\n style={{ width: \"100%\" }}\n onClick={() => {\n const nextSlide = (editingSlide + 1) % slidesCnt;\n studioOps.updateProps({ editingSlide: nextSlide });\n }}\n >\n Next slide\n </Button>\n </div>\n );\n}\n\nfunction OutlineMessage() {\n return <div>* To re-arrange slides, use the Outline panel</div>;\n}\n\ninterface KeenSliderProps extends KeenSliderOptions {}\n\nexport const sliderMeta: CodeComponentMeta<KeenSliderProps> = {\n name: \"hostless-keen-slider\",\n displayName: \"Keen Slider\",\n importName: \"Slider\",\n importPath: \"@plasmicpkgs/plasmic-keen-slider\",\n actions: [\n {\n type: \"custom-action\",\n control: CurrentSlideDropdown,\n },\n {\n type: \"custom-action\",\n control: NavigateSlides,\n },\n {\n type: \"button-action\",\n label: \"Append new slide\",\n onClick: ({ componentProps, studioOps }: ActionProps<any>) => {\n const slidesCnt = componentProps.children.length;\n studioOps.appendToSlot(\n {\n type: \"img\",\n src: \"\",\n },\n \"children\"\n );\n studioOps.updateProps({ editingSlide: slidesCnt });\n },\n },\n {\n type: \"button-action\",\n label: \"Delete current slide\",\n onClick: ({\n componentProps,\n contextData,\n studioOps,\n }: ActionProps<any>) => {\n const editingSlide = contextData.editingSlide ?? 0;\n studioOps.removeFromSlotAt(editingSlide, \"children\");\n const slidesCnt = componentProps.children.length - 1;\n studioOps.updateProps({\n editingSlide: (editingSlide - 1 + slidesCnt) % slidesCnt,\n });\n },\n },\n {\n type: \"custom-action\",\n control: OutlineMessage,\n },\n ],\n props: {\n children: {\n type: \"slot\",\n defaultValue: [0, 1, 2].map((i) => ({\n type: \"vbox\",\n children: {\n type: \"img\",\n src:\n \"https://static1.plasmic.app/components/react-slick/slide\" +\n (i + 1) +\n \".png\",\n styles: {\n maxWidth: \"100%\",\n },\n },\n })),\n },\n editingSlide: {\n displayName: \"Currently edited slide\",\n type: \"number\",\n description:\n \"Switch to the specified slide (first is 0). Only affects the editor, not the final page.\",\n defaultValueHint: 0,\n editOnly: true,\n hidden: () => true,\n },\n disabled: {\n displayName: \"Disabled\",\n type: \"boolean\",\n description: \"Disable or enable slider\",\n defaultValueHint: false,\n },\n drag: {\n displayName: \"Drag\",\n type: \"boolean\",\n description: \"Enables or disables mouse and touch control\",\n defaultValueHint: true,\n },\n dragSpeed: {\n displayName: \"Drag Speed\",\n type: \"number\",\n description:\n \"Set the speed that is applied to the slider when dragging it.\",\n defaultValueHint: 1,\n },\n initial: {\n displayName: \"Initial slide\",\n type: \"number\",\n description: \"Sets the index of initially visible slide\",\n defaultValueHint: 1,\n },\n loop: {\n displayName: \"Loop\",\n type: \"boolean\",\n description:\n \"Enable or disables carousel/loop functionality of the slider\",\n defaultValueHint: false,\n },\n\n mode: {\n displayName: \"Carousel mode\",\n type: \"choice\",\n options: [\"snap\", \"free\", \"free-snap\"],\n description: \"Sets the animation that is applied after a drag ends\",\n defaultValueHint: \"snap\",\n },\n renderMode: {\n displayName: \"Render mode\",\n type: \"choice\",\n options: [\"precision\", \"performance\", \"custom\"],\n description:\n \"It is possible that the render performance of the browser slows down, if you have slides with some complexity in markup and CSS. To counteract this problem, you can set this option to 'performance'. If you want to create your own renderer, you can set this options to 'custom'. Default is 'precision'.\",\n defaultValueHint: \"precision\",\n },\n rtl: {\n displayName: \"Reverse\",\n type: \"boolean\",\n description: \"Reverses the slide order\",\n defaultValueHint: false,\n },\n\n rubberband: {\n displayName: \"Rubberband \",\n type: \"boolean\",\n description:\n \"Enables or disables rubberband behavior for dragging and animation after a drag.\",\n defaultValueHint: true,\n },\n slides: {\n displayName: \"Number of slides\",\n type: \"number\",\n description: \"Specifies number of slider \",\n },\n\n vertical: {\n displayName: \"Vertical\",\n type: \"boolean\",\n description: \"Vertical slide mode\",\n defaultValueHint: false,\n helpText:\n \"(Note: The height of the container must be defined if vertical is true)\",\n },\n },\n\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n flexDirection: \"column\",\n },\n};\n\nexport const SliderWrapper = forwardRef(function SliderWrapper_(\n {\n editingSlide,\n children,\n\n className,\n setControlContextData,\n ...props\n }: KeenSliderProps & {\n className?: string;\n editingSlide?: number;\n children?: any;\n setControlContextData?: (data: {\n editingSlide: number | undefined;\n }) => void;\n },\n userRef?: Ref<HTMLDivElement>\n) {\n setControlContextData?.({ editingSlide: editingSlide });\n const [sliderRef, instanceRef] = useKeenSlider<HTMLDivElement>(\n {\n ...props,\n },\n [ResizePlugin]\n );\n\n useEffect(() => {\n if (editingSlide !== undefined) {\n instanceRef.current!.moveToIdx(editingSlide);\n }\n }, [editingSlide]);\n\n return (\n <div className={className}>\n <div\n ref={composeRefs(sliderRef, userRef)}\n className=\"keen-slider\"\n {...props}\n style={{ height: \"100%\" }}\n >\n {React.Children.map(children, (child) =>\n React.cloneElement(child, {\n className: `keen-slider__slide ${className}`,\n })\n )}\n {children}\n </div>\n </div>\n );\n});\n\nexport function registerSlider(\n loader?: { registerComponent: typeof registerComponent },\n customSliderMeta?: CodeComponentMeta<KeenSliderOptions>\n) {\n if (loader) {\n loader.registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n } else {\n registerComponent(SliderWrapper, customSliderMeta ?? sliderMeta);\n }\n}\n"],"names":["Option","Select","ResizePlugin","slider","observer","ResizeObserver","update","on","observe","container","unobserve","sliderMeta","name","displayName","importName","importPath","actions","type","control","_ref","componentProps","studioOps","editingSlide","_componentProps$editi","slidesCnt","_componentProps$child","children","length","options","Array","from","_","i","map","React","value","toString","style","width","display","flexDirection","gap","justifyContent","defaultValue","onChange","slideIdx","Number","updateProps","_ref2","_componentProps$editi2","Button","onClick","label","_ref3","appendToSlot","src","_ref4","_contextData$editingS","contextData","removeFromSlotAt","props","styles","maxWidth","description","defaultValueHint","editOnly","hidden","disabled","drag","dragSpeed","initial","loop","mode","renderMode","rtl","rubberband","slides","vertical","helpText","defaultStyles","SliderWrapper","forwardRef","_ref5","userRef","className","setControlContextData","_objectWithoutPropertiesLoose","_excluded","_useKeenSlider","useKeenSlider","_extends","sliderRef","instanceRef","useEffect","undefined","current","moveToIdx","ref","composeRefs","height","Children","child","cloneElement","loader","customSliderMeta","registerComponent"],"mappings":"olBAUQA,EAAWC,SAAXD,OAEFE,EAAiC,SAACC,GACtC,IAAMC,EAAW,IAAIC,gBAAe,WAClCF,EAAOG,YAGTH,EAAOI,GAAG,WAAW,WACnBH,EAASI,QAAQL,EAAOM,cAE1BN,EAAOI,GAAG,aAAa,WACrBH,EAASM,UAAUP,EAAOM,eAoFjBE,EAAiD,CAC5DC,KAAM,uBACNC,YAAa,cACbC,WAAY,SACZC,WAAY,mCACZC,QAAS,CACP,CACEC,KAAM,gBACNC,QAxFN,SAA6BC,WAAGC,EAAcD,EAAdC,eAAgBC,EAASF,EAATE,UACxCC,SAAYC,EAAGH,EAAeE,cAAYC,EAAI,EAC9CC,SAASC,EACbL,EAAeM,SAASC,QAAMF,EACI,QAAjCL,EAAeM,SAAST,KAAiB,EAAI,EAE1CW,EAAUC,MAAMC,KAAK,CAAEH,OAAQH,IAAa,SAACO,EAAGC,GAAC,OAAKA,KAAGC,KAAI,SAACD,GAClE,OAAOE,gBAAClC,GAAOmC,MAAOH,EAAEI,qBAAmBJ,EAAI,MAQjD,OACEE,uBACEG,MAAO,CACLC,MAAO,OACPC,QAAS,OACTC,cAAe,MACfC,IAAK,OACLC,eAAgB,kBAGlBR,6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AQwD,EAARxD,SAEA0D,EAASF,EAATE,UACAC,EAAqBH,EAArBG,sBACGzB,6IAAK0B,CAAAJ,EAAAK,SAWVF,GAAAA,EAAwB,CAAE/D,aAAcA,IACxC,IAAAkE,EAAiCC,gBAAaC,KAEvC9B,GAEL,CAAC1D,IAJIyF,EAASH,KAAEI,EAAWJ,KAa7B,OANAK,aAAU,gBACaC,IAAjBxE,GACFsE,EAAYG,QAASC,UAAU1E,KAEhC,CAACA,IAGFY,uBAAKkD,UAAWA,GACdlD,yBACE+D,IAAKC,EAAYP,EAAWR,GAC5BC,UAAU,eACNxB,GACJvB,MAAO,CAAE8D,OAAQ,UAEhBjE,EAAMkE,SAASnE,IAAIP,GAAU,SAAC2E,GAAK,OAClCnE,EAAMoE,aAAaD,EAAO,CACxBjB,gCAAiCA,OAGpC1D,+DAOP6E,EACAC,GAEID,EACFA,EAAOE,kBAAkBzB,QAAewB,EAAAA,EAAoB7F,GAE5D8F,EAAkBzB,QAAewB,EAAAA,EAAoB7F"}
@@ -278,7 +278,7 @@ var SliderWrapper = /*#__PURE__*/forwardRef(function SliderWrapper_(_ref5, userR
278
278
  }, [editingSlide]);
279
279
  return React.createElement("div", {
280
280
  className: className
281
- }, React.createElement("div", Object.assign({
281
+ }, React.createElement("div", _extends({
282
282
  ref: composeRefs(sliderRef, userRef),
283
283
  className: "keen-slider"
284
284
  }, props, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/plasmic-keen-slider",
3
- "version": "0.0.91",
3
+ "version": "0.0.93",
4
4
  "description": "Plasmic Keen slider components.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "scripts": {
15
15
  "start": "tsdx watch",
16
16
  "build": "tsdx build",
17
- "test": "TEST_CWD=`pwd` yarn --cwd=../.. test --passWithNoTests",
17
+ "test": "TEST_CWD=`pwd` pnpm -w test --passWithNoTests",
18
18
  "lint": "tsdx lint",
19
19
  "prepublishOnly": "npm run build",
20
20
  "size": "size-limit",
@@ -34,7 +34,7 @@
34
34
  }
35
35
  ],
36
36
  "devDependencies": {
37
- "@plasmicapp/host": "2.0.5",
37
+ "@plasmicapp/host": "2.0.7",
38
38
  "@types/react": "^18",
39
39
  "@types/react-dom": "^18",
40
40
  "@types/resize-observer-browser": "^0.1.7",
@@ -48,5 +48,5 @@
48
48
  "antd": "^5.8.4",
49
49
  "keen-slider": "^6.8.6"
50
50
  },
51
- "gitHead": "41f43c9b107d2fff575c443bc4649fa708897242"
51
+ "gitHead": "6087f1621240c66b20d4a8fcf02c8bf889c554aa"
52
52
  }