cubing 0.35.10 → 0.35.11

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.
Files changed (23) hide show
  1. package/dist/esm/{chunk-7FZAZ3C3.js → chunk-KA53VAHS.js} +15 -8
  2. package/dist/esm/chunk-KA53VAHS.js.map +7 -0
  3. package/dist/esm/{chunk-OE3AM6XZ.js → chunk-MTMVMFDV.js} +2 -2
  4. package/dist/esm/{chunk-OE3AM6XZ.js.map → chunk-MTMVMFDV.js.map} +0 -0
  5. package/dist/esm/{chunk-77NLJLOE.js → chunk-ZUQFCYEB.js} +4 -4
  6. package/dist/esm/{chunk-77NLJLOE.js.map → chunk-ZUQFCYEB.js.map} +0 -0
  7. package/dist/esm/notation/index.js +1 -1
  8. package/dist/esm/scramble/index.js +3 -3
  9. package/dist/esm/search/index.js +3 -3
  10. package/dist/esm/{search-worker-inside-generated-string-CTFAKIM3.js → search-worker-inside-generated-string-BOQDJKWH.js} +24 -24
  11. package/dist/esm/{search-worker-inside-generated-string-CTFAKIM3.js.map → search-worker-inside-generated-string-BOQDJKWH.js.map} +1 -1
  12. package/dist/esm/{search-worker-js-entry-NU3D54QT.js → search-worker-js-entry-BJHVT6GJ.js} +3 -3
  13. package/dist/esm/{search-worker-js-entry-NU3D54QT.js.map → search-worker-js-entry-BJHVT6GJ.js.map} +0 -0
  14. package/dist/esm/{search-worker-ts-entry-GLXLE5KU.js → search-worker-ts-entry-P4MW2TTD.js} +2 -2
  15. package/dist/esm/{search-worker-ts-entry-GLXLE5KU.js.map → search-worker-ts-entry-P4MW2TTD.js.map} +0 -0
  16. package/dist/esm/twisty/index.js +70 -15
  17. package/dist/esm/twisty/index.js.map +2 -2
  18. package/dist/types/{TwizzleLink-aa6700aa.d.ts → TwizzleLink-a537bbef.d.ts} +1 -1
  19. package/dist/types/notation/index.d.ts +1 -1
  20. package/dist/types/puzzles/index.d.ts +2 -2
  21. package/dist/types/twisty/index.d.ts +2 -2
  22. package/package.json +1 -1
  23. package/dist/esm/chunk-7FZAZ3C3.js.map +0 -7
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-Z6WT2ASL.js";
4
4
  import {
5
5
  insideAPI
6
- } from "./chunk-OE3AM6XZ.js";
6
+ } from "./chunk-MTMVMFDV.js";
7
7
  import "./chunk-EV25IJFC.js";
8
8
  import "./chunk-DKG7EU7X.js";
9
- import "./chunk-7FZAZ3C3.js";
9
+ import "./chunk-KA53VAHS.js";
10
10
  import "./chunk-67PUZ2YF.js";
11
11
  import "./chunk-6TTWMZXN.js";
12
12
  import "./chunk-KLI2E737.js";
@@ -14,4 +14,4 @@ import "./chunk-VZP3KFTU.js";
14
14
 
15
15
  // src/cubing/search/inside/search-worker-js-entry.js
16
16
  expose(insideAPI);
17
- //# sourceMappingURL=search-worker-js-entry-NU3D54QT.js.map
17
+ //# sourceMappingURL=search-worker-js-entry-BJHVT6GJ.js.map
@@ -9,7 +9,7 @@ import "./chunk-EV25IJFC.js";
9
9
  // src/cubing/search/inside/search-worker-ts-entry.ts
