@aurea-uds/core 0.4.0 → 0.6.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/dist/aurea.css +2402 -1663
- package/dist/aurea.js +10 -1
- package/package.json +11 -3
package/dist/aurea.js
CHANGED
|
@@ -93,6 +93,11 @@
|
|
|
93
93
|
if (!targets.length) return;
|
|
94
94
|
var seen = {};
|
|
95
95
|
var observer = new IntersectionObserver(function (entries) {
|
|
96
|
+
// Se o React assumiu este índice depois de nós, saímos. A ordem importa e não é
|
|
97
|
+
// controlável: `initTocs` roda no DOMContentLoaded, e a hidratação pode vir depois. Sem
|
|
98
|
+
// esta linha, os dois observadores escreveriam o mesmo `aria-current` com faixas
|
|
99
|
+
// diferentes, e o item piscaria entre duas seções ao rolar.
|
|
100
|
+
if (toc.getAttribute("data-toc-spy") === "react") { observer.disconnect(); return; }
|
|
96
101
|
for (var i = 0; i < entries.length; i++) seen[entries[i].target.id] = entries[i].isIntersecting;
|
|
97
102
|
// o ÚLTIMO que cruza a faixa, não o primeiro: seção e subseção cruzam juntas e o
|
|
98
103
|
// item específico é o que interessa. Nada cruzando = topo da página = primeiro item.
|
|
@@ -106,7 +111,11 @@
|
|
|
106
111
|
for (var k = 0; k < targets.length; k++) observer.observe(targets[k]);
|
|
107
112
|
}
|
|
108
113
|
function initTocs() {
|
|
109
|
-
|
|
114
|
+
// `[data-toc-spy="react"]` fica de fora: o componente React observa por conta própria desde
|
|
115
|
+
// 21/08/2026, e dois observadores escrevendo o mesmo `aria-current` com faixas diferentes é
|
|
116
|
+
// pior que nenhum. Numa página estática — o catálogo, os docs — a marca não aparece e este
|
|
117
|
+
// caminho segue sendo o único.
|
|
118
|
+
var tocs = document.querySelectorAll('.toc:not([data-toc-spy="react"])');
|
|
110
119
|
for (var t = 0; t < tocs.length; t++) tocSpy(tocs[t]);
|
|
111
120
|
}
|
|
112
121
|
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", initTocs);
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurea-uds/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The Aurea UDS stylesheet and its vanilla behaviour. Import @aurea-uds/fonts/css before this.",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"aurea",
|
|
7
|
+
"design-system",
|
|
8
|
+
"css",
|
|
9
|
+
"design-tokens"
|
|
10
|
+
],
|
|
6
11
|
"license": "Apache-2.0",
|
|
7
12
|
"repository": {
|
|
8
13
|
"type": "git",
|
|
@@ -16,7 +21,10 @@
|
|
|
16
21
|
"dist"
|
|
17
22
|
],
|
|
18
23
|
"exports": {
|
|
19
|
-
"./css": {
|
|
24
|
+
"./css": {
|
|
25
|
+
"types": "./dist/aurea.css.d.ts",
|
|
26
|
+
"default": "./dist/aurea.css"
|
|
27
|
+
},
|
|
20
28
|
"./js": "./dist/aurea.js"
|
|
21
29
|
}
|
|
22
30
|
}
|