@aurea-uds/react 0.1.0 → 0.2.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/actions.d.ts +13 -0
- package/dist/actions.js +5 -0
- package/dist/agents.d.ts +209 -0
- package/dist/agents.js +302 -0
- package/dist/calendar.d.ts +6 -0
- package/dist/calendar.js +27 -0
- package/dist/chart.d.ts +10 -0
- package/dist/chart.js +53 -0
- package/dist/code-editor.js +1 -0
- package/dist/code.js +18 -2
- package/dist/communication.js +1 -0
- package/dist/data-display.js +1 -0
- package/dist/data-grid.d.ts +52 -3
- package/dist/data-grid.js +205 -25
- package/dist/feedback.d.ts +14 -4
- package/dist/feedback.js +37 -7
- package/dist/file-input.d.ts +21 -2
- package/dist/file-input.js +154 -21
- package/dist/graph.d.ts +33 -0
- package/dist/graph.js +178 -0
- package/dist/identity.d.ts +12 -3
- package/dist/identity.js +24 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.js +15 -1
- package/dist/inputs.d.ts +26 -0
- package/dist/inputs.js +69 -4
- package/dist/internal.d.ts +4 -66
- package/dist/internal.js +25 -14
- package/dist/layout.d.ts +2 -1
- package/dist/layout.js +61 -7
- package/dist/media.js +1 -0
- package/dist/navigation.d.ts +27 -1
- package/dist/navigation.js +32 -7
- package/dist/overlays.d.ts +5 -0
- package/dist/overlays.js +21 -9
- package/dist/pure.d.ts +166 -0
- package/dist/pure.js +87 -0
- package/dist/qrcode.d.ts +2 -1
- package/dist/qrcode.js +3 -2
- package/dist/system.d.ts +2 -1
- package/dist/system.js +13 -4
- package/package.json +176 -144
package/dist/pure.d.ts
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
export declare const cx: (...v: Array<string | false | null | undefined>) => string;
|
|
2
|
+
export type UniversalState = "waiting_user" | "waiting_approval" | "waiting_dependency" | "offline" | "stale" | "partial" | "degraded";
|
|
3
|
+
export declare const universalStates: readonly UniversalState[];
|
|
4
|
+
export declare const stateSeverity: (state: UniversalState) => "info" | "warning";
|
|
5
|
+
export interface AureaStrings {
|
|
6
|
+
close: string;
|
|
7
|
+
paginationLabel: string;
|
|
8
|
+
previous: string;
|
|
9
|
+
next: string;
|
|
10
|
+
breadcrumbLabel: string;
|
|
11
|
+
tabsLabel: string;
|
|
12
|
+
optionsLabel: string;
|
|
13
|
+
tableLabel: string;
|
|
14
|
+
commandLabel: string;
|
|
15
|
+
commandPlaceholder: string;
|
|
16
|
+
dismissNotification: string;
|
|
17
|
+
toolbarLabel: string;
|
|
18
|
+
loading: string;
|
|
19
|
+
otpDigit: string;
|
|
20
|
+
stepperLabel: string;
|
|
21
|
+
increment: string;
|
|
22
|
+
decrement: string;
|
|
23
|
+
comboboxEmpty: string;
|
|
24
|
+
comboboxClear: string;
|
|
25
|
+
comboboxOpen: string;
|
|
26
|
+
comboboxRemove: string;
|
|
27
|
+
comboboxLoading: string;
|
|
28
|
+
fileDropPrompt: string;
|
|
29
|
+
fileAdded: string;
|
|
30
|
+
fileRemoved: string;
|
|
31
|
+
fileRemove: string;
|
|
32
|
+
fileTooLarge: string;
|
|
33
|
+
fileWrongType: string;
|
|
34
|
+
treeLabel: string;
|
|
35
|
+
notificationsLabel: string;
|
|
36
|
+
notificationMarkAll: string;
|
|
37
|
+
notificationEmpty: string;
|
|
38
|
+
notificationUnread: string;
|
|
39
|
+
notificationNew: string;
|
|
40
|
+
dataGridFilter: string;
|
|
41
|
+
dataGridEmpty: string;
|
|
42
|
+
dataGridSelectAll: string;
|
|
43
|
+
dataGridSelectRow: string;
|
|
44
|
+
dataGridSelected: string;
|
|
45
|
+
dataGridClearSelection: string;
|
|
46
|
+
dataGridBulkLabel: string;
|
|
47
|
+
dataGridColumns: string;
|
|
48
|
+
dataGridResize: string;
|
|
49
|
+
dataGridStale: string;
|
|
50
|
+
dataGridPartial: string;
|
|
51
|
+
dataGridError: string;
|
|
52
|
+
dataGridDetails: string;
|
|
53
|
+
dataGridDetailPanel: string;
|
|
54
|
+
dataGridExport: string;
|
|
55
|
+
dataGridExportRows: string;
|
|
56
|
+
dataGridExportFiltered: string;
|
|
57
|
+
dataGridExportSelected: string;
|
|
58
|
+
mediaPlayer: string;
|
|
59
|
+
mediaPlay: string;
|
|
60
|
+
mediaPause: string;
|
|
61
|
+
mediaMute: string;
|
|
62
|
+
mediaUnmute: string;
|
|
63
|
+
mediaSeek: string;
|
|
64
|
+
mediaVolume: string;
|
|
65
|
+
mediaCaptionsShow: string;
|
|
66
|
+
mediaCaptionsHide: string;
|
|
67
|
+
mediaSkipBack: string;
|
|
68
|
+
mediaSkipForward: string;
|
|
69
|
+
mediaFullscreenEnter: string;
|
|
70
|
+
mediaFullscreenExit: string;
|
|
71
|
+
uploadSending: string;
|
|
72
|
+
uploadCancel: string;
|
|
73
|
+
uploadRetry: string;
|
|
74
|
+
uploadError: string;
|
|
75
|
+
uploadCanceled: string;
|
|
76
|
+
uploadComplete: string;
|
|
77
|
+
uploadPause: string;
|
|
78
|
+
uploadResume: string;
|
|
79
|
+
uploadPaused: string;
|
|
80
|
+
uploadPending: string;
|
|
81
|
+
uploadChecksum: string;
|
|
82
|
+
uploadChecksumBad: string;
|
|
83
|
+
fileConflict: string;
|
|
84
|
+
fileReplace: string;
|
|
85
|
+
fileKeepBoth: string;
|
|
86
|
+
fileSkip: string;
|
|
87
|
+
uploadReceipt: string;
|
|
88
|
+
uploadReceiptCopy: string;
|
|
89
|
+
agentInspector: string;
|
|
90
|
+
invocationLabel: string;
|
|
91
|
+
invocationInput: string;
|
|
92
|
+
invocationOutput: string;
|
|
93
|
+
taskQueueLabel: string;
|
|
94
|
+
taskState: Record<"queued" | "running" | "completed" | "failed" | "blocked" | "paused", string>;
|
|
95
|
+
taskPriority: Record<"low" | "medium" | "high", string>;
|
|
96
|
+
approvalLabel: string;
|
|
97
|
+
approvalApprove: string;
|
|
98
|
+
approvalDeny: string;
|
|
99
|
+
approvalApproved: string;
|
|
100
|
+
approvalDenied: string;
|
|
101
|
+
approvalDeadline: string;
|
|
102
|
+
approvalRisk: Record<"low" | "medium" | "high", string>;
|
|
103
|
+
permissionLabel: string;
|
|
104
|
+
permissionAsk: string;
|
|
105
|
+
permissionAlways: string;
|
|
106
|
+
permissionNever: string;
|
|
107
|
+
eventStreamLabel: string;
|
|
108
|
+
traceLabel: string;
|
|
109
|
+
healthLabel: string;
|
|
110
|
+
healthState: Record<"operational" | "degraded" | "down" | "maintenance" | "unknown", string>;
|
|
111
|
+
modelUsageLabel: string;
|
|
112
|
+
usageMetric: Record<"tokens" | "cost" | "requests", string>;
|
|
113
|
+
costMeterLabel: string;
|
|
114
|
+
costMeterSpent: string;
|
|
115
|
+
costMeterRemaining: string;
|
|
116
|
+
costMeterExceeded: string;
|
|
117
|
+
costMeterNear: string;
|
|
118
|
+
costMeterOver: string;
|
|
119
|
+
memoryLabel: string;
|
|
120
|
+
memoryProvenance: string;
|
|
121
|
+
memoryOperation: Record<"added" | "updated" | "recalled" | "forgotten", string>;
|
|
122
|
+
memoryScope: Record<"episodic" | "semantic" | "procedural", string>;
|
|
123
|
+
agentMessageLabel: string;
|
|
124
|
+
agentMessageTo: string;
|
|
125
|
+
agentMessageBroadcast: string;
|
|
126
|
+
agentMessageReason: string;
|
|
127
|
+
agentMessageKind: Record<"request" | "response" | "handoff" | "broadcast" | "error", string>;
|
|
128
|
+
automationWhen: string;
|
|
129
|
+
automationThen: string;
|
|
130
|
+
automationEnabled: string;
|
|
131
|
+
automationLastRun: string;
|
|
132
|
+
automationResult: Record<"success" | "failure", string>;
|
|
133
|
+
graphLabel: string;
|
|
134
|
+
agentState: Record<"idle" | "thinking" | "running" | "paused" | "error" | "completed", string>;
|
|
135
|
+
codeEditor: string;
|
|
136
|
+
chatLabel: string;
|
|
137
|
+
chatMessage: string;
|
|
138
|
+
chatSend: string;
|
|
139
|
+
qrCode: string;
|
|
140
|
+
chartLabel: string;
|
|
141
|
+
copyCode: string;
|
|
142
|
+
tocLabel: string;
|
|
143
|
+
navigationToggle: string;
|
|
144
|
+
sidebarLabel: string;
|
|
145
|
+
universalState: Record<UniversalState, string>;
|
|
146
|
+
}
|
|
147
|
+
export declare const defaultStrings: AureaStrings;
|
|
148
|
+
export declare const ptBR: AureaStrings;
|
|
149
|
+
export declare const defaultSpriteUrl = "/aurea-icons.svg";
|
|
150
|
+
export interface GridState {
|
|
151
|
+
sorting?: Array<{
|
|
152
|
+
id: string;
|
|
153
|
+
desc: boolean;
|
|
154
|
+
}>;
|
|
155
|
+
globalFilter?: string;
|
|
156
|
+
columnFilters?: Array<{
|
|
157
|
+
id: string;
|
|
158
|
+
value: unknown;
|
|
159
|
+
}>;
|
|
160
|
+
page?: number;
|
|
161
|
+
}
|
|
162
|
+
export declare function gridStateToParams(state: GridState, into?: URLSearchParams): URLSearchParams;
|
|
163
|
+
export declare function gridStateFromParams(params: URLSearchParams, filters?: Array<{
|
|
164
|
+
column: string;
|
|
165
|
+
facet?: boolean;
|
|
166
|
+
}>): GridState;
|
package/dist/pure.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// A METADE SEM ESTADO do internal.tsx — Parte A do PLANO-1.0 (06/08/2026).
|
|
2
|
+
//
|
|
3
|
+
// Existe por uma razão só, e ela é a mesma da Parte A vista uma camada abaixo: o `internal.tsx`
|
|
4
|
+
// precisa de `"use client"` (ele chama `createContext`), e num empacotador de RSC TODO export de
|
|
5
|
+
// um módulo com a diretiva vira REFERÊNCIA de cliente. O `cx` continuaria importável de um
|
|
6
|
+
// componente de servidor e quebraria ao ser CHAMADO — no consumidor, não aqui.
|
|
7
|
+
//
|
|
8
|
+
// Então o que não tem estado mora neste arquivo, SEM diretiva. O `internal.tsx` reexporta para os
|
|
9
|
+
// módulos de cliente não precisarem saber da diferença; o barril (`index.tsx`, que também é de
|
|
10
|
+
// servidor) importa DAQUI.
|
|
11
|
+
//
|
|
12
|
+
// Mesmo desenho da referência: no shadcn/ui o `cn` mora em `lib/utils.ts` sem diretiva, enquanto
|
|
13
|
+
// 43 dos 57 componentes de `registry/bases/aria/ui` a declaram — medido em 06/08/2026.
|
|
14
|
+
//
|
|
15
|
+
// `.tsx` sem JSX de propósito: os checks 11, 19 e 26 varrem `packages/react/src/*.tsx`, e um
|
|
16
|
+
// `.ts` aqui seria um arquivo que gate nenhum enxerga.
|
|
17
|
+
export const cx = (...v) => v.filter(Boolean).join(" ");
|
|
18
|
+
export const universalStates = ["waiting_user", "waiting_approval", "waiting_dependency", "offline", "stale", "partial", "degraded"];
|
|
19
|
+
// Nenhum dos sete é FALHA: nos sete a tela AINDA SERVE, e é isso que os separa de `error`. Por
|
|
20
|
+
// isso o teto de gravidade é `warning` e `danger` não aparece — quem espera é informado, quem
|
|
21
|
+
// perdeu qualidade é avisado. Um `role="alert"` aqui interromperia o leitor de tela por uma
|
|
22
|
+
// condição que não pede ação imediata, que é o oposto do que o papel serve.
|
|
23
|
+
export const stateSeverity = (state) => state.startsWith("waiting_") ? "info" : "warning";
|
|
24
|
+
export const defaultStrings = { close: "Close", paginationLabel: "Pagination", previous: "Previous", next: "Next", breadcrumbLabel: "Breadcrumb", tabsLabel: "Tabs", optionsLabel: "Options", tableLabel: "Table", commandLabel: "Command palette", commandPlaceholder: "Type a command…", dismissNotification: "Dismiss notification", toolbarLabel: "Toolbar", loading: "Loading", otpDigit: "Digit", stepperLabel: "Steps", increment: "Increase", decrement: "Decrease", comboboxEmpty: "No results", comboboxClear: "Clear selection", comboboxOpen: "Open list", comboboxRemove: "Remove", comboboxLoading: "Loading…", fileDropPrompt: "Drag files here or click to select", fileAdded: "File added", fileRemoved: "File removed", fileRemove: "Remove", fileTooLarge: "File exceeds the size limit", fileWrongType: "File type not allowed", treeLabel: "Tree", notificationsLabel: "Notifications", notificationMarkAll: "Mark all as read", notificationEmpty: "No notifications", notificationUnread: "Unread", notificationNew: "new notifications", dataGridFilter: "Filter", dataGridEmpty: "No results", dataGridSelectAll: "Select all rows", dataGridSelectRow: "Select row", dataGridSelected: "selected", dataGridClearSelection: "Clear selection", dataGridBulkLabel: "Bulk actions", dataGridColumns: "Columns", dataGridResize: "Resize column", dataGridStale: "Showing data that may be out of date.", dataGridPartial: "Some rows could not be loaded. What you see is incomplete.", dataGridError: "The rows could not be loaded.", dataGridDetails: "Details", dataGridDetailPanel: "Row detail", dataGridExport: "Export", dataGridExportRows: "rows", dataGridExportFiltered: "filtered rows", dataGridExportSelected: "selected rows", mediaPlayer: "Media player", mediaPlay: "Play", mediaPause: "Pause", mediaMute: "Mute", mediaUnmute: "Unmute", mediaSeek: "Seek", mediaVolume: "Volume", mediaCaptionsShow: "Show captions", mediaCaptionsHide: "Hide captions", mediaSkipBack: "Skip back 10 seconds", mediaSkipForward: "Skip forward 10 seconds", mediaFullscreenEnter: "Enter full screen", mediaFullscreenExit: "Exit full screen", uploadSending: "Uploading", uploadCancel: "Cancel upload", uploadRetry: "Retry upload", uploadError: "Upload failed", uploadCanceled: "Upload canceled", uploadComplete: "Upload complete", uploadPause: "Pause upload", uploadResume: "Resume upload", uploadPaused: "Paused", uploadPending: "Waiting", uploadChecksum: "Checksum", uploadChecksumBad: "The server received different bytes than the ones sent.", fileConflict: "A file with this name is already in the queue", fileReplace: "Replace", fileKeepBoth: "Keep both", fileSkip: "Skip", uploadReceipt: "Receipt", uploadReceiptCopy: "Copy receipt", agentInspector: "Agent inspector", invocationLabel: "Invocation", invocationInput: "Input", invocationOutput: "Output", taskQueueLabel: "Task queue", taskState: { queued: "Queued", running: "Running", completed: "Completed", failed: "Failed", blocked: "Blocked", paused: "Paused" }, taskPriority: { low: "Low", medium: "Medium", high: "High" }, approvalLabel: "Approval", approvalApprove: "Approve", approvalDeny: "Deny", approvalApproved: "Approved", approvalDenied: "Denied", approvalDeadline: "Decide by", approvalRisk: { low: "Low risk", medium: "Medium risk", high: "High risk" }, permissionLabel: "Tool permissions", permissionAsk: "Ask", permissionAlways: "Always", permissionNever: "Never", eventStreamLabel: "Events", traceLabel: "Trace", healthLabel: "Health", healthState: { operational: "Operational", degraded: "Degraded", down: "Down", maintenance: "Maintenance", unknown: "Unknown" }, modelUsageLabel: "Model usage", usageMetric: { tokens: "Tokens", cost: "Cost", requests: "Requests" }, costMeterLabel: "Cost", costMeterSpent: "Spent", costMeterRemaining: "left", costMeterExceeded: "Over the limit", costMeterNear: "Spending is past the soft limit.", costMeterOver: "The limit has been reached. Further calls are blocked.", memoryLabel: "Memory ledger", memoryProvenance: "Where this came from", memoryOperation: { added: "Added", updated: "Updated", recalled: "Recalled", forgotten: "Forgotten" }, memoryScope: { episodic: "Episodic", semantic: "Semantic", procedural: "Procedural" }, agentMessageLabel: "Agent messages", agentMessageTo: "to", agentMessageBroadcast: "all agents", agentMessageReason: "Why it went this way", agentMessageKind: { request: "Request", response: "Response", handoff: "Handoff", broadcast: "Broadcast", error: "Error" }, automationWhen: "When", automationThen: "Then", automationEnabled: "Enabled", automationLastRun: "Last run", automationResult: { success: "Succeeded", failure: "Failed" }, graphLabel: "Dependency graph", agentState: { idle: "Idle", thinking: "Thinking", running: "Running", paused: "Paused", error: "Error", completed: "Completed" }, codeEditor: "Code editor", chatLabel: "Conversation", chatMessage: "Message", chatSend: "Send", qrCode: "QR code", chartLabel: "Chart", copyCode: "Copy code", tocLabel: "On this page", navigationToggle: "Navigation", sidebarLabel: "Sidebar", universalState: { waiting_user: "Waiting for someone to act.", waiting_approval: "Waiting for approval.", waiting_dependency: "Waiting for something else to finish.", offline: "No connection. This was loaded earlier.", stale: "This may be out of date.", partial: "Some of this could not be loaded.", degraded: "Working with reduced capability." } };
|
|
25
|
+
// pt-BR preservado como locale (mesmos valores que já eram o default): passe
|
|
26
|
+
// <AureaProvider strings={ptBR}> para restaurar português.
|
|
27
|
+
export const ptBR = { close: "Fechar", paginationLabel: "Paginação", previous: "Anterior", next: "Próxima", breadcrumbLabel: "Breadcrumb", tabsLabel: "Abas", optionsLabel: "Opções", tableLabel: "Tabela", commandLabel: "Paleta de comandos", commandPlaceholder: "Digite um comando…", dismissNotification: "Dispensar notificação", toolbarLabel: "Barra de ferramentas", loading: "Carregando", otpDigit: "Dígito", stepperLabel: "Etapas", increment: "Aumentar", decrement: "Diminuir", comboboxEmpty: "Nenhum resultado", comboboxClear: "Limpar seleção", comboboxOpen: "Abrir lista", comboboxRemove: "Remover", comboboxLoading: "Carregando…", fileDropPrompt: "Arraste arquivos aqui ou clique para selecionar", fileAdded: "Arquivo adicionado", fileRemoved: "Arquivo removido", fileRemove: "Remover", fileTooLarge: "Arquivo maior que o limite", fileWrongType: "Tipo de arquivo não aceito", treeLabel: "Árvore", notificationsLabel: "Notificações", notificationMarkAll: "Marcar todas como lidas", notificationEmpty: "Nenhuma notificação", notificationUnread: "Não lida", notificationNew: "novas notificações", dataGridFilter: "Filtrar", dataGridEmpty: "Nenhum resultado", dataGridSelectAll: "Selecionar todas as linhas", dataGridSelectRow: "Selecionar linha", dataGridSelected: "selecionadas", dataGridClearSelection: "Limpar seleção", dataGridBulkLabel: "Ações em lote", dataGridColumns: "Colunas", dataGridResize: "Redimensionar coluna", dataGridStale: "Mostrando dados que podem estar desatualizados.", dataGridPartial: "Algumas linhas não puderam ser carregadas. O que aparece está incompleto.", dataGridError: "Não foi possível carregar as linhas.", dataGridDetails: "Detalhes", dataGridDetailPanel: "Detalhe da linha", dataGridExport: "Exportar", dataGridExportRows: "linhas", dataGridExportFiltered: "linhas filtradas", dataGridExportSelected: "linhas selecionadas", mediaPlayer: "Reprodutor de mídia", mediaPlay: "Reproduzir", mediaPause: "Pausar", mediaMute: "Silenciar", mediaUnmute: "Ativar som", mediaSeek: "Posição da reprodução", mediaVolume: "Volume", mediaCaptionsShow: "Ativar legendas", mediaCaptionsHide: "Desativar legendas", mediaSkipBack: "Voltar 10 segundos", mediaSkipForward: "Avançar 10 segundos", mediaFullscreenEnter: "Tela cheia", mediaFullscreenExit: "Sair da tela cheia", uploadSending: "Enviando", uploadCancel: "Cancelar envio", uploadRetry: "Tentar envio novamente", uploadError: "Falha no envio", uploadCanceled: "Envio cancelado", uploadComplete: "Envio concluído", uploadPause: "Pausar envio", uploadResume: "Retomar envio", uploadPaused: "Pausado", uploadPending: "Aguardando", uploadChecksum: "Soma de verificação", uploadChecksumBad: "O servidor recebeu bytes diferentes dos enviados.", fileConflict: "Já existe um arquivo com este nome na fila", fileReplace: "Substituir", fileKeepBoth: "Manter os dois", fileSkip: "Pular", uploadReceipt: "Recibo", uploadReceiptCopy: "Copiar recibo", agentInspector: "Inspetor do agente", invocationLabel: "Invocação", invocationInput: "Entrada", invocationOutput: "Saída", taskQueueLabel: "Fila de tarefas", taskState: { queued: "Na fila", running: "Executando", completed: "Concluída", failed: "Falhou", blocked: "Bloqueada", paused: "Pausada" }, taskPriority: { low: "Baixa", medium: "Média", high: "Alta" }, approvalLabel: "Aprovação", approvalApprove: "Aprovar", approvalDeny: "Negar", approvalApproved: "Aprovado", approvalDenied: "Negado", approvalDeadline: "Decidir até", approvalRisk: { low: "Risco baixo", medium: "Risco médio", high: "Risco alto" }, permissionLabel: "Permissões de ferramenta", permissionAsk: "Perguntar", permissionAlways: "Sempre", permissionNever: "Nunca", eventStreamLabel: "Eventos", traceLabel: "Rastro", healthLabel: "Saúde", healthState: { operational: "Operando", degraded: "Degradado", down: "Fora do ar", maintenance: "Em manutenção", unknown: "Desconhecido" }, modelUsageLabel: "Consumo por modelo", usageMetric: { tokens: "Tokens", cost: "Custo", requests: "Chamadas" }, costMeterLabel: "Custo", costMeterSpent: "Gasto", costMeterRemaining: "restantes", costMeterExceeded: "Acima do limite", costMeterNear: "O gasto passou do limite brando.", costMeterOver: "O limite foi atingido. As próximas chamadas estão bloqueadas.", memoryLabel: "Livro-razão de memória", memoryProvenance: "De onde isto veio", memoryOperation: { added: "Guardada", updated: "Atualizada", recalled: "Lembrada", forgotten: "Esquecida" }, memoryScope: { episodic: "Episódica", semantic: "Semântica", procedural: "Procedural" }, agentMessageLabel: "Recados entre agentes", agentMessageTo: "para", agentMessageBroadcast: "todos os agentes", agentMessageReason: "Por que foi por aqui", agentMessageKind: { request: "Pedido", response: "Resposta", handoff: "Passagem", broadcast: "Difusão", error: "Erro" }, automationWhen: "Quando", automationThen: "Então", automationEnabled: "Ativa", automationLastRun: "Última execução", automationResult: { success: "Concluiu", failure: "Falhou" }, graphLabel: "Grafo de dependências", agentState: { idle: "Ocioso", thinking: "Pensando", running: "Executando", paused: "Pausado", error: "Erro", completed: "Concluído" }, codeEditor: "Editor de código", chatLabel: "Conversa", chatMessage: "Mensagem", chatSend: "Enviar", qrCode: "Código QR", chartLabel: "Gráfico", copyCode: "Copiar código", tocLabel: "Nesta página", navigationToggle: "Navegação", sidebarLabel: "Lateral", universalState: { waiting_user: "Esperando alguém agir.", waiting_approval: "Esperando aprovação.", waiting_dependency: "Esperando outra coisa terminar.", offline: "Sem conexão. Isto foi carregado antes.", stale: "Isto pode estar desatualizado.", partial: "Parte disto não pôde ser carregada.", degraded: "Funcionando com capacidade reduzida." } };
|
|
28
|
+
// Sprite de ícones: CONFIGURAÇÃO DE APLICAÇÃO, então entra pelo provider, uma vez.
|
|
29
|
+
// Antes o default absoluto "/aurea-icons.svg" vivia no Icon e 15 componentes declaravam
|
|
30
|
+
// e repassavam `spriteUrl` à mão — 52 sítios de código. Consequência: aplicação servida
|
|
31
|
+
// em subcaminho perdia TODOS os ícones, e para consertar tinha de passar a prop em cada
|
|
32
|
+
// componente (auditoria 26/07/2026, achado A4 — causa raiz do A3 daquela auditoria, que
|
|
33
|
+
// foi corrigido nos fallbacks do catálogo e não aqui). O default segue o mesmo para quem
|
|
34
|
+
// não configura nada; `Icon` aceita a prop como override local.
|
|
35
|
+
export const defaultSpriteUrl = "/aurea-icons.svg";
|
|
36
|
+
// Formato: `sort=-nome,execucoes` (o `-` é descendente) · `q=texto` · `page=2` ·
|
|
37
|
+
// `f.<coluna>=valor`, repetido quando a coluna é faceta. Só entra o que está
|
|
38
|
+
// ativo, então grade sem filtro nenhum deixa a URL limpa.
|
|
39
|
+
//
|
|
40
|
+
// `into` preserva o que já estava na busca: uma aplicação real tem `tab=`, `ref=`
|
|
41
|
+
// e companhia na mesma URL, e serializar a grade não pode apagá-los.
|
|
42
|
+
export function gridStateToParams(state, into) {
|
|
43
|
+
const p = new URLSearchParams(into);
|
|
44
|
+
for (const k of [...p.keys()])
|
|
45
|
+
if (k === "sort" || k === "q" || k === "page" || k.startsWith("f."))
|
|
46
|
+
p.delete(k);
|
|
47
|
+
if (state.sorting?.length)
|
|
48
|
+
p.set("sort", state.sorting.map(s => (s.desc ? "-" : "") + s.id).join(","));
|
|
49
|
+
if (state.globalFilter)
|
|
50
|
+
p.set("q", state.globalFilter);
|
|
51
|
+
// página 1 não vai para a URL: é o default, e escrevê-lo só suja o link.
|
|
52
|
+
if (state.page && state.page > 1)
|
|
53
|
+
p.set("page", String(state.page));
|
|
54
|
+
for (const f of state.columnFilters ?? []) {
|
|
55
|
+
if (Array.isArray(f.value)) {
|
|
56
|
+
for (const v of f.value)
|
|
57
|
+
p.append("f." + f.id, String(v));
|
|
58
|
+
}
|
|
59
|
+
else if (f.value != null && f.value !== "")
|
|
60
|
+
p.set("f." + f.id, String(f.value));
|
|
61
|
+
}
|
|
62
|
+
return p;
|
|
63
|
+
}
|
|
64
|
+
// `filters` é o MESMO array que a grade recebe, e serve para uma coisa só: saber
|
|
65
|
+
// se `f.estado=feito` volta como `"feito"` ou como `["feito"]`. Sem ele a decisão
|
|
66
|
+
// cai num palpite — repetido é lista, sozinho é texto —, e uma faceta com UM valor
|
|
67
|
+
// escolhido volta como texto e para de filtrar. Passe-o sempre que houver faceta.
|
|
68
|
+
export function gridStateFromParams(params, filters) {
|
|
69
|
+
const state = {};
|
|
70
|
+
const sort = params.get("sort");
|
|
71
|
+
if (sort)
|
|
72
|
+
state.sorting = sort.split(",").filter(Boolean).map(t => t.startsWith("-") ? { id: t.slice(1), desc: true } : { id: t, desc: false });
|
|
73
|
+
const q = params.get("q");
|
|
74
|
+
if (q)
|
|
75
|
+
state.globalFilter = q;
|
|
76
|
+
const page = Number(params.get("page"));
|
|
77
|
+
if (Number.isFinite(page) && page > 1)
|
|
78
|
+
state.page = Math.floor(page);
|
|
79
|
+
const colunas = [];
|
|
80
|
+
for (const k of new Set([...params.keys()].filter(k => k.startsWith("f.")))) {
|
|
81
|
+
const id = k.slice(2), vals = params.getAll(k);
|
|
82
|
+
colunas.push({ id, value: (filters ? filters.some(f => f.column === id && f.facet) : vals.length > 1) ? vals : vals[0] });
|
|
83
|
+
}
|
|
84
|
+
if (colunas.length)
|
|
85
|
+
state.columnFilters = colunas;
|
|
86
|
+
return state;
|
|
87
|
+
}
|
package/dist/qrcode.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type ErrorCorrection } from "qr";
|
|
3
|
+
export type QRCodeSize = "sm" | "md" | "lg";
|
|
3
4
|
export interface QRCodeProps extends Omit<React.SVGAttributes<SVGSVGElement>, "children"> {
|
|
4
5
|
value: string;
|
|
5
|
-
size?:
|
|
6
|
+
size?: QRCodeSize;
|
|
6
7
|
ecc?: ErrorCorrection;
|
|
7
8
|
quietZone?: number;
|
|
8
9
|
label?: string;
|
package/dist/qrcode.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
// Fase 9 (achado A5): este arquivo saiu do index.tsx de 970 linhas. Um módulo por categoria
|
|
3
4
|
// do registry — a taxonomia já existia e é gateada. A ordem de import entre eles é um DAG:
|
|
@@ -14,7 +15,7 @@ import { cx, useAureaStrings } from "./internal.js";
|
|
|
14
15
|
// --qr-quiet no CSS. Matriz da lib `qr` (0-dep, Apache-2.0, Paul Miller); o desenho é
|
|
15
16
|
// nosso. ecc default "quartile": dots cobrem menos área que quadrados, então mais
|
|
16
17
|
// correção de erro preserva a escaneabilidade. ponytail: um estilo (dots) só.
|
|
17
|
-
export function QRCode({ value, size =
|
|
18
|
+
export function QRCode({ value, size = "md", ecc = "quartile", quietZone = 4, label, className, ...props }) {
|
|
18
19
|
const s = useAureaStrings();
|
|
19
20
|
const name = label ?? `${s.qrCode}: ${value}`;
|
|
20
21
|
const m = encodeQR(value, "raw", { ecc, border: quietZone });
|
|
@@ -30,5 +31,5 @@ export function QRCode({ value, size = 160, ecc = "quartile", quietZone = 4, lab
|
|
|
30
31
|
// olho redondo: anel externo (raio 3.5) → furo (2.5, cor do fundo) → centro (1.5).
|
|
31
32
|
// os raios preservam a proporção 7:5:3 do finder, então o leitor ainda o reconhece.
|
|
32
33
|
const eyeShapes = eyes.map(([ex, ey], i) => { const cx = ex + 3.5, cy = ey + 3.5; return _jsxs(React.Fragment, { children: [_jsx("circle", { className: "qr-mod", cx: cx, cy: cy, r: 3.5 }), _jsx("circle", { className: "qr-eye-gap", cx: cx, cy: cy, r: 2.5 }), _jsx("circle", { className: "qr-mod", cx: cx, cy: cy, r: 1.5 })] }, `eye${i}`); });
|
|
33
|
-
return _jsxs("svg", { className: cx("qrcode", className), role: "img", "aria-label": name, viewBox: `0 0 ${n} ${n}`,
|
|
34
|
+
return _jsxs("svg", { className: cx("qrcode", size !== "md" && `qrcode-${size}`, className), role: "img", "aria-label": name, viewBox: `0 0 ${n} ${n}`, ...props, children: [_jsx("title", { children: name }), eyeShapes, dots] });
|
|
34
35
|
}
|
package/dist/system.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { type ReactNode } from "react";
|
|
2
2
|
import { type AureaStrings } from "./internal.js";
|
|
3
|
-
export declare function AureaProvider({ children, strings, direction, spriteUrl }: {
|
|
3
|
+
export declare function AureaProvider({ children, strings, direction, spriteUrl, portalContainer }: {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
strings?: Partial<AureaStrings>;
|
|
6
6
|
direction?: "ltr" | "rtl";
|
|
7
7
|
spriteUrl?: string;
|
|
8
|
+
portalContainer?: HTMLElement | null;
|
|
8
9
|
}): React.JSX.Element;
|
|
9
10
|
export type AureaToastType = "info" | "success" | "warning" | "danger";
|
|
10
11
|
export declare const useToast: () => import("@base-ui/react").UseToastManagerReturnValue<any>;
|
package/dist/system.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
// Fase 9 (achado A5): este arquivo saiu do index.tsx de 970 linhas. Um módulo por categoria
|
|
3
4
|
// do registry — a taxonomia já existia e é gateada. A ordem de import entre eles é um DAG:
|
|
@@ -6,10 +7,17 @@ import React from "react";
|
|
|
6
7
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
7
8
|
import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";
|
|
8
9
|
import { DirectionProvider } from "@base-ui/react/direction-provider";
|
|
9
|
-
import { cx, StringsContext, SpriteContext, defaultStrings, defaultSpriteUrl, useSpriteUrl, useAureaStrings } from "./internal.js";
|
|
10
|
-
|
|
10
|
+
import { cx, StringsContext, SpriteContext, PortalContext, defaultStrings, defaultSpriteUrl, useSpriteUrl, useAureaStrings, usePortalContainer } from "./internal.js";
|
|
11
|
+
// `portalContainer` (achado B7, Parte C do PLANO-1.0): onde TODO popup da biblioteca é montado.
|
|
12
|
+
// Configuração de aplicação, então entra aqui uma vez — o mesmo raciocínio do `spriteUrl`, e
|
|
13
|
+
// pela mesma razão medida: com prop por componente seriam nove sítios repassando a mesma coisa
|
|
14
|
+
// à mão, que é o achado A4 de novo.
|
|
15
|
+
// Sem ela nada muda: o Base UI monta no `document.body`, que é o que permite empilhar e
|
|
16
|
+
// posicionar sem herdar `overflow` nem `transform`. Com ela, o consumidor aponta para um nó
|
|
17
|
+
// dentro do landmark dele e o conteúdo do popup deixa de ficar fora de qualquer marco.
|
|
18
|
+
export function AureaProvider({ children, strings, direction = "ltr", spriteUrl = defaultSpriteUrl, portalContainer }) {
|
|
11
19
|
const value = React.useMemo(() => strings ? { ...defaultStrings, ...strings } : defaultStrings, [strings]);
|
|
12
|
-
return _jsx(StringsContext.Provider, { value: value, children: _jsx(SpriteContext.Provider, { value: spriteUrl, children: _jsx(DirectionProvider, { direction: direction, children: _jsx(BaseToast.Provider, { children: _jsxs(BaseTooltip.Provider, { children: [children, _jsx(AureaToastViewport, {})] }) }) }) }) });
|
|
20
|
+
return _jsx(StringsContext.Provider, { value: value, children: _jsx(SpriteContext.Provider, { value: spriteUrl, children: _jsx(PortalContext.Provider, { value: portalContainer, children: _jsx(DirectionProvider, { direction: direction, children: _jsx(BaseToast.Provider, { children: _jsxs(BaseTooltip.Provider, { children: [children, _jsx(AureaToastViewport, {})] }) }) }) }) }) });
|
|
13
21
|
}
|
|
14
22
|
export const useToast = () => BaseToast.useToastManager();
|
|
15
23
|
function AureaToastList() {
|
|
@@ -18,7 +26,8 @@ function AureaToastList() {
|
|
|
18
26
|
return _jsx(_Fragment, { children: toasts.map(t => (_jsxs(BaseToast.Root, { toast: t, className: cx("toast", t.type && `toast-${t.type}`), children: [_jsxs("div", { className: "toast-text", children: [_jsx(BaseToast.Title, { render: _jsx("strong", {}) }), t.description ? _jsx(BaseToast.Description, { className: "muted" }) : null] }), _jsx(BaseToast.Close, { className: "btn btn-ghost btn-icon btn-sm", "aria-label": s.dismissNotification, children: "\u00D7" })] }, t.id))) });
|
|
19
27
|
}
|
|
20
28
|
function AureaToastViewport() {
|
|
21
|
-
|
|
29
|
+
const portal = usePortalContainer();
|
|
30
|
+
return _jsx(BaseToast.Portal, { container: portal, children: _jsx(BaseToast.Viewport, { className: "toast-stack", children: _jsx(AureaToastList, {}) }) });
|
|
22
31
|
}
|
|
23
32
|
// spriteUrl aqui é OVERRIDE local (dois sprites na mesma página, por exemplo). O normal é
|
|
24
33
|
// não passar nada e deixar o AureaProvider dizer de onde vêm os glifos.
|