@oat-sa/tao-core-ui 3.18.6 → 3.19.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.
@@ -0,0 +1,91 @@
1
+ define(['jquery'], function ($) { 'use strict';
2
+
3
+ $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
4
+
5
+ /**
6
+ * This program is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU General Public License
8
+ * as published by the Free Software Foundation; under version 2
9
+ * of the License (non-upgradable).
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
+ *
20
+ * Copyright (c) 2026 (original work) Open Assessment Technologies SA ;
21
+ */
22
+ let callbacks;
23
+ let resizeObserver;
24
+
25
+ /**
26
+ * Use the single ResizeObserver instance
27
+ * @returns {Object}
28
+ */
29
+ var resizeObserver$1 = {
30
+ /**
31
+ * @param {jQuery|Element} elem
32
+ * @param {(entry: ResizeObserverEntry, observer: ResizeObserver) => {}} callback
33
+ * @param {Object?} observeOptions - see https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#options
34
+ */
35
+ observe: function (elem) {
36
+ let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => {};
37
+ let observeOptions = arguments.length > 2 ? arguments[2] : undefined;
38
+ const node = elem && $(elem).get(0);
39
+ if (!node) {
40
+ return;
41
+ }
42
+ ensureResizeObserverInstance();
43
+ resizeObserver.observe(node, observeOptions);
44
+ let nodeCallbacks = callbacks.get(node);
45
+ if (!nodeCallbacks) {
46
+ callbacks.set(node, new Set());
47
+ nodeCallbacks = callbacks.get(node);
48
+ }
49
+ nodeCallbacks.add(callback);
50
+ },
51
+ /**
52
+ * @param {jQuery|Element} elem
53
+ * @param {Function} callback
54
+ */
55
+ unobserve: function (elem, callback) {
56
+ const node = elem && $(elem).get(0);
57
+ if (!node) {
58
+ return;
59
+ }
60
+ ensureResizeObserverInstance();
61
+ const nodeCallbacks = callbacks.get(node);
62
+ if (!nodeCallbacks) {
63
+ return;
64
+ }
65
+ nodeCallbacks.delete(callback);
66
+ if (nodeCallbacks.size < 1) {
67
+ resizeObserver.unobserve(node);
68
+ callbacks.delete(node);
69
+ }
70
+ }
71
+ };
72
+ function ensureResizeObserverInstance() {
73
+ if (!resizeObserver) {
74
+ callbacks = new WeakMap();
75
+ resizeObserver = new ResizeObserver((entries, observer) => {
76
+ for (const entry of entries) {
77
+ const entryCallbacks = callbacks.get(entry.target);
78
+ if (!entryCallbacks) {
79
+ continue;
80
+ }
81
+ for (const entryCallback of entryCallbacks) {
82
+ entryCallback(entry, observer);
83
+ }
84
+ }
85
+ });
86
+ }
87
+ }
88
+
89
+ return resizeObserver$1;
90
+
91
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oat-sa/tao-core-ui",
3
- "version": "3.18.6",
3
+ "version": "3.19.0",
4
4
  "displayName": "TAO Core UI",
5
5
  "description": "UI libraries of TAO",
6
6
  "scripts": {
@@ -673,25 +673,31 @@ body {
673
673
  }
674
674
  }
675
675
 
676
- ruby rb:has(.txt-wavy) + rt {
677
- @include writing-mode-vertical-rl {
678
- position: relative;
679
- left: 5px;
680
- }
681
- @include writing-mode-horizontal-tb {
682
- position: relative;
683
- left: auto;
676
+ &.writing-mode-vertical-rl,
677
+ .writing-mode-vertical-rl {
678
+ ruby {
679
+ rb:has(.txt-wavy) + rt {
680
+ position: relative;
681
+ left: 5px;
682
+ }
683
+ rb:has(.txt-underline, .txt-dashed) + rt {
684
+ position: relative;
685
+ left: 2px;
686
+ }
684
687
  }
685
688
  }
686
689
 
687
- ruby rb:has(.txt-underline, .txt-dashed) + rt {
688
- @include writing-mode-vertical-rl {
689
- position: relative;
690
- left: 2px;
691
- }
692
- @include writing-mode-horizontal-tb {
693
- position: relative;
694
- left: auto;
690
+ &.writing-mode-horizontal-tb,
691
+ .writing-mode-horizontal-tb {
692
+ ruby {
693
+ rb:has(.txt-wavy) + rt {
694
+ position: relative;
695
+ left: auto;
696
+ }
697
+ rb:has(.txt-underline, .txt-dashed) + rt {
698
+ position: relative;
699
+ left: auto;
700
+ }
695
701
  }
696
702
  }
697
703
 
@@ -776,7 +782,7 @@ body {
776
782
  left: 0;
777
783
  }
778
784
  }
779
- &,
785
+ &.writing-mode-horizontal-tb,
780
786
  .writing-mode-horizontal-tb {
781
787
  .txt-underline,
782
788
  .txt-dashed {
package/src/css/basic.css CHANGED
@@ -1619,34 +1619,26 @@ html .writing-mode-vertical-rl .writing-mode-horizontal-tb .txt-wavy ruby rt {
1619
1619
  inset-block-start: auto;
1620
1620
  }
1621
1621
 
1622
+ html.writing-mode-vertical-rl ruby rb:has(.txt-wavy) + rt,
1622
1623
  html .writing-mode-vertical-rl ruby rb:has(.txt-wavy) + rt {
1623
1624
  position: relative;
1624
1625
  left: 5px;
1625
1626
  }
1626
-
1627
- html ruby rb:has(.txt-wavy) + rt {
1628
- position: relative;
1629
- left: auto;
1630
- }
1631
- html .writing-mode-vertical-rl .writing-mode-horizontal-tb ruby rb:has(.txt-wavy) + rt {
1632
- position: relative;
1633
- left: auto;
1634
- }
1635
-
1627
+ html.writing-mode-vertical-rl ruby rb:has(.txt-underline, .txt-dashed) + rt,
1636
1628
  html .writing-mode-vertical-rl ruby rb:has(.txt-underline, .txt-dashed) + rt {
1637
1629
  position: relative;
1638
1630
  left: 2px;
1639
1631
  }
1640
-
1641
- html ruby rb:has(.txt-underline, .txt-dashed) + rt {
1632
+ html.writing-mode-horizontal-tb ruby rb:has(.txt-wavy) + rt,
1633
+ html .writing-mode-horizontal-tb ruby rb:has(.txt-wavy) + rt {
1642
1634
  position: relative;
1643
1635
  left: auto;
1644
1636
  }
1645
- html .writing-mode-vertical-rl .writing-mode-horizontal-tb ruby rb:has(.txt-underline, .txt-dashed) + rt {
1637
+ html.writing-mode-horizontal-tb ruby rb:has(.txt-underline, .txt-dashed) + rt,
1638
+ html .writing-mode-horizontal-tb ruby rb:has(.txt-underline, .txt-dashed) + rt {
1646
1639
  position: relative;
1647
1640
  left: auto;
1648
1641
  }
1649
-
1650
1642
  html .qti-item .writing-mode-vertical-rl .media-container,
1651
1643
  html .qti-item .writing-mode-vertical-rl .qti-object-container.previewer:has(.mediaplayer) {
1652
1644
  writing-mode: horizontal-tb;
@@ -1723,13 +1715,13 @@ html [data-useragent-browser=safari].writing-mode-vertical-rl ruby rb:has(.txt-w
1723
1715
  html [data-useragent-browser=safari] .writing-mode-vertical-rl ruby rb:has(.txt-wavy) + rt {
1724
1716
  left: 0;
1725
1717
  }
1726
- html [data-useragent-browser=safari] .txt-underline,
1727
- html [data-useragent-browser=safari] .txt-dashed,
1718
+ html [data-useragent-browser=safari].writing-mode-horizontal-tb .txt-underline,
1719
+ html [data-useragent-browser=safari].writing-mode-horizontal-tb .txt-dashed,
1728
1720
  html [data-useragent-browser=safari] .writing-mode-horizontal-tb .txt-underline,
1729
1721
  html [data-useragent-browser=safari] .writing-mode-horizontal-tb .txt-dashed {
1730
1722
  text-underline-offset: auto;
1731
1723
  }
1732
- html [data-useragent-browser=safari] ruby rb:has(.txt-wavy, .txt-underline, .txt-dashed) + rt,
1724
+ html [data-useragent-browser=safari].writing-mode-horizontal-tb ruby rb:has(.txt-wavy, .txt-underline, .txt-dashed) + rt,
1733
1725
  html [data-useragent-browser=safari] .writing-mode-horizontal-tb ruby rb:has(.txt-wavy, .txt-underline, .txt-dashed) + rt {
1734
1726
  left: auto;
1735
1727
  }