@aurea-uds/react 0.31.0 → 0.32.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 +33 -6
- package/dist/actions.js +38 -26
- 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 +11 -5
- package/dist/feedback-client.js +26 -15
- 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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/inputs-client.d.ts +215 -2
- package/dist/inputs-client.js +504 -8
- package/dist/inputs.d.ts +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +4 -0
- package/dist/layout-client.d.ts +14 -2
- package/dist/layout-client.js +2 -2
- package/dist/markup.d.ts +89 -9
- package/dist/markup.js +48 -11
- package/dist/navigation-client.d.ts +31 -7
- package/dist/navigation-client.js +60 -16
- package/dist/overlays.d.ts +20 -6
- package/dist/overlays.js +65 -10
- package/dist/pure.d.ts +20 -0
- package/dist/pure.js +2 -2
- package/dist/system.d.ts +5 -2
- package/dist/system.js +17 -9
- package/package.json +8 -2
package/dist/overlays.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
// internal → system → actions → feedback → inputs → navigation → layout → data-display → resto.
|
|
6
6
|
import React, { useRef } from "react";
|
|
7
7
|
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
8
|
+
import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
|
|
8
9
|
import { AlertDialog as BaseAlertDialog } from "@base-ui/react/alert-dialog";
|
|
9
10
|
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
10
11
|
import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";
|
|
@@ -15,12 +16,17 @@ import { PreviewCard as BasePreviewCard } from "@base-ui/react/preview-card";
|
|
|
15
16
|
import { cx, useAureaStrings, usePortalContainer } from "./internal.js";
|
|
16
17
|
import { useValorResponsivo } from "./responsivo-runtime.js";
|
|
17
18
|
import { Icon } from "./system.js";
|
|
18
|
-
import { Button } from "./actions.js";
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
import { Button, CloseButton } from "./actions.js";
|
|
20
|
+
function IconeDaJanela({ icon, tone }) {
|
|
21
|
+
return _jsx("span", { className: cx("dialog-icon", `dialog-icon-${tone}`), "aria-hidden": "true", children: _jsx(Icon, { name: icon }) });
|
|
22
|
+
}
|
|
23
|
+
export function Dialog({ open, title, children, footer, onClose, size = "md", dismissible = true, icon, iconTone = "neutral", placement = "auto" }) {
|
|
21
24
|
const portal = usePortalContainer();
|
|
25
|
+
// O X vem PRIMEIRO na ordem do documento, como o gatilho de fechar da referência: o motor foca o
|
|
26
|
+
// primeiro focável ao abrir, e era o X também quando ele morava no fim do cabeçalho (o título não é
|
|
27
|
+
// focável) — a ordem do Tab não muda.
|
|
22
28
|
return _jsx(BaseDialog.Root, { open: open, disablePointerDismissal: !dismissible, onOpenChange: o => { if (!o && dismissible)
|
|
23
|
-
onClose(); }, children: _jsxs(BaseDialog.Portal, { container: portal, children: [_jsx(BaseDialog.Backdrop, { className: "dialog-backdrop" }), _jsxs(BaseDialog.Popup, { className: cx("dialog", size !== "md" && `dialog-${size}`),
|
|
29
|
+
onClose(); }, children: _jsxs(BaseDialog.Portal, { container: portal, children: [_jsx(BaseDialog.Backdrop, { className: "dialog-backdrop" }), _jsxs(BaseDialog.Popup, { className: cx("dialog", size !== "md" && `dialog-${size}`), "data-placement": placement, children: [_jsx(BaseDialog.Close, { render: _jsx(CloseButton, { className: "dialog-close", disabled: !dismissible }) }), _jsxs("header", { className: "dialog-header", children: [icon && _jsx(IconeDaJanela, { icon: icon, tone: iconTone }), _jsx(BaseDialog.Title, { render: _jsx("h2", {}), className: "dialog-heading", children: title })] }), _jsx("div", { className: "dialog-body", children: children }), footer && _jsx("footer", { className: "dialog-footer", children: footer })] })] }) });
|
|
24
30
|
}
|
|
25
31
|
// ConfirmDialog (M5): a decisão que não se fecha por engano. NÃO é um Dialog com dois botões —
|
|
26
32
|
// é `role="alertdialog"`, e a diferença é de comportamento, não de aparência: o Base UI tira do
|
|
@@ -50,15 +56,23 @@ export function Dialog({ open, title, children, footer, onClose, size = "md", di
|
|
|
50
56
|
// `description` é prop e não `children` porque ela é o nó de `aria-describedby`: o AlertDialog
|
|
51
57
|
// só anuncia o que passa pelo `Description`. Como `children`, um consumidor poria um <div> no
|
|
52
58
|
// meio e o leitor de tela perderia a frase que diz o que se perde.
|
|
53
|
-
|
|
59
|
+
//
|
|
60
|
+
// 0.32.0: a anatomia do `Dialog` (a da referência), sem o X — a decisão não se fecha por engano. O
|
|
61
|
+
// ícone é o círculo de 40 de lá; a cor dele segue o `destructive` quando quem usa não escolhe.
|
|
62
|
+
export function ConfirmDialog({ open, title, description, confirmLabel, cancelLabel, destructive, onConfirm, onCancel, icon, iconTone, placement = "auto" }) {
|
|
54
63
|
const s = useAureaStrings();
|
|
55
64
|
const portal = usePortalContainer();
|
|
56
65
|
const seguro = React.useRef(null);
|
|
57
66
|
return _jsx(BaseAlertDialog.Root, { open: open, onOpenChange: o => { if (!o)
|
|
58
|
-
onCancel(); }, children: _jsxs(BaseAlertDialog.Portal, { container: portal, children: [_jsx(BaseAlertDialog.Backdrop, { className: "dialog-backdrop" }), _jsxs(BaseAlertDialog.Popup, { className: "dialog dialog-confirm", initialFocus: seguro, children: [
|
|
67
|
+
onCancel(); }, children: _jsxs(BaseAlertDialog.Portal, { container: portal, children: [_jsx(BaseAlertDialog.Backdrop, { className: "dialog-backdrop" }), _jsxs(BaseAlertDialog.Popup, { className: "dialog dialog-confirm", initialFocus: seguro, "data-placement": placement, children: [_jsxs("header", { className: "dialog-header", children: [icon && _jsx(IconeDaJanela, { icon: icon, tone: iconTone ?? (destructive ? "danger" : "neutral") }), _jsx(BaseAlertDialog.Title, { render: _jsx("h2", {}), className: "dialog-heading", children: title })] }), _jsx(BaseAlertDialog.Description, { className: "dialog-body", children: description }), _jsxs("footer", { className: "dialog-footer", children: [_jsx(Button, { ref: seguro, variant: "tertiary", onClick: onCancel, children: cancelLabel ?? s.confirmCancel }), _jsx(Button, { variant: destructive ? "danger" : "primary", onClick: onConfirm, children: confirmLabel ?? s.confirmProceed })] })] })] }) });
|
|
68
|
+
}
|
|
69
|
+
const ARRASTO_DO_LADO = { left: "left", right: "right", top: "up", bottom: "down" };
|
|
70
|
+
export function Drawer({ open, title, children, footer, onClose, side = "right" }) {
|
|
71
|
+
const portal = usePortalContainer();
|
|
72
|
+
const alca = _jsx("div", { className: "drawer-handle", "aria-hidden": "true" });
|
|
73
|
+
return _jsx(BaseDrawer.Root, { open: open, onOpenChange: o => { if (!o)
|
|
74
|
+
onClose(); }, swipeDirection: ARRASTO_DO_LADO[side], children: _jsxs(BaseDrawer.Portal, { container: portal, children: [_jsx(BaseDrawer.Backdrop, { className: "drawer-backdrop" }), _jsx(BaseDrawer.Viewport, { className: "drawer-viewport", children: _jsxs(BaseDrawer.Popup, { className: cx("drawer", `drawer-${side}`), children: [_jsx(BaseDrawer.Close, { render: _jsx(CloseButton, { className: "dialog-close" }) }), side === "bottom" && alca, _jsx("header", { className: "dialog-header", children: _jsx(BaseDrawer.Title, { render: _jsx("h2", {}), className: "dialog-heading", children: title }) }), _jsx(BaseDrawer.Content, { className: "dialog-body", children: children }), footer && _jsx("footer", { className: "dialog-footer", children: footer }), side === "top" && alca] }) })] }) });
|
|
59
75
|
}
|
|
60
|
-
export function Drawer({ open, title, children, onClose, side = "right" }) { const s = useAureaStrings(); const portal = usePortalContainer(); return _jsx(BaseDialog.Root, { open: open, onOpenChange: o => { if (!o)
|
|
61
|
-
onClose(); }, children: _jsxs(BaseDialog.Portal, { container: portal, children: [_jsx(BaseDialog.Backdrop, { className: "drawer-backdrop" }), _jsxs(BaseDialog.Popup, { className: cx("drawer", `drawer-${side}`), children: [_jsxs("header", { children: [_jsx(BaseDialog.Title, { render: _jsx("h2", {}), children: title }), _jsx(BaseDialog.Close, { className: "btn btn-ghost btn-icon", "aria-label": s.close, children: _jsx(Icon, { name: "x" }) })] }), children] })] }) }); }
|
|
62
76
|
export function AccessGate({ allowed, children, ...resto }) {
|
|
63
77
|
if (allowed)
|
|
64
78
|
return children;
|
|
@@ -72,8 +86,49 @@ export function AccessGate({ allowed, children, ...resto }) {
|
|
|
72
86
|
// conteúdo da dica. Era tooltip visual, não acessível (padrão APG Tooltip).
|
|
73
87
|
// O id aponta para um elemento que só existe quando aberto; referência pendente é ignorada
|
|
74
88
|
// pela tecnologia assistiva, então não precisa acompanhar o estado.
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
//
|
|
90
|
+
// 0.32.0, a dica e o popover da referência:
|
|
91
|
+
// • A SETA (`arrow`), desligada por padrão como lá. O desenho é nosso (uma curva de 12 × 6, sem a
|
|
92
|
+
// ponta afiada); ela tem o fundo da janela e a linha da borda, então a borda dá a volta nela.
|
|
93
|
+
// A dica com seta se afasta 8 do gatilho (`--space-2`: os 6 da seta e 2 de folga); sem
|
|
94
|
+
// seta, 4 (`--space-1`) — a referência usa 7 e 3, que não são da nossa escala. O popover fica
|
|
95
|
+
// sempre a 8, com ou sem seta, como o dela.
|
|
96
|
+
// • O ATRASO da dica é o dela: 1,5 s para abrir e 0,5 s para fechar (o motor abre em 0,6 s e
|
|
97
|
+
// fecha na hora). Pelo teclado ela abre já, e depois da primeira as vizinhas abrem sem esperar
|
|
98
|
+
// — é o grupo do `Tooltip.Provider` do `AureaProvider`.
|
|
99
|
+
// • O GATILHO FOCÁVEL (C-11): a dica em cima de um texto só abria pelo teclado se o app pusesse
|
|
100
|
+
// `tabIndex`. A referência resolve no gatilho, que sai focável como botão; aqui também — o que
|
|
101
|
+
// não é focável sozinho (um `<span>`, um selo) ganha `tabIndex=0` e `role="button"`. Na
|
|
102
|
+
// marcação, quando o filho é uma tag; e, quando é um componente, no nó de verdade, depois de
|
|
103
|
+
// montado, porque só o DOM sabe o que o componente desenhou.
|
|
104
|
+
const ATRASO_DA_DICA = 1500, ATRASO_PARA_FECHAR_A_DICA = 500;
|
|
105
|
+
function Seta() { return _jsxs("svg", { viewBox: "0 0 12 12", "aria-hidden": "true", children: [_jsx("path", { className: "overlay-arrow-fill", d: "M0 0Q6 12 12 0Z" }), _jsx("path", { className: "overlay-arrow-line", d: "M0 0Q6 12 12 0", fill: "none" })] }); }
|
|
106
|
+
const FOCAVEIS_POR_NATUREZA = new Set(["button", "input", "select", "textarea", "summary", "iframe", "audio", "video"]);
|
|
107
|
+
function focavelNaMarcacao(el) {
|
|
108
|
+
if (typeof el.type !== "string")
|
|
109
|
+
return undefined;
|
|
110
|
+
const p = el.props;
|
|
111
|
+
if (p.tabIndex !== undefined)
|
|
112
|
+
return true;
|
|
113
|
+
if (el.type === "a" || el.type === "area")
|
|
114
|
+
return p.href !== undefined;
|
|
115
|
+
return FOCAVEIS_POR_NATUREZA.has(el.type);
|
|
116
|
+
}
|
|
117
|
+
function garantirFoco(no) {
|
|
118
|
+
if (!no || no.tabIndex >= 0 || no.hasAttribute("tabindex"))
|
|
119
|
+
return;
|
|
120
|
+
no.tabIndex = 0;
|
|
121
|
+
if (!no.hasAttribute("role"))
|
|
122
|
+
no.setAttribute("role", "button");
|
|
123
|
+
}
|
|
124
|
+
export function Tooltip({ children, content, side = "top", arrow = false, delay = ATRASO_DA_DICA, closeDelay = ATRASO_PARA_FECHAR_A_DICA }) {
|
|
125
|
+
const id = React.useId();
|
|
126
|
+
const triggerId = children.props.id;
|
|
127
|
+
const portal = usePortalContainer();
|
|
128
|
+
const foco = focavelNaMarcacao(children) === false ? { tabIndex: 0, role: "button" } : {};
|
|
129
|
+
return _jsxs(BaseTooltip.Root, { children: [_jsx(BaseTooltip.Trigger, { ref: garantirFoco, id: triggerId, render: children, "aria-describedby": id, delay: delay, closeDelay: closeDelay, ...foco }), _jsx(BaseTooltip.Portal, { container: portal, children: _jsx(BaseTooltip.Positioner, { side: side, sideOffset: arrow ? 8 : 4, children: _jsxs(BaseTooltip.Popup, { id: id, role: "tooltip", className: "tooltip", children: [arrow && _jsx(BaseTooltip.Arrow, { className: "overlay-arrow", children: _jsx(Seta, {}) }), content] }) }) })] });
|
|
130
|
+
}
|
|
131
|
+
export function Popover({ trigger, title, children, side = "bottom", arrow = false }) { const portal = usePortalContainer(); return _jsxs(BasePopover.Root, { children: [_jsx(BasePopover.Trigger, { render: trigger }), _jsx(BasePopover.Portal, { container: portal, children: _jsx(BasePopover.Positioner, { side: side, sideOffset: 8, children: _jsxs(BasePopover.Popup, { className: "popover", children: [arrow && _jsx(BasePopover.Arrow, { className: "overlay-arrow", children: _jsx(Seta, {}) }), title && _jsx(BasePopover.Title, { render: _jsx("strong", {}), className: "popover-title", children: title }), children] }) }) })] }); }
|
|
77
132
|
// HoverCard (Lote 1 do BUILDING.md). Não é Tooltip nem Popover, e a diferença é de propósito,
|
|
78
133
|
// não de aparência: a Tooltip é um RÓTULO curto (`role="tooltip"`, some ao mover o mouse); o
|
|
79
134
|
// Popover abre por CLIQUE e pode conter foco; este é uma PRÉVIA rica que aparece ao repousar o
|
package/dist/pure.d.ts
CHANGED
|
@@ -15,9 +15,12 @@ export interface AureaStrings {
|
|
|
15
15
|
close: string;
|
|
16
16
|
confirmCancel: string;
|
|
17
17
|
dataError: string;
|
|
18
|
+
dataCrashed: string;
|
|
19
|
+
dataRetry: string;
|
|
18
20
|
dataEmpty: string;
|
|
19
21
|
confirmProceed: string;
|
|
20
22
|
paginationLabel: string;
|
|
23
|
+
paginationPage: string;
|
|
21
24
|
previous: string;
|
|
22
25
|
next: string;
|
|
23
26
|
breadcrumbLabel: string;
|
|
@@ -26,6 +29,9 @@ export interface AureaStrings {
|
|
|
26
29
|
tableLabel: string;
|
|
27
30
|
commandLabel: string;
|
|
28
31
|
commandPlaceholder: string;
|
|
32
|
+
commandHintMove: string;
|
|
33
|
+
commandHintSelect: string;
|
|
34
|
+
commandHintClose: string;
|
|
29
35
|
dismissNotification: string;
|
|
30
36
|
toolbarLabel: string;
|
|
31
37
|
loading: string;
|
|
@@ -166,6 +172,8 @@ export interface AureaStrings {
|
|
|
166
172
|
graphZoomOut: string;
|
|
167
173
|
graphFit: string;
|
|
168
174
|
graphLegend: string;
|
|
175
|
+
graphLegendKind: string;
|
|
176
|
+
graphLegendStatus: string;
|
|
169
177
|
graphOverview: string;
|
|
170
178
|
graphConnections: string;
|
|
171
179
|
graphShow: string;
|
|
@@ -209,6 +217,8 @@ export interface AureaStrings {
|
|
|
209
217
|
qrCode: string;
|
|
210
218
|
chartLabel: string;
|
|
211
219
|
copyCode: string;
|
|
220
|
+
codeBlockPreview: string;
|
|
221
|
+
codeBlockCode: string;
|
|
212
222
|
copied: string;
|
|
213
223
|
linkCopied: string;
|
|
214
224
|
linkCopyFailed: string;
|
|
@@ -220,6 +230,16 @@ export interface AureaStrings {
|
|
|
220
230
|
bottomNavLabel: string;
|
|
221
231
|
themeToDark: string;
|
|
222
232
|
themeToLight: string;
|
|
233
|
+
datePlaceholder: string;
|
|
234
|
+
dateRangePlaceholder: string;
|
|
235
|
+
colorPicker: string;
|
|
236
|
+
colorArea2D: string;
|
|
237
|
+
colorChannel: Record<"hue" | "saturation" | "brightness" | "lightness" | "red" | "green" | "blue" | "alpha", string>;
|
|
238
|
+
colorHue: Record<"red" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "magenta" | "pink" | "brown" | "gray" | "white" | "black", string>;
|
|
239
|
+
colorTone: Record<"veryDark" | "dark" | "light" | "veryLight" | "vivid" | "pale" | "grayish", string>;
|
|
240
|
+
colorNameFormat: string;
|
|
241
|
+
colorHex: string;
|
|
242
|
+
colorSwatches: string;
|
|
223
243
|
universalState: Record<UniversalState, string>;
|
|
224
244
|
}
|
|
225
245
|
export declare const defaultStrings: AureaStrings;
|
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", 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", 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,7 +1,7 @@
|
|
|
1
1
|
import React, { type ReactNode } from "react";
|
|
2
2
|
import { type Responsive } from "./pure.js";
|
|
3
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 }: {
|
|
4
|
+
export declare function AureaProvider({ children, strings, direction, spriteUrl, portalContainer, theme, defaultTheme, onThemeChange, density, defaultDensity, onDensityChange, toastPlacement }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
strings?: Partial<AureaStrings>;
|
|
7
7
|
direction?: "ltr" | "rtl";
|
|
@@ -13,6 +13,7 @@ export declare function AureaProvider({ children, strings, direction, spriteUrl,
|
|
|
13
13
|
density?: AureaDensity;
|
|
14
14
|
defaultDensity?: AureaDensity;
|
|
15
15
|
onDensityChange?: (density: AureaDensity) => void;
|
|
16
|
+
toastPlacement?: ToastPlacement;
|
|
16
17
|
}): React.JSX.Element;
|
|
17
18
|
export type AureaToastType = "info" | "success" | "warning" | "danger";
|
|
18
19
|
export declare const useToast: () => import("@base-ui/react").UseToastManagerReturnValue<any>;
|
|
@@ -25,6 +26,7 @@ export declare function useAureaTheme(): {
|
|
|
25
26
|
setDensity: (d: AureaDensity) => void;
|
|
26
27
|
toggleTheme: () => void;
|
|
27
28
|
};
|
|
29
|
+
export type ToastPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end";
|
|
28
30
|
export type { IconName, PhosphorIconName, AureaIconNames, IconWeight } from "./icon-names.js";
|
|
29
31
|
import { type IconName, type IconWeight } from "./icon-names.js";
|
|
30
32
|
export type IconSize = "sm" | "md" | "lg" | "xl";
|
|
@@ -41,7 +43,8 @@ export interface IconProps extends Omit<React.SVGAttributes<SVGSVGElement>, "nam
|
|
|
41
43
|
name: AureaIcon;
|
|
42
44
|
spriteUrl?: string;
|
|
43
45
|
size?: Responsive<IconSize>;
|
|
44
|
-
/** `fill` desenha a forma cheia — a do item escolhido (ADR-0053).
|
|
46
|
+
/** `fill` desenha a forma cheia — a do item escolhido (ADR-0053). `bold`, o traço grosso, só nos
|
|
47
|
+
* nomes que o têm (hoje, o `x`); os outros, e o nome próprio do app, ficam no `regular`. */
|
|
45
48
|
weight?: IconWeight;
|
|
46
49
|
}
|
|
47
50
|
export declare function Icon({ name, spriteUrl, size, weight, className, ...props }: IconProps): React.JSX.Element;
|
package/dist/system.js
CHANGED
|
@@ -22,7 +22,7 @@ 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, density, defaultDensity, onDensityChange, toastPlacement = "bottom" }) {
|
|
26
26
|
const value = React.useMemo(() => strings ? { ...defaultStrings, ...strings } : defaultStrings, [strings]);
|
|
27
27
|
const temaCtx = useEixoDoDocumento("theme", theme, defaultTheme, onThemeChange);
|
|
28
28
|
const densCtx = useEixoDoDocumento("density", density, defaultDensity, onDensityChange);
|
|
@@ -43,7 +43,7 @@ export function AureaProvider({ children, strings, direction = "ltr", spriteUrl
|
|
|
43
43
|
// GAR-14: os avisos presos a um botão vivem num gerenciador do MÓDULO (ver `avisosAncorados`), então
|
|
44
44
|
// só o provedor de FORA monta o hospedeiro deles — com dois, cada aviso apareceria duas vezes.
|
|
45
45
|
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, {}) })] }) }) }) }) }) }) }) }) });
|
|
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, { timeout: TEMPO_DO_AVISO, children: _jsxs(BaseTooltip.Provider, { children: [children, _jsx(AureaToastViewport, { placement: toastPlacement }), deFora && _jsx(BaseToast.Provider, { toastManager: avisosAncorados, children: _jsx(AvisosAncorados, {}) })] }) }) }) }) }) }) }) }) });
|
|
47
47
|
}
|
|
48
48
|
/** Um eixo de apresentação que vive no `<html>`: tema ou densidade. A conta é a mesma para os
|
|
49
49
|
* dois, e escrevê-la duas vezes seria o defeito do §21 cometido dentro do próprio conserto
|
|
@@ -147,14 +147,20 @@ export function useAureaTheme() {
|
|
|
147
147
|
},
|
|
148
148
|
}), [theme, density, dentroDeProvider, ctxTema, ctxDens]);
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
const TEMPO_DO_AVISO = 4000;
|
|
151
|
+
const ICONE_DO_AVISO = { info: "info", success: "check-circle", warning: "warning", danger: "x-circle" };
|
|
152
|
+
function AureaToastList({ placement }) {
|
|
151
153
|
const { toasts } = BaseToast.useToastManager();
|
|
152
154
|
const s = useAureaStrings();
|
|
153
|
-
|
|
155
|
+
const arrasto = [placement.startsWith("top") ? "up" : "down", "right"];
|
|
156
|
+
return _jsx(_Fragment, { children: toasts.map(t => {
|
|
157
|
+
const tipo = t.type === "error" ? "danger" : t.type;
|
|
158
|
+
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);
|
|
159
|
+
}) });
|
|
154
160
|
}
|
|
155
|
-
function AureaToastViewport() {
|
|
161
|
+
function AureaToastViewport({ placement }) {
|
|
156
162
|
const portal = usePortalContainer();
|
|
157
|
-
return _jsx(BaseToast.Portal, { container: portal, children: _jsx(BaseToast.Viewport, { className: "toast-stack", children: _jsx(AureaToastList, {}) }) });
|
|
163
|
+
return _jsx(BaseToast.Portal, { container: portal, children: _jsx(BaseToast.Viewport, { className: cx("toast-stack", `toast-stack-${placement}`), children: _jsx(AureaToastList, { placement: placement }) }) });
|
|
158
164
|
}
|
|
159
165
|
// GAR-14 (0.28.0) · OS AVISOS PRESOS A UM BOTÃO ("Link copiado", do `Button share`). A documentação do
|
|
160
166
|
// motor manda o aviso ancorado viver num gerenciador SEPARADO do da pilha — senão ele entra na conta
|
|
@@ -190,12 +196,14 @@ function AvisosAncorados() {
|
|
|
190
196
|
: _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
197
|
}) }) });
|
|
192
198
|
}
|
|
193
|
-
import { NOMES_PHOSPHOR } from "./icon-names.js";
|
|
199
|
+
import { NOMES_PHOSPHOR, NOMES_BOLD } from "./icon-names.js";
|
|
194
200
|
// spriteUrl aqui é OVERRIDE local (dois sprites na mesma página, por exemplo). O normal é
|
|
195
201
|
// não passar nada e deixar o AureaProvider dizer de onde vêm os glifos.
|
|
196
202
|
// 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
|
-
|
|
203
|
+
// próprio do app pedido em `fill` desenha o regular, em vez de um `<use>` vazio. O `bold` (0.32.0)
|
|
204
|
+
// segue a mesma regra, com a lista curta do `NOMES_BOLD`.
|
|
205
|
+
const idDoIcone = (name, weight = "regular") => weight === "fill" && NOMES_PHOSPHOR.has(name) ? `i-${name}-fill`
|
|
206
|
+
: weight === "bold" && NOMES_BOLD.has(name) ? `i-${name}-bold` : `i-${name}`;
|
|
199
207
|
export function Icon({ name, spriteUrl, size, weight, className, ...props }) {
|
|
200
208
|
const base = useSpriteUrl();
|
|
201
209
|
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.32.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"
|