This commit is contained in:
Luiz Silva 2026-06-08 09:19:15 -03:00
parent cb30fdb5f6
commit d00fdecb37
18 changed files with 5680 additions and 4286 deletions

View file

@ -0,0 +1,65 @@
import "./EliFeedbackPainel.css";
import "./EliFeedbackWidget.css";
declare const _default: typeof __VLS_export;
export default _default;
declare const __VLS_export: import("vue").DefineComponent<{}, {
textareaRef: import("vue").Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
expandido: import("vue").Ref<boolean, boolean>;
modo: import("vue").Ref<import("./tiposFeedback").ModoSelecao, import("./tiposFeedback").ModoSelecao>;
elementoSelecionado: import("vue").Ref<{
seletor: string;
id: string | null;
classes: string[];
tag: string;
textoVisivel: string;
dataAtributos: Record<string, string>;
caminhoDom: string;
} | null, import("./tiposFeedback").ElementoCapturado | {
seletor: string;
id: string | null;
classes: string[];
tag: string;
textoVisivel: string;
dataAtributos: Record<string, string>;
caminhoDom: string;
} | null>;
comentario: import("vue").Ref<string, string>;
copiouElemento: import("vue").Ref<boolean, boolean>;
itens: import("vue").Ref<{
id: string;
criadoEm: string;
elemento: {
seletor: string;
id: string | null;
classes: string[];
tag: string;
textoVisivel: string;
dataAtributos: Record<string, string>;
caminhoDom: string;
};
comentario: string;
urlPagina: string;
}[], import("./tiposFeedback").ItemFeedback[] | {
id: string;
criadoEm: string;
elemento: {
seletor: string;
id: string | null;
classes: string[];
tag: string;
textoVisivel: string;
dataAtributos: Record<string, string>;
caminhoDom: string;
};
comentario: string;
urlPagina: string;
}[]>;
totalItens: import("vue").ComputedRef<number>;
aoClicarFab: () => void;
aoIniciarFeedback: () => void;
aoIniciarCopia: () => void;
cancelarSelecao: () => void;
salvarFeedback: () => void;
exportarMarkdown: () => void;
confirmarLimpeza: () => void;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;

View file

@ -0,0 +1,7 @@
import type { ElementoCapturado, ItemFeedback } from "./tiposFeedback";
/** Formata os dados de um elemento capturado como texto para clipboard */
export declare function formatarElementoComoTexto(el: ElementoCapturado, url: string): string;
/** Formata todos os feedbacks como Markdown para exportação */
export declare function formatarComoMarkdown(itens: ItemFeedback[]): string;
/** Captura informações identificadoras de um elemento DOM */
export declare function capturarElemento(el: HTMLElement): ElementoCapturado;

View file

@ -0,0 +1,2 @@
export { default as EliFeedbackWidget } from "./EliFeedbackWidget.vue";
export type { ElementoCapturado, ItemFeedback, ModoSelecao } from "./tiposFeedback";

View file

@ -0,0 +1,34 @@
/** Informações capturadas do elemento DOM selecionado */
export interface ElementoCapturado {
/** Seletor CSS que identifica o elemento */
seletor: string;
/** ID do elemento (se houver) */
id: string | null;
/** Lista de classes do elemento */
classes: string[];
/** Tag HTML do elemento */
tag: string;
/** Texto visível truncado */
textoVisivel: string;
/** Atributos data-* relevantes */
dataAtributos: Record<string, string>;
/** Caminho hierárquico simplificado no DOM */
caminhoDom: string;
}
/** Um item de feedback salvo */
export interface ItemFeedback {
/** Identificador único do feedback */
id: string;
/** Timestamp ISO da criação */
criadoEm: string;
/** Elemento capturado */
elemento: ElementoCapturado;
/** Comentário livre do usuário */
comentario: string;
/** URL da página onde o feedback foi criado */
urlPagina: string;
}
/** Estado do modo de seleção */
export type ModoSelecao = "inativo" | "selecionando" | "selecionando-copiar" | "comentando";
/** Chave usada no localStorage */
export declare const CHAVE_STORAGE = "eli-feedback-items";

View file

@ -0,0 +1,61 @@
import { type ElementoCapturado, type ItemFeedback, type ModoSelecao } from "./tiposFeedback";
export declare function useFeedback(): {
modo: import("vue").Ref<ModoSelecao, ModoSelecao>;
elementoSelecionado: import("vue").Ref<{
seletor: string;
id: string | null;
classes: string[];
tag: string;
textoVisivel: string;
dataAtributos: Record<string, string>;
caminhoDom: string;
} | null, ElementoCapturado | {
seletor: string;
id: string | null;
classes: string[];
tag: string;
textoVisivel: string;
dataAtributos: Record<string, string>;
caminhoDom: string;
} | null>;
comentario: import("vue").Ref<string, string>;
painelAberto: import("vue").Ref<boolean, boolean>;
copiouElemento: import("vue").Ref<boolean, boolean>;
itens: import("vue").Ref<{
id: string;
criadoEm: string;
elemento: {
seletor: string;
id: string | null;
classes: string[];
tag: string;
textoVisivel: string;
dataAtributos: Record<string, string>;
caminhoDom: string;
};
comentario: string;
urlPagina: string;
}[], ItemFeedback[] | {
id: string;
criadoEm: string;
elemento: {
seletor: string;
id: string | null;
classes: string[];
tag: string;
textoVisivel: string;
dataAtributos: Record<string, string>;
caminhoDom: string;
};
comentario: string;
urlPagina: string;
}[]>;
totalItens: import("vue").ComputedRef<number>;
iniciarSelecao: () => void;
iniciarSelecaoParaCopiar: () => void;
cancelarSelecao: () => void;
salvarFeedback: () => void;
exportarMarkdown: () => void;
limparTodos: () => void;
removerItem: (id: string) => void;
};