@telepath-computer/television 0.1.214 → 0.1.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/cli.cjs +62 -19
- package/dist/views/artifact-missing/index.html +2 -2
- package/dist/views/markdown/index.html +22 -22
- package/dist/web/assets/artifact-bridge-3Trk-B2L.js +1 -0
- package/dist/web/assets/{artifactMissing-9rcTXhkH.js → artifactMissing-BiK_l3Ts.js} +1 -1
- package/dist/web/assets/main-V14r9Psb.js +596 -0
- package/dist/web/assets/{urlUnsupported-kgq7Zh2V.js → urlUnsupported-RGIrhMDe.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-BXDhGuL-.js +0 -1
- package/dist/web/assets/main-DqW9ZwnO.js +0 -596
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as a,l as o,m as d}from"./artifact-bridge-
|
|
1
|
+
import{h as a,l as o,m as d}from"./artifact-bridge-3Trk-B2L.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-V14r9Psb.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="./assets/artifact-bridge-3Trk-B2L.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/missing-artifact-page-DVzJ41AE.js">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="./assets/main-Blg8fuaV.css">
|
|
12
12
|
<link rel="preload" as="font" crossorigin="" href="/canonical/v1/fonts/Hind-Variable.933e9900.woff2">
|
|
@@ -123,8 +123,8 @@ p {
|
|
|
123
123
|
display: none !important;
|
|
124
124
|
}
|
|
125
125
|
</style>
|
|
126
|
-
<script type="module" crossorigin src="../../assets/artifactMissing-
|
|
127
|
-
<link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-
|
|
126
|
+
<script type="module" crossorigin src="../../assets/artifactMissing-BiK_l3Ts.js"></script>
|
|
127
|
+
<link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-3Trk-B2L.js">
|
|
128
128
|
<link rel="modulepreload" crossorigin href="../../assets/missing-artifact-page-DVzJ41AE.js">
|
|
129
129
|
</head>
|
|
130
130
|
<body>
|
|
@@ -123,8 +123,8 @@ p {
|
|
|
123
123
|
display: none !important;
|
|
124
124
|
}
|
|
125
125
|
</style>
|
|
126
|
-
<script type="module" crossorigin src="../../assets/urlUnsupported-
|
|
127
|
-
<link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-
|
|
126
|
+
<script type="module" crossorigin src="../../assets/urlUnsupported-RGIrhMDe.js"></script>
|
|
127
|
+
<link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-3Trk-B2L.js">
|
|
128
128
|
</head>
|
|
129
129
|
<body>
|
|
130
130
|
<main class="artifact-error">
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(){const y=document.createElement("link").relList;if(y&&y.supports&&y.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))R(i);new MutationObserver(i=>{for(const u of i)if(u.type==="childList")for(const L of u.addedNodes)L.tagName==="LINK"&&L.rel==="modulepreload"&&R(L)}).observe(document,{childList:!0,subtree:!0});function _(i){const u={};return i.integrity&&(u.integrity=i.integrity),i.referrerPolicy&&(u.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?u.credentials="include":i.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function R(i){if(i.ep)return;i.ep=!0;const u=_(i);fetch(i.href,u)}})();const U="url-target-request",I="url-target",P="artifact-missing-request",N="artifact-missing",b="proxy-content-changed",G="bridge-ready",C="leaving";function k(t,y){return!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown")||t.isComposing||t.metaKey||t.shiftKey?!1:y==="darwin"||/^(Mac|iPhone|iPad|iPod)/i.test(y)?t.altKey&&!t.ctrlKey:t.ctrlKey&&!t.altKey}function m(t){return typeof t=="object"&&t!==null}function q(t){return!m(t)||t.type!==U?!1:!("id"in t)}function v(t){return!m(t)||t.type!==I||typeof t.url!="string"&&t.url!==null?!1:!("id"in t)}function B(t){return!m(t)||t.type!==P?!1:!("id"in t)}function Y(t){return!m(t)||t.type!==N||typeof t.title!="string"||typeof t.path!="string"?!1:!("id"in t)}function F(t){return!m(t)||t.type!==b?!1:!("id"in t)}function W(t){return!m(t)||t.type!==G||typeof t.guid!="string"?!1:!("id"in t)}function V(t){return!m(t)||t.type!==C||typeof t.guid!="string"?!1:!("id"in t)}function X(t){return!m(t)||t.type!=="navigation-request"||typeof t.url!="string"||"replace"in t&&typeof t.replace!="boolean"||"sameDocument"in t&&typeof t.sameDocument!="boolean"||"native"in t&&typeof t.native!="boolean"?!1:!("id"in t)}function $(t){return!m(t)||t.type!=="navigation-key"||t.key!=="ArrowLeft"&&t.key!=="ArrowRight"&&t.key!=="ArrowUp"&&t.key!=="ArrowDown"?!1:!("id"in t)}function w(t=window,y={}){const _=t;if(t.parent===t||_.__televisionArtifactBridgeInstalled===!0)return;_.__televisionArtifactBridgeInstalled=!0;const i=(()=>{const a=Date.now().toString(36);try{const o=t.crypto;if(o&&typeof o.getRandomValues=="function"){const f=new Uint32Array(4);return o.getRandomValues(f),`tvb-${a}-${Array.from(f,e=>e.toString(36)).join("-")}`}}catch{}return`tvb-${a}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`})(),u=()=>{t.parent.postMessage({type:"bridge-ready",guid:i},"*")};t.addEventListener("pagehide",()=>{t.parent.postMessage({type:"leaving",guid:i},"*")}),t.addEventListener("pageshow",s=>{s.persisted===!0&&u()}),t.addEventListener("keydown",s=>{const r=s,a=r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown",o=t.navigator.platform,e=o==="darwin"||/^(Mac|iPhone|iPad|iPod)/i.test(o)?r.altKey&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey:r.ctrlKey&&!r.altKey&&!r.metaKey&&!r.shiftKey;!a||r.isComposing||!e||(r.preventDefault(),t.parent.postMessage({type:"navigation-key",key:r.key},"*"))},!0);const L=t.location.href;if((s=>{try{const r=new URL(s);return/^\/artifact\/[0-9A-Za-z]{26}(\/|$)/.test(r.pathname)}catch{return!1}})(L)&&typeof t.fetch=="function"){const a=y.pollCadence,o=a!==void 0&&Number.isFinite(a.normalMs)&&a.normalMs>0&&Number.isFinite(a.slowMs)&&a.slowMs>=a.normalMs?a:null,f=(o==null?void 0:o.normalMs)??5e3,e=(o==null?void 0:o.slowMs)??15e3;let c=null,l=f,d=0,n=!1,g=null,p=null;const S=()=>{n&&(n=!1,d+=1,g!==null&&(t.clearTimeout(g),g=null),p==null||p.abort(),p=null)},A=()=>{if(n)return;n=!0;const h=++d,E=()=>{if(!n||h!==d)return;g=null;const T=t.AbortController,D=typeof T=="function"?new T:null;p=D,(async()=>{try{const O=await t.fetch(L,{method:"HEAD",...D?{signal:D.signal}:{}});if(!n||h!==d)return;if(!O.ok)throw new Error("Artifact poll failed");const M=O.headers.get("ETag");if(!M)throw new Error("Artifact poll missing ETag");l=f,c===null?c=M:M!==c&&(c=M,t.parent.postMessage({type:"proxy-content-changed"},"*"))}catch{n&&h===d&&(l=Math.min(e,l*2))}finally{p===D&&(p=null),n&&h===d&&(g=t.setTimeout(E,l))}})()};E()};t.addEventListener("pagehide",S),t.addEventListener("pageshow",h=>{h.persisted===!0&&A()}),A()}if(y.reportNavigation!==!1){const s=a=>{t.parent.postMessage({type:"navigation-request",...a},"*")};s({url:t.location.href});const r=t.navigation;if(r)r.addEventListener("navigate",a=>{var d,n;const o=a,f=(d=o.destination)==null?void 0:d.url;if(typeof f!="string")return;const e=((n=o.destination)==null?void 0:n.sameDocument)===!0,c={url:f,...o.navigationType==="replace"?{replace:!0}:{},...e?{sameDocument:!0}:{}};if(e){s(c);return}try{if(new URL(f,t.location.href).origin===t.location.origin){s({...c,native:!0});return}}catch{}o.canIntercept!==!1&&o.preventDefault(),s(c)});else{t.document.addEventListener("click",f=>{var g;const e=f;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;const c=(g=t.document.defaultView)==null?void 0:g.Element;if(!c||!(e.target instanceof c))return;const l=e.target.closest("a[href]");if(!l||l.target&&l.target.toLowerCase()!=="_self"||l.hasAttribute("download"))return;const d=l.getAttribute("href");if(!d||d.startsWith("javascript:"))return;let n;try{n=new URL(l.href,t.document.baseURI)}catch{return}if(n.origin===t.location.origin&&n.pathname===t.location.pathname&&n.search===t.location.search&&n.hash!==""){s({url:n.href,sameDocument:!0});return}e.preventDefault(),s({url:n.href})},!0);const a=t.history.pushState.bind(t.history),o=t.history.replaceState.bind(t.history);t.history.pushState=function(...e){a(...e),s({url:t.location.href,sameDocument:!0})},t.history.replaceState=function(...e){o(...e),s({url:t.location.href,replace:!0,sameDocument:!0})},t.addEventListener("popstate",()=>{s({url:t.location.href,sameDocument:!0})}),t.addEventListener("hashchange",()=>{s({url:t.location.href,sameDocument:!0})}),t.document.addEventListener("submit",f=>{var g,p;const e=f,c=e.target,l=(g=t.document.defaultView)==null?void 0:g.HTMLFormElement;if(!l||!(c instanceof l)||c.target&&c.target.toLowerCase()!=="_self")return;e.preventDefault();const d=c.method.toLowerCase(),n=new URL(c.action||t.location.href,t.document.baseURI);if(d==="get"){const S=(p=t.document.defaultView)==null?void 0:p.FormData;if(!S)return;const A=new URLSearchParams;for(const[h,E]of new S(c))typeof E=="string"&&A.append(h,E);n.search=A.toString()}s({url:n.href})},!0)}}u()}export{N as A,I as U,V as a,W as b,$ as c,X as d,F as e,q as f,k as g,w as h,B as i,Y as j,P as k,v as l,U as m};
|