@plasmicpkgs/plasmic-spotify 0.0.1 → 0.0.4

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.
@@ -17,7 +17,7 @@ function ensure(x) {
17
17
  }
18
18
  var modulePath = "@plasmicpkgs/plasmic-spotify";
19
19
  var SpotifyMeta = {
20
- name: "Spotify",
20
+ name: "hostless-spotify",
21
21
  displayName: "Spotify",
22
22
  importName: "Spotify",
23
23
  importPath: modulePath,
@@ -61,9 +61,7 @@ function registerAll(loader) {
61
61
  registerComponent(Component, defaultMeta);
62
62
  }
63
63
  };
64
- if (loader) {
65
- _registerComponent(Spotify, SpotifyMeta);
66
- }
64
+ _registerComponent(Spotify, SpotifyMeta);
67
65
  }
68
66
 
69
67
  exports.Spotify = Spotify;
@@ -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: \"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};\n\nexport function Spotify({\n className,\n url,\n theme,\n}: 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 {\n Spotify,\n SpotifyMeta,\n} from \"./spotify\";\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(Spotify, SpotifyMeta);\n }\n}\n\nexport * from \"./spotify\";"],"names":["ensure","x","undefined","Error","modulePath","SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","className","value","query","React","src","frameBorder","scrolling","width","height","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;;;;;;;SAGgBA,MAAM,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;IACjC;IACA,MAAM,IAAIC,KAAK,uCAAuC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,8BAA8B;IAQpCC,WAAW,GAAgC;EACtDC,IAAI,EAAE,SAAS;EACfC,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;;;;SAMHM,OAAO;MACrBC,SAAS,QAATA,SAAS;IACTL,GAAG,QAAHA,GAAG;IACHG,KAAK,QAALA,KAAK;EAEL,IAAMG,KAAK,GAAGH,KAAK,GAAG,GAAG,GAAG,GAAG;EAC/B,IAAMI,KAAK,GAAMP,GAAG,oCAA+BM,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;;SCnDgBS,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,CAACZ,OAAO,EAAEZ,WAAW,CAAC;;AAE5C;;;;;;;"}
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,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")),r=e(require("react")),o={name:"Spotify",displayName:"Spotify",importName:"Spotify",importPath:"@plasmicpkgs/plasmic-spotify",providesData:!0,description:"Spotify Player",props:{url:{type:"string",displayName:"URL",description:"Song URL",defaultValue:"https://open.spotify.com/embed/track/3rmo8F54jFF8OgYsqTxm5d"},theme:{type:"boolean",displayName:"Theme",description:"Theme"}}};function i(e){return r.createElement("iframe",{src:e.url+"?utm_source=generator&theme="+(e.theme?"1":"0"),frameBorder:"0",scrolling:"no",width:"400",height:"166",className:e.className})}exports.Spotify=i,exports.SpotifyMeta=o,exports.ensure=function(e){if(null==e)throw new Error("Value must not be undefined or null");return e},exports.registerAll=function(e){var r,p;e&&(r=i,p=o,e?e.registerComponent(r,p):t(r,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")),r=e(require("react")),o={name:"hostless-spotify",displayName:"Spotify",importName:"Spotify",importPath:"@plasmicpkgs/plasmic-spotify",providesData:!0,description:"Spotify Player",props:{url:{type:"string",displayName:"URL",description:"Song URL",defaultValue:"https://open.spotify.com/embed/track/3rmo8F54jFF8OgYsqTxm5d"},theme:{type:"boolean",displayName:"Theme",description:"Theme"}}};function i(e){return r.createElement("iframe",{src:e.url+"?utm_source=generator&theme="+(e.theme?"1":"0"),frameBorder:"0",scrolling:"no",width:"400",height:"166",className:e.className})}exports.Spotify=i,exports.SpotifyMeta=o,exports.ensure=function(e){if(null==e)throw new Error("Value must not be undefined or null");return e},exports.registerAll=function(e){var r,s;r=i,s=o,e?e.registerComponent(r,s):t(r,s)};
2
2
  //# sourceMappingURL=plasmic-spotify.cjs.production.min.js.map
@@ -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: \"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};\n\nexport function Spotify({\n className,\n url,\n theme,\n}: 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 {\n Spotify,\n SpotifyMeta,\n} from \"./spotify\";\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(Spotify, SpotifyMeta);\n }\n}\n\nexport * from \"./spotify\";"],"names":["SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","React","src","frameBorder","scrolling","width","height","className","x","Error","loader","Component","defaultMeta","registerComponent"],"mappings":"uNAoBaA,EAA2C,CACtDC,KAAM,UACNC,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,oBAMHM,KAOd,OACEC,0BACEC,MAPJN,sCACAG,MAEsB,IAAM,KAKxBI,YAAY,IACZC,UAAU,KACVC,MAAM,MACNC,OAAO,MACPC,YAbJA,4EA1CwBC,GACxB,GAAIA,MAAAA,EAEF,MAAM,IAAIC,6CAEV,OAAOD,gCCEiBE,GAI1B,IACEC,EACAC,EASEF,IAVFC,EAWmBX,EAVnBY,EAU4BxB,EARxBsB,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 { 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"}
@@ -11,7 +11,7 @@ function ensure(x) {
11
11
  }
