@stackshift-ui/youtube-video 6.0.11 → 7.0.0-beta.1

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.
@@ -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 c=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=c(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"),n=require("react/jsx-runtime"),l="YoutubeVideo",m=({videoLinkId:e,title:t,children:a,className:r,as:o,...p})=>{let{[l]:d=s.DefaultComponent}=(0,s.useStackShiftUIComponents)();return(0,n.jsx)(d,{as:o,className:"aspect-video",...p,"data-testid":l,children:(0,n.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=l;0&&(module.exports={YoutubeVideo});
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-LHKILQPY.mjs";export{e as YoutubeVideo};
2
+ "use strict";import{a as e}from"./chunk-S3TW6OEF.mjs";export{e as YoutubeVideo};
@@ -1 +1 @@
1
- "use strict";var i=Object.defineProperty;var c=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=c(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"),n=require("react/jsx-runtime"),l="YoutubeVideo",m=({videoLinkId:e,title:t,children:a,className:r,as:o,...p})=>{let{[l]:d=s.DefaultComponent}=(0,s.useStackShiftUIComponents)();return(0,n.jsx)(d,{as:o,className:"aspect-video",...p,"data-testid":l,children:(0,n.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=l;0&&(module.exports={YoutubeVideo});
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});
@@ -1 +1 @@
1
- import{a}from"./chunk-LHKILQPY.mjs";export{a as YoutubeVideo};
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": "6.0.11",
4
+ "version": "7.0.0-beta.1",
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/eslint-config": "6.0.10",
33
- "@stackshift-ui/typescript-config": "6.0.10"
32
+ "@stackshift-ui/typescript-config": "6.0.10",
33
+ "@stackshift-ui/eslint-config": "6.0.10"
34
34
  },
35
35
  "dependencies": {
36
- "@stackshift-ui/system": "6.0.11",
37
- "@stackshift-ui/scripts": "6.0.10"
36
+ "@stackshift-ui/scripts": "6.1.0-beta.0",
37
+ "@stackshift-ui/system": "6.1.0-beta.1"
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.0.11"
44
+ "@stackshift-ui/system": ">=6.1.0-beta.1"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "next": {
@@ -7,7 +7,7 @@ describe.concurrent("youtube-video", () => {
7
7
 
8
8
  test("Common: YouTube Video - test if renders without errors", ({ expect }) => {
9
9
  const clx = "aspect-video";
10
- render(<YoutubeVideo className={clx} />);
10
+ render(<YoutubeVideo data-testid="div" className={clx} />);
11
11
  expect(screen.getByTestId("div").classList).toContain(clx);
12
12
  });
13
13
  });
@@ -23,7 +23,7 @@ export const YoutubeVideo: React.FC<YoutubeVideoProps> = ({
23
23
  const defaultClass = "aspect-video";
24
24
 
25
25
  return (
26
- <Component as={as} className={defaultClass} {...props} data-testid={displayName}>
26
+ <Component as={as} className={defaultClass} {...props}>
27
27
  <iframe
28
28
  aria-label="Show Video Frame"
29
29
  className="w-full h-full rounded-lg"
@@ -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};