@plasmicpkgs/plasmic-soundcloud 0.0.4 → 0.0.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-soundcloud.cjs.development.js","sources":["../src/soundcloud.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta, usePlasmicCanvasContext } from \"@plasmicapp/host\";\n\nimport React from \"react\";\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n // eslint-disable-next-line no-debugger\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n\nconst modulePath = \"@plasmicpkgs/plasmic-soundcloud\";\n\ninterface SoundCloudProps {\n url: string;\n visual: boolean;\n autoPlay: boolean;\n color: string;\n showComments: boolean;\n showUser: boolean;\n showRelated: boolean;\n showTeaser: boolean;\n className: string;\n}\n\nexport const SoundCloudMeta: ComponentMeta<SoundCloudProps> = {\n name: \"SoundCloud\",\n displayName: \"SoundCloud\",\n importName: \"SoundCloud\",\n importPath: modulePath,\n providesData: true,\n description: \"SoundCloud Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Track URL\",\n defaultValue:\n \"https://soundcloud.com/vautdiscovery/ed-sheeran-thinking-out-loud-live-on-jools-holland\",\n },\n visual: {\n type: \"boolean\",\n displayName: \"Visual\",\n description: \"Visual or Classic player\",\n defaultValue: true,\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"AutoPlay\",\n description: \"AutoPlay track\",\n defaultValue: false,\n },\n color: {\n type: \"color\",\n displayName: \"Color\",\n description: \"Widget color,should be in hex format\",\n },\n showUser: {\n type: \"boolean\",\n displayName: \"Author\",\n description: \"Show/Hide the uploader name\",\n defaultValue: false,\n },\n showRelated: {\n type: \"boolean\",\n displayName: \"Related\",\n description: \"Show/Hide related songs\",\n defaultValue: false,\n },\n showTeaser: {\n type: \"boolean\",\n displayName: \"Teaser\",\n description: \"Show/Hide the teaser\",\n defaultValue: false,\n },\n showComments: {\n type: \"boolean\",\n displayName: \"Comments\",\n description: \"Show/Hide the comments\",\n defaultValue: false,\n },\n },\n};\n\nexport function SoundCloud({\n className,\n url,\n autoPlay,\n color,\n showComments,\n showRelated,\n showTeaser,\n showUser,\n visual,\n}: SoundCloudProps) {\n const inEditor = usePlasmicCanvasContext();\n\n const play = inEditor ? false : autoPlay;\n const query = new URL(url);\n const parameters = new URLSearchParams(query.search);\n parameters.set(\"url\", encodeURIComponent(url));\n parameters.set(\"show_comments\", showComments.toString());\n parameters.set(\"show_user\", showUser.toString());\n parameters.set(\"visual\", visual.toString());\n parameters.set(\"auto_play\", play.toString());\n parameters.set(\"show_teaser\", showTeaser.toString());\n parameters.set(\"hide_related\", (!showRelated).toString());\n parameters.set(\"color\", color);\n\n return (\n <iframe\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"600px\"\n height=\"400px\"\n src={`https://w.soundcloud.com/player?${parameters.toString()}`}\n allow=\"autoplay\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport {\n SoundCloud,\n SoundCloudMeta,\n} from \"./soundcloud\";\n\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: ComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n if (loader) {\n _registerComponent(SoundCloud, SoundCloudMeta);\n }\n}\n\nexport * from \"./soundcloud\";"],"names":["ensure","x","undefined","Error","modulePath","SoundCloudMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","visual","autoPlay","color","showUser","showRelated","showTeaser","showComments","SoundCloud","className","inEditor","usePlasmicCanvasContext","play","query","URL","parameters","URLSearchParams","search","set","encodeURIComponent","toString","React","frameBorder","scrolling","width","height","src","allow","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;;;;;;;;SAIgBA,MAAM,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;;IAEjC;IACA,MAAM,IAAIC,KAAK,uCAAuC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,iCAAiC;IAcvCC,cAAc,GAAmC;EAC5DC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,YAAY;EACzBC,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAEL,UAAU;EACtBM,YAAY,EAAE,IAAI;EAClBC,WAAW,EAAE,mBAAmB;EAChCC,KAAK,EAAE;IACLC,GAAG,EAAE;MACHC,IAAI,EAAE,QAAQ;MACdP,WAAW,EAAE,KAAK;MAClBI,WAAW,EAAE,WAAW;MACxBI,YAAY,EACV;KACH;IACDC,MAAM,EAAE;MACNF,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,QAAQ;MACrBI,WAAW,EAAE,0BAA0B;MACvCI,YAAY,EAAE;KACf;IACDE,QAAQ,EAAE;MACRH,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,UAAU;MACvBI,WAAW,EAAE,gBAAgB;MAC7BI,YAAY,EAAE;KACf;IACDG,KAAK,EAAE;MACLJ,IAAI,EAAE,OAAO;MACbP,WAAW,EAAE,OAAO;MACpBI,WAAW,EAAE;KACd;IACDQ,QAAQ,EAAE;MACRL,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,QAAQ;MACrBI,WAAW,EAAE,6BAA6B;MAC1CI,YAAY,EAAE;KACf;IACDK,WAAW,EAAE;MACXN,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,SAAS;MACtBI,WAAW,EAAE,yBAAyB;MACtCI,YAAY,EAAE;KACf;IACDM,UA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,EAAEe,QAAQ,EAAE,CAAC;EACzDL,UAAU,CAACG,GAAG,CAAC,OAAO,EAAEf,KAAK,CAAC;EAE9B,OACEkB;IACEC,WAAW,EAAC,GAAG;IACfC,SAAS,EAAC,IAAI;IACdC,KAAK,EAAC,OAAO;IACbC,MAAM,EAAC,OAAO;IACdC,GAAG,uCAAqCX,UAAU,CAACK,QAAQ,EAAI;IAC/DO,KAAK,EAAC,UAAU;IAChBlB,SAAS,EAAEA;IACX;AAEN;;SCjHgBmB,WAAW,CAACC,MAG3B;EACC,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkB,CACtBC,SAAY,EACZC,WAAmD;IAEnD,IAAIH,MAAM,EAAE;MACVA,MAAM,CAACI,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;KACjD,MAAM;MACLC,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;;GAE5C;EAED,IAAIH,MAAM,EAAE;IACVC,kBAAkB,CAACtB,UAAU,EAAElB,cAAc,CAAC;;AAElD;;;;;;;"}
1
+ {"version":3,"file":"plasmic-soundcloud.cjs.development.js","sources":["../src/soundcloud.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta, usePlasmicCanvasContext } from \"@plasmicapp/host\";\n\nimport React from \"react\";\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n // eslint-disable-next-line no-debugger\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n\nconst modulePath = \"@plasmicpkgs/plasmic-soundcloud\";\n\ninterface SoundCloudProps {\n url: string;\n visual: boolean;\n autoPlay: boolean;\n color: string;\n showComments: boolean;\n showUser: boolean;\n showRelated: boolean;\n showTeaser: boolean;\n className: string;\n}\n\nexport const SoundCloudMeta: ComponentMeta<SoundCloudProps> = {\n name: \"SoundCloud\",\n displayName: \"SoundCloud\",\n importName: \"SoundCloud\",\n importPath: modulePath,\n providesData: true,\n description: \"SoundCloud Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Track URL\",\n defaultValue:\n \"https://soundcloud.com/vautdiscovery/ed-sheeran-thinking-out-loud-live-on-jools-holland\",\n },\n visual: {\n type: \"boolean\",\n displayName: \"Visual\",\n description: \"Visual or Classic player\",\n defaultValue: true,\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"AutoPlay\",\n description: \"AutoPlay track\",\n defaultValue: false,\n },\n color: {\n type: \"color\",\n displayName: \"Color\",\n description: \"Widget color,should be in hex format\",\n },\n showUser: {\n type: \"boolean\",\n displayName: \"Author\",\n description: \"Show/Hide the uploader name\",\n defaultValue: false,\n },\n showRelated: {\n type: \"boolean\",\n displayName: \"Related\",\n description: \"Show/Hide related songs\",\n defaultValue: false,\n },\n showTeaser: {\n type: \"boolean\",\n displayName: \"Teaser\",\n description: \"Show/Hide the teaser\",\n defaultValue: false,\n },\n showComments: {\n type: \"boolean\",\n displayName: \"Comments\",\n description: \"Show/Hide the comments\",\n defaultValue: false,\n },\n },\n};\n\nexport function SoundCloud({\n className,\n url,\n autoPlay,\n color,\n showComments,\n showRelated,\n showTeaser,\n showUser,\n visual,\n}: SoundCloudProps) {\n const inEditor = usePlasmicCanvasContext();\n\n const play = inEditor ? false : autoPlay;\n const query = new URL(url);\n const parameters = new URLSearchParams(query.search);\n parameters.set(\"url\", encodeURIComponent(url));\n parameters.set(\"show_comments\", showComments.toString());\n parameters.set(\"show_user\", showUser.toString());\n parameters.set(\"visual\", visual.toString());\n parameters.set(\"auto_play\", play.toString());\n parameters.set(\"show_teaser\", showTeaser.toString());\n parameters.set(\"hide_related\", (!showRelated).toString());\n parameters.set(\"color\", color);\n\n return (\n <iframe\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"600px\"\n height=\"400px\"\n src={`https://w.soundcloud.com/player?${parameters.toString()}`}\n allow=\"autoplay\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport {\n SoundCloud,\n SoundCloudMeta,\n} from \"./soundcloud\";\n\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: ComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n if (loader) {\n _registerComponent(SoundCloud, SoundCloudMeta);\n }\n}\n\nexport * from \"./soundcloud\";"],"names":["ensure","x","undefined","Error","modulePath","SoundCloudMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","visual","autoPlay","color","showUser","showRelated","showTeaser","showComments","SoundCloud","_ref","className","inEditor","usePlasmicCanvasContext","play","query","URL","parameters","URLSearchParams","search","set","encodeURIComponent","toString","React","frameBorder","scrolling","width","height","src","allow","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;;;;;;;;SAIgBA,MAAMA,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;;IAEjC;IACA,MAAM,IAAIC,KAAK,sCAAsC,CAAC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,iCAAiC;IAcvCC,cAAc,GAAmC;EAC5DC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,YAAY;EACzBC,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAEL,UAAU;EACtBM,YAAY,EAAE,IAAI;EAClBC,WAAW,EAAE,mBAAmB;EAChCC,KAAK,EAAE;IACLC,GAAG,EAAE;MACHC,IAAI,EAAE,QAAQ;MACdP,WAAW,EAAE,KAAK;MAClBI,WAAW,EAAE,WAAW;MACxBI,YAAY,EACV;KACH;IACDC,MAAM,EAAE;MACNF,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,QAAQ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VC,kBAAkB,CAACvB,UAAU,EAAElB,cAAc,CAAC;;AAElD;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-soundcloud.cjs.production.min.js","sources":["../src/soundcloud.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta, usePlasmicCanvasContext } from \"@plasmicapp/host\";\n\nimport React from \"react\";\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n // eslint-disable-next-line no-debugger\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n\nconst modulePath = \"@plasmicpkgs/plasmic-soundcloud\";\n\ninterface SoundCloudProps {\n url: string;\n visual: boolean;\n autoPlay: boolean;\n color: string;\n showComments: boolean;\n showUser: boolean;\n showRelated: boolean;\n showTeaser: boolean;\n className: string;\n}\n\nexport const SoundCloudMeta: ComponentMeta<SoundCloudProps> = {\n name: \"SoundCloud\",\n displayName: \"SoundCloud\",\n importName: \"SoundCloud\",\n importPath: modulePath,\n providesData: true,\n description: \"SoundCloud Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Track URL\",\n defaultValue:\n \"https://soundcloud.com/vautdiscovery/ed-sheeran-thinking-out-loud-live-on-jools-holland\",\n },\n visual: {\n type: \"boolean\",\n displayName: \"Visual\",\n description: \"Visual or Classic player\",\n defaultValue: true,\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"AutoPlay\",\n description: \"AutoPlay track\",\n defaultValue: false,\n },\n color: {\n type: \"color\",\n displayName: \"Color\",\n description: \"Widget color,should be in hex format\",\n },\n showUser: {\n type: \"boolean\",\n displayName: \"Author\",\n description: \"Show/Hide the uploader name\",\n defaultValue: false,\n },\n showRelated: {\n type: \"boolean\",\n displayName: \"Related\",\n description: \"Show/Hide related songs\",\n defaultValue: false,\n },\n showTeaser: {\n type: \"boolean\",\n displayName: \"Teaser\",\n description: \"Show/Hide the teaser\",\n defaultValue: false,\n },\n showComments: {\n type: \"boolean\",\n displayName: \"Comments\",\n description: \"Show/Hide the comments\",\n defaultValue: false,\n },\n },\n};\n\nexport function SoundCloud({\n className,\n url,\n autoPlay,\n color,\n showComments,\n showRelated,\n showTeaser,\n showUser,\n visual,\n}: SoundCloudProps) {\n const inEditor = usePlasmicCanvasContext();\n\n const play = inEditor ? false : autoPlay;\n const query = new URL(url);\n const parameters = new URLSearchParams(query.search);\n parameters.set(\"url\", encodeURIComponent(url));\n parameters.set(\"show_comments\", showComments.toString());\n parameters.set(\"show_user\", showUser.toString());\n parameters.set(\"visual\", visual.toString());\n parameters.set(\"auto_play\", play.toString());\n parameters.set(\"show_teaser\", showTeaser.toString());\n parameters.set(\"hide_related\", (!showRelated).toString());\n parameters.set(\"color\", color);\n\n return (\n <iframe\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"600px\"\n height=\"400px\"\n src={`https://w.soundcloud.com/player?${parameters.toString()}`}\n allow=\"autoplay\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport {\n SoundCloud,\n SoundCloudMeta,\n} from \"./soundcloud\";\n\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: ComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n if (loader) {\n _registerComponent(SoundCloud, SoundCloudMeta);\n }\n}\n\nexport * from \"./soundcloud\";"],"names":["SoundCloudMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","visual","autoPlay","color","showUser","showRelated","showTeaser","showComments","SoundCloud","className","play","usePlasmicCanvasContext","query","URL","parameters","URLSearchParams","search","set","encodeURIComponent","toString","React","frameBorder","scrolling","width","height","src","allow","x","Error","loader","Component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AM,WACNjB,UAAWA,0EApHSkB,GACxB,GAAIA,MAAAA,EAGF,MAAM,IAAIC,6CAEV,OAAOD,gCCAiBE,GAI1B,IACEC,EACAC,EASEF,IAVFC,EAWmBtB,EAVnBuB,EAU+BzC,EAR3BuC,EACFA,EAAOG,kBAAkBF,EAAWC,GAEpCC,EAAkBF,EAAWC"}
1
+ {"version":3,"file":"plasmic-soundcloud.cjs.production.min.js","sources":["../src/soundcloud.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta, usePlasmicCanvasContext } from \"@plasmicapp/host\";\n\nimport React from \"react\";\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n // eslint-disable-next-line no-debugger\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n\nconst modulePath = \"@plasmicpkgs/plasmic-soundcloud\";\n\ninterface SoundCloudProps {\n url: string;\n visual: boolean;\n autoPlay: boolean;\n color: string;\n showComments: boolean;\n showUser: boolean;\n showRelated: boolean;\n showTeaser: boolean;\n className: string;\n}\n\nexport const SoundCloudMeta: ComponentMeta<SoundCloudProps> = {\n name: \"SoundCloud\",\n displayName: \"SoundCloud\",\n importName: \"SoundCloud\",\n importPath: modulePath,\n providesData: true,\n description: \"SoundCloud Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Track URL\",\n defaultValue:\n \"https://soundcloud.com/vautdiscovery/ed-sheeran-thinking-out-loud-live-on-jools-holland\",\n },\n visual: {\n type: \"boolean\",\n displayName: \"Visual\",\n description: \"Visual or Classic player\",\n defaultValue: true,\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"AutoPlay\",\n description: \"AutoPlay track\",\n defaultValue: false,\n },\n color: {\n type: \"color\",\n displayName: \"Color\",\n description: \"Widget color,should be in hex format\",\n },\n showUser: {\n type: \"boolean\",\n displayName: \"Author\",\n description: \"Show/Hide the uploader name\",\n defaultValue: false,\n },\n showRelated: {\n type: \"boolean\",\n displayName: \"Related\",\n description: \"Show/Hide related songs\",\n defaultValue: false,\n },\n showTeaser: {\n type: \"boolean\",\n displayName: \"Teaser\",\n description: \"Show/Hide the teaser\",\n defaultValue: false,\n },\n showComments: {\n type: \"boolean\",\n displayName: \"Comments\",\n description: \"Show/Hide the comments\",\n defaultValue: false,\n },\n },\n};\n\nexport function SoundCloud({\n className,\n url,\n autoPlay,\n color,\n showComments,\n showRelated,\n showTeaser,\n showUser,\n visual,\n}: SoundCloudProps) {\n const inEditor = usePlasmicCanvasContext();\n\n const play = inEditor ? false : autoPlay;\n const query = new URL(url);\n const parameters = new URLSearchParams(query.search);\n parameters.set(\"url\", encodeURIComponent(url));\n parameters.set(\"show_comments\", showComments.toString());\n parameters.set(\"show_user\", showUser.toString());\n parameters.set(\"visual\", visual.toString());\n parameters.set(\"auto_play\", play.toString());\n parameters.set(\"show_teaser\", showTeaser.toString());\n parameters.set(\"hide_related\", (!showRelated).toString());\n parameters.set(\"color\", color);\n\n return (\n <iframe\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"600px\"\n height=\"400px\"\n src={`https://w.soundcloud.com/player?${parameters.toString()}`}\n allow=\"autoplay\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport {\n SoundCloud,\n SoundCloudMeta,\n} from \"./soundcloud\";\n\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: ComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n if (loader) {\n _registerComponent(SoundCloud, SoundCloudMeta);\n }\n}\n\nexport * from \"./soundcloud\";"],"names":["SoundCloudMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","visual","autoPlay","color","showUser","showRelated","showTeaser","showComments","SoundCloud","_ref","className","play","usePlasmicCanvasContext","query","URL","parameters","URLSearchParams","search","set","encodeURIComponent","toString","React","frameBorder","scrolling","width","height","src","allow","x","Error","loader","Component","defaultMeta","registerComponent"],"mappings":"qPA4BaA,EAAiD,CAC5DC,KAAM,aACNC,YAAa,aACbC,WAAY,aACZC,WAlBiB,kCAmBjBC,cAAc,EACdC,YAAa,oBACbC,MAAO,CACLC,IAAK,CACHC,KAAM,SACNP,YAAa,MACbI,YAAa,YACbI,aACE,2FAEJC,OAAQ,CACNF,KAAM,UACNP,YAAa,SACbI,YAAa,2BACbI,cAAc,GAEhBE,SAAU,CACRH,KAAM,UACNP,YAAa,WACbI,YAAa,iBACbI,cAAc,GAEhBG,MAAO,CACLJ,KAAM,QACNP,YAAa,QACbI,YAAa,wCAEfQ,SAAU,CACRL,KAAM,UACNP,YAAa,SACbI,YAAa,8BACbI,cAAc,GAEhBK,YAAa,CACXN,KAAM,UACNP,YAAa,UACbI,YAAa,0BACbI,cAAc,GAEhBM,WAAY,CACVP,KAAM,UACNP,YAAa,SACbI,YAAa,uBACbI,cAAc,GAEhBO,aAAc,CACZR,KAAM,UACNP,YAAa,WACbI,YAAa,yBACbI,cAAc,cAKJQ,EAAUC,OACxBC,EAASD,EAATC,UACAZ,EAAGW,EAAHX,IACAI,EAAQO,EAARP,SACAC,EAAKM,EAALN,MACAI,EAAYE,EAAZF,aACAF,EAAWI,EAAXJ,YACAC,EAAUG,EAAVH,WACAF,EAAQK,EAARL,SACAH,EAAMQ,EAANR,OAIMU,GAFWC,6BAEeV,EAC1BW,EAAQ,IAAIC,IAAIhB,GAChBiB,EAAa,IAAIC,gBAAgBH,EAAMI,QAU7C,OATAF,EAAWG,IAAI,MAAOC,mBAAmBrB,IACzCiB,EAAWG,IAAI,gBAAiBX,EAAaa,YAC7CL,EAAWG,IAAI,YAAad,EAASgB,YACrCL,EAAWG,IAAI,SAAUjB,EAAOmB,YAChCL,EAAWG,IAAI,YAAaP,EAAKS,YACjCL,EAAWG,IAAI,cAAeZ,EAAWc,YACzCL,EAAWG,IAAI,iBAAkBb,GAAae,YAC9CL,EAAWG,IAAI,QAASf,GAGtBkB,0BACEC,YAAY,IACZC,UAAU,KACVC,MAAM,QACNC,OAAO,QACPC,uCAAwCX,EAAWK,WACnDO,MAAM,WACNjB,UAAWA,0EApHSkB,GACxB,GAAIA,MAAAA,EAGF,MAAM,IAAIC,6CAEV,OAAOD,gCCAiBE,GAI1B,IACEC,EACAC,EASEF,IAVFC,EAWmBvB,EAVnBwB,EAU+B1C,EAR3BwC,EACFA,EAAOG,kBAAkBF,EAAWC,GAEpCC,EAAkBF,EAAWC"}
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-soundcloud.esm.js","sources":["../src/soundcloud.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta, usePlasmicCanvasContext } from \"@plasmicapp/host\";\n\nimport React from \"react\";\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n // eslint-disable-next-line no-debugger\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n\nconst modulePath = \"@plasmicpkgs/plasmic-soundcloud\";\n\ninterface SoundCloudProps {\n url: string;\n visual: boolean;\n autoPlay: boolean;\n color: string;\n showComments: boolean;\n showUser: boolean;\n showRelated: boolean;\n showTeaser: boolean;\n className: string;\n}\n\nexport const SoundCloudMeta: ComponentMeta<SoundCloudProps> = {\n name: \"SoundCloud\",\n displayName: \"SoundCloud\",\n importName: \"SoundCloud\",\n importPath: modulePath,\n providesData: true,\n description: \"SoundCloud Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Track URL\",\n defaultValue:\n \"https://soundcloud.com/vautdiscovery/ed-sheeran-thinking-out-loud-live-on-jools-holland\",\n },\n visual: {\n type: \"boolean\",\n displayName: \"Visual\",\n description: \"Visual or Classic player\",\n defaultValue: true,\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"AutoPlay\",\n description: \"AutoPlay track\",\n defaultValue: false,\n },\n color: {\n type: \"color\",\n displayName: \"Color\",\n description: \"Widget color,should be in hex format\",\n },\n showUser: {\n type: \"boolean\",\n displayName: \"Author\",\n description: \"Show/Hide the uploader name\",\n defaultValue: false,\n },\n showRelated: {\n type: \"boolean\",\n displayName: \"Related\",\n description: \"Show/Hide related songs\",\n defaultValue: false,\n },\n showTeaser: {\n type: \"boolean\",\n displayName: \"Teaser\",\n description: \"Show/Hide the teaser\",\n defaultValue: false,\n },\n showComments: {\n type: \"boolean\",\n displayName: \"Comments\",\n description: \"Show/Hide the comments\",\n defaultValue: false,\n },\n },\n};\n\nexport function SoundCloud({\n className,\n url,\n autoPlay,\n color,\n showComments,\n showRelated,\n showTeaser,\n showUser,\n visual,\n}: SoundCloudProps) {\n const inEditor = usePlasmicCanvasContext();\n\n const play = inEditor ? false : autoPlay;\n const query = new URL(url);\n const parameters = new URLSearchParams(query.search);\n parameters.set(\"url\", encodeURIComponent(url));\n parameters.set(\"show_comments\", showComments.toString());\n parameters.set(\"show_user\", showUser.toString());\n parameters.set(\"visual\", visual.toString());\n parameters.set(\"auto_play\", play.toString());\n parameters.set(\"show_teaser\", showTeaser.toString());\n parameters.set(\"hide_related\", (!showRelated).toString());\n parameters.set(\"color\", color);\n\n return (\n <iframe\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"600px\"\n height=\"400px\"\n src={`https://w.soundcloud.com/player?${parameters.toString()}`}\n allow=\"autoplay\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport {\n SoundCloud,\n SoundCloudMeta,\n} from \"./soundcloud\";\n\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: ComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n if (loader) {\n _registerComponent(SoundCloud, SoundCloudMeta);\n }\n}\n\nexport * from \"./soundcloud\";"],"names":["ensure","x","undefined","Error","modulePath","SoundCloudMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","visual","autoPlay","color","showUser","showRelated","showTeaser","showComments","SoundCloud","className","inEditor","usePlasmicCanvasContext","play","query","URL","parameters","URLSearchParams","search","set","encodeURIComponent","toString","React","frameBorder","scrolling","width","height","src","allow","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;;SAIgBA,MAAM,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;;IAEjC;IACA,MAAM,IAAIC,KAAK,uCAAuC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,iCAAiC;IAcvCC,cAAc,GAAmC;EAC5DC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,YAAY;EACzBC,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAEL,UAAU;EACtBM,YAAY,EAAE,IAAI;EAClBC,WAAW,EAAE,mBAAmB;EAChCC,KAAK,EAAE;IACLC,GAAG,EAAE;MACHC,IAAI,EAAE,QAAQ;MACdP,WAAW,EAAE,KAAK;MAClBI,WAAW,EAAE,WAAW;MACxBI,YAAY,EACV;KACH;IACDC,MAAM,EAAE;MACNF,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,QAAQ;MACrBI,WAAW,EAAE,0BAA0B;MACvCI,YAAY,EAAE;KACf;IACDE,QAAQ,EAAE;MACRH,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,UAAU;MACvBI,WAAW,EAAE,gBAAgB;MAC7BI,YAAY,EAAE;KACf;IACDG,KAAK,EAAE;MACLJ,IAAI,EAAE,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,CAAC;EAChDL,UAAU,CAACG,GAAG,CAAC,QAAQ,EAAEjB,MAAM,CAACmB,QAAQ,EAAE,CAAC;EAC3CL,UAAU,CAACG,GAAG,CAAC,WAAW,EAAEN,IAAI,CAACQ,QAAQ,EAAE,CAAC;EAC5CL,UAAU,CAACG,GAAG,CAAC,aAAa,EAAEZ,UAAU,CAACc,QAAQ,EAAE,CAAC;EACpDL,UAAU,CAACG,GAAG,CAAC,cAAc,EAAE,CAAC,CAACb,WAAW,EAAEe,QAAQ,EAAE,CAAC;EACzDL,UAAU,CAACG,GAAG,CAAC,OAAO,EAAEf,KAAK,CAAC;EAE9B,OACEkB;IACEC,WAAW,EAAC,GAAG;IACfC,SAAS,EAAC,IAAI;IACdC,KAAK,EAAC,OAAO;IACbC,MAAM,EAAC,OAAO;IACdC,GAAG,uCAAqCX,UAAU,CAACK,QAAQ,EAAI;IAC/DO,KAAK,EAAC,UAAU;IAChBlB,SAAS,EAAEA;IACX;AAEN;;SCjHgBmB,WAAW,CAACC,MAG3B;EACC,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkB,CACtBC,SAAY,EACZC,WAAmD;IAEnD,IAAIH,MAAM,EAAE;MACVA,MAAM,CAACI,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;KACjD,MAAM;MACLC,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;;GAE5C;EAED,IAAIH,MAAM,EAAE;IACVC,kBAAkB,CAACtB,UAAU,EAAElB,cAAc,CAAC;;AAElD;;;;"}
1
+ {"version":3,"file":"plasmic-soundcloud.esm.js","sources":["../src/soundcloud.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta, usePlasmicCanvasContext } from \"@plasmicapp/host\";\n\nimport React from \"react\";\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n // eslint-disable-next-line no-debugger\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n\nconst modulePath = \"@plasmicpkgs/plasmic-soundcloud\";\n\ninterface SoundCloudProps {\n url: string;\n visual: boolean;\n autoPlay: boolean;\n color: string;\n showComments: boolean;\n showUser: boolean;\n showRelated: boolean;\n showTeaser: boolean;\n className: string;\n}\n\nexport const SoundCloudMeta: ComponentMeta<SoundCloudProps> = {\n name: \"SoundCloud\",\n displayName: \"SoundCloud\",\n importName: \"SoundCloud\",\n importPath: modulePath,\n providesData: true,\n description: \"SoundCloud Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Track URL\",\n defaultValue:\n \"https://soundcloud.com/vautdiscovery/ed-sheeran-thinking-out-loud-live-on-jools-holland\",\n },\n visual: {\n type: \"boolean\",\n displayName: \"Visual\",\n description: \"Visual or Classic player\",\n defaultValue: true,\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"AutoPlay\",\n description: \"AutoPlay track\",\n defaultValue: false,\n },\n color: {\n type: \"color\",\n displayName: \"Color\",\n description: \"Widget color,should be in hex format\",\n },\n showUser: {\n type: \"boolean\",\n displayName: \"Author\",\n description: \"Show/Hide the uploader name\",\n defaultValue: false,\n },\n showRelated: {\n type: \"boolean\",\n displayName: \"Related\",\n description: \"Show/Hide related songs\",\n defaultValue: false,\n },\n showTeaser: {\n type: \"boolean\",\n displayName: \"Teaser\",\n description: \"Show/Hide the teaser\",\n defaultValue: false,\n },\n showComments: {\n type: \"boolean\",\n displayName: \"Comments\",\n description: \"Show/Hide the comments\",\n defaultValue: false,\n },\n },\n};\n\nexport function SoundCloud({\n className,\n url,\n autoPlay,\n color,\n showComments,\n showRelated,\n showTeaser,\n showUser,\n visual,\n}: SoundCloudProps) {\n const inEditor = usePlasmicCanvasContext();\n\n const play = inEditor ? false : autoPlay;\n const query = new URL(url);\n const parameters = new URLSearchParams(query.search);\n parameters.set(\"url\", encodeURIComponent(url));\n parameters.set(\"show_comments\", showComments.toString());\n parameters.set(\"show_user\", showUser.toString());\n parameters.set(\"visual\", visual.toString());\n parameters.set(\"auto_play\", play.toString());\n parameters.set(\"show_teaser\", showTeaser.toString());\n parameters.set(\"hide_related\", (!showRelated).toString());\n parameters.set(\"color\", color);\n\n return (\n <iframe\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"600px\"\n height=\"400px\"\n src={`https://w.soundcloud.com/player?${parameters.toString()}`}\n allow=\"autoplay\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport {\n SoundCloud,\n SoundCloudMeta,\n} from \"./soundcloud\";\n\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: ComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n if (loader) {\n _registerComponent(SoundCloud, SoundCloudMeta);\n }\n}\n\nexport * from \"./soundcloud\";"],"names":["ensure","x","undefined","Error","modulePath","SoundCloudMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","visual","autoPlay","color","showUser","showRelated","showTeaser","showComments","SoundCloud","_ref","className","inEditor","usePlasmicCanvasContext","play","query","URL","parameters","URLSearchParams","search","set","encodeURIComponent","toString","React","frameBorder","scrolling","width","height","src","allow","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;;SAIgBA,MAAMA,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;;IAEjC;IACA,MAAM,IAAIC,KAAK,sCAAsC,CAAC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,iCAAiC;IAcvCC,cAAc,GAAmC;EAC5DC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,YAAY;EACzBC,UAAU,EAA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ACX;AAEN;;SCjHgBmB,WAAWA,CAACC,MAG3B;EACC,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CACtBC,SAAY,EACZC,WAAmD;IAEnD,IAAIH,MAAM,EAAE;MACVA,MAAM,CAACI,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;KACjD,MAAM;MACLC,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;;GAE5C;EAED,IAAIH,MAAM,EAAE;IACVC,kBAAkB,CAACvB,UAAU,EAAElB,cAAc,CAAC;;AAElD;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { ComponentMeta } from "@plasmicapp/host";
2
+ import React from "react";
2
3
  export declare function ensure<T>(x: T | null | undefined): T;
3
4
  interface SoundCloudProps {
4
5
  url: string;
@@ -12,5 +13,5 @@ interface SoundCloudProps {
12
13
  className: string;
13
14
  }
14
15
  export declare const SoundCloudMeta: ComponentMeta<SoundCloudProps>;
15
- export declare function SoundCloud({ className, url, autoPlay, color, showComments, showRelated, showTeaser, showUser, visual, }: SoundCloudProps): JSX.Element;
16
+ export declare function SoundCloud({ className, url, autoPlay, color, showComments, showRelated, showTeaser, showUser, visual, }: SoundCloudProps): React.JSX.Element;
16
17
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/plasmic-soundcloud",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Plasmic Soundcloud components.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  }
35
35
  ],
36
36
  "devDependencies": {
37
- "@plasmicapp/host": "1.0.162",
37
+ "@plasmicapp/host": "1.0.164",
38
38
  "@size-limit/preset-small-lib": "^7.0.8",
39
39
  "@types/dlv": "^1.1.2",
40
40
  "@types/react": "^18.0.27",
@@ -49,5 +49,5 @@
49
49
  "dependencies": {
50
50
  "change-case": "^4.1.2"
51
51
  },
52
- "gitHead": "bf12f2268d3e2794698bee0996d4e2008b6827c5"
52
+ "gitHead": "83b92a98990acc021cc904ef919c6176e88a3238"
53
53
  }