pinokiod 3.103.0 → 3.105.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.103.0",
3
+ "version": "3.105.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -278,7 +278,7 @@ body.dark .type-tabs {
278
278
  margin-right: 5px;
279
279
  }
280
280
  body.dark .navheader2 {
281
- background: rgba(255,255,255,0.2) !important;
281
+ background: rgba(255,255,255,0.07) !important;
282
282
  }
283
283
  body.dark .navheader2 .btn {
284
284
  background: rgba(0,0,0,0.4);
@@ -1559,7 +1559,7 @@ body.dark .btn {
1559
1559
  /*
1560
1560
  color: white;
1561
1561
  */
1562
- background: rgba(255,255,255,0.1) !important;
1562
+ background: rgba(255,255,255,0.1);
1563
1563
  /*
1564
1564
  background: var(--dark-btn-bg);
1565
1565
  */
@@ -18,8 +18,9 @@
18
18
  <link href="/electron.css" rel="stylesheet"/>
19
19
  <% } %>
20
20
  <style>
21
- body.dark #devtab {
21
+ body.dark #devtab.selected {
22
22
  border: none;
23
+ background: rgba(255,255,255,0.07);
23
24
  }
24
25
  #devtab {
25
26
  align-items: center;
@@ -144,7 +145,7 @@ body.dark .appcanvas {
144
145
  }
145
146
  */
146
147
  body.dark .appcanvas_filler {
147
- background: rgba(255,255,255,0.2) !important;
148
+ background: rgba(255,255,255,0.07) !important;
148
149
  border: none;
149
150
  }
150
151
  .appcanvas_filler {
@@ -370,6 +371,9 @@ body.dark .appcanvas > aside .m.menu .nested-menu > .submenu .frame-link:hover {
370
371
  background: none !important;
371
372
  border: none;
372
373
  }
374
+ body.dark .appcanvas > aside .header-item.btn:not(.selected) {
375
+ background: none;
376
+ }
373
377
 
374
378
  .appcanvas > aside .header-item .tab {
375
379
  display: flex;
@@ -702,7 +706,7 @@ body .frame-link.selected {
702
706
  color: white;
703
707
  }
704
708
  body.dark .frame-link.selected {
705
- background: rgba(255,255,255,0.2) !important;
709
+ background: rgba(255,255,255,0.07) !important;
706
710
  }
707
711
  .frame-link .loader {
708
712
  /*
@@ -1273,11 +1277,8 @@ body.dark .top-menu .btn2.selected {
1273
1277
  }
1274
1278
 
1275
1279
  body.dark #fs-status {
1276
- /*
1277
- border-bottom: 1px solid rgba(255,255,255,0.04);
1278
- */
1279
1280
  border: none;
1280
- background: rgba(255,255,255,0.2) !important;
1281
+ background: rgba(255,255,255,0.07) !important;
1281
1282
  }
1282
1283
  #fs-status {
1283
1284
  padding: 5px;
@@ -2760,6 +2761,15 @@ body.dark {
2760
2761
  renderSelection({ force: true })
2761
2762
  }, delay)
2762
2763
  }
2764
+ const pluginLaunchActive = (() => {
2765
+ try {
2766
+ const params = new URLSearchParams(window.location.search)
2767
+ return params.has('plugin')
2768
+ } catch (_) {
2769
+ return false
2770
+ }
2771
+ })()
2772
+ let ignorePersistedSelection = pluginLaunchActive
2763
2773
  let lastForegroundSignature = null
2764
2774
  const iframe_onerror = (iframe) => {
2765
2775
  let originalSrc = iframe.src
@@ -4674,10 +4684,16 @@ body.dark {
4674
4684
  const renderSelection = async ({ event: eventParam = null, target: explicitTarget = null, force = false } = {}) => {
4675
4685
  const storage = getWindowStorage()
4676
4686
  const selectionKey = selectionStorageKey()
4677
- const hasPersistedSelection = Boolean(selectionKey && storage && storage.getItem(selectionKey))
4678
- const persistedSelectionRaw = selectionKey && storage ? storage.getItem(selectionKey) : null
4687
+ const originalHasPersistedSelection = Boolean(selectionKey && storage && storage.getItem(selectionKey))
4688
+ let persistedSelectionRaw = selectionKey && storage ? storage.getItem(selectionKey) : null
4689
+ const skipPersistedSelection = ignorePersistedSelection
4690
+ let hasPersistedSelection = skipPersistedSelection ? false : originalHasPersistedSelection
4691
+ if (skipPersistedSelection) {
4692
+ persistedSelectionRaw = null
4693
+ }
4679
4694
 
4680
4695
  let target = explicitTarget
4696
+ let preselected = null
4681
4697
 
4682
4698
  if (!target && eventParam) {
4683
4699
  target = eventParam.target?.closest(".frame-link") || null
@@ -4694,7 +4710,14 @@ body.dark {
4694
4710
  }
4695
4711
  }
4696
4712
 
4697
- if (!target) {
4713
+ if (!target && !skipPersistedSelection) {
4714
+ preselected = document.querySelector('#devtab.frame-link.selected') || document.querySelector('.frame-link.selected')
4715
+ if (preselected) {
4716
+ target = preselected
4717
+ }
4718
+ }
4719
+
4720
+ if (!target && persistedSelectionRaw) {
4698
4721
  target = restorePersistedFrameLink()
4699
4722
  if (!target && persistedSelectionRaw) {
4700
4723
  scheduleSelectionRetry()
@@ -4702,7 +4725,7 @@ body.dark {
4702
4725
  }
4703
4726
  }
4704
4727
 
4705
- if (!target) {
4728
+ if (!target && !skipPersistedSelection) {
4706
4729
  const urlKey = selectionUrlStorageKey()
4707
4730
  const storedUrl = urlKey && storage ? storage.getItem(urlKey) : null
4708
4731
  if (storedUrl) {
@@ -4710,6 +4733,16 @@ body.dark {
4710
4733
  }
4711
4734
  }
4712
4735
 
4736
+ if (!target && skipPersistedSelection) {
4737
+ const defaultSelection = document.querySelector("[data-default]")
4738
+ if (defaultSelection) {
4739
+ target = defaultSelection
4740
+ } else {
4741
+ scheduleSelectionRetry()
4742
+ return
4743
+ }
4744
+ }
4745
+
4713
4746
  <% if (type === "run" && env.PINOKIO_SCRIPT_DEFAULT && env.PINOKIO_SCRIPT_DEFAULT.toString().toLowerCase() === "true") { %>
4714
4747
  if (!target && !hasPersistedSelection) {
4715
4748
  const defaultSelection = document.querySelector("[data-default]")
@@ -4781,6 +4814,9 @@ body.dark {
4781
4814
  el.classList.remove("selected")
4782
4815
  })
4783
4816
  target.classList.add("selected")
4817
+ if (skipPersistedSelection && target.hasAttribute('data-default')) {
4818
+ ignorePersistedSelection = false
4819
+ }
4784
4820
  persistFrameLinkSelection(target)
4785
4821
 
4786
4822
  // save target.href
@@ -335,7 +335,7 @@ async function displayResults(config) {
335
335
  write(JSON.stringify(packet.data.json2, null, 2).replace(/\n/g, "\r\n"))
336
336
  write("\r\n")
337
337
  }
338
- document.querySelector("#end").scrollIntoView({ behavior: 'smooth' });
338
+ // document.querySelector("#end").scrollIntoView({ behavior: 'smooth' });
339
339
  } else if (packet.type === 'disconnect') {
340
340
  term.write("\r\nDisconnected...\r\n")
341
341
  socket.close()