@aurea-uds/react 0.31.0 → 0.33.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/README.md +5 -3
- package/dist/actions.d.ts +48 -13
- package/dist/actions.js +64 -31
- package/dist/agents.js +1 -1
- package/dist/calendar.d.ts +38 -1
- package/dist/calendar.js +115 -2
- package/dist/code-client.d.ts +3 -1
- package/dist/code-client.js +23 -1
- package/dist/color.d.ts +92 -0
- package/dist/color.js +293 -0
- package/dist/disclosure.d.ts +19 -9
- package/dist/disclosure.js +8 -1
- package/dist/feedback-client.d.ts +14 -6
- package/dist/feedback-client.js +29 -16
- package/dist/graph-worker.d.ts +1 -0
- package/dist/graph-worker.js +17 -0
- package/dist/graph.d.ts +11 -1
- package/dist/graph.js +214 -19
- package/dist/icon-names.d.ts +7 -1
- package/dist/icon-names.js +2 -0
- package/dist/identity-client.d.ts +6 -1
- package/dist/identity-client.js +2 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/inputs-client.d.ts +245 -3
- package/dist/inputs-client.js +541 -14
- package/dist/inputs.d.ts +1 -1
- package/dist/internal.d.ts +7 -4
- package/dist/internal.js +6 -1
- package/dist/layout-client.d.ts +14 -2
- package/dist/layout-client.js +2 -2
- package/dist/markup.d.ts +135 -15
- package/dist/markup.js +87 -17
- package/dist/navigation-client.d.ts +38 -10
- package/dist/navigation-client.js +77 -21
- package/dist/overlays.d.ts +20 -6
- package/dist/overlays.js +70 -15
- package/dist/pure.d.ts +27 -0
- package/dist/pure.js +2 -2
- package/dist/system.d.ts +12 -6
- package/dist/system.js +52 -13
- package/package.json +8 -2
package/dist/pure.js
CHANGED
|
@@ -53,10 +53,10 @@ export const universalStates = ["waiting_user", "waiting_approval", "waiting_dep
|
|
|
53
53
|
// perdeu qualidade é avisado. Um `role="alert"` aqui interromperia o leitor de tela por uma
|
|
54
54
|
// condição que não pede ação imediata, que é o oposto do que o papel serve.
|
|
55
55
|
export const stateSeverity = (state) => state.startsWith("waiting_") ? "info" : "warning";
|
|
56
|
-
export const defaultStrings = { passwordShow: "Show password", passwordHide: "Hide password", skipToContent: "Skip to content", close: "Close", confirmCancel: "Cancel", dataError: "This could not be loaded.", dataEmpty: "Nothing here yet", confirmProceed: "Continue", 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", mediaEmbedOpen: "Open the video on its own site", carouselLabel: "Carousel", carouselSlide: "Slide", positionOf: "of", carouselPrev: "Previous slide", carouselNext: "Next slide", galleryLabel: "Gallery", galleryVideo: "Video", sortableLabel: "Sortable list", sortableHandle: "Reorder", sortableHelp: "Press Space to pick this up, then Arrow Up and Arrow Down to move it. Space drops it, Escape puts it back.", sortableGrabbed: "Picked up", sortableDropped: "Dropped", sortableMoved: "Moved", sortableCanceled: "Put back", blockEditorLabel: "Content blocks", blockLabel: "Block", blockRemove: "Remove block", 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", graphZoomIn: "Zoom in", graphZoomOut: "Zoom out", graphFit: "Fit to screen", graphLegend: "Legend", graphOverview: "Overview", graphConnections: "connections", graphShow: "Show", graphJoin: "Join", graphArrange: "Arrange the map", graphUndo: "Undo", graphRedo: "Redo", graphAlignLeft: "Align left", graphAlignCenter: "Align centers", graphAlignRight: "Align right", graphAlignTop: "Align top", graphAlignMiddle: "Align middles", graphAlignBottom: "Align bottom", graphDistributeH: "Distribute horizontally", graphDistributeV: "Distribute vertically", graphPin: "Pin in place", graphPinned: "pinned", graphRelayout: "Rearrange", graphExpand: "Open", graphCollapse: "Close", graphHidden: "hidden", graphEdge: "Connection", graphEdgeHelp: "Enter selects the connection.", graphHandle: "Connection point", graphNodeHelp: "Enter or Space selects the node. Once selected, the arrow keys move it; with Shift, further. Escape releases it.", graphMoved: "Node moved", agentState: { idle: "Idle", thinking: "Thinking", running: "Running", paused: "Paused", error: "Error", completed: "Completed" }, codeEditor: "Code editor", chatLabel: "Conversation", chatMessage: "Message", chatSend: "Send", chatAttach: "Attach file", chatAttachments: "Attachments", chatReplyTo: "Replying to", chatReplyCancel: "Cancel reply", chatEditing: "Editing message", chatEditCancel: "Cancel editing", chatSave: "Save", chatEdited: "edited", chatForwardedFrom: "Forwarded from", qrCode: "QR code", chartLabel: "Chart", copyCode: "Copy code", copied: "Copied", linkCopied: "Link copied", linkCopyFailed: "Could not copy. Copy the link below.", tocLabel: "On this page", navigationToggle: "Navigation", sidebarLabel: "Sidebar", sidebarCollapse: "Collapse sidebar", sidebarExpand: "Expand sidebar", bottomNavLabel: "Main", themeToDark: "Switch to dark theme", themeToLight: "Switch to light theme", 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." } };
|
|
56
|
+
export const defaultStrings = { passwordShow: "Show password", passwordHide: "Hide password", skipToContent: "Skip to content", close: "Close", confirmCancel: "Cancel", dataError: "This could not be loaded.", dataCrashed: "Something went wrong here.", dataRetry: "Try again", dataEmpty: "Nothing here yet", confirmProceed: "Continue", paginationLabel: "Pagination", paginationPage: "Page", previous: "Previous", next: "Next", breadcrumbLabel: "Breadcrumb", tabsLabel: "Tabs", optionsLabel: "Options", tableLabel: "Table", commandLabel: "Command palette", commandPlaceholder: "Type a command…", commandHintMove: "move", commandHintSelect: "open", commandHintClose: "close", 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", mediaEmbedOpen: "Open the video on its own site", carouselLabel: "Carousel", carouselSlide: "Slide", positionOf: "of", carouselPrev: "Previous slide", carouselNext: "Next slide", galleryLabel: "Gallery", galleryVideo: "Video", sortableLabel: "Sortable list", sortableHandle: "Reorder", sortableHelp: "Press Space to pick this up, then Arrow Up and Arrow Down to move it. Space drops it, Escape puts it back.", sortableGrabbed: "Picked up", sortableDropped: "Dropped", sortableMoved: "Moved", sortableCanceled: "Put back", blockEditorLabel: "Content blocks", blockLabel: "Block", blockRemove: "Remove block", 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", graphZoomIn: "Zoom in", graphZoomOut: "Zoom out", graphFit: "Fit to screen", graphLegend: "Legend", graphLegendKind: "Link type", graphLegendStatus: "Status", graphOverview: "Overview", graphConnections: "connections", graphShow: "Show", graphJoin: "Join", graphArrange: "Arrange the map", graphUndo: "Undo", graphRedo: "Redo", graphAlignLeft: "Align left", graphAlignCenter: "Align centers", graphAlignRight: "Align right", graphAlignTop: "Align top", graphAlignMiddle: "Align middles", graphAlignBottom: "Align bottom", graphDistributeH: "Distribute horizontally", graphDistributeV: "Distribute vertically", graphPin: "Pin in place", graphPinned: "pinned", graphRelayout: "Rearrange", graphExpand: "Open", graphCollapse: "Close", graphHidden: "hidden", graphEdge: "Connection", graphEdgeHelp: "Enter selects the connection.", graphHandle: "Connection point", graphNodeHelp: "Enter or Space selects the node. Once selected, the arrow keys move it; with Shift, further. Escape releases it.", graphMoved: "Node moved", agentState: { idle: "Idle", thinking: "Thinking", running: "Running", paused: "Paused", error: "Error", completed: "Completed" }, codeEditor: "Code editor", chatLabel: "Conversation", chatMessage: "Message", chatSend: "Send", chatAttach: "Attach file", chatAttachments: "Attachments", chatReplyTo: "Replying to", chatReplyCancel: "Cancel reply", chatEditing: "Editing message", chatEditCancel: "Cancel editing", chatSave: "Save", chatEdited: "edited", chatForwardedFrom: "Forwarded from", qrCode: "QR code", chartLabel: "Chart", copyCode: "Copy code", codeBlockPreview: "Preview", codeBlockCode: "Code", copied: "Copied", linkCopied: "Link copied", linkCopyFailed: "Could not copy. Copy the link below.", tocLabel: "On this page", navigationToggle: "Navigation", sidebarLabel: "Sidebar", sidebarCollapse: "Collapse sidebar", sidebarExpand: "Expand sidebar", bottomNavLabel: "Main", themeToDark: "Switch to dark theme", themeChoice: "Theme", themeLight: "Light", themeDark: "Dark", themeSystem: "System", themeToLight: "Switch to light theme", datePlaceholder: "Pick a date", dateRangePlaceholder: "Pick a date range", colorPicker: "Color picker", colorArea2D: "2D slider", colorChannel: { hue: "Hue", saturation: "Saturation", brightness: "Brightness", lightness: "Lightness", red: "Red", green: "Green", blue: "Blue", alpha: "Alpha" }, colorHue: { red: "red", orange: "orange", yellow: "yellow", green: "green", cyan: "cyan", blue: "blue", purple: "purple", magenta: "magenta", pink: "pink", brown: "brown", gray: "gray", white: "white", black: "black" }, colorTone: { veryDark: "very dark", dark: "dark", light: "light", veryLight: "very light", vivid: "vivid", pale: "pale", grayish: "grayish" }, colorNameFormat: "{lightness} {chroma} {hue}", colorHex: "Hex", colorSwatches: "Swatches", 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." } };
|
|
57
57
|
// pt-BR preservado como locale (mesmos valores que já eram o default): passe
|
|
58
58
|
// <AureaProvider strings={ptBR}> para restaurar português.
|
|
59
|
-
export const ptBR = { passwordShow: "Mostrar senha", passwordHide: "Ocultar senha", skipToContent: "Pular para o conteúdo", close: "Fechar", confirmCancel: "Cancelar", dataError: "Não foi possível carregar.", dataEmpty: "Ainda não há nada aqui", confirmProceed: "Continuar", 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", mediaEmbedOpen: "Abrir o vídeo no site de origem", carouselLabel: "Carrossel", carouselSlide: "Slide", positionOf: "de", carouselPrev: "Slide anterior", carouselNext: "Próximo slide", galleryLabel: "Galeria", galleryVideo: "Vídeo", sortableLabel: "Lista ordenável", sortableHandle: "Reordenar", sortableHelp: "Aperte Espaço para pegar, e as setas para cima e para baixo para mover. Espaço solta, Esc devolve ao lugar.", sortableGrabbed: "Pego", sortableDropped: "Solto", sortableMoved: "Movido", sortableCanceled: "Devolvido", blockEditorLabel: "Blocos de conteúdo", blockLabel: "Bloco", blockRemove: "Remover bloco", 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", graphZoomIn: "Aproximar", graphZoomOut: "Afastar", graphFit: "Caber na tela", graphLegend: "Legenda", graphOverview: "Visão geral", graphConnections: "conexões", graphShow: "Mostrar", graphJoin: "Juntar", graphArrange: "Arrumar o mapa", graphUndo: "Desfazer", graphRedo: "Refazer", graphAlignLeft: "Alinhar à esquerda", graphAlignCenter: "Alinhar pelo centro", graphAlignRight: "Alinhar à direita", graphAlignTop: "Alinhar em cima", graphAlignMiddle: "Alinhar pelo meio", graphAlignBottom: "Alinhar embaixo", graphDistributeH: "Distribuir na horizontal", graphDistributeV: "Distribuir na vertical", graphPin: "Fixar no lugar", graphPinned: "fixo", graphRelayout: "Reorganizar", graphExpand: "Abrir", graphCollapse: "Fechar", graphHidden: "ocultos", graphEdge: "Ligação", graphEdgeHelp: "Enter escolhe a ligação.", graphHandle: "Ponto de ligação", graphNodeHelp: "Enter ou Espaço escolhe o nó. Escolhido, as setas o movem; com Shift, mais longe. Esc solta.", graphMoved: "Nó movido", 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", chatAttach: "Anexar arquivo", chatAttachments: "Anexos", chatReplyTo: "Respondendo a", chatReplyCancel: "Cancelar resposta", chatEditing: "Editando mensagem", chatEditCancel: "Cancelar edição", chatSave: "Salvar", chatEdited: "editada", chatForwardedFrom: "Encaminhada de", qrCode: "Código QR", chartLabel: "Gráfico", copyCode: "Copiar código", copied: "Copiado", linkCopied: "Link copiado", linkCopyFailed: "Não deu para copiar. Copie o link abaixo.", tocLabel: "Nesta página", navigationToggle: "Navegação", sidebarLabel: "Lateral", sidebarCollapse: "Recolher o menu", sidebarExpand: "Abrir o menu", bottomNavLabel: "Principal", themeToDark: "Mudar para o tema escuro", themeToLight: "Mudar para o tema claro", 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." } };
|
|
59
|
+
export const ptBR = { passwordShow: "Mostrar senha", passwordHide: "Ocultar senha", skipToContent: "Pular para o conteúdo", close: "Fechar", confirmCancel: "Cancelar", dataError: "Não foi possível carregar.", dataCrashed: "Algo deu errado aqui.", dataRetry: "Tentar de novo", dataEmpty: "Ainda não há nada aqui", confirmProceed: "Continuar", paginationLabel: "Paginação", paginationPage: "Página", previous: "Anterior", next: "Próxima", breadcrumbLabel: "Breadcrumb", tabsLabel: "Abas", optionsLabel: "Opções", tableLabel: "Tabela", commandLabel: "Paleta de comandos", commandPlaceholder: "Digite um comando…", commandHintMove: "mover", commandHintSelect: "abrir", commandHintClose: "fechar", 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", mediaEmbedOpen: "Abrir o vídeo no site de origem", carouselLabel: "Carrossel", carouselSlide: "Slide", positionOf: "de", carouselPrev: "Slide anterior", carouselNext: "Próximo slide", galleryLabel: "Galeria", galleryVideo: "Vídeo", sortableLabel: "Lista ordenável", sortableHandle: "Reordenar", sortableHelp: "Aperte Espaço para pegar, e as setas para cima e para baixo para mover. Espaço solta, Esc devolve ao lugar.", sortableGrabbed: "Pego", sortableDropped: "Solto", sortableMoved: "Movido", sortableCanceled: "Devolvido", blockEditorLabel: "Blocos de conteúdo", blockLabel: "Bloco", blockRemove: "Remover bloco", 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", graphZoomIn: "Aproximar", graphZoomOut: "Afastar", graphFit: "Caber na tela", graphLegend: "Legenda", graphLegendKind: "Tipo de ligação", graphLegendStatus: "Estado", graphOverview: "Visão geral", graphConnections: "conexões", graphShow: "Mostrar", graphJoin: "Juntar", graphArrange: "Arrumar o mapa", graphUndo: "Desfazer", graphRedo: "Refazer", graphAlignLeft: "Alinhar à esquerda", graphAlignCenter: "Alinhar pelo centro", graphAlignRight: "Alinhar à direita", graphAlignTop: "Alinhar em cima", graphAlignMiddle: "Alinhar pelo meio", graphAlignBottom: "Alinhar embaixo", graphDistributeH: "Distribuir na horizontal", graphDistributeV: "Distribuir na vertical", graphPin: "Fixar no lugar", graphPinned: "fixo", graphRelayout: "Reorganizar", graphExpand: "Abrir", graphCollapse: "Fechar", graphHidden: "ocultos", graphEdge: "Ligação", graphEdgeHelp: "Enter escolhe a ligação.", graphHandle: "Ponto de ligação", graphNodeHelp: "Enter ou Espaço escolhe o nó. Escolhido, as setas o movem; com Shift, mais longe. Esc solta.", graphMoved: "Nó movido", 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", chatAttach: "Anexar arquivo", chatAttachments: "Anexos", chatReplyTo: "Respondendo a", chatReplyCancel: "Cancelar resposta", chatEditing: "Editando mensagem", chatEditCancel: "Cancelar edição", chatSave: "Salvar", chatEdited: "editada", chatForwardedFrom: "Encaminhada de", qrCode: "Código QR", chartLabel: "Gráfico", copyCode: "Copiar código", codeBlockPreview: "Prévia", codeBlockCode: "Código", copied: "Copiado", linkCopied: "Link copiado", linkCopyFailed: "Não deu para copiar. Copie o link abaixo.", tocLabel: "Nesta página", navigationToggle: "Navegação", sidebarLabel: "Lateral", sidebarCollapse: "Recolher o menu", sidebarExpand: "Abrir o menu", bottomNavLabel: "Principal", themeToDark: "Mudar para o tema escuro", themeChoice: "Tema", themeLight: "Claro", themeDark: "Escuro", themeSystem: "Sistema", themeToLight: "Mudar para o tema claro", datePlaceholder: "Escolher data", dateRangePlaceholder: "Escolher período", colorPicker: "Seletor de cor", colorArea2D: "controle 2D", colorChannel: { hue: "Matiz", saturation: "Saturação", brightness: "Brilho", lightness: "Luminosidade", red: "Vermelho", green: "Verde", blue: "Azul", alpha: "Alfa" }, colorHue: { red: "vermelho", orange: "laranja", yellow: "amarelo", green: "verde", cyan: "ciano", blue: "azul", purple: "roxo", magenta: "magenta", pink: "rosa", brown: "marrom", gray: "cinza", white: "branco", black: "preto" }, colorTone: { veryDark: "muito escuro", dark: "escuro", light: "claro", veryLight: "muito claro", vivid: "vivo", pale: "pálido", grayish: "acinzentado" }, colorNameFormat: "{hue} {chroma} {lightness}", colorHex: "Código hex", colorSwatches: "Amostras", 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." } };
|
|
60
60
|
// Sprite de ícones: CONFIGURAÇÃO DE APLICAÇÃO, então entra pelo provider, uma vez.
|
|
61
61
|
// Antes o default absoluto "/aurea-icons.svg" vivia no Icon e 15 componentes declaravam
|
|
62
62
|
// e repassavam `spriteUrl` à mão — 52 sítios de código. Consequência: aplicação servida
|
package/dist/system.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import React, { type ReactNode } from "react";
|
|
2
2
|
import { type Responsive } from "./pure.js";
|
|
3
|
-
import { type AureaStrings, type AureaTheme, type AureaDensity } from "./internal.js";
|
|
4
|
-
export declare function AureaProvider({ children, strings, direction, spriteUrl, portalContainer, theme, defaultTheme, onThemeChange, density, defaultDensity, onDensityChange }: {
|
|
3
|
+
import { type AureaStrings, type AureaTheme, type AureaThemePreference, type AureaDensity } from "./internal.js";
|
|
4
|
+
export declare function AureaProvider({ children, strings, direction, spriteUrl, portalContainer, theme, defaultTheme, onThemeChange, onThemePreferenceChange, density, defaultDensity, onDensityChange, toastPlacement }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
strings?: Partial<AureaStrings>;
|
|
7
7
|
direction?: "ltr" | "rtl";
|
|
8
8
|
spriteUrl?: string;
|
|
9
9
|
portalContainer?: HTMLElement | null;
|
|
10
|
-
theme?:
|
|
11
|
-
defaultTheme?:
|
|
10
|
+
theme?: AureaThemePreference;
|
|
11
|
+
defaultTheme?: AureaThemePreference;
|
|
12
12
|
onThemeChange?: (theme: AureaTheme) => void;
|
|
13
|
+
onThemePreferenceChange?: (preference: AureaThemePreference) => void;
|
|
13
14
|
density?: AureaDensity;
|
|
14
15
|
defaultDensity?: AureaDensity;
|
|
15
16
|
onDensityChange?: (density: AureaDensity) => void;
|
|
17
|
+
toastPlacement?: ToastPlacement;
|
|
16
18
|
}): React.JSX.Element;
|
|
17
19
|
export type AureaToastType = "info" | "success" | "warning" | "danger";
|
|
18
20
|
export declare const useToast: () => import("@base-ui/react").UseToastManagerReturnValue<any>;
|
|
@@ -21,10 +23,13 @@ export type { AureaDensity };
|
|
|
21
23
|
export declare function useAureaTheme(): {
|
|
22
24
|
theme: AureaThemeName | null;
|
|
23
25
|
density: AureaDensity | null;
|
|
24
|
-
|
|
26
|
+
/** O que foi escolhido (15/10/2026): pode ser `"system"`. Fora de um provider, o tema na tela. */
|
|
27
|
+
preference: "system" | AureaThemeName | null;
|
|
28
|
+
setTheme: (t: AureaThemePreference) => void;
|
|
25
29
|
setDensity: (d: AureaDensity) => void;
|
|
26
30
|
toggleTheme: () => void;
|
|
27
31
|
};
|
|
32
|
+
export type ToastPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end";
|
|
28
33
|
export type { IconName, PhosphorIconName, AureaIconNames, IconWeight } from "./icon-names.js";
|
|
29
34
|
import { type IconName, type IconWeight } from "./icon-names.js";
|
|
30
35
|
export type IconSize = "sm" | "md" | "lg" | "xl";
|
|
@@ -41,7 +46,8 @@ export interface IconProps extends Omit<React.SVGAttributes<SVGSVGElement>, "nam
|
|
|
41
46
|
name: AureaIcon;
|
|
42
47
|
spriteUrl?: string;
|
|
43
48
|
size?: Responsive<IconSize>;
|
|
44
|
-
/** `fill` desenha a forma cheia — a do item escolhido (ADR-0053).
|
|
49
|
+
/** `fill` desenha a forma cheia — a do item escolhido (ADR-0053). `bold`, o traço grosso, só nos
|
|
50
|
+
* nomes que o têm (hoje, o `x`); os outros, e o nome próprio do app, ficam no `regular`. */
|
|
45
51
|
weight?: IconWeight;
|
|
46
52
|
}
|
|
47
53
|
export declare function Icon({ name, spriteUrl, size, weight, className, ...props }: IconProps): React.JSX.Element;
|
package/dist/system.js
CHANGED
|
@@ -22,11 +22,28 @@ import { cx, StringsContext, SpriteContext, PortalContext, ThemeContext, Density
|
|
|
22
22
|
// Sem ela nada muda: o Base UI monta no `document.body`, que é o que permite empilhar e
|
|
23
23
|
// posicionar sem herdar `overflow` nem `transform`. Com ela, o consumidor aponta para um nó
|
|
24
24
|
// dentro do landmark dele e o conteúdo do popup deixa de ficar fora de qualquer marco.
|
|
25
|
-
export function AureaProvider({ children, strings, direction = "ltr", spriteUrl = defaultSpriteUrl, portalContainer, theme, defaultTheme, onThemeChange, density, defaultDensity, onDensityChange }) {
|
|
25
|
+
export function AureaProvider({ children, strings, direction = "ltr", spriteUrl = defaultSpriteUrl, portalContainer, theme, defaultTheme, onThemeChange, onThemePreferenceChange, density, defaultDensity, onDensityChange, toastPlacement = "bottom" }) {
|
|
26
26
|
const value = React.useMemo(() => strings ? { ...defaultStrings, ...strings } : defaultStrings, [strings]);
|
|
27
|
-
|
|
27
|
+
// "SYSTEM" (15/10/2026, a chave de três posições da referência): a PREFERÊNCIA pode ser `"system"`, e aí o tema na
|
|
28
|
+
// tela é o do sistema (`prefers-color-scheme`), e muda junto com ele. O documento recebe sempre o tema RESOLVIDO —
|
|
29
|
+
// o CSS só conhece `dark` e `light`. Sem preferência, o provider continua adotando o que o documento trouxer.
|
|
30
|
+
const [prefInterna, setPrefInterna] = React.useState(defaultTheme);
|
|
31
|
+
const preferencia = theme ?? prefInterna;
|
|
32
|
+
// Só quem SEGUE o sistema pergunta a ele: o provider sem `"system"` não abre `matchMedia` nenhum (o custo por
|
|
33
|
+
// aplicação é cobrado em `custo-responsivo` e `ssr-responsivo`, que pegaram a primeira versão, 15/10/2026).
|
|
34
|
+
const segue = preferencia === "system";
|
|
35
|
+
const assina = React.useCallback((cb) => segue ? assinaEsquema(cb) : () => { }, [segue]);
|
|
36
|
+
const sistemaEscuro = React.useSyncExternalStore(assina, segue ? leEsquemaEscuro : semEsquema, semEsquema);
|
|
37
|
+
const resolvido = preferencia === "system" ? (sistemaEscuro ? "dark" : "light") : preferencia;
|
|
38
|
+
const temaCtx = useEixoDoDocumento("theme", resolvido, undefined, undefined);
|
|
39
|
+
const escolher = React.useCallback((p) => {
|
|
40
|
+
if (theme === undefined)
|
|
41
|
+
setPrefInterna(p);
|
|
42
|
+
onThemePreferenceChange?.(p);
|
|
43
|
+
onThemeChange?.(p === "system" ? (leEsquemaEscuro() ? "dark" : "light") : p);
|
|
44
|
+
}, [theme, onThemeChange, onThemePreferenceChange]);
|
|
28
45
|
const densCtx = useEixoDoDocumento("density", density, defaultDensity, onDensityChange);
|
|
29
|
-
const tema = React.useMemo(() => ({ theme: temaCtx.valor,
|
|
46
|
+
const tema = React.useMemo(() => ({ theme: temaCtx.valor, preference: preferencia ?? temaCtx.valor, setTheme: escolher,
|
|
30
47
|
// `toggleTheme` existe porque é o gesto real: um botão de tema não escolhe entre dois
|
|
31
48
|
// valores, ele inverte o atual. Deixar isso para o consumidor é como o catálogo e os docs
|
|
32
49
|
// acabaram com duas implementações divergentes da mesma coisa.
|
|
@@ -38,13 +55,24 @@ export function AureaProvider({ children, strings, direction = "ltr", spriteUrl
|
|
|
38
55
|
// ⚠ Achado em 09/09/2026 SÓ porque o `useAureaTheme` passou a delegar para cá: a divergência
|
|
39
56
|
// existia desde sempre e nenhum teste a pegava, porque cada metade era testada sozinha.
|
|
40
57
|
// Agora a regra é uma: desconhecido resolve para claro e alterna para ESCURO.
|
|
41
|
-
toggleTheme: () =>
|
|
58
|
+
toggleTheme: () => escolher(temaCtx.valor === "dark" ? "light" : "dark") }), [temaCtx, preferencia, escolher]);
|
|
42
59
|
const dens = React.useMemo(() => ({ density: densCtx.valor, setDensity: densCtx.set }), [densCtx]);
|
|
43
60
|
// GAR-14: os avisos presos a um botão vivem num gerenciador do MÓDULO (ver `avisosAncorados`), então
|
|
44
61
|
// só o provedor de FORA monta o hospedeiro deles — com dois, cada aviso apareceria duas vezes.
|
|
45
62
|
const deFora = !React.useContext(DentroDoProviderContext);
|
|
46
|
-
return _jsx(DentroDoProviderContext.Provider, { value: true, children: _jsx(StringsContext.Provider, { value: value, children: _jsx(SpriteContext.Provider, { value: spriteUrl, children: _jsx(PortalContext.Provider, { value: portalContainer, children: _jsx(ThemeContext.Provider, { value: tema, children: _jsx(DensityContext.Provider, { value: dens, children: _jsx(DirectionProvider, { direction: direction, children: _jsx(BaseToast.Provider, { children: _jsxs(BaseTooltip.Provider, { children: [children, _jsx(AureaToastViewport, {}), deFora && _jsx(BaseToast.Provider, { toastManager: avisosAncorados, children: _jsx(AvisosAncorados, {}) })] }) }) }) }) }) }) }) }) });
|
|
63
|
+
return _jsx(DentroDoProviderContext.Provider, { value: true, children: _jsx(StringsContext.Provider, { value: value, children: _jsx(SpriteContext.Provider, { value: spriteUrl, children: _jsx(PortalContext.Provider, { value: portalContainer, children: _jsx(ThemeContext.Provider, { value: tema, children: _jsx(DensityContext.Provider, { value: dens, children: _jsx(DirectionProvider, { direction: direction, children: _jsx(BaseToast.Provider, { timeout: TEMPO_DO_AVISO, children: _jsxs(BaseTooltip.Provider, { children: [children, _jsx(AureaToastViewport, { placement: toastPlacement }), deFora && _jsx(BaseToast.Provider, { toastManager: avisosAncorados, children: _jsx(AvisosAncorados, {}) })] }) }) }) }) }) }) }) }) });
|
|
47
64
|
}
|
|
65
|
+
// O esquema do sistema, para a preferência `"system"`. Sem `matchMedia` (servidor, jsdom), claro.
|
|
66
|
+
const ESQUEMA_ESCURO = "(prefers-color-scheme: dark)";
|
|
67
|
+
const assinaEsquema = (cb) => {
|
|
68
|
+
if (typeof matchMedia !== "function")
|
|
69
|
+
return () => { };
|
|
70
|
+
const m = matchMedia(ESQUEMA_ESCURO);
|
|
71
|
+
m.addEventListener("change", cb);
|
|
72
|
+
return () => m.removeEventListener("change", cb);
|
|
73
|
+
};
|
|
74
|
+
const leEsquemaEscuro = () => typeof matchMedia === "function" && matchMedia(ESQUEMA_ESCURO).matches;
|
|
75
|
+
const semEsquema = () => false;
|
|
48
76
|
/** Um eixo de apresentação que vive no `<html>`: tema ou densidade. A conta é a mesma para os
|
|
49
77
|
* dois, e escrevê-la duas vezes seria o defeito do §21 cometido dentro do próprio conserto
|
|
50
78
|
* dele. */
|
|
@@ -121,12 +149,15 @@ export function useAureaTheme() {
|
|
|
121
149
|
const ctxDens = React.useContext(DensityContext);
|
|
122
150
|
return React.useMemo(() => ({
|
|
123
151
|
theme, density,
|
|
152
|
+
/** O que foi escolhido (15/10/2026): pode ser `"system"`. Fora de um provider, o tema na tela. */
|
|
153
|
+
preference: (dentroDeProvider ? ctxTema.preference : theme) ?? theme,
|
|
124
154
|
setTheme: (t) => {
|
|
125
155
|
if (dentroDeProvider) {
|
|
126
156
|
ctxTema.setTheme(t);
|
|
127
157
|
return;
|
|
128
158
|
}
|
|
129
|
-
|
|
159
|
+
// Fora de provider, `"system"` escreve o tema do sistema AGORA; seguir as mudanças dele é do provider.
|
|
160
|
+
document.documentElement.dataset.theme = t === "system" ? (leEsquemaEscuro() ? "dark" : "light") : t;
|
|
130
161
|
},
|
|
131
162
|
setDensity: (d) => {
|
|
132
163
|
if (dentroDeProvider) {
|
|
@@ -147,14 +178,20 @@ export function useAureaTheme() {
|
|
|
147
178
|
},
|
|
148
179
|
}), [theme, density, dentroDeProvider, ctxTema, ctxDens]);
|
|
149
180
|
}
|
|
150
|
-
|
|
181
|
+
const TEMPO_DO_AVISO = 4000;
|
|
182
|
+
const ICONE_DO_AVISO = { info: "info", success: "check-circle", warning: "warning", danger: "x-circle" };
|
|
183
|
+
function AureaToastList({ placement }) {
|
|
151
184
|
const { toasts } = BaseToast.useToastManager();
|
|
152
185
|
const s = useAureaStrings();
|
|
153
|
-
|
|
186
|
+
const arrasto = [placement.startsWith("top") ? "up" : "down", "right"];
|
|
187
|
+
return _jsx(_Fragment, { children: toasts.map(t => {
|
|
188
|
+
const tipo = t.type === "error" ? "danger" : t.type;
|
|
189
|
+
return _jsxs(BaseToast.Root, { toast: t, swipeDirection: arrasto, className: cx("toast", tipo && `toast-${tipo}`), children: [_jsxs(BaseToast.Content, { className: "toast-content", children: [_jsx("span", { className: "toast-indicator", "aria-hidden": "true", children: tipo === "loading" ? _jsx("span", { className: "spinner" }) : _jsx(Icon, { name: ICONE_DO_AVISO[tipo ?? ""] ?? "info" }) }), _jsxs("div", { className: "toast-text", children: [_jsx(BaseToast.Title, { className: "toast-title", render: _jsx("strong", {}) }), t.description ? _jsx(BaseToast.Description, { className: "toast-description" }) : null] }), t.actionProps ? _jsx(BaseToast.Action, { className: "btn btn-tertiary btn-sm toast-action" }) : null] }), _jsx(BaseToast.Close, { className: "btn btn-tertiary close-button toast-close", "aria-label": s.dismissNotification, children: _jsx("span", { children: _jsx(Icon, { name: "x", weight: "bold" }) }) })] }, t.id);
|
|
190
|
+
}) });
|
|
154
191
|
}
|
|
155
|
-
function AureaToastViewport() {
|
|
192
|
+
function AureaToastViewport({ placement }) {
|
|
156
193
|
const portal = usePortalContainer();
|
|
157
|
-
return _jsx(BaseToast.Portal, { container: portal, children: _jsx(BaseToast.Viewport, { className: "toast-stack", children: _jsx(AureaToastList, {}) }) });
|
|
194
|
+
return _jsx(BaseToast.Portal, { container: portal, children: _jsx(BaseToast.Viewport, { className: cx("toast-stack", `toast-stack-${placement}`), children: _jsx(AureaToastList, { placement: placement }) }) });
|
|
158
195
|
}
|
|
159
196
|
// GAR-14 (0.28.0) · OS AVISOS PRESOS A UM BOTÃO ("Link copiado", do `Button share`). A documentação do
|
|
160
197
|
// motor manda o aviso ancorado viver num gerenciador SEPARADO do da pilha — senão ele entra na conta
|
|
@@ -190,12 +227,14 @@ function AvisosAncorados() {
|
|
|
190
227
|
: _jsxs(BaseToast.Root, { toast: t, className: "toast-anchored", children: [_jsx("span", { className: "toast-anchored-icon", "aria-hidden": "true" }), _jsx(BaseToast.Title, { render: _jsx("span", {}) })] }) }, t.id);
|
|
191
228
|
}) }) });
|
|
192
229
|
}
|
|
193
|
-
import { NOMES_PHOSPHOR } from "./icon-names.js";
|
|
230
|
+
import { NOMES_PHOSPHOR, NOMES_BOLD } from "./icon-names.js";
|
|
194
231
|
// spriteUrl aqui é OVERRIDE local (dois sprites na mesma página, por exemplo). O normal é
|
|
195
232
|
// não passar nada e deixar o AureaProvider dizer de onde vêm os glifos.
|
|
196
233
|
// A forma cheia é o símbolo `i-<nome>-fill` do sprite. Só os nomes do Phosphor a têm: um nome
|
|
197
|
-
// próprio do app pedido em `fill` desenha o regular, em vez de um `<use>` vazio.
|
|
198
|
-
|
|
234
|
+
// próprio do app pedido em `fill` desenha o regular, em vez de um `<use>` vazio. O `bold` (0.32.0)
|
|
235
|
+
// segue a mesma regra, com a lista curta do `NOMES_BOLD`.
|
|
236
|
+
const idDoIcone = (name, weight = "regular") => weight === "fill" && NOMES_PHOSPHOR.has(name) ? `i-${name}-fill`
|
|
237
|
+
: weight === "bold" && NOMES_BOLD.has(name) ? `i-${name}-bold` : `i-${name}`;
|
|
199
238
|
export function Icon({ name, spriteUrl, size, weight, className, ...props }) {
|
|
200
239
|
const base = useSpriteUrl();
|
|
201
240
|
if (typeof name === "function") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurea-uds/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Os componentes React da Aurea UDS. Importe @aurea-uds/fonts/css e @aurea-uds/core/css junto.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aurea",
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
|
-
"sideEffects":
|
|
26
|
+
"sideEffects": [
|
|
27
|
+
"./dist/graph-worker.js"
|
|
28
|
+
],
|
|
27
29
|
"main": "./dist/index.js",
|
|
28
30
|
"module": "./dist/index.js",
|
|
29
31
|
"types": "./dist/index.d.ts",
|
|
@@ -108,6 +110,10 @@
|
|
|
108
110
|
"types": "./dist/graph.d.ts",
|
|
109
111
|
"import": "./dist/graph.js"
|
|
110
112
|
},
|
|
113
|
+
"./graph-worker": {
|
|
114
|
+
"types": "./dist/graph-worker.d.ts",
|
|
115
|
+
"import": "./dist/graph-worker.js"
|
|
116
|
+
},
|
|
111
117
|
"./agents": {
|
|
112
118
|
"types": "./dist/agents.d.ts",
|
|
113
119
|
"import": "./dist/agents.js"
|