@stackshift-ui/youtube-video 7.0.0-beta.0 → 7.0.0-beta.3
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/chunk-47HNBTP4.mjs +32 -0
- package/dist/chunk-S3TW6OEF.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/youtube-video.js +1 -1
- package/dist/youtube-video.mjs +1 -1
- package/package.json +6 -6
- package/dist/chunk-LHKILQPY.mjs +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/youtube-video.tsx
|
|
2
|
+
import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var displayName = "YoutubeVideo";
|
|
5
|
+
var YoutubeVideo = ({
|
|
6
|
+
videoLinkId,
|
|
7
|
+
title,
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
as,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
13
|
+
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
14
|
+
const defaultClass = "aspect-video";
|
|
15
|
+
return /* @__PURE__ */ jsx(Component, { as, className: defaultClass, ...props, children: /* @__PURE__ */ jsx(
|
|
16
|
+
"iframe",
|
|
17
|
+
{
|
|
18
|
+
"aria-label": "Show Video Frame",
|
|
19
|
+
className: "w-full h-full rounded-lg",
|
|
20
|
+
src: `https://www.youtube.com/embed/${videoLinkId}`,
|
|
21
|
+
srcDoc: `<style>*{padding:0;margin:0;overflow:hidden;border-radius:8px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=${`https://www.youtube.com/embed/${videoLinkId}`}><img src=${`https://i.ytimg.com/vi_webp/${videoLinkId}/maxresdefault.webp`} alt=${title} loading="lazy" /><span>\u25B6</span></a>`,
|
|
22
|
+
frameBorder: "0",
|
|
23
|
+
loading: "lazy",
|
|
24
|
+
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
25
|
+
}
|
|
26
|
+
) });
|
|
27
|
+
};
|
|
28
|
+
YoutubeVideo.displayName = displayName;
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
YoutubeVideo
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DefaultComponent as l,useStackShiftUIComponents as n}from"@stackshift-ui/system";import{jsx as t}from"react/jsx-runtime";var o="YoutubeVideo",m=({videoLinkId:e,title:a,children:p,className:c,as:s,...r})=>{let{[o]:i=l}=n();return t(i,{as:s,className:"aspect-video",...r,children:t("iframe",{"aria-label":"Show Video Frame",className:"w-full h-full rounded-lg",src:`https://www.youtube.com/embed/${e}`,srcDoc:`<style>*{padding:0;margin:0;overflow:hidden;border-radius:8px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=${`https://www.youtube.com/embed/${e}`}><img src=${`https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp`} alt=${a} loading="lazy" /><span>\u25B6</span></a>`,frameBorder:"0",loading:"lazy",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"})})};m.displayName=o;export{m as a};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var i=Object.defineProperty;var
|
|
2
|
+
"use strict";var i=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var h=(e,t)=>{for(var a in t)i(e,a,{get:t[a],enumerable:!0})},b=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!f.call(e,o)&&o!==a&&i(e,o,{get:()=>t[o],enumerable:!(r=d(t,o))||r.enumerable});return e};var g=e=>b(i({},"__esModule",{value:!0}),e);var y={};h(y,{YoutubeVideo:()=>m});module.exports=g(y);var s=require("@stackshift-ui/system"),l=require("react/jsx-runtime"),n="YoutubeVideo",m=({videoLinkId:e,title:t,children:a,className:r,as:o,...p})=>{let{[n]:c=s.DefaultComponent}=(0,s.useStackShiftUIComponents)();return(0,l.jsx)(c,{as:o,className:"aspect-video",...p,children:(0,l.jsx)("iframe",{"aria-label":"Show Video Frame",className:"w-full h-full rounded-lg",src:`https://www.youtube.com/embed/${e}`,srcDoc:`<style>*{padding:0;margin:0;overflow:hidden;border-radius:8px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=${`https://www.youtube.com/embed/${e}`}><img src=${`https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp`} alt=${t} loading="lazy" /><span>\u25B6</span></a>`,frameBorder:"0",loading:"lazy",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"})})};m.displayName=n;0&&(module.exports={YoutubeVideo});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as e}from"./chunk-
|
|
2
|
+
"use strict";import{a as e}from"./chunk-S3TW6OEF.mjs";export{e as YoutubeVideo};
|
package/dist/youtube-video.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var a in t)i(e,a,{get:t[a],enumerable:!0})},b=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!h.call(e,o)&&o!==a&&i(e,o,{get:()=>t[o],enumerable:!(r=d(t,o))||r.enumerable});return e};var g=e=>b(i({},"__esModule",{value:!0}),e);var y={};f(y,{YoutubeVideo:()=>m});module.exports=g(y);var s=require("@stackshift-ui/system"),l=require("react/jsx-runtime"),n="YoutubeVideo",m=({videoLinkId:e,title:t,children:a,className:r,as:o,...p})=>{let{[n]:c=s.DefaultComponent}=(0,s.useStackShiftUIComponents)();return(0,l.jsx)(c,{as:o,className:"aspect-video",...p,children:(0,l.jsx)("iframe",{"aria-label":"Show Video Frame",className:"w-full h-full rounded-lg",src:`https://www.youtube.com/embed/${e}`,srcDoc:`<style>*{padding:0;margin:0;overflow:hidden;border-radius:8px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=${`https://www.youtube.com/embed/${e}`}><img src=${`https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp`} alt=${t} loading="lazy" /><span>\u25B6</span></a>`,frameBorder:"0",loading:"lazy",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"})})};m.displayName=n;0&&(module.exports={YoutubeVideo});
|
package/dist/youtube-video.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-S3TW6OEF.mjs";export{a as YoutubeVideo};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/youtube-video",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/
|
|
33
|
-
"@stackshift-ui/
|
|
32
|
+
"@stackshift-ui/typescript-config": "6.0.10",
|
|
33
|
+
"@stackshift-ui/eslint-config": "6.0.10"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@stackshift-ui/scripts": "6.1.0-beta.
|
|
37
|
-
"@stackshift-ui/system": "6.1.0-beta.
|
|
36
|
+
"@stackshift-ui/scripts": "6.1.0-beta.2",
|
|
37
|
+
"@stackshift-ui/system": "6.1.0-beta.3"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@types/react": "16.8 - 19",
|
|
41
41
|
"next": "10 - 14",
|
|
42
42
|
"react": "16.8 - 19",
|
|
43
43
|
"react-dom": "16.8 - 19",
|
|
44
|
-
"@stackshift-ui/system": ">=6.1.0-beta.
|
|
44
|
+
"@stackshift-ui/system": ">=6.1.0-beta.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"next": {
|
package/dist/chunk-LHKILQPY.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DefaultComponent as l,useStackShiftUIComponents as n}from"@stackshift-ui/system";import{jsx as o}from"react/jsx-runtime";var t="YoutubeVideo",m=({videoLinkId:e,title:a,children:p,className:d,as:s,...r})=>{let{[t]:i=l}=n();return o(i,{as:s,className:"aspect-video",...r,"data-testid":t,children:o("iframe",{"aria-label":"Show Video Frame",className:"w-full h-full rounded-lg",src:`https://www.youtube.com/embed/${e}`,srcDoc:`<style>*{padding:0;margin:0;overflow:hidden;border-radius:8px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=${`https://www.youtube.com/embed/${e}`}><img src=${`https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp`} alt=${a} loading="lazy" /><span>\u25B6</span></a>`,frameBorder:"0",loading:"lazy",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"})})};m.displayName=t;export{m as a};
|