appquery 0.7.0.rc4 → 0.7.0.rc5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a14a392efa76c538933b7e3a41ded16c0b424411401fe6bfbba25e04fdd5d58
4
- data.tar.gz: '090b6b2dc6fc90bad886bcf204112e96375bac828aa940d275deed236a74956e'
3
+ metadata.gz: f0a7427b588822074b0d97fa98f7008bd4a66a9630619e425421341ad5d74b2d
4
+ data.tar.gz: bfc1eead06bc7f5c8044694adb349260bab5ce8b0f11d8918fa1e068b736a2ac
5
5
  SHA512:
6
- metadata.gz: ba9661f71020f4d1925f7ed059831017b0f4348049a3146be3a5a94ba78199006f99ebde72a38f6da31a172a677402663cbacdbfab03f72ec837fe29a5ea9162
7
- data.tar.gz: e603c2c8b6cdb2bed56bdfc52ee568d5065c30e291e91c154dd4e9dccc35068493dde970682515f9566d8a7e313f3ac9dfbf6fd401af5a01089d29fbb393cd6b
6
+ metadata.gz: 9fd7aad6bcc1ec6a05f2fa2bdcebfd2c23b46d48ab9faa3b166651c2d680da82cb4ebee3faa8fcc7d20690777e2342943bbb01180eefab0bcf75ae7ca820745e
7
+ data.tar.gz: c3d0cfb70e26b846dadc3b0dc89b1cbdaa6aa5d9de7a5b06cdee583ccd9fb7fd517aa128a8dda341eed92f3e615f501986b06b778c71642810aae485bcc5ed10
@@ -1,3 +1,6 @@
1
+ // Simplified YARD app.js - disabled SPA navigation in favor of regular links
2
+ // The original SPA navigation was broken for nested pages
3
+
1
4
  window.__app = function () {
2
5
  var localStorage = {},
3
6
  sessionStorage = {};
@@ -151,7 +154,6 @@ window.__app = function () {
151
154
  $(this).addClass("deprecated");
152
155
  }
153
156
  });
154
- // Add the value of the constant as "Tooltip" to the summary object
155
157
  list.find("pre.code").each(function () {
156
158
  var dt_element = $(this).parent().prev();
157
159
  var tooltip = $(this).text();
@@ -316,16 +318,6 @@ window.__app = function () {
316
318
  }, 10);
317
319
  }
318
320
 
319
- function navigationChange() {
320
- // This works around the broken anchor navigation with the YARD template.
321
- window.onpopstate = function () {
322
- var hash = window.location.hash;
323
- if (hash !== "" && $(hash)[0]) {
324
- $(hash)[0].scrollIntoView();
325
- }
326
- };
327
- }
328
-
329
321
  $(document).ready(function () {
330
322
  navResizer();
331
323
  navExpander();
@@ -338,62 +330,16 @@ window.__app = function () {
338
330
  constantSummaryToggle();
339
331
  generateTOC();
340
332
  mainFocus();
341
- navigationChange();
342
333
  });
343
334
  };
344
335
  window.__app();
345
336
 
346
- window.addEventListener(
347
- "message",
348
- async (e) => {
349
- if (e.data.action === "navigate") {
350
- // Fix: resolve URL relative to the iframe's base (root), not current page
351
- const nav = document.getElementById("nav");
352
- const baseUrl = new URL(nav.src, window.location.href).href.replace(/[^/]*$/, '');
353
- const absoluteUrl = new URL(e.data.url, baseUrl).href;
354
- const response = await fetch(absoluteUrl);
355
- const text = await response.text();
356
- const parser = new DOMParser();
357
- const doc = parser.parseFromString(text, "text/html");
358
-
359
- const classListLink =
360
- document.getElementById("class_list_link").classList;
361
-
362
- const content = doc.querySelector("#main").innerHTML;
363
- document.querySelector("#main").innerHTML = content;
364
- document.title = doc.head.querySelector("title").innerText;
365
- document.head.querySelectorAll("script").forEach((script) => {
366
- if (
367
- !script.type ||
368
- (script.type.includes("text/javascript") && !script.src)
369
- ) {
370
- script.remove();
371
- }
372
- });
373
-
374
- doc.head.querySelectorAll("script").forEach((script) => {
375
- if (
376
- !script.type ||
377
- (script.type.includes("text/javascript") && !script.src)
378
- ) {
379
- const newScript = document.createElement("script");
380
- newScript.type = "text/javascript";
381
- newScript.textContent = script.textContent;
382
- document.head.appendChild(newScript);
383
- }
384
- });
385
-
386
- window.__app();
387
-
388
- document.getElementById("class_list_link").classList = classListLink;
389
-
390
- const url = new URL(e.data.url, "https://localhost");
391
- const hash = decodeURIComponent(url.hash ?? "");
392
- if (hash) {
393
- document.getElementById(hash.substring(1)).scrollIntoView();
394
- }
395
- history.pushState({}, document.title, absoluteUrl);
396
- }
397
- },
398
- false
399
- );
337
+ // Force sidebar links to do full page navigation instead of broken SPA
338
+ window.addEventListener("message", function (e) {
339
+ if (e.data.action === "navigate") {
340
+ // Calculate the correct absolute URL and do a real navigation
341
+ const nav = document.getElementById("nav");
342
+ const baseUrl = new URL(nav.src, window.location.href).href.replace(/[^/]*$/, '');
343
+ window.location.href = new URL(e.data.url, baseUrl).href;
344
+ }
345
+ }, false);
@@ -3,5 +3,5 @@
3
3
  module AppQuery
4
4
  # This should just contain the .dev of the upcoming version.
5
5
  # When doing the actual release, CI will write the tag here before pushing the gem.
6
- VERSION = "0.7.0.rc4"
6
+ VERSION = "0.7.0.rc5"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.rc4
4
+ version: 0.7.0.rc5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gert Goet