10
10
  if (exposeAPI.expose) {
11
11
  (async () => {
12
- await import("./search-worker-js-entry-NU3D54QT.js");
12
+ await import("./search-worker-js-entry-BJHVT6GJ.js");
13
13
  const messagePort = globalThis.postMessage ? globalThis : await nodeEndpointPort();
14
14
  messagePort.postMessage("comlink-exposed");
15
15
  })();
@@ -18,4 +18,4 @@ var WORKER_ENTRY_FILE_URL = import.meta.url;
18
18
  export {
19
19
  WORKER_ENTRY_FILE_URL
20
20
  };
21
- //# sourceMappingURL=search-worker-ts-entry-GLXLE5KU.js.map
21
+ //# sourceMappingURL=search-worker-ts-entry-P4MW2TTD.js.map
@@ -23,7 +23,7 @@ import {
23
23
  countAnimatedLeaves,
24
24
  countMetricMoves,
25
25
  countMoves
26
- } from "../chunk-7FZAZ3C3.js";
26
+ } from "../chunk-KA53VAHS.js";
27
27
  import {
28
28
  cube3x3x3,
29
29
  puzzles
@@ -5312,6 +5312,12 @@ var twizzleLinkCSS = new CSSSource(
5312
5312
  .wrapper {
5313
5313
  background: rgb(255, 245, 235);
5314
5314
  border: 1px solid rgba(0, 0, 0, 0.25);
5315
+
5316
+ /* Workaround from https://stackoverflow.com/questions/40010597/how-do-i-apply-opacity-to-a-css-color-variable */
5317
+ --text-color: 0, 0, 0;
5318
+ --heading-background: 255, 230, 210;
5319
+
5320
+ color: rgb(var(--text-color));
5315
5321
  }
5316
5322
 
5317
5323
  .setup-alg, twisty-alg-viewer {
@@ -5319,23 +5325,31 @@ var twizzleLinkCSS = new CSSSource(
5319
5325
  }
5320
5326
 
5321
5327
  .heading {
5322
- background: rgba(255, 230, 210, 1);
5328
+ background: rgba(var(--heading-background), 1);
5329
+ color: rgba(var(--text-color), 1);
5323
5330
  font-weight: bold;
5324
5331
  padding: 0.25em 0.5em;
5325
5332
  display: grid;
5326
5333
  grid-template-columns: auto 1fr;
5334
+
5335
+ /* For the move count hover elems. */
5336
+ position: sticky;
5327
5337
  }
5328
5338
 
5329
5339
  .heading.title {
5330
5340
  background: rgb(255, 245, 235);
5331
5341
  font-size: 150%;
5332
- white-space: pre;
5342
+ white-space: pre-wrap;
5333
5343
  }
5334
5344
 
5335
5345
  .heading .move-count {
5336
5346
  font-weight: initial;
5337
5347
  text-align: right;
5338
- opacity: 0.5;
5348
+ color: rgba(var(--text-color), 0.4);
5349
+ }
5350
+
5351
+ .wrapper.dark-mode .heading .move-count {
5352
+ color: rgba(var(--text-color), 0.7);
5339
5353
  }
5340
5354
 
5341
5355
  .heading a {
@@ -5405,15 +5419,37 @@ twisty-alg-viewer {
5405
5419
  height: 100%;
5406
5420
  }
5407
5421
  }
5422
+
5423
+ /* TODO: dedup with Twizzle Editor */
5424
+ .move-count > span:hover:before {
5425
+ background-color: rgba(var(--heading-background), 1);
5426
+ color: rgba(var(--text-color), 1);
5427
+ backdrop-filter: blur(4px);
5428
+ z-index: 100;
5429
+ position: absolute;
5430
+ padding: 0.5em;
5431
+ top: 1.5em;
5432
+ right: 0;
5433
+ content: attr(data-before);
5434
+ white-space: pre-wrap;
5435
+ text-align: left;
5436
+ }
5437
+
5438
+ .move-count > span:hover {
5439
+ color: rgba(var(--text-color), 1);
5440
+ cursor: help;
5441
+ }
5408
5442
  `
5409
5443
  );
5410
5444
  var twizzleLinkForumTweaksCSS = new CSSSource(`
5411
5445
  .wrapper {
5412
5446
  background: white;
5447
+ --heading-background: 232, 239, 253
5413
5448
  }
5414
5449
 
5415
- .heading {
5416
- background: #4285f422;
5450
+ .wrapper.dark-mode {
5451
+ --text-color: 236, 236, 236;
5452
+ --heading-background: 29, 29, 29;
5417
5453
  }
5418
5454
 
5419
5455
  .scrollable-region {
@@ -5422,14 +5458,13 @@ var twizzleLinkForumTweaksCSS = new CSSSource(`
5422
5458
 
5423
5459
  .wrapper.dark-mode {
5424
5460
  background: #262626;
5425
- color: #929292;
5461
+ --text-color: 142, 142, 142;
5426
5462
  border-color: #FFFFFF44;
5427
5463
  color-scheme: dark;
5428
5464
  }
5429
5465
 
5430
5466
  .wrapper.dark-mode .heading:not(.title) {
5431
5467
  background: #1d1d1d;
5432
- color: #ececec;
5433
5468
  }
5434
5469
 
5435
5470
  .heading.title {
@@ -5463,13 +5498,29 @@ function getConfigFromURL(prefix = "", url = location.href) {
5463
5498
  }
5464
5499
 
5465
5500
  // src/cubing/twisty/views/twizzle/TwizzleLink.ts
5466
- var NBSP = "\xA0";
5467
5501
  var OUTER_BLOCK_MOVES_EXPLANATION = "outer block moves (e.g. R, Rw, or 4r)";
5468
5502
  var INNER_BLOCK_MOVES_EXPLANATION = "inner block moves (e.g. M or 2-5r)";
5469
5503
  var METRIC_EXPLANATIONS = {
5470
- ["OBTM" /* OuterBlockTurnMetric */]: `OBTM ("Outer Block Turn Metric"): ${INNER_BLOCK_MOVES_EXPLANATION} count as 2 turns, ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn, rotations (e.g. x) count as 0 turns`,
5471
- ["RBTM" /* RangeBlockTurnMetric */]: `RBTM ("Range Block Turn Metric"): ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn, ${INNER_BLOCK_MOVES_EXPLANATION} count as 1 turn, rotations (e.g. x) count as 0 turns`,
5472
- ["ETM" /* ExecutionTurnMetric */]: `ETM ("Execution Turn Metric"): all moves (including rotations) count as 1 turn`
5504
+ ["OBTM" /* OuterBlockTurnMetric */]: `HTM = OBTM ("Outer Block Turn Metric"):
5505
+ \u2022 ${INNER_BLOCK_MOVES_EXPLANATION} count as 2 turns
5506
+ \u2022 ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn
5507
+ \u2022 rotations (e.g. x) count as 0 turns`,
5508
+ ["OBQTM" /* OuterBlockQuantumTurnMetric */]: `QTM = OBQTM ("Outer Block Quantum Turn Metric"):
5509
+ \u2022 ${INNER_BLOCK_MOVES_EXPLANATION} count as 2 turns per quantum (e.g. M2 counts as 4)
5510
+ \u2022 ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn per quantum (e.g. R2 counts as 2)
5511
+ \u2022 rotations (e.g. x) count as 0 turns`,
5512
+ ["RBTM" /* RangeBlockTurnMetric */]: `STM = RBTM ("Range Block Turn Metric"):
5513
+ \u2022 ${INNER_BLOCK_MOVES_EXPLANATION} count as 1 turn
5514
+ \u2022 ${OUTER_BLOCK_MOVES_EXPLANATION} count as 1 turn
5515
+ \u2022 rotations (e.g. x) count as 0 turns`,
5516
+ ["ETM" /* ExecutionTurnMetric */]: `ETM ("Execution Turn Metric"):
5517
+ \u2022 all moves (including rotations) count as 1 turn`
5518
+ };
5519
+ var METRIC_ABBREVIATIONS = {
5520
+ ["OBTM" /* OuterBlockTurnMetric */]: "h",
5521
+ ["OBQTM" /* OuterBlockQuantumTurnMetric */]: "q",
5522
+ ["RBTM" /* RangeBlockTurnMetric */]: "s",
5523
+ ["ETM" /* ExecutionTurnMetric */]: "e"
5473
5524
  };
5474
5525
  var TwizzleLink = class extends ManagedCustomElement {
5475
5526
  constructor(options) {
@@ -5628,7 +5679,7 @@ function constructMoveCountDisplay(model, elem = document.createElement("span"))
5628
5679
  if (isFirstMetric) {
5629
5680
  isFirstMetric = false;
5630
5681
  } else {
5631
- elem.append(" / ");
5682
+ elem.append(", ");
5632
5683
  }
5633
5684
  const span = elem.appendChild(document.createElement("span"));
5634
5685
  const moveCount = countMetricMoves(
@@ -5636,12 +5687,16 @@ function constructMoveCountDisplay(model, elem = document.createElement("span"))
5636
5687
  metric,
5637
5688
  algWithIssues.alg
5638
5689
  );
5639
- span.textContent = `${moveCount}${NBSP}${metric}`;
5640
- span.title = METRIC_EXPLANATIONS[metric] ?? "";
5690
+ const moveNumber = span.appendChild(document.createElement("span"));
5691
+ moveNumber.textContent = moveCount.toString();
5692
+ moveNumber.classList.add("move-number");
5693
+ span.append(`${METRIC_ABBREVIATIONS[metric]}`);
5694
+ span.setAttribute("data-before", METRIC_EXPLANATIONS[metric] ?? "");
5641
5695
  }
5642
5696
  elem.textContent = "(";
5643
5697
  if (puzzleLoader.id === "3x3x3") {
5644
5698
  addMetric("OBTM" /* OuterBlockTurnMetric */);
5699
+ addMetric("OBQTM" /* OuterBlockQuantumTurnMetric */);
5645
5700
  addMetric("RBTM" /* RangeBlockTurnMetric */);
5646
5701
  }
5647
5702
  addMetric("ETM" /* ExecutionTurnMetric */);