12
12
  var modulePath = "@plasmicpkgs/plasmic-spotify";
13
13
  var SpotifyMeta = {
14
- name: "Spotify",
14
+ name: "hostless-spotify",
15
15
  displayName: "Spotify",
16
16
  importName: "Spotify",
17
17
  importPath: modulePath,
@@ -55,9 +55,7 @@ function registerAll(loader) {
55
55
  registerComponent(Component, defaultMeta);
56
56
  }
57
57
  };
58
- if (loader) {
59
- _registerComponent(Spotify, SpotifyMeta);
60
- }
58
+ _registerComponent(Spotify, SpotifyMeta);
61
59
  }
62
60
 
63
61
  export { Spotify, SpotifyMeta, ensure, registerAll };
@@ -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: \"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};\n\nexport function Spotify({\n className,\n url,\n theme,\n}: 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 {\n Spotify,\n SpotifyMeta,\n} from \"./spotify\";\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(Spotify, SpotifyMeta);\n }\n}\n\nexport * from \"./spotify\";"],"names":["ensure","x","undefined","Error","modulePath","SpotifyMeta","name","displayName","importName","importPath","providesData","description","props","url","type","defaultValue","theme","Spotify","className","value","query","React","src","frameBorder","scrolling","width","height","registerAll","loader","_registerComponent","Component","defaultMeta","registerComponent"],"mappings":";;;SAGgBA,MAAM,CAAIC,CAAuB;EAC/C,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;IACjC;IACA,MAAM,IAAIC,KAAK,uCAAuC;GACvD,MAAM;IACL,OAAOF,CAAC;;AAEZ;AAEA,IAAMG,UAAU,GAAG,8BAA8B;IAQpCC,WAAW,GAAgC;EACtDC,IAAI,EAAE,SAAS;EACfC,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;;;;SAMHM,OAAO;MACrBC,SAAS,QAATA,SAAS;IACTL,GAAG,QAAHA,GAAG;IACHG,KAAK,QAALA,KAAK;EAEL,IAAMG,KAAK,GAAGH,KAAK,GAAG,GAAG,GAAG,GAAG;EAC/B,IAAMI,KAAK,GAAMP,GAAG,oCAA+BM,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;;SCnDgBS,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,CAACZ,OAAO,EAAEZ,WAAW,CAAC;;AAE5C;;;;"}
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;;;;"}
package/dist/spotify.d.ts CHANGED
@@ -7,5 +7,5 @@ interface SpotifyProps {
7
7
  className?: string;
8
8
  }
9
9
  export declare const SpotifyMeta: ComponentMeta<SpotifyProps>;
10
- export declare function Spotify({ className, url, theme, }: SpotifyProps): React.JSX.Element;
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.1",
3
+ "version": "0.0.4",
4
4
  "description": "Plasmic Spotify components.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -14,9 +14,9 @@
14
14
  "scripts": {
15
15
  "start": "tsdx watch",
16
16
  "build": "tsdx build",
17
- "test": "yarn --cwd=../.. test --passWithNoTests",
17
+ "test": "TEST_CWD=`pwd` yarn --cwd=../.. test --passWithNoTests",
18
18
  "lint": "tsdx lint",
19
- "prepare": "if-env PREPARE_NO_BUILD=true || yarn build",
19
+ "prepublishOnly": "npm run build",
20
20
  "size": "size-limit",
21
21
  "analyze": "size-limit --why"
22
22
  },
@@ -34,19 +34,17 @@
34
34
  }
35
35
  ],
36
36
  "devDependencies": {
37
- "@plasmicapp/host": "^1.0.117",
38
- "@size-limit/preset-small-lib": "^7.0.8",
37
+ "@plasmicapp/host": "1.0.226",
39
38
  "@types/react": "^17.0.43",
40
39
  "@types/react-dom": "^17.0.14",
41
40
  "husky": "^7.0.4",
42
41
  "react": "^18.0.0",
43
42
  "react-dom": "^18.0.0",
44
- "size-limit": "^7.0.8",
45
43
  "tsdx": "^0.14.1",
46
44
  "tslib": "^2.3.1"
47
45
  },
48
46
  "dependencies": {
49
47
  "@plasmicapp/query": "^0.1.61"
50
48
  },
51
- "gitHead": "6a7364c3fd0b59099a5869f3e99f13b51a391d0a"
49
+ "gitHead": "8c7b2566770ba6dbc181bd98a22cca50cc84c57e"
52
50
  }