@plasmicpkgs/react-youtube 7.13.214 → 7.13.216
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/react-youtube.cjs.development.js +6 -11
- package/dist/react-youtube.cjs.development.js.map +1 -1
- package/dist/react-youtube.cjs.production.min.js +1 -1
- package/dist/react-youtube.cjs.production.min.js.map +1 -1
- package/dist/react-youtube.esm.js +6 -11
- package/dist/react-youtube.esm.js.map +1 -1
- package/package.json +3 -3
|
@@ -9,18 +9,13 @@ var React = _interopDefault(require('react'));
|
|
|
9
9
|
var YouTubeImpl = _interopDefault(require('react-youtube'));
|
|
10
10
|
|
|
11
11
|
function _extends() {
|
|
12
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
13
|
-
for (var
|
|
14
|
-
var
|
|
15
|
-
for (var
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
17
|
-
target[key] = source[key];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
12
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
13
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
14
|
+
var t = arguments[e];
|
|
15
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
20
16
|
}
|
|
21
|
-
return
|
|
22
|
-
};
|
|
23
|
-
return _extends.apply(this, arguments);
|
|
17
|
+
return n;
|
|
18
|
+
}, _extends.apply(null, arguments);
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
var playerParams = ["autoplay", "cc_load_policy", "color", "controls", "disablekb", "enablejsapi", "end", "fs", "hl", "iv_load_policy", "list", "listType", "loop", "modestbranding", "origin", "playlist", "playsinline", "rel", "start"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-youtube.cjs.development.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\nimport YouTubeImpl, { YouTubeProps as YouTubeImplProps } from \"react-youtube\";\nimport type { Options } from \"youtube-player/dist/types\";\n\ntype PlayerVars = Exclude<Options[\"playerVars\"], undefined>;\nexport type YouTubeProps = YouTubeImplProps &\n {\n [prop in keyof PlayerVars]:\n | PlayerVars[prop]\n | (prop extends typeof booleanParams[number] ? boolean : never);\n } & { mute?: boolean };\nconst playerParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"color\",\n \"controls\",\n \"disablekb\",\n \"enablejsapi\",\n \"end\",\n \"fs\",\n \"hl\",\n \"iv_load_policy\",\n \"list\",\n \"listType\",\n \"loop\",\n \"modestbranding\",\n \"origin\",\n \"playlist\",\n \"playsinline\",\n \"rel\",\n \"start\",\n] as const;\n\nconst booleanParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"controls\",\n \"disablekb\",\n \"fs\",\n \"loop\",\n \"modestbranding\",\n \"playsinline\",\n \"rel\",\n] as const;\n\nconst booleanParamsSet = new Set<string>(booleanParams);\n\nconst YouTube = React.forwardRef<YouTubeImpl, YouTubeProps>(\n (props: YouTubeProps, ref) => {\n const internalRef = React.useRef<YouTubeImpl | null>(null);\n\n const onRef = React.useCallback(\n (player: YouTubeImpl | null) => {\n internalRef.current = player;\n if (ref) {\n if (typeof ref === \"function\") {\n ref(player);\n } else {\n ref.current = player;\n }\n }\n },\n [ref]\n );\n\n React.useEffect(() => {\n if (props.mute !== undefined) {\n if (props.mute) {\n internalRef.current?.getInternalPlayer()?.mute();\n } else {\n internalRef.current?.getInternalPlayer()?.unMute();\n }\n }\n }, [props.mute, internalRef]);\n\n const finalProps = { ...props };\n for (const prop of playerParams) {\n if (prop in finalProps) {\n const value = finalProps[prop];\n delete finalProps[prop];\n if (!finalProps.opts) {\n finalProps.opts = {};\n }\n if (!finalProps.opts.playerVars) {\n finalProps.opts.playerVars = {};\n }\n if (booleanParamsSet.has(prop)) {\n if (prop === \"cc_load_policy\" || prop === \"modestbranding\") {\n // undefined or 1\n if (value) {\n finalProps.opts.playerVars[prop] = 1;\n } else {\n delete finalProps.opts.playerVars[prop];\n }\n } else {\n // 0 or 1\n finalProps.opts.playerVars[prop] = (value ? 1 : 0) as any;\n }\n } else {\n finalProps.opts.playerVars[prop] = value as any;\n }\n }\n }\n return (\n <YouTubeImpl\n ref={onRef}\n {...finalProps}\n iframeClassName={props.className}\n />\n );\n }\n);\n\nexport const youtubeMeta: ComponentMeta<YouTubeProps> = {\n name: \"hostless-youtube\",\n displayName: \"YouTube\",\n importName: \"YouTube\",\n importPath: \"@plasmicpkgs/react-youtube\",\n props: {\n videoId: {\n type: \"string\",\n defaultValue: \"R6MeLqRQzYw\",\n displayName: \"Video ID\",\n description: \"The ID for the YouTube video\",\n },\n autoplay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video should automatically start playing when the player loads\",\n defaultValueHint: false,\n hidden: (props) => !props.mute,\n },\n cc_load_policy: {\n type: \"boolean\",\n displayName: \"Show Captions\",\n description:\n \"Whether the captions should be shown by default, even if the user has turned captions off\",\n defaultValueHint: false,\n },\n start: {\n type: \"number\",\n displayName: \"Start\",\n description:\n \"The video should begin at this amount of seconds from the start of the video\",\n defaultValueHint: 0,\n },\n end: {\n type: \"number\",\n displayName: \"End\",\n description:\n \"Stop playing the video after this amount of seconds (measured from the start of the video)\",\n },\n color: {\n type: \"choice\",\n displayName: \"Color\",\n options: [\"red\", \"white\"],\n description:\n \"The color used in the display bar to highlight how much of the video the viewer has already seen\",\n defaultValueHint: \"red\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description:\n \"Whether the YouTube video player controls should be displayed\",\n defaultValueHint: true,\n },\n disablekb: {\n type: \"boolean\",\n displayName: \"Disable Keyboard\",\n description: \"Whether the keyboard controls should be disabled\",\n defaultValueHint: false,\n },\n fs: {\n type: \"boolean\",\n displayName: \"FullScreen Button\",\n description: \"Whether the fullscreen button should be displayed\",\n defaultValueHint: true,\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n defaultValueHint: false,\n },\n modestbranding: {\n type: \"boolean\",\n displayName: \"Hide Logo\",\n description: \"Hide the YouTube logo in the control bar\",\n defaultValueHint: false,\n },\n mute: {\n type: \"boolean\",\n displayName: \"Mute\",\n description: \"Whether the video should be muted\",\n defaultValueHint: false,\n },\n playsinline: {\n type: \"boolean\",\n displayName: \"Play Inline\",\n description:\n \"Whether the video should be played inline or fullscreen on iOS\",\n defaultValueHint: false,\n },\n rel: {\n type: \"boolean\",\n displayName: \"Related Videos\",\n description:\n \"Whether it should show related videos when the video ends (if false, it shows other videos from the same channel)\",\n defaultValueHint: true,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n height: \"390px\",\n width: \"640px\",\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerYouTube(\n loader?: { registerComponent: typeof registerComponent },\n customYouTubeMeta?: ComponentMeta<YouTubeProps>\n) {\n if (loader) {\n loader.registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n } else {\n registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n }\n}\n\nexport default YouTube;\n"],"names":["playerParams","booleanParams","booleanParamsSet","Set","YouTube","React","forwardRef","props","ref","internalRef","useRef","onRef","useCallback","player","current","useEffect","mute","undefined","_internalRef$current","getInternalPlayer","_internalRef$current2","unMute","finalProps","_extends","_i","_playerParams","length","prop","value","opts","playerVars","has","YouTubeImpl","iframeClassName","className","youtubeMeta","name","displayName","importName","importPath","videoId","type","defaultValue","description","autoplay","defaultValueHint","hidden","cc_load_policy","start","end","color","options","controls","disablekb","fs","loop","modestbranding","playsinline","rel","isDefaultExport","defaultStyles","height","width","maxHeight","maxWidth","registerYouTube","loader","customYouTubeMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,YAAY,GAAG,CACnB,UAAU,EACV,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAA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b,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,mBAAmB;MAChCM,WAAW,EAAE,mDAAmD;MAChEE,gBAAgB,EAAE;KACnB;IACDU,IAAI,EAAE;MACJd,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,MAAM;MACnBM,WAAW,EAAE,4DAA4D;MACzEE,gBAAgB,EAAE;KACnB;IACDW,cAAc,EAAE;MACdf,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,WAAW;MACxBM,WAAW,EAAE,0CAA0C;MACvDE,gBAAgB,EAAE;KACnB;IACD7B,IAAI,EAAE;MACJyB,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,MAAM;MACnBM,WAAW,EAAE,mCAAmC;MAChDE,gBAAgB,EAAE;KACnB;IACDY,WAAW,EAAE;MACXhB,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,aAAa;MAC1BM,WAAW,EACT,gEAAgE;MAClEE,gBAAgB,EAAE;KACnB;IACDa,GAAG,EAAE;MACHjB,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,gBAAgB;MAC7BM,WAAW,EACT,mHAAmH;MACrHE,gBAAgB,EAAE;;GAErB;EACDc,eAAe,EAAE,IAAI;EACrBC,aAAa,EAAE;IACbC,MAAM,EAAE,OAAO;IACfC,KAAK,EAAE,OAAO;IACdC,SAAS,EAAE,MAAM;IACjBC,QAAQ,EAAE;;;SAIEC,eAAeA,CAC7BC,MAAwD,EACxDC,iBAA+C;EAE/C,IAAID,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAAChE,OAAO,EAAE+D,iBAAiB,WAAjBA,iBAAiB,GAAIhC,WAAW,CAAC;GACpE,MAAM;IACLiC,iBAAiB,CAAChE,OAAO,EAAE+D,iBAAiB,WAAjBA,iBAAiB,GAAIhC,WAAW,CAAC;;AAEhE;;;;;;"}
|
|
1
|
+
{"version":3,"file":"react-youtube.cjs.development.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\nimport YouTubeImpl, { YouTubeProps as YouTubeImplProps } from \"react-youtube\";\nimport type { Options } from \"youtube-player/dist/types\";\n\ntype PlayerVars = Exclude<Options[\"playerVars\"], undefined>;\nexport type YouTubeProps = YouTubeImplProps &\n {\n [prop in keyof PlayerVars]:\n | PlayerVars[prop]\n | (prop extends typeof booleanParams[number] ? boolean : never);\n } & { mute?: boolean };\nconst playerParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"color\",\n \"controls\",\n \"disablekb\",\n \"enablejsapi\",\n \"end\",\n \"fs\",\n \"hl\",\n \"iv_load_policy\",\n \"list\",\n \"listType\",\n \"loop\",\n \"modestbranding\",\n \"origin\",\n \"playlist\",\n \"playsinline\",\n \"rel\",\n \"start\",\n] as const;\n\nconst booleanParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"controls\",\n \"disablekb\",\n \"fs\",\n \"loop\",\n \"modestbranding\",\n \"playsinline\",\n \"rel\",\n] as const;\n\nconst booleanParamsSet = new Set<string>(booleanParams);\n\nconst YouTube = React.forwardRef<YouTubeImpl, YouTubeProps>(\n (props: YouTubeProps, ref) => {\n const internalRef = React.useRef<YouTubeImpl | null>(null);\n\n const onRef = React.useCallback(\n (player: YouTubeImpl | null) => {\n internalRef.current = player;\n if (ref) {\n if (typeof ref === \"function\") {\n ref(player);\n } else {\n ref.current = player;\n }\n }\n },\n [ref]\n );\n\n React.useEffect(() => {\n if (props.mute !== undefined) {\n if (props.mute) {\n internalRef.current?.getInternalPlayer()?.mute();\n } else {\n internalRef.current?.getInternalPlayer()?.unMute();\n }\n }\n }, [props.mute, internalRef]);\n\n const finalProps = { ...props };\n for (const prop of playerParams) {\n if (prop in finalProps) {\n const value = finalProps[prop];\n delete finalProps[prop];\n if (!finalProps.opts) {\n finalProps.opts = {};\n }\n if (!finalProps.opts.playerVars) {\n finalProps.opts.playerVars = {};\n }\n if (booleanParamsSet.has(prop)) {\n if (prop === \"cc_load_policy\" || prop === \"modestbranding\") {\n // undefined or 1\n if (value) {\n finalProps.opts.playerVars[prop] = 1;\n } else {\n delete finalProps.opts.playerVars[prop];\n }\n } else {\n // 0 or 1\n finalProps.opts.playerVars[prop] = (value ? 1 : 0) as any;\n }\n } else {\n finalProps.opts.playerVars[prop] = value as any;\n }\n }\n }\n return (\n <YouTubeImpl\n ref={onRef}\n {...finalProps}\n iframeClassName={props.className}\n />\n );\n }\n);\n\nexport const youtubeMeta: ComponentMeta<YouTubeProps> = {\n name: \"hostless-youtube\",\n displayName: \"YouTube\",\n importName: \"YouTube\",\n importPath: \"@plasmicpkgs/react-youtube\",\n props: {\n videoId: {\n type: \"string\",\n defaultValue: \"R6MeLqRQzYw\",\n displayName: \"Video ID\",\n description: \"The ID for the YouTube video\",\n },\n autoplay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video should automatically start playing when the player loads\",\n defaultValueHint: false,\n hidden: (props) => !props.mute,\n },\n cc_load_policy: {\n type: \"boolean\",\n displayName: \"Show Captions\",\n description:\n \"Whether the captions should be shown by default, even if the user has turned captions off\",\n defaultValueHint: false,\n },\n start: {\n type: \"number\",\n displayName: \"Start\",\n description:\n \"The video should begin at this amount of seconds from the start of the video\",\n defaultValueHint: 0,\n },\n end: {\n type: \"number\",\n displayName: \"End\",\n description:\n \"Stop playing the video after this amount of seconds (measured from the start of the video)\",\n },\n color: {\n type: \"choice\",\n displayName: \"Color\",\n options: [\"red\", \"white\"],\n description:\n \"The color used in the display bar to highlight how much of the video the viewer has already seen\",\n defaultValueHint: \"red\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description:\n \"Whether the YouTube video player controls should be displayed\",\n defaultValueHint: true,\n },\n disablekb: {\n type: \"boolean\",\n displayName: \"Disable Keyboard\",\n description: \"Whether the keyboard controls should be disabled\",\n defaultValueHint: false,\n },\n fs: {\n type: \"boolean\",\n displayName: \"FullScreen Button\",\n description: \"Whether the fullscreen button should be displayed\",\n defaultValueHint: true,\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n defaultValueHint: false,\n },\n modestbranding: {\n type: \"boolean\",\n displayName: \"Hide Logo\",\n description: \"Hide the YouTube logo in the control bar\",\n defaultValueHint: false,\n },\n mute: {\n type: \"boolean\",\n displayName: \"Mute\",\n description: \"Whether the video should be muted\",\n defaultValueHint: false,\n },\n playsinline: {\n type: \"boolean\",\n displayName: \"Play Inline\",\n description:\n \"Whether the video should be played inline or fullscreen on iOS\",\n defaultValueHint: false,\n },\n rel: {\n type: \"boolean\",\n displayName: \"Related Videos\",\n description:\n \"Whether it should show related videos when the video ends (if false, it shows other videos from the same channel)\",\n defaultValueHint: true,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n height: \"390px\",\n width: \"640px\",\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerYouTube(\n loader?: { registerComponent: typeof registerComponent },\n customYouTubeMeta?: ComponentMeta<YouTubeProps>\n) {\n if (loader) {\n loader.registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n } else {\n registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n }\n}\n\nexport default YouTube;\n"],"names":["playerParams","booleanParams","booleanParamsSet","Set","YouTube","React","forwardRef","props","ref","internalRef","useRef","onRef","useCallback","player","current","useEffect","mute","undefined","_internalRef$current","getInternalPlayer","_internalRef$current2","unMute","finalProps","_extends","_i","_playerParams","length","prop","value","opts","playerVars","has","YouTubeImpl","iframeClassName","className","youtubeMeta","name","displayName","importName","importPath","videoId","type","defaultValue","description","autoplay","defaultValueHint","hidden","cc_load_policy","start","end","color","options","controls","disablekb","fs","loop","modestbranding","playsinline","rel","isDefaultExport","defaultStyles","height","width","maxHeight","maxWidth","registerYouTube","loader","customYouTubeMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,YAAY,GAAG,CACnB,UAAU,EACV,gBAAgB,EAChB,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&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@plasmicapp/host/registerComponent")),o=e(require("react")),a=e(require("react-youtube"));function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)
|
|
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")),o=e(require("react")),a=e(require("react-youtube"));function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e}).apply(null,arguments)}var i=["autoplay","cc_load_policy","color","controls","disablekb","enablejsapi","end","fs","hl","iv_load_policy","list","listType","loop","modestbranding","origin","playlist","playsinline","rel","start"],n=new Set(["autoplay","cc_load_policy","controls","disablekb","fs","loop","modestbranding","playsinline","rel"]),r=o.forwardRef((function(e,t){var r=o.useRef(null),s=o.useCallback((function(e){r.current=e,t&&("function"==typeof t?t(e):t.current=e)}),[t]);o.useEffect((function(){var t,o;void 0!==e.mute&&(e.mute?null==(t=r.current)||null==(t=t.getInternalPlayer())||t.mute():null==(o=r.current)||null==(o=o.getInternalPlayer())||o.unMute())}),[e.mute,r]);for(var d=l({},e),u=0,p=i;u<p.length;u++){var h=p[u];if(h in d){var c=d[h];delete d[h],d.opts||(d.opts={}),d.opts.playerVars||(d.opts.playerVars={}),n.has(h)?"cc_load_policy"===h||"modestbranding"===h?c?d.opts.playerVars[h]=1:delete d.opts.playerVars[h]:d.opts.playerVars[h]=c?1:0:d.opts.playerVars[h]=c}}return o.createElement(a,Object.assign({ref:s},d,{iframeClassName:e.className}))})),s={name:"hostless-youtube",displayName:"YouTube",importName:"YouTube",importPath:"@plasmicpkgs/react-youtube",props:{videoId:{type:"string",defaultValue:"R6MeLqRQzYw",displayName:"Video ID",description:"The ID for the YouTube video"},autoplay:{type:"boolean",displayName:"Auto Play",description:"Whether the video should automatically start playing when the player loads",defaultValueHint:!1,hidden:function(e){return!e.mute}},cc_load_policy:{type:"boolean",displayName:"Show Captions",description:"Whether the captions should be shown by default, even if the user has turned captions off",defaultValueHint:!1},start:{type:"number",displayName:"Start",description:"The video should begin at this amount of seconds from the start of the video",defaultValueHint:0},end:{type:"number",displayName:"End",description:"Stop playing the video after this amount of seconds (measured from the start of the video)"},color:{type:"choice",displayName:"Color",options:["red","white"],description:"The color used in the display bar to highlight how much of the video the viewer has already seen",defaultValueHint:"red"},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the YouTube video player controls should be displayed",defaultValueHint:!0},disablekb:{type:"boolean",displayName:"Disable Keyboard",description:"Whether the keyboard controls should be disabled",defaultValueHint:!1},fs:{type:"boolean",displayName:"FullScreen Button",description:"Whether the fullscreen button should be displayed",defaultValueHint:!0},loop:{type:"boolean",displayName:"Loop",description:"Whether the video should be played again after it finishes",defaultValueHint:!1},modestbranding:{type:"boolean",displayName:"Hide Logo",description:"Hide the YouTube logo in the control bar",defaultValueHint:!1},mute:{type:"boolean",displayName:"Mute",description:"Whether the video should be muted",defaultValueHint:!1},playsinline:{type:"boolean",displayName:"Play Inline",description:"Whether the video should be played inline or fullscreen on iOS",defaultValueHint:!1},rel:{type:"boolean",displayName:"Related Videos",description:"Whether it should show related videos when the video ends (if false, it shows other videos from the same channel)",defaultValueHint:!0}},isDefaultExport:!0,defaultStyles:{height:"390px",width:"640px",maxHeight:"100%",maxWidth:"100%"}};exports.default=r,exports.registerYouTube=function(e,o){e?e.registerComponent(r,null!=o?o:s):t(r,null!=o?o:s)},exports.youtubeMeta=s;
|
|
2
2
|
//# sourceMappingURL=react-youtube.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-youtube.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\nimport YouTubeImpl, { YouTubeProps as YouTubeImplProps } from \"react-youtube\";\nimport type { Options } from \"youtube-player/dist/types\";\n\ntype PlayerVars = Exclude<Options[\"playerVars\"], undefined>;\nexport type YouTubeProps = YouTubeImplProps &\n {\n [prop in keyof PlayerVars]:\n | PlayerVars[prop]\n | (prop extends typeof booleanParams[number] ? boolean : never);\n } & { mute?: boolean };\nconst playerParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"color\",\n \"controls\",\n \"disablekb\",\n \"enablejsapi\",\n \"end\",\n \"fs\",\n \"hl\",\n \"iv_load_policy\",\n \"list\",\n \"listType\",\n \"loop\",\n \"modestbranding\",\n \"origin\",\n \"playlist\",\n \"playsinline\",\n \"rel\",\n \"start\",\n] as const;\n\nconst booleanParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"controls\",\n \"disablekb\",\n \"fs\",\n \"loop\",\n \"modestbranding\",\n \"playsinline\",\n \"rel\",\n] as const;\n\nconst booleanParamsSet = new Set<string>(booleanParams);\n\nconst YouTube = React.forwardRef<YouTubeImpl, YouTubeProps>(\n (props: YouTubeProps, ref) => {\n const internalRef = React.useRef<YouTubeImpl | null>(null);\n\n const onRef = React.useCallback(\n (player: YouTubeImpl | null) => {\n internalRef.current = player;\n if (ref) {\n if (typeof ref === \"function\") {\n ref(player);\n } else {\n ref.current = player;\n }\n }\n },\n [ref]\n );\n\n React.useEffect(() => {\n if (props.mute !== undefined) {\n if (props.mute) {\n internalRef.current?.getInternalPlayer()?.mute();\n } else {\n internalRef.current?.getInternalPlayer()?.unMute();\n }\n }\n }, [props.mute, internalRef]);\n\n const finalProps = { ...props };\n for (const prop of playerParams) {\n if (prop in finalProps) {\n const value = finalProps[prop];\n delete finalProps[prop];\n if (!finalProps.opts) {\n finalProps.opts = {};\n }\n if (!finalProps.opts.playerVars) {\n finalProps.opts.playerVars = {};\n }\n if (booleanParamsSet.has(prop)) {\n if (prop === \"cc_load_policy\" || prop === \"modestbranding\") {\n // undefined or 1\n if (value) {\n finalProps.opts.playerVars[prop] = 1;\n } else {\n delete finalProps.opts.playerVars[prop];\n }\n } else {\n // 0 or 1\n finalProps.opts.playerVars[prop] = (value ? 1 : 0) as any;\n }\n } else {\n finalProps.opts.playerVars[prop] = value as any;\n }\n }\n }\n return (\n <YouTubeImpl\n ref={onRef}\n {...finalProps}\n iframeClassName={props.className}\n />\n );\n }\n);\n\nexport const youtubeMeta: ComponentMeta<YouTubeProps> = {\n name: \"hostless-youtube\",\n displayName: \"YouTube\",\n importName: \"YouTube\",\n importPath: \"@plasmicpkgs/react-youtube\",\n props: {\n videoId: {\n type: \"string\",\n defaultValue: \"R6MeLqRQzYw\",\n displayName: \"Video ID\",\n description: \"The ID for the YouTube video\",\n },\n autoplay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video should automatically start playing when the player loads\",\n defaultValueHint: false,\n hidden: (props) => !props.mute,\n },\n cc_load_policy: {\n type: \"boolean\",\n displayName: \"Show Captions\",\n description:\n \"Whether the captions should be shown by default, even if the user has turned captions off\",\n defaultValueHint: false,\n },\n start: {\n type: \"number\",\n displayName: \"Start\",\n description:\n \"The video should begin at this amount of seconds from the start of the video\",\n defaultValueHint: 0,\n },\n end: {\n type: \"number\",\n displayName: \"End\",\n description:\n \"Stop playing the video after this amount of seconds (measured from the start of the video)\",\n },\n color: {\n type: \"choice\",\n displayName: \"Color\",\n options: [\"red\", \"white\"],\n description:\n \"The color used in the display bar to highlight how much of the video the viewer has already seen\",\n defaultValueHint: \"red\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description:\n \"Whether the YouTube video player controls should be displayed\",\n defaultValueHint: true,\n },\n disablekb: {\n type: \"boolean\",\n displayName: \"Disable Keyboard\",\n description: \"Whether the keyboard controls should be disabled\",\n defaultValueHint: false,\n },\n fs: {\n type: \"boolean\",\n displayName: \"FullScreen Button\",\n description: \"Whether the fullscreen button should be displayed\",\n defaultValueHint: true,\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n defaultValueHint: false,\n },\n modestbranding: {\n type: \"boolean\",\n displayName: \"Hide Logo\",\n description: \"Hide the YouTube logo in the control bar\",\n defaultValueHint: false,\n },\n mute: {\n type: \"boolean\",\n displayName: \"Mute\",\n description: \"Whether the video should be muted\",\n defaultValueHint: false,\n },\n playsinline: {\n type: \"boolean\",\n displayName: \"Play Inline\",\n description:\n \"Whether the video should be played inline or fullscreen on iOS\",\n defaultValueHint: false,\n },\n rel: {\n type: \"boolean\",\n displayName: \"Related Videos\",\n description:\n \"Whether it should show related videos when the video ends (if false, it shows other videos from the same channel)\",\n defaultValueHint: true,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n height: \"390px\",\n width: \"640px\",\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerYouTube(\n loader?: { registerComponent: typeof registerComponent },\n customYouTubeMeta?: ComponentMeta<YouTubeProps>\n) {\n if (loader) {\n loader.registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n } else {\n registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n }\n}\n\nexport default YouTube;\n"],"names":["playerParams","booleanParamsSet","Set","YouTube","React","forwardRef","props","ref","internalRef","useRef","onRef","useCallback","player","current","useEffect","_internalRef$current","_internalRef$current2","undefined","mute","getInternalPlayer","unMute","finalProps","_extends","_i","_playerParams","length","prop","value","opts","playerVars","has","YouTubeImpl","iframeClassName","className","youtubeMeta","name","displayName","importName","importPath","videoId","type","defaultValue","description","autoplay","defaultValueHint","hidden","cc_load_policy","start","end","color","options","controls","disablekb","fs","loop","modestbranding","playsinline","rel","isDefaultExport","defaultStyles","height","width","maxHeight","maxWidth","loader","customYouTubeMeta","registerComponent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-youtube.cjs.production.min.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\nimport YouTubeImpl, { YouTubeProps as YouTubeImplProps } from \"react-youtube\";\nimport type { Options } from \"youtube-player/dist/types\";\n\ntype PlayerVars = Exclude<Options[\"playerVars\"], undefined>;\nexport type YouTubeProps = YouTubeImplProps &\n {\n [prop in keyof PlayerVars]:\n | PlayerVars[prop]\n | (prop extends typeof booleanParams[number] ? boolean : never);\n } & { mute?: boolean };\nconst playerParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"color\",\n \"controls\",\n \"disablekb\",\n \"enablejsapi\",\n \"end\",\n \"fs\",\n \"hl\",\n \"iv_load_policy\",\n \"list\",\n \"listType\",\n \"loop\",\n \"modestbranding\",\n \"origin\",\n \"playlist\",\n \"playsinline\",\n \"rel\",\n \"start\",\n] as const;\n\nconst booleanParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"controls\",\n \"disablekb\",\n \"fs\",\n \"loop\",\n \"modestbranding\",\n \"playsinline\",\n \"rel\",\n] as const;\n\nconst booleanParamsSet = new Set<string>(booleanParams);\n\nconst YouTube = React.forwardRef<YouTubeImpl, YouTubeProps>(\n (props: YouTubeProps, ref) => {\n const internalRef = React.useRef<YouTubeImpl | null>(null);\n\n const onRef = React.useCallback(\n (player: YouTubeImpl | null) => {\n internalRef.current = player;\n if (ref) {\n if (typeof ref === \"function\") {\n ref(player);\n } else {\n ref.current = player;\n }\n }\n },\n [ref]\n );\n\n React.useEffect(() => {\n if (props.mute !== undefined) {\n if (props.mute) {\n internalRef.current?.getInternalPlayer()?.mute();\n } else {\n internalRef.current?.getInternalPlayer()?.unMute();\n }\n }\n }, [props.mute, internalRef]);\n\n const finalProps = { ...props };\n for (const prop of playerParams) {\n if (prop in finalProps) {\n const value = finalProps[prop];\n delete finalProps[prop];\n if (!finalProps.opts) {\n finalProps.opts = {};\n }\n if (!finalProps.opts.playerVars) {\n finalProps.opts.playerVars = {};\n }\n if (booleanParamsSet.has(prop)) {\n if (prop === \"cc_load_policy\" || prop === \"modestbranding\") {\n // undefined or 1\n if (value) {\n finalProps.opts.playerVars[prop] = 1;\n } else {\n delete finalProps.opts.playerVars[prop];\n }\n } else {\n // 0 or 1\n finalProps.opts.playerVars[prop] = (value ? 1 : 0) as any;\n }\n } else {\n finalProps.opts.playerVars[prop] = value as any;\n }\n }\n }\n return (\n <YouTubeImpl\n ref={onRef}\n {...finalProps}\n iframeClassName={props.className}\n />\n );\n }\n);\n\nexport const youtubeMeta: ComponentMeta<YouTubeProps> = {\n name: \"hostless-youtube\",\n displayName: \"YouTube\",\n importName: \"YouTube\",\n importPath: \"@plasmicpkgs/react-youtube\",\n props: {\n videoId: {\n type: \"string\",\n defaultValue: \"R6MeLqRQzYw\",\n displayName: \"Video ID\",\n description: \"The ID for the YouTube video\",\n },\n autoplay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video should automatically start playing when the player loads\",\n defaultValueHint: false,\n hidden: (props) => !props.mute,\n },\n cc_load_policy: {\n type: \"boolean\",\n displayName: \"Show Captions\",\n description:\n \"Whether the captions should be shown by default, even if the user has turned captions off\",\n defaultValueHint: false,\n },\n start: {\n type: \"number\",\n displayName: \"Start\",\n description:\n \"The video should begin at this amount of seconds from the start of the video\",\n defaultValueHint: 0,\n },\n end: {\n type: \"number\",\n displayName: \"End\",\n description:\n \"Stop playing the video after this amount of seconds (measured from the start of the video)\",\n },\n color: {\n type: \"choice\",\n displayName: \"Color\",\n options: [\"red\", \"white\"],\n description:\n \"The color used in the display bar to highlight how much of the video the viewer has already seen\",\n defaultValueHint: \"red\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description:\n \"Whether the YouTube video player controls should be displayed\",\n defaultValueHint: true,\n },\n disablekb: {\n type: \"boolean\",\n displayName: \"Disable Keyboard\",\n description: \"Whether the keyboard controls should be disabled\",\n defaultValueHint: false,\n },\n fs: {\n type: \"boolean\",\n displayName: \"FullScreen Button\",\n description: \"Whether the fullscreen button should be displayed\",\n defaultValueHint: true,\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n defaultValueHint: false,\n },\n modestbranding: {\n type: \"boolean\",\n displayName: \"Hide Logo\",\n description: \"Hide the YouTube logo in the control bar\",\n defaultValueHint: false,\n },\n mute: {\n type: \"boolean\",\n displayName: \"Mute\",\n description: \"Whether the video should be muted\",\n defaultValueHint: false,\n },\n playsinline: {\n type: \"boolean\",\n displayName: \"Play Inline\",\n description:\n \"Whether the video should be played inline or fullscreen on iOS\",\n defaultValueHint: false,\n },\n rel: {\n type: \"boolean\",\n displayName: \"Related Videos\",\n description:\n \"Whether it should show related videos when the video ends (if false, it shows other videos from the same channel)\",\n defaultValueHint: true,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n height: \"390px\",\n width: \"640px\",\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerYouTube(\n loader?: { registerComponent: typeof registerComponent },\n customYouTubeMeta?: ComponentMeta<YouTubeProps>\n) {\n if (loader) {\n loader.registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n } else {\n registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n }\n}\n\nexport default YouTube;\n"],"names":["playerParams","booleanParamsSet","Set","YouTube","React","forwardRef","props","ref","internalRef","useRef","onRef","useCallback","player","current","useEffect","_internalRef$current","_internalRef$current2","undefined","mute","getInternalPlayer","unMute","finalProps","_extends","_i","_playerParams","length","prop","value","opts","playerVars","has","YouTubeImpl","iframeClassName","className","youtubeMeta","name","displayName","importName","importPath","videoId","type","defaultValue","description","autoplay","defaultValueHint","hidden","cc_load_policy","start","end","color","options","controls","disablekb","fs","loop","modestbranding","playsinline","rel","isDefaultExport","defaultStyles","height","width","maxHeight","maxWidth","loader","customYouTubeMeta","registerComponent"],"mappings":"4cAcA,IAAMA,EAAe,CACnB,WACA,iBACA,QACA,WACA,YACA,cACA,MACA,KACA,KACA,iBACA,OACA,WACA,OACA,iBACA,SACA,WACA,cACA,MACA,SAeIC,EAAmB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,YAAa,YACbM,YACE,6EACFE,kBAAkB,EAClBC,OAAQ,SAACvC,GAAK,OAAMA,EAAMY,OAE5B4B,eAAgB,CACdN,KAAM,UACNJ,YAAa,gBACbM,YACE,4FACFE,kBAAkB,GAEpBG,MAAO,CACLP,KAAM,SACNJ,YAAa,QACbM,YACE,+EACFE,iBAAkB,GAEpBI,IAAK,CACHR,KAAM,SACNJ,YAAa,MACbM,YACE,8FAEJO,MAAO,CACLT,KAAM,SACNJ,YAAa,QACbc,QAAS,CAAC,MAAO,SACjBR,YACE,mGACFE,iBAAkB,OAEpBO,SAAU,CACRX,KAAM,UACNJ,YAAa,gBACbM,YACE,gEACFE,kBAAkB,GAEpBQ,UAAW,CACTZ,KAAM,UACNJ,YAAa,mBACbM,YAAa,mDACbE,kBAAkB,GAEpBS,GAAI,CACFb,KAAM,UACNJ,YAAa,oBACbM,YAAa,oDACbE,kBAAkB,GAEpBU,KAAM,CACJd,KAAM,UACNJ,YAAa,OACbM,YAAa,6DACbE,kBAAkB,GAEpBW,eAAgB,CACdf,KAAM,UACNJ,YAAa,YACbM,YAAa,2CACbE,kBAAkB,GAEpB1B,KAAM,CACJsB,KAAM,UACNJ,YAAa,OACbM,YAAa,oCACbE,kBAAkB,GAEpBY,YAAa,CACXhB,KAAM,UACNJ,YAAa,cACbM,YACE,iEACFE,kBAAkB,GAEpBa,IAAK,CACHjB,KAAM,UACNJ,YAAa,iBACbM,YACE,oHACFE,kBAAkB,IAGtBc,iBAAiB,EACjBC,cAAe,CACbC,OAAQ,QACRC,MAAO,QACPC,UAAW,OACXC,SAAU,4DAKZC,EACAC,GAEID,EACFA,EAAOE,kBAAkB/D,QAAS8D,EAAAA,EAAqB/B,GAEvDgC,EAAkB/D,QAAS8D,EAAAA,EAAqB/B"}
|
|
@@ -3,18 +3,13 @@ import React from 'react';
|
|
|
3
3
|
import YouTubeImpl from 'react-youtube';
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
7
|
-
for (var
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
|
-
target[key] = source[key];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
8
|
+
var t = arguments[e];
|
|
9
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
14
10
|
}
|
|
15
|
-
return
|
|
16
|
-
};
|
|
17
|
-
return _extends.apply(this, arguments);
|
|
11
|
+
return n;
|
|
12
|
+
}, _extends.apply(null, arguments);
|
|
18
13
|
}
|
|
19
14
|
|
|
20
15
|
var playerParams = ["autoplay", "cc_load_policy", "color", "controls", "disablekb", "enablejsapi", "end", "fs", "hl", "iv_load_policy", "list", "listType", "loop", "modestbranding", "origin", "playlist", "playsinline", "rel", "start"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-youtube.esm.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\nimport YouTubeImpl, { YouTubeProps as YouTubeImplProps } from \"react-youtube\";\nimport type { Options } from \"youtube-player/dist/types\";\n\ntype PlayerVars = Exclude<Options[\"playerVars\"], undefined>;\nexport type YouTubeProps = YouTubeImplProps &\n {\n [prop in keyof PlayerVars]:\n | PlayerVars[prop]\n | (prop extends typeof booleanParams[number] ? boolean : never);\n } & { mute?: boolean };\nconst playerParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"color\",\n \"controls\",\n \"disablekb\",\n \"enablejsapi\",\n \"end\",\n \"fs\",\n \"hl\",\n \"iv_load_policy\",\n \"list\",\n \"listType\",\n \"loop\",\n \"modestbranding\",\n \"origin\",\n \"playlist\",\n \"playsinline\",\n \"rel\",\n \"start\",\n] as const;\n\nconst booleanParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"controls\",\n \"disablekb\",\n \"fs\",\n \"loop\",\n \"modestbranding\",\n \"playsinline\",\n \"rel\",\n] as const;\n\nconst booleanParamsSet = new Set<string>(booleanParams);\n\nconst YouTube = React.forwardRef<YouTubeImpl, YouTubeProps>(\n (props: YouTubeProps, ref) => {\n const internalRef = React.useRef<YouTubeImpl | null>(null);\n\n const onRef = React.useCallback(\n (player: YouTubeImpl | null) => {\n internalRef.current = player;\n if (ref) {\n if (typeof ref === \"function\") {\n ref(player);\n } else {\n ref.current = player;\n }\n }\n },\n [ref]\n );\n\n React.useEffect(() => {\n if (props.mute !== undefined) {\n if (props.mute) {\n internalRef.current?.getInternalPlayer()?.mute();\n } else {\n internalRef.current?.getInternalPlayer()?.unMute();\n }\n }\n }, [props.mute, internalRef]);\n\n const finalProps = { ...props };\n for (const prop of playerParams) {\n if (prop in finalProps) {\n const value = finalProps[prop];\n delete finalProps[prop];\n if (!finalProps.opts) {\n finalProps.opts = {};\n }\n if (!finalProps.opts.playerVars) {\n finalProps.opts.playerVars = {};\n }\n if (booleanParamsSet.has(prop)) {\n if (prop === \"cc_load_policy\" || prop === \"modestbranding\") {\n // undefined or 1\n if (value) {\n finalProps.opts.playerVars[prop] = 1;\n } else {\n delete finalProps.opts.playerVars[prop];\n }\n } else {\n // 0 or 1\n finalProps.opts.playerVars[prop] = (value ? 1 : 0) as any;\n }\n } else {\n finalProps.opts.playerVars[prop] = value as any;\n }\n }\n }\n return (\n <YouTubeImpl\n ref={onRef}\n {...finalProps}\n iframeClassName={props.className}\n />\n );\n }\n);\n\nexport const youtubeMeta: ComponentMeta<YouTubeProps> = {\n name: \"hostless-youtube\",\n displayName: \"YouTube\",\n importName: \"YouTube\",\n importPath: \"@plasmicpkgs/react-youtube\",\n props: {\n videoId: {\n type: \"string\",\n defaultValue: \"R6MeLqRQzYw\",\n displayName: \"Video ID\",\n description: \"The ID for the YouTube video\",\n },\n autoplay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video should automatically start playing when the player loads\",\n defaultValueHint: false,\n hidden: (props) => !props.mute,\n },\n cc_load_policy: {\n type: \"boolean\",\n displayName: \"Show Captions\",\n description:\n \"Whether the captions should be shown by default, even if the user has turned captions off\",\n defaultValueHint: false,\n },\n start: {\n type: \"number\",\n displayName: \"Start\",\n description:\n \"The video should begin at this amount of seconds from the start of the video\",\n defaultValueHint: 0,\n },\n end: {\n type: \"number\",\n displayName: \"End\",\n description:\n \"Stop playing the video after this amount of seconds (measured from the start of the video)\",\n },\n color: {\n type: \"choice\",\n displayName: \"Color\",\n options: [\"red\", \"white\"],\n description:\n \"The color used in the display bar to highlight how much of the video the viewer has already seen\",\n defaultValueHint: \"red\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description:\n \"Whether the YouTube video player controls should be displayed\",\n defaultValueHint: true,\n },\n disablekb: {\n type: \"boolean\",\n displayName: \"Disable Keyboard\",\n description: \"Whether the keyboard controls should be disabled\",\n defaultValueHint: false,\n },\n fs: {\n type: \"boolean\",\n displayName: \"FullScreen Button\",\n description: \"Whether the fullscreen button should be displayed\",\n defaultValueHint: true,\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n defaultValueHint: false,\n },\n modestbranding: {\n type: \"boolean\",\n displayName: \"Hide Logo\",\n description: \"Hide the YouTube logo in the control bar\",\n defaultValueHint: false,\n },\n mute: {\n type: \"boolean\",\n displayName: \"Mute\",\n description: \"Whether the video should be muted\",\n defaultValueHint: false,\n },\n playsinline: {\n type: \"boolean\",\n displayName: \"Play Inline\",\n description:\n \"Whether the video should be played inline or fullscreen on iOS\",\n defaultValueHint: false,\n },\n rel: {\n type: \"boolean\",\n displayName: \"Related Videos\",\n description:\n \"Whether it should show related videos when the video ends (if false, it shows other videos from the same channel)\",\n defaultValueHint: true,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n height: \"390px\",\n width: \"640px\",\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerYouTube(\n loader?: { registerComponent: typeof registerComponent },\n customYouTubeMeta?: ComponentMeta<YouTubeProps>\n) {\n if (loader) {\n loader.registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n } else {\n registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n }\n}\n\nexport default YouTube;\n"],"names":["playerParams","booleanParams","booleanParamsSet","Set","YouTube","React","forwardRef","props","ref","internalRef","useRef","onRef","useCallback","player","current","useEffect","mute","undefined","_internalRef$current","getInternalPlayer","_internalRef$current2","unMute","finalProps","_extends","_i","_playerParams","length","prop","value","opts","playerVars","has","YouTubeImpl","iframeClassName","className","youtubeMeta","name","displayName","importName","importPath","videoId","type","defaultValue","description","autoplay","defaultValueHint","hidden","cc_load_policy","start","end","color","options","controls","disablekb","fs","loop","modestbranding","playsinline","rel","isDefaultExport","defaultStyles","height","width","maxHeight","maxWidth","registerYouTube","loader","customYouTubeMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,IAAMA,YAAY,GAAG,CACnB,UAAU,EACV,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,KAAK,EACL,OAAO,CACC;AAEV,IAAMC,aAAa,GAAG,CACpB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,MAAM,EACN,gBAAgB,EAChB,aAAa,EACb,KAAK,CACG;AAEV,IAAMC,gBAAgB,gBAAG,IAAIC,GAAG,CAASF,aAAa,CAAC;AAEvD,IAAMG,OAAO,gBAAGC,KAAK,CAACC,UAAU,CAC9B,UAACC,KAAmB,EAAEC,GAAG;EACvB,IAAMC,WAAW,GAAGJ,KAAK,CAACK,MAA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WAAW,EAAE;MACXhB,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,aAAa;MAC1BM,WAAW,EACT,gEAAgE;MAClEE,gBAAgB,EAAE;KACnB;IACDa,GAAG,EAAE;MACHjB,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,gBAAgB;MAC7BM,WAAW,EACT,mHAAmH;MACrHE,gBAAgB,EAAE;;GAErB;EACDc,eAAe,EAAE,IAAI;EACrBC,aAAa,EAAE;IACbC,MAAM,EAAE,OAAO;IACfC,KAAK,EAAE,OAAO;IACdC,SAAS,EAAE,MAAM;IACjBC,QAAQ,EAAE;;;SAIEC,eAAeA,CAC7BC,MAAwD,EACxDC,iBAA+C;EAE/C,IAAID,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAAChE,OAAO,EAAE+D,iBAAiB,WAAjBA,iBAAiB,GAAIhC,WAAW,CAAC;GACpE,MAAM;IACLiC,iBAAiB,CAAChE,OAAO,EAAE+D,iBAAiB,WAAjBA,iBAAiB,GAAIhC,WAAW,CAAC;;AAEhE;;;;;"}
|
|
1
|
+
{"version":3,"file":"react-youtube.esm.js","sources":["../src/index.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\nimport YouTubeImpl, { YouTubeProps as YouTubeImplProps } from \"react-youtube\";\nimport type { Options } from \"youtube-player/dist/types\";\n\ntype PlayerVars = Exclude<Options[\"playerVars\"], undefined>;\nexport type YouTubeProps = YouTubeImplProps &\n {\n [prop in keyof PlayerVars]:\n | PlayerVars[prop]\n | (prop extends typeof booleanParams[number] ? boolean : never);\n } & { mute?: boolean };\nconst playerParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"color\",\n \"controls\",\n \"disablekb\",\n \"enablejsapi\",\n \"end\",\n \"fs\",\n \"hl\",\n \"iv_load_policy\",\n \"list\",\n \"listType\",\n \"loop\",\n \"modestbranding\",\n \"origin\",\n \"playlist\",\n \"playsinline\",\n \"rel\",\n \"start\",\n] as const;\n\nconst booleanParams = [\n \"autoplay\",\n \"cc_load_policy\",\n \"controls\",\n \"disablekb\",\n \"fs\",\n \"loop\",\n \"modestbranding\",\n \"playsinline\",\n \"rel\",\n] as const;\n\nconst booleanParamsSet = new Set<string>(booleanParams);\n\nconst YouTube = React.forwardRef<YouTubeImpl, YouTubeProps>(\n (props: YouTubeProps, ref) => {\n const internalRef = React.useRef<YouTubeImpl | null>(null);\n\n const onRef = React.useCallback(\n (player: YouTubeImpl | null) => {\n internalRef.current = player;\n if (ref) {\n if (typeof ref === \"function\") {\n ref(player);\n } else {\n ref.current = player;\n }\n }\n },\n [ref]\n );\n\n React.useEffect(() => {\n if (props.mute !== undefined) {\n if (props.mute) {\n internalRef.current?.getInternalPlayer()?.mute();\n } else {\n internalRef.current?.getInternalPlayer()?.unMute();\n }\n }\n }, [props.mute, internalRef]);\n\n const finalProps = { ...props };\n for (const prop of playerParams) {\n if (prop in finalProps) {\n const value = finalProps[prop];\n delete finalProps[prop];\n if (!finalProps.opts) {\n finalProps.opts = {};\n }\n if (!finalProps.opts.playerVars) {\n finalProps.opts.playerVars = {};\n }\n if (booleanParamsSet.has(prop)) {\n if (prop === \"cc_load_policy\" || prop === \"modestbranding\") {\n // undefined or 1\n if (value) {\n finalProps.opts.playerVars[prop] = 1;\n } else {\n delete finalProps.opts.playerVars[prop];\n }\n } else {\n // 0 or 1\n finalProps.opts.playerVars[prop] = (value ? 1 : 0) as any;\n }\n } else {\n finalProps.opts.playerVars[prop] = value as any;\n }\n }\n }\n return (\n <YouTubeImpl\n ref={onRef}\n {...finalProps}\n iframeClassName={props.className}\n />\n );\n }\n);\n\nexport const youtubeMeta: ComponentMeta<YouTubeProps> = {\n name: \"hostless-youtube\",\n displayName: \"YouTube\",\n importName: \"YouTube\",\n importPath: \"@plasmicpkgs/react-youtube\",\n props: {\n videoId: {\n type: \"string\",\n defaultValue: \"R6MeLqRQzYw\",\n displayName: \"Video ID\",\n description: \"The ID for the YouTube video\",\n },\n autoplay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video should automatically start playing when the player loads\",\n defaultValueHint: false,\n hidden: (props) => !props.mute,\n },\n cc_load_policy: {\n type: \"boolean\",\n displayName: \"Show Captions\",\n description:\n \"Whether the captions should be shown by default, even if the user has turned captions off\",\n defaultValueHint: false,\n },\n start: {\n type: \"number\",\n displayName: \"Start\",\n description:\n \"The video should begin at this amount of seconds from the start of the video\",\n defaultValueHint: 0,\n },\n end: {\n type: \"number\",\n displayName: \"End\",\n description:\n \"Stop playing the video after this amount of seconds (measured from the start of the video)\",\n },\n color: {\n type: \"choice\",\n displayName: \"Color\",\n options: [\"red\", \"white\"],\n description:\n \"The color used in the display bar to highlight how much of the video the viewer has already seen\",\n defaultValueHint: \"red\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description:\n \"Whether the YouTube video player controls should be displayed\",\n defaultValueHint: true,\n },\n disablekb: {\n type: \"boolean\",\n displayName: \"Disable Keyboard\",\n description: \"Whether the keyboard controls should be disabled\",\n defaultValueHint: false,\n },\n fs: {\n type: \"boolean\",\n displayName: \"FullScreen Button\",\n description: \"Whether the fullscreen button should be displayed\",\n defaultValueHint: true,\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n defaultValueHint: false,\n },\n modestbranding: {\n type: \"boolean\",\n displayName: \"Hide Logo\",\n description: \"Hide the YouTube logo in the control bar\",\n defaultValueHint: false,\n },\n mute: {\n type: \"boolean\",\n displayName: \"Mute\",\n description: \"Whether the video should be muted\",\n defaultValueHint: false,\n },\n playsinline: {\n type: \"boolean\",\n displayName: \"Play Inline\",\n description:\n \"Whether the video should be played inline or fullscreen on iOS\",\n defaultValueHint: false,\n },\n rel: {\n type: \"boolean\",\n displayName: \"Related Videos\",\n description:\n \"Whether it should show related videos when the video ends (if false, it shows other videos from the same channel)\",\n defaultValueHint: true,\n },\n },\n isDefaultExport: true,\n defaultStyles: {\n height: \"390px\",\n width: \"640px\",\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerYouTube(\n loader?: { registerComponent: typeof registerComponent },\n customYouTubeMeta?: ComponentMeta<YouTubeProps>\n) {\n if (loader) {\n loader.registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n } else {\n registerComponent(YouTube, customYouTubeMeta ?? youtubeMeta);\n }\n}\n\nexport default YouTube;\n"],"names":["playerParams","booleanParams","booleanParamsSet","Set","YouTube","React","forwardRef","props","ref","internalRef","useRef","onRef","useCallback","player","current","useEffect","mute","undefined","_internalRef$current","getInternalPlayer","_internalRef$current2","unMute","finalProps","_extends","_i","_playerParams","length","prop","value","opts","playerVars","has","YouTubeImpl","iframeClassName","className","youtubeMeta","name","displayName","importName","importPath","videoId","type","defaultValue","description","autoplay","defaultValueHint","hidden","cc_load_policy","start","end","color","options","controls","disablekb","fs","loop","modestbranding","playsinline","rel","isDefaultExport","defaultStyles","height","width","maxHeight","maxWidth","registerYouTube","loader","customYouTubeMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;AAcA,IAAMA,YAAY,GAAG,CACnB,UAAU,EACV,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,KAAK,EACL,OAAO,CACC;AAEV,IAAMC,aAAa,GAAG,CACpB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,MAAM,EACN,gBAAgB,EAChB,aAAa,EACb,KAAK,CACG;AAEV,IAAMC,gBAAgB,gBAAG,IAAIC,GAAG,CAASF,aAAa,CAAC;AAEvD,IAAMG,OAAO,gBAAGC,KAAK,CAACC,UAAU,CAC9B,UAACC,KAAmB,EAAEC,GAAG;EACvB,IAAMC,WAAW,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AAgB,EAAE;KACnB;IACDY,WAAW,EAAE;MACXhB,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,aAAa;MAC1BM,WAAW,EACT,gEAAgE;MAClEE,gBAAgB,EAAE;KACnB;IACDa,GAAG,EAAE;MACHjB,IAAI,EAAE,SAAS;MACfJ,WAAW,EAAE,gBAAgB;MAC7BM,WAAW,EACT,mHAAmH;MACrHE,gBAAgB,EAAE;;GAErB;EACDc,eAAe,EAAE,IAAI;EACrBC,aAAa,EAAE;IACbC,MAAM,EAAE,OAAO;IACfC,KAAK,EAAE,OAAO;IACdC,SAAS,EAAE,MAAM;IACjBC,QAAQ,EAAE;;;SAIEC,eAAeA,CAC7BC,MAAwD,EACxDC,iBAA+C;EAE/C,IAAID,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CAAChE,OAAO,EAAE+D,iBAAiB,WAAjBA,iBAAiB,GAAIhC,WAAW,CAAC;GACpE,MAAM;IACLiC,iBAAiB,CAAChE,OAAO,EAAE+D,iBAAiB,WAAjBA,iBAAiB,GAAIhC,WAAW,CAAC;;AAEhE;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicpkgs/react-youtube",
|
|
3
|
-
"version": "7.13.
|
|
3
|
+
"version": "7.13.216",
|
|
4
4
|
"description": "Plasmic registration call for react-youtube",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"analyze": "size-limit --why"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@plasmicapp/host": "1.0.
|
|
31
|
+
"@plasmicapp/host": "1.0.212",
|
|
32
32
|
"@size-limit/preset-small-lib": "^4.11.0",
|
|
33
33
|
"@types/node": "^14.0.26",
|
|
34
34
|
"@types/react": "^18.2.33",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"react": ">=16.8.0",
|
|
46
46
|
"react-dom": ">=16.8.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e14716fd42ea79a35e4844d660f6d12aa97a9768"
|
|
49
49
|
}
|