@yakuzaa/jade 0.1.13 → 0.1.14
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/commands/html.js +77 -2
- package/package.json +2 -2
package/commands/html.js
CHANGED
|
@@ -99,6 +99,25 @@ function gerarCSS(tema = {}) {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/* ── Header fixo ─────────────────────────────── */
|
|
102
|
+
/* ── Banner de notificação (empurra layout) ─── */
|
|
103
|
+
#jade-banner {
|
|
104
|
+
position: fixed;
|
|
105
|
+
top: 0; left: 0; right: 0;
|
|
106
|
+
height: 0;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
z-index: 400;
|
|
109
|
+
transition: height 0.28s cubic-bezier(0.4,0,0.2,1);
|
|
110
|
+
}
|
|
111
|
+
#jade-banner.jade-banner-visivel { height: 48px; }
|
|
112
|
+
body.jade-com-banner #jade-header {
|
|
113
|
+
top: 48px;
|
|
114
|
+
transition: top 0.28s cubic-bezier(0.4,0,0.2,1);
|
|
115
|
+
}
|
|
116
|
+
body.jade-com-banner #jade-app {
|
|
117
|
+
margin-top: calc(52px + 48px);
|
|
118
|
+
transition: margin-top 0.28s cubic-bezier(0.4,0,0.2,1);
|
|
119
|
+
}
|
|
120
|
+
|
|
102
121
|
#jade-header {
|
|
103
122
|
position: fixed;
|
|
104
123
|
top: 0; left: 0; right: 0;
|
|
@@ -111,6 +130,7 @@ function gerarCSS(tema = {}) {
|
|
|
111
130
|
z-index: 300;
|
|
112
131
|
box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 2px 8px rgba(0,0,0,0.2);
|
|
113
132
|
flex-shrink: 0;
|
|
133
|
+
transition: top 0.28s cubic-bezier(0.4,0,0.2,1);
|
|
114
134
|
}
|
|
115
135
|
|
|
116
136
|
#jade-hamburger {
|
|
@@ -138,7 +158,34 @@ function gerarCSS(tema = {}) {
|
|
|
138
158
|
white-space: nowrap;
|
|
139
159
|
overflow: hidden;
|
|
140
160
|
text-overflow: ellipsis;
|
|
161
|
+
transition: opacity 0.2s;
|
|
162
|
+
}
|
|
163
|
+
body.jade-com-busca #jade-header-titulo { opacity: 0; pointer-events: none; }
|
|
164
|
+
|
|
165
|
+
/* ── Search bar centralizado no header ─────── */
|
|
166
|
+
#jade-header-busca-wrapper {
|
|
167
|
+
position: absolute;
|
|
168
|
+
left: 50%;
|
|
169
|
+
transform: translateX(-50%);
|
|
170
|
+
width: min(380px, calc(100% - 180px));
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
}
|
|
174
|
+
#jade-header-busca {
|
|
175
|
+
width: 100%;
|
|
176
|
+
height: 34px;
|
|
177
|
+
padding: 0 14px;
|
|
178
|
+
border: none;
|
|
179
|
+
border-radius: 999px;
|
|
180
|
+
background: rgba(255,255,255,0.13);
|
|
181
|
+
color: #fff;
|
|
182
|
+
font-size: 0.875rem;
|
|
183
|
+
font-family: var(--jade-fonte);
|
|
184
|
+
outline: none;
|
|
185
|
+
transition: background 0.15s;
|
|
141
186
|
}
|
|
187
|
+
#jade-header-busca::placeholder { color: rgba(255,255,255,0.45); }
|
|
188
|
+
#jade-header-busca:focus { background: rgba(255,255,255,0.2); }
|
|
142
189
|
|
|
143
190
|
/* ── Layout principal (abaixo do header) ─────── */
|
|
144
191
|
#jade-app {
|
|
@@ -146,6 +193,11 @@ function gerarCSS(tema = {}) {
|
|
|
146
193
|
height: calc(100dvh - 52px);
|
|
147
194
|
margin-top: 52px;
|
|
148
195
|
overflow: hidden;
|
|
196
|
+
transition: margin-top 0.28s cubic-bezier(0.4,0,0.2,1),
|
|
197
|
+
height 0.28s cubic-bezier(0.4,0,0.2,1);
|
|
198
|
+
}
|
|
199
|
+
body.jade-com-banner #jade-app {
|
|
200
|
+
height: calc(100dvh - 52px - 48px);
|
|
149
201
|
}
|
|
150
202
|
|
|
151
203
|
/* ── Nav lateral ─────────────────────────────── */
|
|
@@ -473,6 +525,24 @@ async function mudarTela(nome, telas, db, ui, navItems) {
|
|
|
473
525
|
resolverAgregacoes(tela, dadosMap);
|
|
474
526
|
|
|
475
527
|
ui.renderizarTela(tela, container, dadosMap);
|
|
528
|
+
|
|
529
|
+
// Conecta search bar do header ao filtro da tela, se existir
|
|
530
|
+
const buscaWrapper = document.getElementById('jade-header-busca-wrapper');
|
|
531
|
+
const buscaInput = document.getElementById('jade-header-busca');
|
|
532
|
+
if (buscaWrapper && buscaInput) {
|
|
533
|
+
const signal = ui.getFiltroPorTela?.(nome);
|
|
534
|
+
if (signal) {
|
|
535
|
+
buscaWrapper.style.display = '';
|
|
536
|
+
document.body.classList.add('jade-com-busca');
|
|
537
|
+
buscaInput.value = '';
|
|
538
|
+
signal.set('');
|
|
539
|
+
buscaInput.oninput = () => signal.set(buscaInput.value.toLowerCase());
|
|
540
|
+
} else {
|
|
541
|
+
buscaWrapper.style.display = 'none';
|
|
542
|
+
document.body.classList.remove('jade-com-busca');
|
|
543
|
+
buscaInput.oninput = null;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
476
546
|
}
|
|
477
547
|
|
|
478
548
|
async function iniciar() {
|
|
@@ -510,8 +580,8 @@ async function iniciar() {
|
|
|
510
580
|
const navEl = document.getElementById('jade-nav');
|
|
511
581
|
const isMobile = () => window.innerWidth <= 768;
|
|
512
582
|
|
|
513
|
-
const iconeMenu = criarElementoIcone('menu',
|
|
514
|
-
const iconeFechar = criarElementoIcone('fechar',
|
|
583
|
+
const iconeMenu = criarElementoIcone('menu', 24);
|
|
584
|
+
const iconeFechar = criarElementoIcone('fechar', 24);
|
|
515
585
|
if (iconeMenu) hamburger.appendChild(iconeMenu);
|
|
516
586
|
|
|
517
587
|
function abrirDrawer() {
|
|
@@ -643,9 +713,14 @@ ${gerarCSS(tema)}
|
|
|
643
713
|
Carregando...
|
|
644
714
|
</div>
|
|
645
715
|
|
|
716
|
+
<div id="jade-banner" role="status" aria-live="polite"></div>
|
|
717
|
+
|
|
646
718
|
<header id="jade-header" style="display:none">
|
|
647
719
|
<button id="jade-hamburger" aria-label="Abrir menu" aria-expanded="false"></button>
|
|
648
720
|
<span id="jade-header-titulo">${nome}</span>
|
|
721
|
+
<div id="jade-header-busca-wrapper" style="display:none" role="search">
|
|
722
|
+
<input id="jade-header-busca" type="search" placeholder="Buscar..." autocomplete="off" aria-label="Buscar na tela atual">
|
|
723
|
+
</div>
|
|
649
724
|
</header>
|
|
650
725
|
|
|
651
726
|
<div id="jade-overlay" role="presentation"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yakuzaa/jade",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "Jade DSL — linguagem empresarial em português compilada para WebAssembly. Instala compilador + runtime + CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@yakuzaa/jade-compiler": "^0.1.15",
|
|
21
|
-
"@yakuzaa/jade-runtime": "^0.1.
|
|
21
|
+
"@yakuzaa/jade-runtime": "^0.1.10"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
24
24
|
"jade",
|