@thibezer/ui-components-kit 1.0.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/LICENSE +21 -0
- package/README.md +624 -0
- package/dist/botao.cjs +1 -0
- package/dist/botao.d.ts +8 -0
- package/dist/botao.js +6 -0
- package/dist/camadas.cjs +296 -0
- package/dist/camadas.d.ts +14 -0
- package/dist/camadas.js +1857 -0
- package/dist/campo-texto.cjs +1 -0
- package/dist/campo-texto.d.ts +8 -0
- package/dist/campo-texto.js +11 -0
- package/dist/canvas.cjs +254 -0
- package/dist/canvas.d.ts +8 -0
- package/dist/canvas.js +3082 -0
- package/dist/card.cjs +1 -0
- package/dist/card.d.ts +7 -0
- package/dist/card.js +5 -0
- package/dist/components/ui-alerta/index.d.ts +2 -0
- package/dist/components/ui-alerta/ui-alerta-base.d.ts +23 -0
- package/dist/components/ui-alerta/ui-alerta.d.ts +2 -0
- package/dist/components/ui-alerta/ui-toast.d.ts +34 -0
- package/dist/components/ui-avatar/index.d.ts +1 -0
- package/dist/components/ui-avatar/ui-avatar.d.ts +12 -0
- package/dist/components/ui-badge/index.d.ts +1 -0
- package/dist/components/ui-badge/ui-badge.d.ts +20 -0
- package/dist/components/ui-barra-ferramentas/ferramentas-comum.d.ts +22 -0
- package/dist/components/ui-barra-ferramentas/ferramentas-icones.d.ts +24 -0
- package/dist/components/ui-barra-ferramentas/index.d.ts +4 -0
- package/dist/components/ui-barra-ferramentas/tipos.d.ts +55 -0
- package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +54 -0
- package/dist/components/ui-barra-ferramentas/ui-ribbon.d.ts +52 -0
- package/dist/components/ui-botao/index.d.ts +1 -0
- package/dist/components/ui-botao/ui-botao.d.ts +26 -0
- package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +18 -0
- package/dist/components/ui-camadas/camadas-drag-drop.d.ts +18 -0
- package/dist/components/ui-camadas/camadas-eventos-arvore.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-eventos-camadas.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-eventos-rodape.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-host.d.ts +23 -0
- package/dist/components/ui-camadas/camadas-icones.d.ts +23 -0
- package/dist/components/ui-camadas/camadas-mapas-base.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-metricas.d.ts +17 -0
- package/dist/components/ui-camadas/camadas-persistencia.d.ts +65 -0
- package/dist/components/ui-camadas/camadas-resizer.d.ts +16 -0
- package/dist/components/ui-camadas/camadas-rodape.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-selecao.d.ts +24 -0
- package/dist/components/ui-camadas/camadas-sincronizacao-dom.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-teclado.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-utils.d.ts +26 -0
- package/dist/components/ui-camadas/index.d.ts +11 -0
- package/dist/components/ui-camadas/tipos.d.ts +116 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +112 -0
- package/dist/components/ui-campo-texto/campo-texto-estados.d.ts +12 -0
- package/dist/components/ui-campo-texto/campo-texto-template.d.ts +2 -0
- package/dist/components/ui-campo-texto/index.d.ts +1 -0
- package/dist/components/ui-campo-texto/ui-campo-texto.d.ts +57 -0
- package/dist/components/ui-canvas-cad/cad-atributos-sync.d.ts +13 -0
- package/dist/components/ui-canvas-cad/cad-broadcast.d.ts +19 -0
- package/dist/components/ui-canvas-cad/cad-colecoes-dados.d.ts +46 -0
- package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +26 -0
- package/dist/components/ui-canvas-cad/cad-inicializador.d.ts +19 -0
- package/dist/components/ui-canvas-cad/cad-painel-camadas.d.ts +9 -0
- package/dist/components/ui-canvas-cad/cad-tamanho-observer.d.ts +7 -0
- package/dist/components/ui-canvas-cad/cad-template.d.ts +1 -0
- package/dist/components/ui-canvas-cad/cad-toolbar-painel.d.ts +29 -0
- package/dist/components/ui-canvas-cad/index.d.ts +8 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +91 -0
- package/dist/components/ui-card/index.d.ts +1 -0
- package/dist/components/ui-card/ui-card.d.ts +18 -0
- package/dist/components/ui-checkbox/index.d.ts +1 -0
- package/dist/components/ui-checkbox/ui-checkbox.d.ts +36 -0
- package/dist/components/ui-drawer/drawer-acessibilidade.d.ts +16 -0
- package/dist/components/ui-drawer/index.d.ts +1 -0
- package/dist/components/ui-drawer/ui-drawer.d.ts +37 -0
- package/dist/components/ui-icone/index.d.ts +1 -0
- package/dist/components/ui-icone/ui-icone.d.ts +15 -0
- package/dist/components/ui-lista-flutuante/index.d.ts +1 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-posicionamento.d.ts +15 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-render.d.ts +9 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-teclado.d.ts +13 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-template.d.ts +2 -0
- package/dist/components/ui-lista-flutuante/tipos.d.ts +4 -0
- package/dist/components/ui-lista-flutuante/ui-lista-flutuante.d.ts +63 -0
- package/dist/components/ui-mapa/index.d.ts +3 -0
- package/dist/components/ui-mapa/ui-mapa-linha.d.ts +12 -0
- package/dist/components/ui-mapa/ui-mapa-marcador.d.ts +15 -0
- package/dist/components/ui-mapa/ui-mapa.d.ts +16 -0
- package/dist/components/ui-modal/index.d.ts +2 -0
- package/dist/components/ui-modal/modal-acessibilidade.d.ts +12 -0
- package/dist/components/ui-modal/ui-modal.d.ts +30 -0
- package/dist/components/ui-radio/index.d.ts +1 -0
- package/dist/components/ui-radio/radio-grupo-registry.d.ts +10 -0
- package/dist/components/ui-radio/ui-radio.d.ts +29 -0
- package/dist/components/ui-segmented/index.d.ts +1 -0
- package/dist/components/ui-segmented/segmented-indicador.d.ts +13 -0
- package/dist/components/ui-segmented/segmented-teclado.d.ts +4 -0
- package/dist/components/ui-segmented/segmented-template.d.ts +4 -0
- package/dist/components/ui-segmented/ui-segmented.d.ts +48 -0
- package/dist/components/ui-seletor-mapa-base/index.d.ts +2 -0
- package/dist/components/ui-seletor-mapa-base/tipos.d.ts +22 -0
- package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +43 -0
- package/dist/components/ui-skeleton/index.d.ts +1 -0
- package/dist/components/ui-skeleton/ui-skeleton.d.ts +19 -0
- package/dist/components/ui-stat/index.d.ts +1 -0
- package/dist/components/ui-stat/ui-stat.d.ts +30 -0
- package/dist/components/ui-switch/index.d.ts +1 -0
- package/dist/components/ui-switch/ui-switch.d.ts +36 -0
- package/dist/components/ui-tabela/index.d.ts +7 -0
- package/dist/components/ui-tabela/tabela-atributos-sync.d.ts +14 -0
- package/dist/components/ui-tabela/tabela-corpo.d.ts +18 -0
- package/dist/components/ui-tabela/tabela-dom.d.ts +15 -0
- package/dist/components/ui-tabela/tabela-header.d.ts +18 -0
- package/dist/components/ui-tabela/tabela-interacao.d.ts +9 -0
- package/dist/components/ui-tabela/tabela-localizador.d.ts +4 -0
- package/dist/components/ui-tabela/tabela-ordenacao.d.ts +12 -0
- package/dist/components/ui-tabela/tabela-orquestrador-dados.d.ts +18 -0
- package/dist/components/ui-tabela/tabela-redimensionamento.d.ts +28 -0
- package/dist/components/ui-tabela/tabela-remota.d.ts +15 -0
- package/dist/components/ui-tabela/tabela-renderizador.d.ts +29 -0
- package/dist/components/ui-tabela/tabela-selecao.d.ts +24 -0
- package/dist/components/ui-tabela/tipos.d.ts +27 -0
- package/dist/components/ui-tabela/ui-tabela.d.ts +83 -0
- package/dist/components/ui-tabela-propriedades/avaliador-expressao.d.ts +6 -0
- package/dist/components/ui-tabela-propriedades/editores-basicos.d.ts +7 -0
- package/dist/components/ui-tabela-propriedades/editores-cad.d.ts +17 -0
- package/dist/components/ui-tabela-propriedades/index.d.ts +6 -0
- package/dist/components/ui-tabela-propriedades/propriedades-densidade.d.ts +5 -0
- package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +6 -0
- package/dist/components/ui-tabela-propriedades/propriedades-editores.d.ts +5 -0
- package/dist/components/ui-tabela-propriedades/propriedades-flutuante.d.ts +7 -0
- package/dist/components/ui-tabela-propriedades/propriedades-gerenciador-valores.d.ts +26 -0
- package/dist/components/ui-tabela-propriedades/propriedades-painel-controles.d.ts +15 -0
- package/dist/components/ui-tabela-propriedades/propriedades-render-arvore.d.ts +24 -0
- package/dist/components/ui-tabela-propriedades/propriedades-seletor-tipo.d.ts +13 -0
- package/dist/components/ui-tabela-propriedades/propriedades-splitter.d.ts +13 -0
- package/dist/components/ui-tabela-propriedades/propriedades-template.d.ts +1 -0
- package/dist/components/ui-tabela-propriedades/tipos.d.ts +48 -0
- package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +66 -0
- package/dist/components/ui-texto/index.d.ts +1 -0
- package/dist/components/ui-texto/ui-texto.d.ts +15 -0
- package/dist/components/ui-tooltip/index.d.ts +1 -0
- package/dist/components/ui-tooltip/ui-tooltip.d.ts +25 -0
- package/dist/core/acessibilidade.d.ts +21 -0
- package/dist/core/form-associated-element.d.ts +33 -0
- package/dist/core/form-validacao.d.ts +34 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/leaflet-loader.d.ts +7 -0
- package/dist/core/leaflet-style.d.ts +7 -0
- package/dist/core/listener-bag.d.ts +21 -0
- package/dist/core/ssr-safe.d.ts +20 -0
- package/dist/core/ui-bus.d.ts +85 -0
- package/dist/core/zero-js-triggers.d.ts +1 -0
- package/dist/core.cjs +1 -0
- package/dist/core.js +22 -0
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +22 -0
- package/dist/data.js +63 -0
- package/dist/feedback.cjs +1 -0
- package/dist/feedback.d.ts +26 -0
- package/dist/feedback.js +25 -0
- package/dist/form-validacao-BIOXxt-1.js +140 -0
- package/dist/form-validacao-ytRYSF3E.cjs +1 -0
- package/dist/forms.cjs +1 -0
- package/dist/forms.d.ts +22 -0
- package/dist/forms.js +25 -0
- package/dist/gerencigeo-canvas/canvas_destaque.d.ts +13 -0
- package/dist/gerencigeo-canvas/canvas_destaque_marcadores.d.ts +8 -0
- package/dist/gerencigeo-canvas/canvas_interacao.d.ts +56 -0
- package/dist/gerencigeo-canvas/canvas_selecao_box.d.ts +23 -0
- package/dist/gerencigeo-canvas/controller_dados_ops.d.ts +15 -0
- package/dist/gerencigeo-canvas/index.d.ts +17 -0
- package/dist/gerencigeo-canvas/layer_defaults.d.ts +3 -0
- package/dist/gerencigeo-canvas/layer_instance_ops.d.ts +6 -0
- package/dist/gerencigeo-canvas/layer_manager.d.ts +37 -0
- package/dist/gerencigeo-canvas/layer_pane_ops.d.ts +8 -0
- package/dist/gerencigeo-canvas/layer_renderer_factory.d.ts +14 -0
- package/dist/gerencigeo-canvas/layer_state_ops.d.ts +6 -0
- package/dist/gerencigeo-canvas/mapa_config.d.ts +11 -0
- package/dist/gerencigeo-canvas/mapa_controller.d.ts +53 -0
- package/dist/gerencigeo-canvas/mapa_core.d.ts +30 -0
- package/dist/gerencigeo-canvas/mapa_linhas.d.ts +14 -0
- package/dist/gerencigeo-canvas/mapa_marcadores.d.ts +18 -0
- package/dist/gerencigeo-canvas/mapa_pontos_shapes.d.ts +8 -0
- package/dist/gerencigeo-canvas/renderers/grid_renderer.d.ts +9 -0
- package/dist/gerencigeo-canvas/renderers/tile_renderer.d.ts +8 -0
- package/dist/gerencigeo-canvas/renderers/vector_lines_builder.d.ts +4 -0
- package/dist/gerencigeo-canvas/renderers/vector_lines_renderer.d.ts +9 -0
- package/dist/gerencigeo-canvas/renderers/vector_points_renderer.d.ts +11 -0
- package/dist/gerencigeo-canvas/renderers/vector_polygons_renderer.d.ts +9 -0
- package/dist/gerencigeo-canvas/renderers/wms_renderer.d.ts +8 -0
- package/dist/gerencigeo-canvas/sigef_consultor.d.ts +9 -0
- package/dist/gerencigeo-canvas/tile_preloader.d.ts +2 -0
- package/dist/gerencigeo-canvas/types.d.ts +169 -0
- package/dist/gerencigeo-canvas/utils.d.ts +46 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.js +186 -0
- package/dist/leaflet-Cw6tqYFh.cjs +1 -0
- package/dist/leaflet-DkaFZYc5.js +69 -0
- package/dist/leaflet-loader-94z5VsdY.cjs +2 -0
- package/dist/leaflet-loader-Cjcdgj5R.js +21 -0
- package/dist/listener-bag-D5omxZ9h.cjs +1 -0
- package/dist/listener-bag-DQgv7OON.js +34 -0
- package/dist/mapa.cjs +19 -0
- package/dist/mapa.d.ts +11 -0
- package/dist/mapa.js +264 -0
- package/dist/modal.cjs +1 -0
- package/dist/modal.d.ts +8 -0
- package/dist/modal.js +8 -0
- package/dist/register.cjs +1 -0
- package/dist/register.d.ts +7 -0
- package/dist/register.js +21 -0
- package/dist/seletor-mapa-base.cjs +53 -0
- package/dist/seletor-mapa-base.d.ts +8 -0
- package/dist/seletor-mapa-base.js +275 -0
- package/dist/ssr-safe-5cWfJP-s.js +10 -0
- package/dist/ssr-safe-CiHD1adl.cjs +1 -0
- package/dist/tabela.cjs +1 -0
- package/dist/tabela.d.ts +12 -0
- package/dist/tabela.js +56 -0
- package/dist/tools.cjs +1 -0
- package/dist/tools.d.ts +8 -0
- package/dist/tools.js +30 -0
- package/dist/ui-badge-92yelKls.js +183 -0
- package/dist/ui-badge-B95jSECC.cjs +28 -0
- package/dist/ui-botao-BShEouvi.js +124 -0
- package/dist/ui-botao-DF1yuUUD.cjs +12 -0
- package/dist/ui-campo-texto-BCh5HyCM.cjs +16 -0
- package/dist/ui-campo-texto-B_JF6POq.js +361 -0
- package/dist/ui-card-BJ8SmvVf.js +111 -0
- package/dist/ui-card-Bhm6k91e.cjs +20 -0
- package/dist/ui-kit.css +1 -0
- package/dist/ui-modal-Bi4isGYh.cjs +18 -0
- package/dist/ui-modal-DV-pw2x1.js +194 -0
- package/dist/ui-paleta-ferramentas-B6dJ0O6K.cjs +18 -0
- package/dist/ui-paleta-ferramentas-Bpp4XBVg.js +633 -0
- package/dist/ui-segmented-C8wuycjJ.js +411 -0
- package/dist/ui-segmented-NC5cBXLh.cjs +19 -0
- package/dist/ui-skeleton-B3xQyn0Z.js +396 -0
- package/dist/ui-skeleton-D42oQufF.cjs +33 -0
- package/dist/ui-switch-C6o4yZUF.cjs +53 -0
- package/dist/ui-switch-CO9MoS8x.js +826 -0
- package/dist/ui-tabela-propriedades-7yJ9g7ti.cjs +145 -0
- package/dist/ui-tabela-propriedades-D-XKNVwK.js +2078 -0
- package/dist/ui-toast-CQBqvUm3.cjs +20 -0
- package/dist/ui-toast-CwUmiqyG.js +156 -0
- package/dist/zero-js-triggers-DdESy0tk.js +205 -0
- package/dist/zero-js-triggers-QGD7FOTv.cjs +1 -0
- package/package.json +149 -0
package/dist/card.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const e=require("./ui-card-Bhm6k91e.cjs");exports.UICard=e.UICard;
|
package/dist/card.d.ts
ADDED
package/dist/card.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ListenerBag } from '../../core/listener-bag';
|
|
2
|
+
import { SafeHTMLElement } from '../../core/ssr-safe';
|
|
3
|
+
export declare const ICONES_ALERTA: Record<string, string>;
|
|
4
|
+
export declare class UIAlerta extends SafeHTMLElement {
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
protected alertaElement: HTMLDivElement;
|
|
7
|
+
protected iconeElement: HTMLSpanElement;
|
|
8
|
+
protected tituloElement: HTMLHeadingElement;
|
|
9
|
+
protected mensagemElement: HTMLParagraphElement;
|
|
10
|
+
protected mensagemTextoElement: HTMLSpanElement;
|
|
11
|
+
protected closeElement: HTMLButtonElement;
|
|
12
|
+
protected acoesElement: HTMLDivElement;
|
|
13
|
+
protected botaoAcaoElement: HTMLButtonElement;
|
|
14
|
+
protected progressoContainer: HTMLDivElement;
|
|
15
|
+
protected progressoBarra: HTMLDivElement;
|
|
16
|
+
protected listeners: ListenerBag;
|
|
17
|
+
constructor();
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
attributeChangedCallback(_name: string, _old: string | null, _value: string | null): void;
|
|
21
|
+
fechar(): void;
|
|
22
|
+
protected syncState(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { UIAlerta } from './ui-alerta-base';
|
|
2
|
+
export interface UIToastAcao {
|
|
3
|
+
rotulo: string;
|
|
4
|
+
onClick: (e: MouseEvent) => void;
|
|
5
|
+
tipo?: 'primario' | 'secundario' | 'destrutivo';
|
|
6
|
+
}
|
|
7
|
+
export interface UIToastOpcoes {
|
|
8
|
+
tipo?: 'sucesso' | 'erro' | 'alerta' | 'info';
|
|
9
|
+
titulo?: string;
|
|
10
|
+
mensagem: string;
|
|
11
|
+
duracao?: number;
|
|
12
|
+
posicao?: 'bottom-right' | 'top-right' | 'bottom-left' | 'top-left' | 'bottom-center' | 'top-center';
|
|
13
|
+
acao?: UIToastAcao;
|
|
14
|
+
fechavel?: boolean;
|
|
15
|
+
pausarNoHover?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare class UIToast extends UIAlerta {
|
|
18
|
+
private timerId;
|
|
19
|
+
private tempoRestante;
|
|
20
|
+
private inicioTimestamp;
|
|
21
|
+
private isPausado;
|
|
22
|
+
private acaoConfig?;
|
|
23
|
+
private containerRef;
|
|
24
|
+
configurarAcao(acao: UIToastAcao): void;
|
|
25
|
+
connectedCallback(): void;
|
|
26
|
+
fechar(): void;
|
|
27
|
+
disconnectedCallback(): void;
|
|
28
|
+
private handleAcaoClick;
|
|
29
|
+
private iniciarTimer;
|
|
30
|
+
private pausarTimer;
|
|
31
|
+
private retomarTimer;
|
|
32
|
+
private static obterContainer;
|
|
33
|
+
static notificar(opcoes: UIToastOpcoes): any;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui-avatar';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SafeHTMLElement } from '../../core/ssr-safe';
|
|
2
|
+
export declare class UIAvatar extends SafeHTMLElement {
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
private avatarElement;
|
|
5
|
+
private statusElement;
|
|
6
|
+
constructor();
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
attributeChangedCallback(_name: string, _old: string | null, _value: string | null): void;
|
|
9
|
+
private extrairIniciais;
|
|
10
|
+
private syncState;
|
|
11
|
+
private renderFallback;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui-badge';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SafeHTMLElement } from '../../core/ssr-safe';
|
|
2
|
+
export declare class UIBadge extends SafeHTMLElement {
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
private badgeElement;
|
|
5
|
+
private labelElement;
|
|
6
|
+
private closeElement;
|
|
7
|
+
private listeners;
|
|
8
|
+
constructor();
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
attributeChangedCallback(_name: string, _old: string | null, _value: string | null): void;
|
|
12
|
+
get removivel(): boolean;
|
|
13
|
+
set removivel(val: boolean);
|
|
14
|
+
private syncState;
|
|
15
|
+
private handleRemove;
|
|
16
|
+
}
|
|
17
|
+
export declare class UIChip extends UIBadge {
|
|
18
|
+
}
|
|
19
|
+
export declare class UITag extends UIBadge {
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FerramentaItem } from './tipos';
|
|
2
|
+
export type VarianteBotaoFerramenta = 'grande' | 'pequeno' | 'paleta';
|
|
3
|
+
export declare function criarIcone(icone: string | undefined, tamanho: number): HTMLElement | null;
|
|
4
|
+
export declare function textoTooltip(item: FerramentaItem): string;
|
|
5
|
+
export declare function aplicarEstadoBotao(btn: HTMLButtonElement, item: FerramentaItem): void;
|
|
6
|
+
export declare function criarBotaoFerramenta(item: FerramentaItem, variante: VarianteBotaoFerramenta, tamanhoIcone: number): HTMLButtonElement;
|
|
7
|
+
export declare function acharItem(itens: FerramentaItem[], id: string): FerramentaItem | undefined;
|
|
8
|
+
export declare function definirRoving(botoes: HTMLButtonElement[]): void;
|
|
9
|
+
/** Move o foco entre botões com as setas informadas. Retorna true se tratou a tecla. */
|
|
10
|
+
export declare function navegarRoving(e: KeyboardEvent, botoes: HTMLButtonElement[], teclasAnterior: string[], teclasProximo: string[]): boolean;
|
|
11
|
+
export interface OpcoesMenu {
|
|
12
|
+
lado?: 'baixo' | 'direita';
|
|
13
|
+
/** Foca o primeiro item ao abrir (abertura por teclado). */
|
|
14
|
+
focar?: boolean;
|
|
15
|
+
onFechar?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface MenuHandle {
|
|
18
|
+
elemento: HTMLElement;
|
|
19
|
+
ancora: HTMLElement;
|
|
20
|
+
fechar(): void;
|
|
21
|
+
}
|
|
22
|
+
export declare function abrirMenu(raiz: ShadowRoot, ancora: HTMLElement, itens: FerramentaItem[], onEscolher: (item: FerramentaItem) => void, opcoes?: OpcoesMenu): MenuHandle;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const ICONES_FERRAMENTAS: {
|
|
2
|
+
readonly selecionar: string;
|
|
3
|
+
readonly mover: string;
|
|
4
|
+
readonly mao: string;
|
|
5
|
+
readonly zoom: string;
|
|
6
|
+
readonly linha: string;
|
|
7
|
+
readonly polilinha: string;
|
|
8
|
+
readonly retangulo: string;
|
|
9
|
+
readonly circulo: string;
|
|
10
|
+
readonly arco: string;
|
|
11
|
+
readonly ponto: string;
|
|
12
|
+
readonly texto: string;
|
|
13
|
+
readonly caneta: string;
|
|
14
|
+
readonly medir: string;
|
|
15
|
+
readonly camadas: string;
|
|
16
|
+
readonly grade: string;
|
|
17
|
+
readonly desfazer: string;
|
|
18
|
+
readonly refazer: string;
|
|
19
|
+
readonly colar: string;
|
|
20
|
+
readonly copiar: string;
|
|
21
|
+
readonly negrito: string;
|
|
22
|
+
readonly italico: string;
|
|
23
|
+
};
|
|
24
|
+
export type NomeIconeFerramenta = keyof typeof ICONES_FERRAMENTAS;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipos compartilhados pelos componentes de barra de ferramentas:
|
|
3
|
+
* - <ui-ribbon> → abas + grupos (estilo AutoCAD / Word / Excel)
|
|
4
|
+
* - <ui-paleta-ferramentas> → paleta com flyouts (estilo Illustrator / Photoshop)
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* - `botao` ação pontual (Desfazer, Colar…). Padrão no ribbon.
|
|
8
|
+
* - `toggle` liga/desliga de forma independente (Negrito, Grade…).
|
|
9
|
+
* - `ferramenta` seleção exclusiva: só uma ativa por vez (Mover, Linha…). Padrão na paleta.
|
|
10
|
+
* - `menu` abre um menu com `filhos` (ribbon).
|
|
11
|
+
* - `separador` divisor visual.
|
|
12
|
+
*/
|
|
13
|
+
export type TipoFerramenta = 'botao' | 'toggle' | 'ferramenta' | 'menu' | 'separador';
|
|
14
|
+
export interface FerramentaItem {
|
|
15
|
+
id: string;
|
|
16
|
+
rotulo?: string;
|
|
17
|
+
/** Nome de um ícone do <ui-icone> ou um trecho `<svg>…</svg>` confiável. */
|
|
18
|
+
icone?: string;
|
|
19
|
+
/** Tecla de atalho exibida no tooltip/menu. Na paleta, com o atributo `atalhos`, também é ativa. */
|
|
20
|
+
atalho?: string;
|
|
21
|
+
tipo?: TipoFerramenta;
|
|
22
|
+
ativo?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Apenas ribbon: botão grande (ícone sobre o rótulo) ou pequeno (em colunas de 3). Padrão: 'pequeno'. */
|
|
25
|
+
tamanho?: 'grande' | 'pequeno';
|
|
26
|
+
/** Apenas ribbon: oculta o rótulo em botões pequenos. */
|
|
27
|
+
somenteIcone?: boolean;
|
|
28
|
+
/** Ribbon: itens do menu suspenso. Paleta: ferramentas agrupadas (flyout). */
|
|
29
|
+
filhos?: FerramentaItem[];
|
|
30
|
+
}
|
|
31
|
+
export interface RibbonGrupo {
|
|
32
|
+
id: string;
|
|
33
|
+
rotulo: string;
|
|
34
|
+
itens: FerramentaItem[];
|
|
35
|
+
}
|
|
36
|
+
export interface RibbonAba {
|
|
37
|
+
id: string;
|
|
38
|
+
rotulo: string;
|
|
39
|
+
grupos: RibbonGrupo[];
|
|
40
|
+
/** Aba contextual (destacada, ex.: "Edição de Polilinha"). */
|
|
41
|
+
contextual?: boolean;
|
|
42
|
+
/** Aba oculta até ser habilitada via `definirAbaVisivel`. */
|
|
43
|
+
oculta?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface FerramentaDetail {
|
|
46
|
+
id: string;
|
|
47
|
+
item: FerramentaItem;
|
|
48
|
+
/** Item pai quando o disparo veio de um menu/flyout. */
|
|
49
|
+
pai?: FerramentaItem;
|
|
50
|
+
/** Estado atual para itens `toggle` / `ferramenta`. */
|
|
51
|
+
ativo?: boolean;
|
|
52
|
+
origem: 'ribbon' | 'paleta';
|
|
53
|
+
/** Apenas ribbon: id da aba ativa no momento do disparo. */
|
|
54
|
+
aba?: string;
|
|
55
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FerramentaItem } from './tipos';
|
|
2
|
+
import { SafeHTMLElement } from '../../core/ssr-safe';
|
|
3
|
+
/**
|
|
4
|
+
* <ui-paleta-ferramentas> — paleta de ferramentas (estilo Illustrator / Photoshop).
|
|
5
|
+
*
|
|
6
|
+
* - Itens com `filhos` viram um grupo: mostra a última ferramenta usada e abre um flyout
|
|
7
|
+
* com clique longo, botão direito ou seta (→ na vertical, ↓ na horizontal).
|
|
8
|
+
* - Ferramentas (`tipo` padrão) são exclusivas; `toggle` liga/desliga; `botao` só dispara ação.
|
|
9
|
+
* - Com o atributo `atalhos`, a tecla `atalho` do item ativa a ferramenta; teclas repetidas
|
|
10
|
+
* entre itens percorrem o grupo (como Shift+letra no Photoshop).
|
|
11
|
+
*
|
|
12
|
+
* Atributos: valor, orientacao (vertical|horizontal), colunas (1|2), tamanho (sm|md|lg), atalhos
|
|
13
|
+
* Propriedades: ferramentas, valor
|
|
14
|
+
* Métodos: ativar(id), atualizarItem(id, parcial)
|
|
15
|
+
* Eventos: ui-change / ui-selecionar { valor, item, anterior }, ui-ferramenta { id, item, pai?, ativo?, origem }
|
|
16
|
+
*/
|
|
17
|
+
export declare class UIPaletaFerramentas extends SafeHTMLElement {
|
|
18
|
+
static get observedAttributes(): string[];
|
|
19
|
+
private rootElement;
|
|
20
|
+
private _ferramentas;
|
|
21
|
+
private _ativo;
|
|
22
|
+
private visiveis;
|
|
23
|
+
private menu;
|
|
24
|
+
private timerPressao;
|
|
25
|
+
private suprimirClique;
|
|
26
|
+
private listeners;
|
|
27
|
+
constructor();
|
|
28
|
+
connectedCallback(): void;
|
|
29
|
+
disconnectedCallback(): void;
|
|
30
|
+
attributeChangedCallback(name: string, old: string | null, value: string | null): void;
|
|
31
|
+
get ferramentas(): FerramentaItem[];
|
|
32
|
+
set ferramentas(val: FerramentaItem[]);
|
|
33
|
+
get valor(): string;
|
|
34
|
+
set valor(id: string);
|
|
35
|
+
get value(): string;
|
|
36
|
+
set value(id: string);
|
|
37
|
+
/** Ativa uma ferramenta (exclusiva). Se estiver dentro de um grupo, ela passa a ser a exibida. */
|
|
38
|
+
ativar(id: string, emitir?: boolean): void;
|
|
39
|
+
atualizarItem(id: string, parcial: Partial<FerramentaItem>): void;
|
|
40
|
+
private definirAtivoInterno;
|
|
41
|
+
private itemExibido;
|
|
42
|
+
private todasFerramentas;
|
|
43
|
+
private renderizar;
|
|
44
|
+
private botoes;
|
|
45
|
+
private acionar;
|
|
46
|
+
private handleClick;
|
|
47
|
+
private handlePointerDown;
|
|
48
|
+
private cancelarPressao;
|
|
49
|
+
private handleContextMenu;
|
|
50
|
+
private handleKeyDown;
|
|
51
|
+
private handleAtalho;
|
|
52
|
+
private abrirFlyout;
|
|
53
|
+
private fecharMenu;
|
|
54
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FerramentaItem, RibbonAba } from './tipos';
|
|
2
|
+
import { SafeHTMLElement } from '../../core/ssr-safe';
|
|
3
|
+
/**
|
|
4
|
+
* <ui-ribbon> — barra de ferramentas em abas com grupos (estilo AutoCAD / Word / Excel).
|
|
5
|
+
*
|
|
6
|
+
* Atributos: aba-ativa, recolhido, compacto
|
|
7
|
+
* Propriedades: abas, abaAtiva, recolhido
|
|
8
|
+
* Métodos: atualizarItem(id, parcial), definirAbaVisivel(id, visivel), selecionarAba(id)
|
|
9
|
+
* Eventos: ui-ferramenta { id, item, pai?, ativo?, origem, aba }, ui-aba-change { id, aba }
|
|
10
|
+
*/
|
|
11
|
+
export declare class UIRibbon extends SafeHTMLElement {
|
|
12
|
+
static get observedAttributes(): string[];
|
|
13
|
+
private rootElement;
|
|
14
|
+
private abasElement;
|
|
15
|
+
private gruposElement;
|
|
16
|
+
private _abas;
|
|
17
|
+
private _abaAtiva;
|
|
18
|
+
private menu;
|
|
19
|
+
private listeners;
|
|
20
|
+
constructor();
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
disconnectedCallback(): void;
|
|
23
|
+
attributeChangedCallback(name: string, old: string | null, value: string | null): void;
|
|
24
|
+
get abas(): RibbonAba[];
|
|
25
|
+
set abas(val: RibbonAba[]);
|
|
26
|
+
get abaAtiva(): string;
|
|
27
|
+
set abaAtiva(id: string);
|
|
28
|
+
get recolhido(): boolean;
|
|
29
|
+
set recolhido(val: boolean);
|
|
30
|
+
selecionarAba(id: string, emitir?: boolean): void;
|
|
31
|
+
definirAbaVisivel(id: string, visivel: boolean): void;
|
|
32
|
+
/** Atualiza um item (estado ou aparência) sem precisar recriar as abas. */
|
|
33
|
+
atualizarItem(id: string, parcial: Partial<FerramentaItem>): void;
|
|
34
|
+
private abasVisiveis;
|
|
35
|
+
private renderizar;
|
|
36
|
+
private renderizarAbas;
|
|
37
|
+
private renderizarPainel;
|
|
38
|
+
private criarGrupo;
|
|
39
|
+
private criarBotao;
|
|
40
|
+
private botoesPainel;
|
|
41
|
+
private handleClickAbas;
|
|
42
|
+
private handleDblClickAbas;
|
|
43
|
+
private handleKeyDownAbas;
|
|
44
|
+
private handleClickGrupos;
|
|
45
|
+
private handleKeyDownGrupos;
|
|
46
|
+
private handleEscape;
|
|
47
|
+
private handlePointerDownFora;
|
|
48
|
+
private acionar;
|
|
49
|
+
private alternarMenu;
|
|
50
|
+
private fecharMenu;
|
|
51
|
+
private emitir;
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui-botao';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SafeHTMLElement } from '../../core/ssr-safe';
|
|
2
|
+
export type VarianteBotao = 'primary' | 'primario' | 'secondary' | 'secundario' | 'ghost' | 'terciario' | 'destructive' | 'destrutivo' | 'erro' | 'icon-only' | 'icone' | 'destaque' | 'outline' | 'borda';
|
|
3
|
+
export declare class UIBotao extends SafeHTMLElement {
|
|
4
|
+
static get observedAttributes(): string[];
|
|
5
|
+
private button;
|
|
6
|
+
private spinnerContainer;
|
|
7
|
+
private slotElement;
|
|
8
|
+
private opticalState;
|
|
9
|
+
private listeners;
|
|
10
|
+
constructor();
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
attributeChangedCallback(_name: string, _old: string | null, _value: string | null): void;
|
|
14
|
+
get carregando(): boolean;
|
|
15
|
+
set carregando(val: boolean);
|
|
16
|
+
private handleSlotChange;
|
|
17
|
+
/**
|
|
18
|
+
* Remove espaços e quebras de linha fantasmas no slot e identifica
|
|
19
|
+
* se há ícone no início ou fim para aplicar compensação óptica de padding.
|
|
20
|
+
*/
|
|
21
|
+
private sanitizeAndBalanceContent;
|
|
22
|
+
private syncState;
|
|
23
|
+
private handleClick;
|
|
24
|
+
}
|
|
25
|
+
export declare class UIBotaoPrimario extends UIBotao {
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CamadaItem, FeicaoItem } from './tipos';
|
|
2
|
+
import { escapeHtml } from './camadas-utils';
|
|
3
|
+
export interface ParametrosRenderArvore {
|
|
4
|
+
camadas: CamadaItem[];
|
|
5
|
+
feicoes: FeicaoItem[];
|
|
6
|
+
camadaAtivaId: string | null;
|
|
7
|
+
expandedLayers: Set<string>;
|
|
8
|
+
selectedFeatureIds: Set<string>;
|
|
9
|
+
activeSettingsLayerId: string | null;
|
|
10
|
+
editingLayerId: string | null;
|
|
11
|
+
editingFeatureId: string | null;
|
|
12
|
+
searchQuery: string;
|
|
13
|
+
limiteFeicoesPorCamada?: number;
|
|
14
|
+
mostrarBotaoColapsar?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export { escapeHtml };
|
|
17
|
+
export declare function renderizarThumbGeometria(tipo: string | undefined, cor: string): string;
|
|
18
|
+
export declare function renderizarArvoreCamadas(params: ParametrosRenderArvore): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CamadaItem, FeicaoItem } from './tipos';
|
|
2
|
+
export interface UICamadasHost {
|
|
3
|
+
camadas: CamadaItem[];
|
|
4
|
+
feicoes: FeicaoItem[];
|
|
5
|
+
editingLayerId: string | null;
|
|
6
|
+
editingFeatureId: string | null;
|
|
7
|
+
solicitarRenderizacao(): void;
|
|
8
|
+
dispararEvento(nome: string, detalhe: unknown): void;
|
|
9
|
+
salvarLembrancaEstado?(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class CamadasDragDropManager {
|
|
12
|
+
private host;
|
|
13
|
+
private shadow;
|
|
14
|
+
constructor(host: UICamadasHost, shadow: ShadowRoot);
|
|
15
|
+
bindAll(): void;
|
|
16
|
+
bindInlineRename(): void;
|
|
17
|
+
bindDragAndDrop(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UICamadasHost } from './camadas-drag-drop';
|
|
2
|
+
export interface CamadasHostCompleto extends UICamadasHost {
|
|
3
|
+
expandedLayers: Set<string>;
|
|
4
|
+
selectedFeatureIds: Set<string>;
|
|
5
|
+
lastClickedFeatureId: string | null;
|
|
6
|
+
activeSettingsLayerId: string | null;
|
|
7
|
+
searchQuery: string;
|
|
8
|
+
salvarLembrancaEstado(): void;
|
|
9
|
+
agendarSalvarLembranca(): void;
|
|
10
|
+
colapsar(emitirEvento?: boolean): void;
|
|
11
|
+
readonly camadaAtivaId: string | null;
|
|
12
|
+
readonly mapaBaseAtivo: string;
|
|
13
|
+
definirCamadaAtiva(camadaId: string, emitirEvento?: boolean): void;
|
|
14
|
+
selecionarMapaBase(id: string, emitirEvento?: boolean): void;
|
|
15
|
+
selecionarFeicao(feicaoId: string, acumular?: boolean, intervalo?: boolean, emitirEvento?: boolean): void;
|
|
16
|
+
limparSelecao(emitirEvento?: boolean): void;
|
|
17
|
+
notificarMudancaSelecao(): void;
|
|
18
|
+
alternarVisibilidadeTodas(emitirEvento?: boolean): void;
|
|
19
|
+
expandirTodas(): void;
|
|
20
|
+
colapsarTodas(): void;
|
|
21
|
+
removerCamada(camadaId: string): void;
|
|
22
|
+
sincronizarSelecaoDOM(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const ICONES: {
|
|
2
|
+
camadas: string;
|
|
3
|
+
inspecao: string;
|
|
4
|
+
equipe: string;
|
|
5
|
+
olhoAberto: string;
|
|
6
|
+
olhoFechado: string;
|
|
7
|
+
cadeadoTrancado: string;
|
|
8
|
+
cadeadoAberto: string;
|
|
9
|
+
chevronDir: string;
|
|
10
|
+
dragHandle: string;
|
|
11
|
+
alvoEnquadrar: string;
|
|
12
|
+
engrenagem: string;
|
|
13
|
+
mais: string;
|
|
14
|
+
lixeira: string;
|
|
15
|
+
fechar: string;
|
|
16
|
+
busca: string;
|
|
17
|
+
recolherPainel: string;
|
|
18
|
+
expandirPainel: string;
|
|
19
|
+
reguaMetrica: string;
|
|
20
|
+
moverPasta: string;
|
|
21
|
+
mapa: string;
|
|
22
|
+
gradeCad: string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FeicaoItem } from './tipos';
|
|
2
|
+
/**
|
|
3
|
+
* Calcula a distância em metros entre duas coordenadas [lat, lon] ou [lon, lat]
|
|
4
|
+
*/
|
|
5
|
+
export declare function calcularDistanciaPontos(p1: [number, number], p2: [number, number]): number;
|
|
6
|
+
/**
|
|
7
|
+
* Calcula o comprimento total de uma linha de coordenadas em metros
|
|
8
|
+
*/
|
|
9
|
+
export declare function calcularComprimentoLinha(coords: unknown): number;
|
|
10
|
+
/**
|
|
11
|
+
* Calcula a área de um anel poligonal em m² usando fórmula esférica
|
|
12
|
+
*/
|
|
13
|
+
export declare function calcularAreaPoligono(coords: unknown): number;
|
|
14
|
+
/**
|
|
15
|
+
* Formata métrica resumida para lista de feições selecionadas
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatarMetricaFeicoes(feicoes: FeicaoItem[]): string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { CamadaItem } from './tipos';
|
|
2
|
+
export interface CamadaPropsPersistidas {
|
|
3
|
+
name?: string;
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
locked?: boolean;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CamadaOverridePersistido extends CamadaPropsPersistidas {
|
|
10
|
+
/**
|
|
11
|
+
* Valores fornecidos pela aplicação (via definirCamadas/adicionarCamada) quando o override foi salvo.
|
|
12
|
+
* Se a aplicação passar um valor diferente depois, ela vence a customização do usuário.
|
|
13
|
+
*/
|
|
14
|
+
origem?: CamadaPropsPersistidas;
|
|
15
|
+
}
|
|
16
|
+
export interface EstadoPersistidoCamadas {
|
|
17
|
+
versao: number;
|
|
18
|
+
expandedLayerIds: string[];
|
|
19
|
+
collapsedLayerIds: string[];
|
|
20
|
+
camadaAtivaId?: string | null;
|
|
21
|
+
painelColapsado?: boolean;
|
|
22
|
+
ordemCamadasIds?: string[];
|
|
23
|
+
mapaBaseAtivo?: string;
|
|
24
|
+
densidade?: 'compacto' | 'normal';
|
|
25
|
+
altura?: number | null;
|
|
26
|
+
camadasOverrides?: Record<string, CamadaOverridePersistido>;
|
|
27
|
+
ultimaAtualizacao?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Retorna a chave do localStorage para uma determinada instância
|
|
31
|
+
*/
|
|
32
|
+
export declare function gerarChaveStorage(chaveProp?: string | null, elementId?: string | null): string;
|
|
33
|
+
/**
|
|
34
|
+
* Lê o estado persistido do localStorage com tolerância a falhas (SSR, restrições de sandbox)
|
|
35
|
+
*/
|
|
36
|
+
export declare function carregarEstadoPersistido(storageKey: string): EstadoPersistidoCamadas | null;
|
|
37
|
+
/**
|
|
38
|
+
* Salva o estado atualizado no localStorage de forma segura
|
|
39
|
+
*/
|
|
40
|
+
export declare function salvarEstadoPersistido(storageKey: string, estado: EstadoPersistidoCamadas): void;
|
|
41
|
+
/**
|
|
42
|
+
* Remove o estado persistido no localStorage
|
|
43
|
+
*/
|
|
44
|
+
export declare function limparEstadoPersistido(storageKey: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Mescla o estado das camadas carregadas com os overrides persistidos pelo usuário
|
|
47
|
+
*/
|
|
48
|
+
export declare function snapshotCamada(camada: CamadaItem): CamadaPropsPersistidas;
|
|
49
|
+
export declare function reidratarCamadasComOverrides(camadas: CamadaItem[], estadoPersistido: EstadoPersistidoCamadas | null, expandedLayersSet: Set<string>, origensCamadas?: Map<string, CamadaPropsPersistidas>): void;
|
|
50
|
+
export interface EntradaMontagemEstado {
|
|
51
|
+
estadoAnterior: EstadoPersistidoCamadas | null;
|
|
52
|
+
origensCamadas?: Map<string, CamadaPropsPersistidas>;
|
|
53
|
+
camadas: CamadaItem[];
|
|
54
|
+
expandedLayers: Set<string>;
|
|
55
|
+
camadaAtivaId: string | null;
|
|
56
|
+
painelColapsado: boolean;
|
|
57
|
+
mapaBaseAtivo: string;
|
|
58
|
+
densidade: 'compacto' | 'normal';
|
|
59
|
+
altura: number | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Monta o estado a persistir. Se ainda não há camadas na instância,
|
|
63
|
+
* preserva listas e overrides do estado anterior.
|
|
64
|
+
*/
|
|
65
|
+
export declare function montarEstadoPersistido(entrada: EntradaMontagemEstado): EstadoPersistidoCamadas;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ListenerBag } from '../../core/listener-bag';
|
|
2
|
+
export interface ContextoResizerCamadas {
|
|
3
|
+
hostElement: HTMLElement;
|
|
4
|
+
resizerElement: HTMLElement | null;
|
|
5
|
+
listeners: ListenerBag;
|
|
6
|
+
getMinAltura?: () => number;
|
|
7
|
+
getMaxAltura?: () => number;
|
|
8
|
+
onAlturaAlterada?: (alturaPx: number | null) => void;
|
|
9
|
+
onRedimensionando?: (alturaPx: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface ControladorResizerCamadas {
|
|
12
|
+
init: () => void;
|
|
13
|
+
definirAltura: (alturaPx: number | string | null, dispararEvento?: boolean) => void;
|
|
14
|
+
destruir: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function criarControladorRedimensionamentoAltura(ctx: ContextoResizerCamadas): ControladorResizerCamadas;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CamadaItem, FeicaoItem } from './tipos';
|
|
2
|
+
export interface ResultadoSelecao {
|
|
3
|
+
selecionados: Set<string>;
|
|
4
|
+
ultimoClicadoId: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const LIMITE_FEICOES_POR_CAMADA = 80;
|
|
7
|
+
/**
|
|
8
|
+
* Filtra feições pelo termo de busca (nome, categoria ou tipo). Sem termo, retorna todas.
|
|
9
|
+
*/
|
|
10
|
+
export declare function filtrarFeicoesPorBusca(feicoes: FeicaoItem[], termo: string): FeicaoItem[];
|
|
11
|
+
/**
|
|
12
|
+
* IDs de feições efetivamente exibidas na árvore, na ordem da tela:
|
|
13
|
+
* respeita camadas expandidas (todas, durante uma busca), o filtro de busca e o limite de linhas.
|
|
14
|
+
*/
|
|
15
|
+
export declare function obterIdsVisiveisFeicoes(camadas: CamadaItem[], feicoes: FeicaoItem[], camadasExpandidas: Set<string>, termoBusca?: string, limitePorCamada?: number): string[];
|
|
16
|
+
/**
|
|
17
|
+
* Calcula a nova seleção após clique (simples, Ctrl/Cmd acumulado ou Shift em intervalo).
|
|
18
|
+
* Retorna null se a feição clicada não estiver visível.
|
|
19
|
+
*/
|
|
20
|
+
export declare function calcularSelecaoFeicao(idsVisiveis: string[], selecionadosAtuais: Set<string>, ultimoClicadoId: string | null, feicaoId: string, acumular: boolean, intervalo: boolean): ResultadoSelecao | null;
|
|
21
|
+
/**
|
|
22
|
+
* Remove da seleção IDs que não existem mais nas feições
|
|
23
|
+
*/
|
|
24
|
+
export declare function removerSelecoesInvalidas(selecionados: Set<string>, feicoes: FeicaoItem[]): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ListenerBag } from '../../core/listener-bag';
|
|
2
|
+
import { CamadasHostCompleto } from './camadas-host';
|
|
3
|
+
export declare function conectarTecladoEAcessibilidade(host: CamadasHostCompleto, hostElement: HTMLElement, shadow: ShadowRoot, corpo: HTMLElement, listeners: ListenerBag): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Escapa caracteres HTML perigosos para prevenir ataques XSS
|
|
3
|
+
*/
|
|
4
|
+
export declare function escapeHtml(str: string | null | undefined): string;
|
|
5
|
+
/**
|
|
6
|
+
* Sanitiza e valida cor para interpolação segura em inline styles e variáveis CSS
|
|
7
|
+
*/
|
|
8
|
+
export declare function sanitizarCorCss(cor: string | null | undefined, fallback?: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converte uma cor CSS para `#rrggbb`, único formato aceito por <input type="color">.
|
|
11
|
+
* Suporta hex (3/4/6/8 dígitos), rgb()/rgba() e hsl()/hsla(); demais valores retornam o fallback.
|
|
12
|
+
*/
|
|
13
|
+
export declare function corParaHex(cor: string | null | undefined, fallback?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Localiza um elemento pelo valor exato de um atributo, sem montar seletor CSS.
|
|
16
|
+
* IDs arbitrários (aspas, colchetes, barras) quebram `[attr="valor"]`; comparar o valor evita escape.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buscarPorAtributo(raiz: ParentNode, atributo: string, valor: string): HTMLElement | null;
|
|
19
|
+
/**
|
|
20
|
+
* Cria uma função com debounce para limitar disparos de alta frequência (ex: busca rápida)
|
|
21
|
+
*/
|
|
22
|
+
export declare function debounce<T extends (...args: any[]) => void>(fn: T, delayMs?: number): (...args: Parameters<T>) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Atualiza título e aria-label de um controle-ícone de uma só vez
|
|
25
|
+
*/
|
|
26
|
+
export declare function definirRotuloControle(el: Element, texto: string): void;
|