@telepath-computer/television 0.1.169 → 0.1.170

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 CHANGED
@@ -49445,14 +49445,41 @@ var DisposableArtifactContextEventTarget = withDisposable(
49445
49445
 
49446
49446
  // ../artifact/src/browser/artifact-bridge.ts
49447
49447
  function installBridge(win = window, options = {}) {
49448
- if (win.parent === win) {
49449
- return;
49450
- }
49451
49448
  const bridgeWindow = win;
49452
49449
  if (bridgeWindow.__televisionArtifactBridgeInstalled === true) {
49453
49450
  return;
49454
49451
  }
49455
49452
  bridgeWindow.__televisionArtifactBridgeInstalled = true;
49453
+ if (win.parent === win) {
49454
+ return;
49455
+ }
49456
+ const makeBridgeGuid = () => {
49457
+ const GUID_RADIX = 36;
49458
+ const GUID_WORD_COUNT = 4;
49459
+ const now = Date.now().toString(GUID_RADIX);
49460
+ try {
49461
+ const cryptoLike = win.crypto;
49462
+ if (cryptoLike && typeof cryptoLike.getRandomValues === "function") {
49463
+ const values = new Uint32Array(GUID_WORD_COUNT);
49464
+ cryptoLike.getRandomValues(values);
49465
+ return `tvb-${now}-${Array.from(values, (value) => value.toString(GUID_RADIX)).join("-")}`;
49466
+ }
49467
+ } catch {
49468
+ }
49469
+ return `tvb-${now}-${Math.random().toString(GUID_RADIX).slice(2)}-${Math.random().toString(GUID_RADIX).slice(2)}`;
49470
+ };
49471
+ const documentGuid = makeBridgeGuid();
49472
+ const postBridgeReady = () => {
49473
+ win.parent.postMessage({ type: "bridge-ready", url: win.location.href, guid: documentGuid }, "*");
49474
+ };
49475
+ win.addEventListener("pagehide", () => {
49476
+ win.parent.postMessage({ type: "leaving", guid: documentGuid }, "*");
49477
+ });
49478
+ win.addEventListener("pageshow", (event) => {
49479
+ if (event.persisted === true) {
49480
+ postBridgeReady();
49481
+ }
49482
+ });
49456
49483
  const capturedURL = win.location.href;
49457
49484
  const isTvArtifactURL = (url2) => {
49458
49485
  try {
@@ -49775,6 +49802,7 @@ function installBridge(win = window, options = {}) {
49775
49802
  }
49776
49803
  win.parent.postMessage({ type: "swipe-end", velocityX: 0 }, "*");
49777
49804
  });
49805
+ postBridgeReady();
49778
49806
  }
49779
49807
  function bridgeScriptSource() {
49780
49808
  return `(function(){const __name=(target)=>target;(${installBridge.toString()})(window);})();`;
@@ -52613,8 +52641,8 @@ function resolveVercelSkillsInstallerBin() {
52613
52641
  return localRequire.resolve("skills/bin/cli.mjs");
52614
52642
  }
52615
52643
  function readCLIVersion() {
52616
- if ("0.1.169".length > 0) {
52617
- return "0.1.169";
52644
+ if ("0.1.170".length > 0) {
52645
+ return "0.1.170";
52618
52646
  }
52619
52647
  const devPackageJsonPath = import_node_path12.default.join(getDevPackageDir(), "package.json");
52620
52648
  if (!(0, import_node_fs10.existsSync)(devPackageJsonPath)) {
@@ -58,8 +58,8 @@
58
58
  display: none !important;
59
59
  }
60
60
  </style>
61
- <script type="module" crossorigin src="../../assets/artifactMissing-CxC-pgtU.js"></script>
62
- <link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-KdJfBNuH.js">
61
+ <script type="module" crossorigin src="../../assets/artifactMissing-DWPZdkiF.js"></script>
62
+ <link rel="modulepreload" crossorigin href="../../assets/artifact-bridge-C0H5cXgO.js">
63
63
  <link rel="modulepreload" crossorigin href="../../assets/missing-artifact-page-DVzJ41AE.js">
64
64
  </head>
65
65
  <body>