@telepath-computer/television 0.1.159 → 0.1.161
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/cli.cjs +2044 -671
- package/dist/skills/television/SKILL.md +28 -5
- package/dist/views/artifact-missing/index.html +2 -2
- package/dist/views/markdown/index.html +10 -10
- package/dist/web/assets/artifact-bridge-KdJfBNuH.js +1 -0
- package/dist/web/assets/{artifactMissing-B7Big40q.js → artifactMissing-CxC-pgtU.js} +1 -1
- package/dist/web/assets/main-BsJuVijD.js +718 -0
- package/dist/web/assets/{urlUnsupported-BqoIG2ob.js → urlUnsupported-D3a0K5cH.js} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/views/artifact-missing/index.html +2 -2
- package/dist/web/views/url-unsupported/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/artifact-bridge-Ce9BPLXH.js +0 -1
- package/dist/web/assets/main-DNa6t8SQ.js +0 -718
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as a,l as o,m as d}from"./artifact-bridge-KdJfBNuH.js";a(window,{reportNavigation:!1});window.addEventListener("message",t=>{t.source===window.parent&&o(t.data)&&l(t.data.url)});window.parent.postMessage({type:d},"*");function l(t,n=document){const e=f(n);if(p(e),t===null){e.targetBlock.hidden=!0,e.desktopApp.hidden=!1;return}const r=g(t);if(e.targetBlock.hidden=!1,e.desktopApp.hidden=!1,e.addressLabel.textContent="This is the URL you're trying to visit:",r){e.targetLink.textContent=t,e.targetLink.href=r.href,e.targetLink.hidden=!1;return}e.plainAddress.textContent=t,e.plainAddress.hidden=!1}function p(t){t.targetLink.removeAttribute("href"),t.targetLink.textContent="",t.targetLink.hidden=!0,t.addressLabel.textContent="",t.plainAddress.textContent="",t.plainAddress.hidden=!0}function g(t){try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?null:n}catch{return null}}function f(t){const n=t.getElementById("target-block"),e=t.getElementById("address-label"),r=t.getElementById("target-link"),s=t.getElementById("plain-address"),i=t.getElementById("desktop-app");if(!(n instanceof HTMLElement))throw new Error("Missing #target-block");if(!(e instanceof HTMLElement))throw new Error("Missing #address-label");if(!(r instanceof HTMLAnchorElement))throw new Error("Missing #target-link");if(!(s instanceof HTMLElement))throw new Error("Missing #plain-address");if(!(i instanceof HTMLElement))throw new Error("Missing #desktop-app");return{targetBlock:n,addressLabel:e,targetLink:r,plainAddress:s,desktopApp:i}}
|
package/dist/web/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="./assets/favicon-DaYMFRha.svg" />
|
|
7
7
|
<title>Television</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/main-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="./assets/artifact-bridge-
|
|
8
|
+
<script type="module" crossorigin src="./assets/main-BsJuVijD.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="./assets/artifact-bridge-KdJfBNuH.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/missing-artifact-page-DVzJ41AE.js">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="./assets/main-qun7KJ0j.css">
|
|
12
12
|
</head>
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
display: none !important;
|
|
59
59
|
}
|
|
60
60
|
</style>
|
|
61
|
-
<script type="module" crossorigin src="../../assets/artifactMissing-
|
|
62
|
-
<link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-
|
|
61
|
+
<script type="module" crossorigin src="../../assets/artifactMissing-CxC-pgtU.js"></script>
|
|
62
|
+
<link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-KdJfBNuH.js">
|
|
63
63
|
<link rel="modulepreload" crossorigin href="../../assets/missing-artifact-page-DVzJ41AE.js">
|
|
64
64
|
</head>
|
|
65
65
|
<body>
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
display: none !important;
|
|
71
71
|
}
|
|
72
72
|
</style>
|
|
73
|
-
<script type="module" crossorigin src="../../assets/urlUnsupported-
|
|
74
|
-
<link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-
|
|
73
|
+
<script type="module" crossorigin src="../../assets/urlUnsupported-D3a0K5cH.js"></script>
|
|
74
|
+
<link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-KdJfBNuH.js">
|
|
75
75
|
</head>
|
|
76
76
|
<body>
|
|
77
77
|
<main>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(){const h=document.createElement("link").relList;if(h&&h.supports&&h.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))y(c);new MutationObserver(c=>{for(const l of c)if(l.type==="childList")for(const g of l.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&y(g)}).observe(document,{childList:!0,subtree:!0});function b(c){const l={};return c.integrity&&(l.integrity=c.integrity),c.referrerPolicy&&(l.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?l.credentials="include":c.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function y(c){if(c.ep)return;c.ep=!0;const l=b(c);fetch(c.href,l)}})();const I="url-target-request",R="url-target",T="artifact-missing-request",X="artifact-missing";function p(e){return typeof e=="object"&&e!==null}function D(e){return!p(e)||e.type!==I?!1:!("id"in e)}function N(e){return!p(e)||e.type!==R||typeof e.url!="string"&&e.url!==null?!1:!("id"in e)}function C(e){return!p(e)||e.type!==T?!1:!("id"in e)}function P(e){return!p(e)||e.type!==X||typeof e.title!="string"||typeof e.path!="string"?!1:!("id"in e)}function Y(e){return!p(e)||e.type!=="wheel"||typeof e.deltaX!="number"||typeof e.shiftKey!="boolean"?!1:!("id"in e)}function K(e){return!p(e)||e.type!=="navigation-request"||typeof e.url!="string"||"replace"in e&&typeof e.replace!="boolean"||"sameDocument"in e&&typeof e.sameDocument!="boolean"||"native"in e&&typeof e.native!="boolean"?!1:!("id"in e)}function U(e){return!p(e)||e.type!=="filmstrip-key"||e.direction!==-1&&e.direction!==1?!1:!("id"in e)}function O(e){return!p(e)||e.type!=="swipe-move"||typeof e.deltaX!="number"?!1:!("id"in e)}function q(e){return!p(e)||e.type!=="swipe-end"||typeof e.velocityX!="number"?!1:!("id"in e)}function x(e=window,h={}){if(e.parent===e)return;const b=e;if(b.__televisionArtifactBridgeInstalled===!0)return;b.__televisionArtifactBridgeInstalled=!0;const y=()=>{e.document.documentElement&&(e.document.documentElement.style.touchAction="pan-y",e.document.documentElement.style.overscrollBehaviorX="contain",e.document.documentElement.style.overscrollBehaviorY="contain"),e.document.body&&(e.document.body.style.overscrollBehaviorX="contain",e.document.body.style.overscrollBehaviorY="contain")};if(y(),e.document.body||e.document.addEventListener("DOMContentLoaded",y,{once:!0}),h.reportNavigation!==!1){const o=r=>{e.parent.postMessage({type:"navigation-request",...r},"*")};o({url:e.location.href});const t=e.navigation;if(t)t.addEventListener("navigate",r=>{var d,f;const i=r,a=(d=i.destination)==null?void 0:d.url;if(typeof a!="string")return;const n=((f=i.destination)==null?void 0:f.sameDocument)===!0,s={url:a,...i.navigationType==="replace"?{replace:!0}:{},...n?{sameDocument:!0}:{}};if(n){o(s);return}try{if(new URL(a,e.location.href).origin===e.location.origin){o({...s,native:!0});return}}catch{}i.canIntercept!==!1&&i.preventDefault(),o(s)});else{e.document.addEventListener("click",a=>{var E;const n=a;if(n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;const s=(E=e.document.defaultView)==null?void 0:E.Element;if(!s||!(n.target instanceof s))return;const u=n.target.closest("a[href]");if(!u||u.target&&u.target.toLowerCase()!=="_self"||u.hasAttribute("download"))return;const d=u.getAttribute("href");if(!d||d.startsWith("javascript:"))return;let f;try{f=new URL(u.href,e.document.baseURI)}catch{return}if(f.origin===e.location.origin&&f.pathname===e.location.pathname&&f.search===e.location.search&&f.hash!==""){o({url:f.href,sameDocument:!0});return}n.preventDefault(),o({url:f.href})},!0);const r=e.history.pushState.bind(e.history),i=e.history.replaceState.bind(e.history);e.history.pushState=function(...n){r(...n),o({url:e.location.href,sameDocument:!0})},e.history.replaceState=function(...n){i(...n),o({url:e.location.href,replace:!0,sameDocument:!0})},e.addEventListener("popstate",()=>{o({url:e.location.href,sameDocument:!0})}),e.addEventListener("hashchange",()=>{o({url:e.location.href,sameDocument:!0})}),e.document.addEventListener("submit",a=>{var E,S;const n=a,s=n.target,u=(E=e.document.defaultView)==null?void 0:E.HTMLFormElement;if(!u||!(s instanceof u)||s.target&&s.target.toLowerCase()!=="_self")return;n.preventDefault();const d=s.method.toLowerCase(),f=new URL(s.action||e.location.href,e.document.baseURI);if(d==="get"){const L=(S=e.document.defaultView)==null?void 0:S.FormData;if(!L)return;const M=new URLSearchParams;for(const[A,_]of new L(s))typeof _=="string"&&M.append(A,_);f.search=M.toString()}o({url:f.href})},!0)}}const c=o=>{var a,n;const t=(a=e.document.defaultView)==null?void 0:a.Element;if(!t||!(o instanceof t))return!1;const i=o.closest("input, textarea, select, [contenteditable], [role='textbox'], [role='searchbox'], [role='combobox'], [role='spinbutton'], [role='slider']");return i?i.hasAttribute("contenteditable")?((n=i.getAttribute("contenteditable"))==null?void 0:n.toLowerCase())!=="false":!0:!1};e.addEventListener("keydown",o=>{const t=o;t.key!=="ArrowLeft"&&t.key!=="ArrowRight"||t.metaKey||t.ctrlKey||t.altKey||t.shiftKey||c(t.target)||(t.preventDefault(),e.parent.postMessage({type:"filmstrip-key",direction:t.key==="ArrowRight"?1:-1},"*"))},{capture:!0}),e.addEventListener("wheel",o=>{const t=o,r=t.shiftKey&&t.deltaX===0&&t.deltaY!==0,i=r?t.deltaY:t.deltaX,a=Math.abs(i),n=r?0:Math.abs(t.deltaY);a<=n||(t.preventDefault(),e.parent.postMessage({type:"wheel",deltaX:i,shiftKey:t.shiftKey},"*"))},{passive:!1});const l=8,g=100,v=1e3,m=new Map;e.addEventListener("pointerdown",o=>{const t=o;t.pointerType==="touch"&&m.set(t.pointerId,{startX:t.clientX,startY:t.clientY,lastX:t.clientX,offset:0,active:!1,discarded:!1,samples:[{time:t.timeStamp,offset:0}]})},{passive:!0}),e.addEventListener("pointermove",o=>{const t=o,r=m.get(t.pointerId);if(!r||r.discarded)return;if(!r.active){const s=t.clientX-r.startX,u=t.clientY-r.startY,d=Math.abs(s),f=Math.abs(u);if(d<l&&f<l)return;if(f>=d){r.discarded=!0;return}r.active=!0}const i=t.clientX-r.lastX;r.lastX=t.clientX,r.offset+=i,r.samples.push({time:t.timeStamp,offset:r.offset});const a=t.timeStamp-g;let n=0;for(let s=0;s<r.samples.length;s+=1){if(r.samples[s].time>=a){n=s;break}n=s+1}if(n>0){const s=Math.max(0,n-1);r.samples.splice(0,s)}e.parent.postMessage({type:"swipe-move",deltaX:i},"*"),t.preventDefault()},{passive:!1}),e.addEventListener("pointerup",o=>{const t=o,r=m.get(t.pointerId);if(!r||(m.delete(t.pointerId),!r.active))return;let i=0;if(r.samples.length>=2){const a=r.samples[0],n=r.samples[r.samples.length-1],s=n.time-a.time;s>0&&(i=(n.offset-a.offset)/s*v)}e.parent.postMessage({type:"swipe-end",velocityX:i},"*")}),e.addEventListener("pointercancel",o=>{const t=o,r=m.get(t.pointerId);r&&(m.delete(t.pointerId),r.active&&e.parent.postMessage({type:"swipe-end",velocityX:0},"*"))})}export{X as A,R as U,U as a,D as b,C as c,K as d,O as e,q as f,x as g,P as h,Y as i,T as j,N as k,I as l};
|