@plasmicpkgs/plasmic-spotify 0.0.12 → 0.0.13

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-spotify.cjs.development.js","sources":["../src/spotify.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta } from \"@plasmicapp/host\";\n\nimport React from \"react\";\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\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-spotify\";\n\ninterface SpotifyProps {\n theme?: boolean;\n url?: string;\n className?: string;\n}\n\nexport const SpotifyMeta: ComponentMeta<SpotifyProps> = {\n name: \"hostless-spotify\",\n displayName: \"Spotify\",\n importName: \"Spotify\",\n importPath: modulePath,\n providesData: true,\n description: \"Spotify Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Song URL\",\n defaultValue:\n \"https://open.spotify.com/embed/track/3rmo8F54jFF8OgYsqTxm5d\",\n },\n theme: {\n type: \"boolean\",\n displayName: \"Theme\",\n description: \"Theme\",\n },\n },\n};\n\nexport function Spotify({ className, url, theme }: SpotifyProps) {\n const value = theme ? \"1\" : \"0\";\n const query = `${url}?utm_source=generator&theme=${value}`;\n return (\n <iframe\n src={query}\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"400\"\n height=\"166\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport { Spotify, SpotifyMeta } from \"./spotify\";\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 _registerComponent(Spotify, SpotifyMeta);\n}\n\nexport * from \"./spotify\";\n"],"names":["ensure","x","undefined","Error","modulePath","SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","_ref","className","value","query","React","src","frameBorder","scrolling","width","height","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;;;;;;;SAGgBA,MAAMA,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;IACjC;IACA,MAAM,IAAIC,KAAK,sCAAsC,CAAC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,8BAA8B;IAQpCC,WAAW,GAAgC;EACtDC,IAAI,EAAE,kBAAkB;EACxBC,WAAW,EAAE,SAAS;EACtBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAEL,UAAU;EACtBM,YAAY,EAAE,IAAI;EAClBC,WAAW,EAAE,gBAAgB;EAC7BC,KAAK,EAAE;IACLC,GAAG,EAAE;MACHC,IAAI,EAAE,QAAQ;MACdP,WAAW,EAAE,KAAK;MAClBI,WAAW,EAAE,UAAU;MACvBI,YAAY,EACV;KACH;IACDC,KAAK,EAAE;MACLF,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,OAAO;MACpBI,WAAW,EAAE;;;;SAKHM,OAAOA,CAAAC,IAAA;MAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEN,GAAG,GAAAK,IAAA,CAAHL,GAAG;IAAEG,KAAK,GAAAE,IAAA,CAALF,KAAK;EAC7C,IAAMI,KAAK,GAAGJ,KAAK,GAAG,GAAG,GAAG,GAAG;EAC/B,IAAMK,KAAK,GAAMR,GAAG,oCAA+BO,KAAO;EAC1D,OACEE;IACEC,GAAG,EAAEF,KAAK;IACVG,WAAW,EAAC,GAAG;IACfC,SAAS,EAAC,IAAI;IACdC,KAAK,EAAC,KAAK;IACXC,MAAM,EAAC,KAAK;IACZR,SAAS,EAAEA;IACX;AAEN;;SClDgBS,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;EAEDF,kBAAkB,CAACb,OAAO,EAAEZ,WAAW,CAAC;AAC1C;;;;;;;"}
1
+ {"version":3,"file":"plasmic-spotify.cjs.development.js","sources":["../src/spotify.tsx","../src/index.tsx"],"sourcesContent":["import { CodeComponentMeta } from \"@plasmicapp/host/registerComponent\";\n\nimport React from \"react\";\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\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-spotify\";\n\ninterface SpotifyProps {\n theme?: boolean;\n url?: string;\n className?: string;\n}\n\nexport const SpotifyMeta: CodeComponentMeta<SpotifyProps> = {\n name: \"hostless-spotify\",\n displayName: \"Spotify\",\n importName: \"Spotify\",\n importPath: modulePath,\n providesData: true,\n description: \"Spotify Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Song URL\",\n defaultValue:\n \"https://open.spotify.com/embed/track/3rmo8F54jFF8OgYsqTxm5d\",\n },\n theme: {\n type: \"boolean\",\n displayName: \"Theme\",\n description: \"Theme\",\n },\n },\n};\n\nexport function Spotify({ className, url, theme }: SpotifyProps) {\n const value = theme ? \"1\" : \"0\";\n const query = `${url}?utm_source=generator&theme=${value}`;\n return (\n <iframe\n src={query}\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"400\"\n height=\"166\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport { Spotify, SpotifyMeta } from \"./spotify\";\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: CodeComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n _registerComponent(Spotify, SpotifyMeta);\n}\n\nexport * from \"./spotify\";\n"],"names":["ensure","x","undefined","Error","modulePath","SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","_ref","className","value","query","React","src","frameBorder","scrolling","width","height","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;;;;;;;SAGgBA,MAAMA,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;IACjC;IACA,MAAM,IAAIC,KAAK,sCAAsC,CAAC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,8BAA8B;IAQpCC,WAAW,GAAoC;EAC1DC,IAAI,EAAE,kBAAkB;EACxBC,WAAW,EAAE,SAAS;EACtBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAEL,UAAU;EACtBM,YAAY,EAAE,IAAI;EAClBC,WAAW,EAAE,gBAAgB;EAC7BC,KAAK,EAAE;IACLC,GAAG,EAAE;MACHC,IAAI,EAAE,QAAQ;MACdP,WAAW,EAAE,KAAK;MAClBI,WAAW,EAAE,UAAU;MACvBI,YAAY,EACV;KACH;IACDC,KAAK,EAAE;MACLF,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,OAAO;MACpBI,WAAW,EAAE;;;;SAKHM,OAAOA,CAAAC,IAAA;MAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEN,GAAG,GAAAK,IAAA,CAAHL,GAAG;IAAEG,KAAK,GAAAE,IAAA,CAALF,KAAK;EAC7C,IAAMI,KAAK,GAAGJ,KAAK,GAAG,GAAG,GAAG,GAAG;EAC/B,IAAMK,KAAK,GAAMR,GAAG,oCAA+BO,KAAO;EAC1D,OACEE;IACEC,GAAG,EAAEF,KAAK;IACVG,WAAW,EAAC,GAAG;IACfC,SAAS,EAAC,IAAI;IACdC,KAAK,EAAC,KAAK;IACXC,MAAM,EAAC,KAAK;IACZR,SAAS,EAAEA;IACX;AAEN;;SClDgBS,WAAWA,CAACC,MAG3B;EACC,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CACtBC,SAAY,EACZC,WAAuD;IAEvD,IAAIH,MAAM,EAAE;MACVA,MAAM,CAACI,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;KACjD,MAAM;MACLC,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;;GAE5C;EAEDF,kBAAkB,CAACb,OAAO,EAAEZ,WAAW,CAAC;AAC1C;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-spotify.cjs.production.min.js","sources":["../src/spotify.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta } from \"@plasmicapp/host\";\n\nimport React from \"react\";\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\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-spotify\";\n\ninterface SpotifyProps {\n theme?: boolean;\n url?: string;\n className?: string;\n}\n\nexport const SpotifyMeta: ComponentMeta<SpotifyProps> = {\n name: \"hostless-spotify\",\n displayName: \"Spotify\",\n importName: \"Spotify\",\n importPath: modulePath,\n providesData: true,\n description: \"Spotify Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Song URL\",\n defaultValue:\n \"https://open.spotify.com/embed/track/3rmo8F54jFF8OgYsqTxm5d\",\n },\n theme: {\n type: \"boolean\",\n displayName: \"Theme\",\n description: \"Theme\",\n },\n },\n};\n\nexport function Spotify({ className, url, theme }: SpotifyProps) {\n const value = theme ? \"1\" : \"0\";\n const query = `${url}?utm_source=generator&theme=${value}`;\n return (\n <iframe\n src={query}\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"400\"\n height=\"166\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport { Spotify, SpotifyMeta } from \"./spotify\";\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 _registerComponent(Spotify, SpotifyMeta);\n}\n\nexport * from \"./spotify\";\n"],"names":["SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","_ref","React","src","frameBorder","scrolling","width","height","className","x","Error","loader","Component","defaultMeta","registerComponent"],"mappings":"uNAoBaA,EAA2C,CACtDC,KAAM,mBACNC,YAAa,UACbC,WAAY,UACZC,WAZiB,+BAajBC,cAAc,EACdC,YAAa,iBACbC,MAAO,CACLC,IAAK,CACHC,KAAM,SACNP,YAAa,MACbI,YAAa,WACbI,aACE,+DAEJC,MAAO,CACLF,KAAM,UACNP,YAAa,QACbI,YAAa,oBAKHM,EAAOC,GAGrB,OACEC,0BACEC,IALkCF,EAAHL,oCAAUK,EAALF,MAClB,IAAM,KAKxBK,YAAY,IACZC,UAAU,KACVC,MAAM,MACNC,OAAO,MACPC,UAV6BP,EAATO,4EAxCAC,GACxB,GAAIA,MAAAA,EAEF,MAAM,IAAIC,6CAEV,OAAOD,gCCFiBE,GAI1B,IACEC,EACAC,EADAD,EAUiBZ,EATjBa,EAS0BzB,EAPtBuB,EACFA,EAAOG,kBAAkBF,EAAWC,GAEpCC,EAAkBF,EAAWC"}
1
+ {"version":3,"file":"plasmic-spotify.cjs.production.min.js","sources":["../src/spotify.tsx","../src/index.tsx"],"sourcesContent":["import { CodeComponentMeta } from \"@plasmicapp/host/registerComponent\";\n\nimport React from \"react\";\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\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-spotify\";\n\ninterface SpotifyProps {\n theme?: boolean;\n url?: string;\n className?: string;\n}\n\nexport const SpotifyMeta: CodeComponentMeta<SpotifyProps> = {\n name: \"hostless-spotify\",\n displayName: \"Spotify\",\n importName: \"Spotify\",\n importPath: modulePath,\n providesData: true,\n description: \"Spotify Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Song URL\",\n defaultValue:\n \"https://open.spotify.com/embed/track/3rmo8F54jFF8OgYsqTxm5d\",\n },\n theme: {\n type: \"boolean\",\n displayName: \"Theme\",\n description: \"Theme\",\n },\n },\n};\n\nexport function Spotify({ className, url, theme }: SpotifyProps) {\n const value = theme ? \"1\" : \"0\";\n const query = `${url}?utm_source=generator&theme=${value}`;\n return (\n <iframe\n src={query}\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"400\"\n height=\"166\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport { Spotify, SpotifyMeta } from \"./spotify\";\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: CodeComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n _registerComponent(Spotify, SpotifyMeta);\n}\n\nexport * from \"./spotify\";\n"],"names":["SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","_ref","React","src","frameBorder","scrolling","width","height","className","x","Error","loader","Component","defaultMeta","registerComponent"],"mappings":"uNAoBaA,EAA+C,CAC1DC,KAAM,mBACNC,YAAa,UACbC,WAAY,UACZC,WAZiB,+BAajBC,cAAc,EACdC,YAAa,iBACbC,MAAO,CACLC,IAAK,CACHC,KAAM,SACNP,YAAa,MACbI,YAAa,WACbI,aACE,+DAEJC,MAAO,CACLF,KAAM,UACNP,YAAa,QACbI,YAAa,oBAKHM,EAAOC,GAGrB,OACEC,0BACEC,IALkCF,EAAHL,oCAAUK,EAALF,MAClB,IAAM,KAKxBK,YAAY,IACZC,UAAU,KACVC,MAAM,MACNC,OAAO,MACPC,UAV6BP,EAATO,4EAxCAC,GACxB,GAAIA,MAAAA,EAEF,MAAM,IAAIC,6CAEV,OAAOD,gCCFiBE,GAI1B,IACEC,EACAC,EADAD,EAUiBZ,EATjBa,EAS0BzB,EAPtBuB,EACFA,EAAOG,kBAAkBF,EAAWC,GAEpCC,EAAkBF,EAAWC"}
@@ -1 +1 @@
1
- {"version":3,"file":"plasmic-spotify.esm.js","sources":["../src/spotify.tsx","../src/index.tsx"],"sourcesContent":["import { ComponentMeta } from \"@plasmicapp/host\";\n\nimport React from \"react\";\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\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-spotify\";\n\ninterface SpotifyProps {\n theme?: boolean;\n url?: string;\n className?: string;\n}\n\nexport const SpotifyMeta: ComponentMeta<SpotifyProps> = {\n name: \"hostless-spotify\",\n displayName: \"Spotify\",\n importName: \"Spotify\",\n importPath: modulePath,\n providesData: true,\n description: \"Spotify Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Song URL\",\n defaultValue:\n \"https://open.spotify.com/embed/track/3rmo8F54jFF8OgYsqTxm5d\",\n },\n theme: {\n type: \"boolean\",\n displayName: \"Theme\",\n description: \"Theme\",\n },\n },\n};\n\nexport function Spotify({ className, url, theme }: SpotifyProps) {\n const value = theme ? \"1\" : \"0\";\n const query = `${url}?utm_source=generator&theme=${value}`;\n return (\n <iframe\n src={query}\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"400\"\n height=\"166\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport { Spotify, SpotifyMeta } from \"./spotify\";\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 _registerComponent(Spotify, SpotifyMeta);\n}\n\nexport * from \"./spotify\";\n"],"names":["ensure","x","undefined","Error","modulePath","SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","_ref","className","value","query","React","src","frameBorder","scrolling","width","height","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;SAGgBA,MAAMA,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;IACjC;IACA,MAAM,IAAIC,KAAK,sCAAsC,CAAC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,8BAA8B;IAQpCC,WAAW,GAAgC;EACtDC,IAAI,EAAE,kBAAkB;EACxBC,WAAW,EAAE,SAAS;EACtBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAEL,UAAU;EACtBM,YAAY,EAAE,IAAI;EAClBC,WAAW,EAAE,gBAAgB;EAC7BC,KAAK,EAAE;IACLC,GAAG,EAAE;MACHC,IAAI,EAAE,QAAQ;MACdP,WAAW,EAAE,KAAK;MAClBI,WAAW,EAAE,UAAU;MACvBI,YAAY,EACV;KACH;IACDC,KAAK,EAAE;MACLF,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,OAAO;MACpBI,WAAW,EAAE;;;;SAKHM,OAAOA,CAAAC,IAAA;MAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEN,GAAG,GAAAK,IAAA,CAAHL,GAAG;IAAEG,KAAK,GAAAE,IAAA,CAALF,KAAK;EAC7C,IAAMI,KAAK,GAAGJ,KAAK,GAAG,GAAG,GAAG,GAAG;EAC/B,IAAMK,KAAK,GAAMR,GAAG,oCAA+BO,KAAO;EAC1D,OACEE;IACEC,GAAG,EAAEF,KAAK;IACVG,WAAW,EAAC,GAAG;IACfC,SAAS,EAAC,IAAI;IACdC,KAAK,EAAC,KAAK;IACXC,MAAM,EAAC,KAAK;IACZR,SAAS,EAAEA;IACX;AAEN;;SClDgBS,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;EAEDF,kBAAkB,CAACb,OAAO,EAAEZ,WAAW,CAAC;AAC1C;;;;"}
1
+ {"version":3,"file":"plasmic-spotify.esm.js","sources":["../src/spotify.tsx","../src/index.tsx"],"sourcesContent":["import { CodeComponentMeta } from \"@plasmicapp/host/registerComponent\";\n\nimport React from \"react\";\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\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-spotify\";\n\ninterface SpotifyProps {\n theme?: boolean;\n url?: string;\n className?: string;\n}\n\nexport const SpotifyMeta: CodeComponentMeta<SpotifyProps> = {\n name: \"hostless-spotify\",\n displayName: \"Spotify\",\n importName: \"Spotify\",\n importPath: modulePath,\n providesData: true,\n description: \"Spotify Player\",\n props: {\n url: {\n type: \"string\",\n displayName: \"URL\",\n description: \"Song URL\",\n defaultValue:\n \"https://open.spotify.com/embed/track/3rmo8F54jFF8OgYsqTxm5d\",\n },\n theme: {\n type: \"boolean\",\n displayName: \"Theme\",\n description: \"Theme\",\n },\n },\n};\n\nexport function Spotify({ className, url, theme }: SpotifyProps) {\n const value = theme ? \"1\" : \"0\";\n const query = `${url}?utm_source=generator&theme=${value}`;\n return (\n <iframe\n src={query}\n frameBorder=\"0\"\n scrolling=\"no\"\n width=\"400\"\n height=\"166\"\n className={className}\n />\n );\n}\n","import registerComponent, {\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerGlobalContext from \"@plasmicapp/host/registerGlobalContext\";\nimport { Spotify, SpotifyMeta } from \"./spotify\";\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: CodeComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n _registerComponent(Spotify, SpotifyMeta);\n}\n\nexport * from \"./spotify\";\n"],"names":["ensure","x","undefined","Error","modulePath","SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","_ref","className","value","query","React","src","frameBorder","scrolling","width","height","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;SAGgBA,MAAMA,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;IACjC;IACA,MAAM,IAAIC,KAAK,sCAAsC,CAAC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,8BAA8B;IAQpCC,WAAW,GAAoC;EAC1DC,IAAI,EAAE,kBAAkB;EACxBC,WAAW,EAAE,SAAS;EACtBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAEL,UAAU;EACtBM,YAAY,EAAE,IAAI;EAClBC,WAAW,EAAE,gBAAgB;EAC7BC,KAAK,EAAE;IACLC,GAAG,EAAE;MACHC,IAAI,EAAE,QAAQ;MACdP,WAAW,EAAE,KAAK;MAClBI,WAAW,EAAE,UAAU;MACvBI,YAAY,EACV;KACH;IACDC,KAAK,EAAE;MACLF,IAAI,EAAE,SAAS;MACfP,WAAW,EAAE,OAAO;MACpBI,WAAW,EAAE;;;;SAKHM,OAAOA,CAAAC,IAAA;MAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEN,GAAG,GAAAK,IAAA,CAAHL,GAAG;IAAEG,KAAK,GAAAE,IAAA,CAALF,KAAK;EAC7C,IAAMI,KAAK,GAAGJ,KAAK,GAAG,GAAG,GAAG,GAAG;EAC/B,IAAMK,KAAK,GAAMR,GAAG,oCAA+BO,KAAO;EAC1D,OACEE;IACEC,GAAG,EAAEF,KAAK;IACVG,WAAW,EAAC,GAAG;IACfC,SAAS,EAAC,IAAI;IACdC,KAAK,EAAC,KAAK;IACXC,MAAM,EAAC,KAAK;IACZR,SAAS,EAAEA;IACX;AAEN;;SClDgBS,WAAWA,CAACC,MAG3B;EACC,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CACtBC,SAAY,EACZC,WAAuD;IAEvD,IAAIH,MAAM,EAAE;MACVA,MAAM,CAACI,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;KACjD,MAAM;MACLC,iBAAiB,CAACF,SAAS,EAAEC,WAAW,CAAC;;GAE5C;EAEDF,kBAAkB,CAACb,OAAO,EAAEZ,WAAW,CAAC;AAC1C;;;;"}
package/dist/spotify.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ComponentMeta } from "@plasmicapp/host";
1
+ import { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
2
  import React from "react";
3
3
  export declare function ensure<T>(x: T | null | undefined): T;
4
4
  interface SpotifyProps {
@@ -6,6 +6,6 @@ interface SpotifyProps {
6
6
  url?: string;
7
7
  className?: string;
8
8
  }
9
- export declare const SpotifyMeta: ComponentMeta<SpotifyProps>;
9
+ export declare const SpotifyMeta: CodeComponentMeta<SpotifyProps>;
10
10
  export declare function Spotify({ className, url, theme }: SpotifyProps): React.JSX.Element;
11
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/plasmic-spotify",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Plasmic Spotify components.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -46,5 +46,5 @@
46
46
  "dependencies": {
47
47
  "@plasmicapp/query": "0.1.82"
48
48
  },
49
- "gitHead": "30e1d9c40c46f513d507349568dc16bc5f3e9572"
49
+ "gitHead": "bbba4b6636e69a3441c6dbe4cefb860ed30e826f"
50
50
  }