@flowtomic/ui 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/developer-panel/page.js +1 -1
- package/dist/components/atoms/actions/badge/badge.d.ts +2 -2
- package/dist/components/atoms/actions/button/button.d.ts +2 -2
- package/dist/components/atoms/animation/encrypted-text/encrypted-text.js +1 -1
- package/dist/components/atoms/animation/sliding-number/sliding-number.d.ts.map +1 -1
- package/dist/components/atoms/animation/sliding-number/sliding-number.js +1 -1
- package/dist/components/atoms/data-display/qr-code/qr-code.d.ts +3 -3
- package/dist/components/atoms/data-display/qr-code/qr-code.d.ts.map +1 -1
- package/dist/components/atoms/data-display/qr-code/qr-code.js +4 -3
- package/dist/components/atoms/feedback/alert/alert.d.ts +1 -1
- package/dist/components/atoms/feedback/alert-dialog/alert-dialog.d.ts +2 -2
- package/dist/components/atoms/feedback/tooltip/tooltip.js +3 -3
- package/dist/components/atoms/forms/input/input.d.ts +2 -2
- package/dist/components/atoms/forms/toggle/toggle.d.ts +2 -2
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/atoms/index.js +1 -0
- package/dist/components/atoms/layout/sidebar/sidebar.d.ts +2 -2
- package/dist/components/atoms/navigation/command/command.d.ts +13 -13
- package/dist/components/atoms/widget-resize-handle/index.d.ts +3 -0
- package/dist/components/atoms/widget-resize-handle/index.d.ts.map +1 -0
- package/dist/components/atoms/widget-resize-handle/index.js +1 -0
- package/dist/components/atoms/widget-resize-handle/widget-resize-handle.d.ts +60 -0
- package/dist/components/atoms/widget-resize-handle/widget-resize-handle.d.ts.map +1 -0
- package/dist/components/atoms/widget-resize-handle/widget-resize-handle.js +75 -0
- package/dist/components/molecules/draggable-widget/draggable-widget.d.ts +73 -0
- package/dist/components/molecules/draggable-widget/draggable-widget.d.ts.map +1 -0
- package/dist/components/molecules/draggable-widget/draggable-widget.js +44 -0
- package/dist/components/molecules/draggable-widget/index.d.ts +3 -0
- package/dist/components/molecules/draggable-widget/index.d.ts.map +1 -0
- package/dist/components/molecules/draggable-widget/index.js +1 -0
- package/dist/components/molecules/edit-mode-toggle/edit-mode-toggle.d.ts +41 -0
- package/dist/components/molecules/edit-mode-toggle/edit-mode-toggle.d.ts.map +1 -0
- package/dist/components/molecules/edit-mode-toggle/edit-mode-toggle.js +26 -0
- package/dist/components/molecules/edit-mode-toggle/index.d.ts +3 -0
- package/dist/components/molecules/edit-mode-toggle/index.d.ts.map +1 -0
- package/dist/components/molecules/edit-mode-toggle/index.js +1 -0
- package/dist/components/molecules/forms/autocomplete/autocomplete-context.d.ts +1 -1
- package/dist/components/molecules/forms/autocomplete/autocomplete-context.d.ts.map +1 -1
- package/dist/components/molecules/forms/autocomplete/autocomplete-item.d.ts.map +1 -1
- package/dist/components/molecules/forms/autocomplete/autocomplete-section.d.ts.map +1 -1
- package/dist/components/molecules/forms/autocomplete/autocomplete.d.ts +1 -1
- package/dist/components/molecules/forms/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/molecules/forms/autocomplete/autocomplete.js +6 -6
- package/dist/components/molecules/forms/autocomplete/index.d.ts +2 -2
- package/dist/components/molecules/forms/autocomplete/index.d.ts.map +1 -1
- package/dist/components/molecules/forms/autocomplete/index.js +1 -1
- package/dist/components/molecules/forms/item/item.d.ts +2 -2
- package/dist/components/molecules/forms/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/molecules/forms/text-editor/text-editor.js +14 -13
- package/dist/components/molecules/index.d.ts +8 -2
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/components/molecules/index.js +4 -1
- package/dist/components/molecules/navigation/menu-dock/menu-dock.d.ts.map +1 -1
- package/dist/components/molecules/navigation/menu-dock/menu-dock.js +25 -28
- package/dist/components/molecules/widget-renderer/index.d.ts +3 -0
- package/dist/components/molecules/widget-renderer/index.d.ts.map +1 -0
- package/dist/components/molecules/widget-renderer/index.js +1 -0
- package/dist/components/molecules/widget-renderer/widget-renderer.d.ts +46 -0
- package/dist/components/molecules/widget-renderer/widget-renderer.d.ts.map +1 -0
- package/dist/components/molecules/widget-renderer/widget-renderer.js +37 -0
- package/dist/components/organisms/document-editor/document-editor.d.ts.map +1 -1
- package/dist/components/organisms/document-editor/document-editor.js +4 -4
- package/dist/components/organisms/document-editor/index.d.ts +1 -1
- package/dist/components/organisms/document-editor/index.d.ts.map +1 -1
- package/dist/components/organisms/draggable-dashboard-grid/draggable-dashboard-grid.d.ts +65 -0
- package/dist/components/organisms/draggable-dashboard-grid/draggable-dashboard-grid.d.ts.map +1 -0
- package/dist/components/organisms/draggable-dashboard-grid/draggable-dashboard-grid.js +124 -0
- package/dist/components/organisms/draggable-dashboard-grid/index.d.ts +3 -0
- package/dist/components/organisms/draggable-dashboard-grid/index.d.ts.map +1 -0
- package/dist/components/organisms/draggable-dashboard-grid/index.js +1 -0
- package/dist/components/organisms/form-layout/form-layout.d.ts +2 -2
- package/dist/components/organisms/form-layout/form-layout.d.ts.map +1 -1
- package/dist/components/organisms/form-layout/form-layout.js +11 -9
- package/dist/components/organisms/form-layout/index.d.ts +1 -1
- package/dist/components/organisms/form-layout/index.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +6 -0
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/components/organisms/index.js +3 -0
- package/dist/components/organisms/model-selector/model-selector.d.ts +1 -1
- package/dist/components/organisms/widget-config-modal/index.d.ts +3 -0
- package/dist/components/organisms/widget-config-modal/index.d.ts.map +1 -0
- package/dist/components/organisms/widget-config-modal/index.js +1 -0
- package/dist/components/organisms/widget-config-modal/widget-config-modal.d.ts +57 -0
- package/dist/components/organisms/widget-config-modal/widget-config-modal.d.ts.map +1 -0
- package/dist/components/organisms/widget-config-modal/widget-config-modal.js +35 -0
- package/dist/components/organisms/widget-palette/index.d.ts +3 -0
- package/dist/components/organisms/widget-palette/index.d.ts.map +1 -0
- package/dist/components/organisms/widget-palette/index.js +1 -0
- package/dist/components/organisms/widget-palette/widget-palette.d.ts +71 -0
- package/dist/components/organisms/widget-palette/widget-palette.d.ts.map +1 -0
- package/dist/components/organisms/widget-palette/widget-palette.js +42 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +513 -509
- package/dist/types/dashboard.d.ts +74 -0
- package/dist/types/dashboard.d.ts.map +1 -0
- package/dist/types/dashboard.js +7 -0
- package/package.json +4 -3
|
@@ -31,5 +31,5 @@ export default function DeveloperPanel({ user, health, systemInfo, environmentIn
|
|
|
31
31
|
if (loading) {
|
|
32
32
|
return (_jsx("div", { className: "container mx-auto p-6", children: _jsx("div", { className: "flex items-center justify-center h-64", children: _jsx("p", { className: "text-muted-foreground", children: "Carregando informa\u00E7\u00F5es do sistema..." }) }) }));
|
|
33
33
|
}
|
|
34
|
-
return (_jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-3xl font-bold", children: "Painel de Desenvolvedor" }), _jsx("p", { className: "text-muted-foreground mt-2", children: "Informa\u00E7\u00F5es t\u00E9cnicas e ferramentas de desenvolvimento" })] }), _jsx(Badge, { variant: "outline", className: "text-lg px-4 py-2", children: user?.isAdmin ? "ADMIN" : "USER" })] }), error && (_jsxs(Card, { className: "border-destructive", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { className: "text-destructive", children: "Erro" }) }), _jsx(CardContent, { children: _jsx("p", { children: error }) })] })), _jsxs(Tabs, { defaultValue: "info", className: "w-full", children: [_jsxs(TabsList, { className: "grid w-full grid-cols-2 mb-6", children: [_jsxs(TabsTrigger, { value: "info", className: "flex items-center gap-2", children: [_jsx(Info, { className: "h-4 w-4" }), "Informa\u00E7\u00F5es do Sistema"] }), _jsxs(TabsTrigger, { value: "editor", className: "flex items-center gap-2", children: [_jsx(Code, { className: "h-4 w-4" }), "Editor de Scripts"] })] }), _jsx(TabsContent, { value: "info", className: "space-y-6", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Usu\u00E1rio Atual" }), _jsx(CardDescription, { children: "Informa\u00E7\u00F5es da sess\u00E3o atual" })] }), _jsxs(CardContent, { className: "space-y-2", children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Nome" }), _jsx("p", { className: "font-medium", children: user?.username || "N/A" })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Email" }), _jsx("p", { className: "font-medium", children: user?.email || "N/A" })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Role" }), _jsx(Badge, { variant: user?.isAdmin ? "default" : "secondary", children: user?.role || "N/A" })] }), user?.token && (_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Token" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: [user.token.substring(0, 20), "..."] }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => copyToClipboard(user.token, "token"), children: copiedText === "token" ? "Copiado!" : "Copiar" })] })] }))] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Status do Sistema" }), _jsx(CardDescription, { children: "Health check da API" })] }), _jsx(CardContent, { className: "space-y-2", children: health ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Status" }), _jsx(Badge, { variant: health.status === "UP" ? "default" : "destructive", children: health.status })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Servi\u00E7o" }), _jsx("p", { className: "font-medium", children: health.service })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timestamp" }), _jsx("p", { className: "font-medium text-xs", children: new Date(health.timestamp).toLocaleString("pt-BR") })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Informa\u00E7\u00F5es da Aplica\u00E7\u00E3o" }), _jsx(CardDescription, { children: "Vers\u00E3o e detalhes do sistema" })] }), _jsx(CardContent, { className: "space-y-2", children: systemInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Nome" }), _jsx("p", { className: "font-medium", children: systemInfo.name })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Vers\u00E3o" }), _jsx(Badge, { variant: "outline", children: systemInfo.version })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Descri\u00E7\u00E3o" }), _jsx("p", { className: "font-medium text-sm", children: systemInfo.description })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Ambiente Frontend" }), _jsx(CardDescription, { children: "Configura\u00E7\u00F5es do cliente" })] }), _jsx(CardContent, { className: "space-y-2", children: environmentInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "API Base URL" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: environmentInfo.apiBaseUrl }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => copyToClipboard(environmentInfo.apiBaseUrl, "apiUrl"), children: copiedText === "apiUrl" ? "Copiado!" : "Copiar" })] })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Modo" }), _jsx(Badge, { variant: "outline", children: environmentInfo.nodeEnv })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timezone" }), _jsx("p", { className: "font-medium text-xs", children: environmentInfo.timezone })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Resolu\u00E7\u00E3o" }), _jsx("p", { className: "font-medium text-xs", children: environmentInfo.screenResolution })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Ferramentas" }), _jsx(CardDescription, { children: "Acesso r\u00E1pido a ferramentas de desenvolvimento" })] }), _jsxs(CardContent, { className: "space-y-2", children: [_jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenSwagger || defaultOpenSwagger, children: "\uD83D\uDCDA Abrir Swagger UI" }), _jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenApiDocs || defaultOpenApiDocs, children: "\uD83D\uDCD6 Abrir API Docs (JSON)" }), _jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenHealthCheck || defaultOpenHealthCheck, children: "\u2764\uFE0F Health Check" })] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Navegador" }), _jsx(CardDescription, { children: "Informa\u00E7\u00F5es do cliente web" })] }), _jsx(CardContent, { className: "space-y-2", children: environmentInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "User Agent" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: [environmentInfo.userAgent.substring(0, 50), "..."] }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => copyToClipboard(environmentInfo.userAgent, "userAgent"), children: copiedText === "userAgent" ? "Copiado!" : "Copiar" })] })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timestamp" }), _jsx("p", { className: "font-medium text-xs", children: new Date(environmentInfo.timestamp).toLocaleString("pt-BR") })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] })] }) }), _jsx(TabsContent, { value: "editor", className: "space-y-6", children: _jsx(ScriptEditor, { ...scriptEditorProps }) })] })] }));
|
|
34
|
+
return (_jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-3xl font-bold", children: "Painel de Desenvolvedor" }), _jsx("p", { className: "text-muted-foreground mt-2", children: "Informa\u00E7\u00F5es t\u00E9cnicas e ferramentas de desenvolvimento" })] }), _jsx(Badge, { variant: "outline", className: "text-lg px-4 py-2", children: user?.isAdmin ? "ADMIN" : "USER" })] }), error && (_jsxs(Card, { className: "border-destructive", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { className: "text-destructive", children: "Erro" }) }), _jsx(CardContent, { children: _jsx("p", { children: error }) })] })), _jsxs(Tabs, { defaultValue: "info", className: "w-full", children: [_jsxs(TabsList, { className: "grid w-full grid-cols-2 mb-6", children: [_jsxs(TabsTrigger, { value: "info", className: "flex items-center gap-2", children: [_jsx(Info, { className: "h-4 w-4" }), "Informa\u00E7\u00F5es do Sistema"] }), _jsxs(TabsTrigger, { value: "editor", className: "flex items-center gap-2", children: [_jsx(Code, { className: "h-4 w-4" }), "Editor de Scripts"] })] }), _jsx(TabsContent, { value: "info", className: "space-y-6", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Usu\u00E1rio Atual" }), _jsx(CardDescription, { children: "Informa\u00E7\u00F5es da sess\u00E3o atual" })] }), _jsxs(CardContent, { className: "space-y-2", children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Nome" }), _jsx("p", { className: "font-medium", children: user?.username || "N/A" })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Email" }), _jsx("p", { className: "font-medium", children: user?.email || "N/A" })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Role" }), _jsx(Badge, { variant: user?.isAdmin ? "default" : "secondary", children: user?.role || "N/A" })] }), user?.token && (_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Token" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: [user.token.substring(0, 20), "..."] }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => user.token && copyToClipboard(user.token, "token"), children: copiedText === "token" ? "Copiado!" : "Copiar" })] })] }))] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Status do Sistema" }), _jsx(CardDescription, { children: "Health check da API" })] }), _jsx(CardContent, { className: "space-y-2", children: health ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Status" }), _jsx(Badge, { variant: health.status === "UP" ? "default" : "destructive", children: health.status })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Servi\u00E7o" }), _jsx("p", { className: "font-medium", children: health.service })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timestamp" }), _jsx("p", { className: "font-medium text-xs", children: new Date(health.timestamp).toLocaleString("pt-BR") })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Informa\u00E7\u00F5es da Aplica\u00E7\u00E3o" }), _jsx(CardDescription, { children: "Vers\u00E3o e detalhes do sistema" })] }), _jsx(CardContent, { className: "space-y-2", children: systemInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Nome" }), _jsx("p", { className: "font-medium", children: systemInfo.name })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Vers\u00E3o" }), _jsx(Badge, { variant: "outline", children: systemInfo.version })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Descri\u00E7\u00E3o" }), _jsx("p", { className: "font-medium text-sm", children: systemInfo.description })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Ambiente Frontend" }), _jsx(CardDescription, { children: "Configura\u00E7\u00F5es do cliente" })] }), _jsx(CardContent, { className: "space-y-2", children: environmentInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "API Base URL" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: environmentInfo.apiBaseUrl }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => copyToClipboard(environmentInfo.apiBaseUrl, "apiUrl"), children: copiedText === "apiUrl" ? "Copiado!" : "Copiar" })] })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Modo" }), _jsx(Badge, { variant: "outline", children: environmentInfo.nodeEnv })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timezone" }), _jsx("p", { className: "font-medium text-xs", children: environmentInfo.timezone })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Resolu\u00E7\u00E3o" }), _jsx("p", { className: "font-medium text-xs", children: environmentInfo.screenResolution })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Ferramentas" }), _jsx(CardDescription, { children: "Acesso r\u00E1pido a ferramentas de desenvolvimento" })] }), _jsxs(CardContent, { className: "space-y-2", children: [_jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenSwagger || defaultOpenSwagger, children: "\uD83D\uDCDA Abrir Swagger UI" }), _jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenApiDocs || defaultOpenApiDocs, children: "\uD83D\uDCD6 Abrir API Docs (JSON)" }), _jsx(Button, { variant: "outline", className: "w-full justify-start", onClick: onOpenHealthCheck || defaultOpenHealthCheck, children: "\u2764\uFE0F Health Check" })] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Navegador" }), _jsx(CardDescription, { children: "Informa\u00E7\u00F5es do cliente web" })] }), _jsx(CardContent, { className: "space-y-2", children: environmentInfo ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "User Agent" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("code", { className: "text-xs bg-muted px-2 py-1 rounded flex-1 truncate", children: [environmentInfo.userAgent.substring(0, 50), "..."] }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => copyToClipboard(environmentInfo.userAgent, "userAgent"), children: copiedText === "userAgent" ? "Copiado!" : "Copiar" })] })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Timestamp" }), _jsx("p", { className: "font-medium text-xs", children: new Date(environmentInfo.timestamp).toLocaleString("pt-BR") })] })] })) : (_jsx("p", { className: "text-muted-foreground", children: "N\u00E3o dispon\u00EDvel" })) })] })] }) }), _jsx(TabsContent, { value: "editor", className: "space-y-6", children: _jsx(ScriptEditor, { ...scriptEditorProps }) })] })] }));
|
|
35
35
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "outline" | "default" | "success" | "destructive" | "secondary" | "info" | "warning" | null | undefined;
|
|
5
|
+
size?: "sm" | "lg" | "md" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
8
8
|
children: React.ReactNode;
|
|
@@ -2,8 +2,8 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { type Transition } from "motion/react";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
|
-
variant?: "link" | "
|
|
6
|
-
size?: "
|
|
5
|
+
variant?: "link" | "outline" | "default" | "success" | "destructive" | "secondary" | "ghost" | "info" | "natural" | null | undefined;
|
|
6
|
+
size?: "sm" | "default" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "transition">, VariantProps<typeof buttonVariants> {
|
|
9
9
|
asChild?: boolean;
|
|
@@ -92,7 +92,7 @@ export const EncryptedText = ({ text, className, revealDelayMs = 50, charset = D
|
|
|
92
92
|
}, [isInView, text, revealDelayMs, charset, flipDelayMs]);
|
|
93
93
|
if (!text)
|
|
94
94
|
return null;
|
|
95
|
-
return (_jsx(motion.span, { ref: ref, className: cn(className), "aria-label": text,
|
|
95
|
+
return (_jsx(motion.span, { ref: ref, className: cn(className), "aria-label": text, children: text.split("").map((char, index) => {
|
|
96
96
|
const isRevealed = index < revealCount;
|
|
97
97
|
const displayChar = isRevealed
|
|
98
98
|
? char
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sliding-number.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/animation/sliding-number/sliding-number.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAItB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"sliding-number.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/animation/sliding-number/sliding-number.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAItB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0F/B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IACtE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,EACH,MAAM,EACN,SAAS,EACT,MAAc,EACd,YAAoB,EACpB,UAAiB,EACjB,QAAgB,EAChB,gBAAsB,EACtB,aAAiB,EACjB,UAIC,EACD,GAAG,KAAK,EACT,EAAE,kBAAkB,2CA+GpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -35,7 +35,7 @@ function SlidingNumberDisplay({ motionValue, number, height, transition, }) {
|
|
|
35
35
|
return translateY;
|
|
36
36
|
});
|
|
37
37
|
if (!height) {
|
|
38
|
-
return _jsx("span", { className: "invisible absolute top-0 left-0 w-full h-[1em] leading-none", children: number });
|
|
38
|
+
return (_jsx("span", { className: "invisible absolute top-0 left-0 w-full h-[1em] leading-none", children: number }));
|
|
39
39
|
}
|
|
40
40
|
return (_jsx(motion.span, { "data-slot": "sliding-number-display", style: {
|
|
41
41
|
y,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type Options as QRCodeStylingOptions } from "qr-code-styling";
|
|
3
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type Options as QRCodeStylingOptions } from "qr-code-styling";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
declare const qrCodeRootVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "lg" | "md" | null | undefined;
|
|
6
6
|
animated?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface QRCodeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof qrCodeRootVariants> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr-code.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/data-display/qr-code/qr-code.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"qr-code.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/data-display/qr-code/qr-code.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAsB,EAAE,KAAK,OAAO,IAAI,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,kBAAkB;;;8EAkBvB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EAC5D,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACzC,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA0CD,eAAO,MAAM,MAAM,oFAwElB,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import QRCodeStyling from "qr-code-styling";
|
|
5
3
|
import { cva } from "class-variance-authority";
|
|
4
|
+
import QRCodeStyling from "qr-code-styling";
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import { cn } from "@/lib/utils";
|
|
7
7
|
// Size tokens (visual wrapper padding + internal QR size)
|
|
8
8
|
const qrCodeRootVariants = cva("relative flex items-center justify-center select-none", // base classes
|
|
@@ -72,7 +72,8 @@ export const QRCode = React.forwardRef(({ value, options, size = "md", animated
|
|
|
72
72
|
});
|
|
73
73
|
}, [value, options, size]);
|
|
74
74
|
// Respect prefers-reduced-motion for animated overlay
|
|
75
|
-
const prefersReducedMotion = React.useMemo(() => typeof window !== "undefined" &&
|
|
75
|
+
const prefersReducedMotion = React.useMemo(() => typeof window !== "undefined" &&
|
|
76
|
+
window.matchMedia("(prefers-reduced-motion: reduce)").matches, []);
|
|
76
77
|
return (_jsxs("div", { ref: ref, role: "img", "aria-label": ariaLabel, className: cn(qrCodeRootVariants({ size, animated }), className), ...props, children: [_jsx("div", { ref: containerRef, className: "[&>canvas]:h-auto [&>canvas]:w-auto" }), _jsx(FrameHandle, { className: "absolute left-0 top-0" }), _jsx(FrameHandle, { className: "absolute top-0 right-0 rotate-90" }), _jsx(FrameHandle, { className: "absolute bottom-0 right-0 rotate-180" }), _jsx(FrameHandle, { className: "absolute bottom-0 left-0 -rotate-90" }), animated && !prefersReducedMotion && (_jsx(GradientScan, { className: "animate-[scan_2.4s_linear_infinite]", style: {} })), _jsx("style", { children: `@keyframes scan { from { transform: translateY(100%); opacity: .15; } to { transform: translateY(0%); opacity: .55; } }` })] }));
|
|
77
78
|
});
|
|
78
79
|
QRCode.displayName = "QRCode";
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { type VariantProps } from "class-variance-authority";
|
|
15
15
|
import * as React from "react";
|
|
16
16
|
declare const alertVariants: (props?: ({
|
|
17
|
-
variant?: "default" | "
|
|
17
|
+
variant?: "default" | "success" | "destructive" | "info" | "warning" | null | undefined;
|
|
18
18
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
19
|
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
20
20
|
}
|
|
@@ -19,7 +19,7 @@ export type AlertDialogTriggerProps = React.ComponentPropsWithoutRef<typeof Aler
|
|
|
19
19
|
* Variantes de animação para AlertDialogContent
|
|
20
20
|
*/
|
|
21
21
|
declare const alertDialogContentVariants: (props?: ({
|
|
22
|
-
animation?: "
|
|
22
|
+
animation?: "center" | "top" | "right" | "bottom" | "left" | "depth" | "3d" | null | undefined;
|
|
23
23
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
24
|
export type AlertDialogContentProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & VariantProps<typeof alertDialogContentVariants> & {
|
|
25
25
|
/**
|
|
@@ -61,7 +61,7 @@ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDial
|
|
|
61
61
|
* Suporta animações 3D quando animation="3d"
|
|
62
62
|
*/
|
|
63
63
|
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
64
|
-
animation?: "
|
|
64
|
+
animation?: "center" | "top" | "right" | "bottom" | "left" | "depth" | "3d" | null | undefined;
|
|
65
65
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
66
66
|
/**
|
|
67
67
|
* Habilita backdrop blur (apenas para animation="3d")
|
|
@@ -52,7 +52,7 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
52
52
|
* Este componente não renderiza nada - o tooltip é renderizado via portal
|
|
53
53
|
* O estado é gerenciado pelo TooltipWithMouseFollowWrapper
|
|
54
54
|
*/
|
|
55
|
-
const TooltipContentWithMouseFollow = React.forwardRef(({ className, minWidth, children, ...
|
|
55
|
+
const TooltipContentWithMouseFollow = React.forwardRef(({ className: _className, minWidth: _minWidth, children: _children, ..._props }, _ref) => {
|
|
56
56
|
// Este componente não renderiza - o tooltip é gerenciado pelo wrapper
|
|
57
57
|
return null;
|
|
58
58
|
});
|
|
@@ -92,7 +92,7 @@ export function TooltipWithMouseFollow({ content, children, containerClassName,
|
|
|
92
92
|
});
|
|
93
93
|
return () => cancelAnimationFrame(rafId1);
|
|
94
94
|
}
|
|
95
|
-
}, [isVisible
|
|
95
|
+
}, [isVisible]);
|
|
96
96
|
const calculatePosition = React.useCallback((mouseX, mouseY) => {
|
|
97
97
|
if (!contentRef.current || !containerRef.current) {
|
|
98
98
|
return { x: mouseX + 12, y: mouseY + 12 };
|
|
@@ -196,7 +196,7 @@ export function TooltipWithMouseFollow({ content, children, containerClassName,
|
|
|
196
196
|
setPosition(newPosition);
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
}, [isVisible,
|
|
199
|
+
}, [isVisible, mouse.x, mouse.y, calculatePosition]);
|
|
200
200
|
return (_jsxs("div", { ref: containerRef, className: cn("relative inline-block", containerClassName), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onMouseMove: handleMouseMove, onTouchStart: handleTouchStart, onTouchEnd: handleTouchEnd, onClick: handleClick, children: [children, _jsx(AnimatePresence, { children: isVisible && (_jsx(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: {
|
|
201
201
|
type: "spring",
|
|
202
202
|
stiffness: 200,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import React from "react";
|
|
3
3
|
declare const inputVariants: (props?: ({
|
|
4
|
-
size?: "
|
|
5
|
-
variant?: "default" | "
|
|
4
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
5
|
+
variant?: "default" | "error" | "success" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof inputVariants> {
|
|
8
8
|
label?: string;
|
|
@@ -2,8 +2,8 @@ import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import type * as React from "react";
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
6
|
-
size?: "
|
|
5
|
+
variant?: "outline" | "default" | null | undefined;
|
|
6
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface ToggleProps extends React.ComponentProps<typeof TogglePrimitive.Root>, VariantProps<typeof toggleVariants> {
|
|
9
9
|
}
|
|
@@ -11,4 +11,6 @@ export * from "./feedback";
|
|
|
11
11
|
export * from "./forms";
|
|
12
12
|
export * from "./layout";
|
|
13
13
|
export * from "./navigation";
|
|
14
|
+
export type { WidgetResizeHandleProps } from "./widget-resize-handle";
|
|
15
|
+
export { WidgetResizeHandle } from "./widget-resize-handle";
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,WAAW,CAAC;AAE1B,cAAc,aAAa,CAAC;AAE5B,cAAc,QAAQ,CAAC;AAEvB,cAAc,gBAAgB,CAAC;AAE/B,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC;AAE3B,cAAc,SAAS,CAAC;AAExB,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,WAAW,CAAC;AAE1B,cAAc,aAAa,CAAC;AAE5B,cAAc,QAAQ,CAAC;AAEvB,cAAc,gBAAgB,CAAC;AAE/B,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC;AAE3B,cAAc,SAAS,CAAC;AAExB,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC;AAE7B,YAAY,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -106,8 +106,8 @@ declare namespace SidebarMenuItem {
|
|
|
106
106
|
var displayName: string;
|
|
107
107
|
}
|
|
108
108
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
109
|
-
variant?: "
|
|
110
|
-
size?: "
|
|
109
|
+
variant?: "outline" | "default" | null | undefined;
|
|
110
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
111
111
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
112
112
|
export interface SidebarMenuButtonProps extends React.ComponentProps<"button">, VariantProps<typeof sidebarMenuButtonVariants> {
|
|
113
113
|
asChild?: boolean;
|
|
@@ -19,11 +19,11 @@ export type CommandSeparatorProps = React.ComponentPropsWithoutRef<typeof Comman
|
|
|
19
19
|
*/
|
|
20
20
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
21
21
|
children?: React.ReactNode;
|
|
22
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
22
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
23
23
|
ref?: React.Ref<HTMLDivElement>;
|
|
24
24
|
} & {
|
|
25
25
|
asChild?: boolean;
|
|
26
|
-
},
|
|
26
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
27
27
|
label?: string;
|
|
28
28
|
shouldFilter?: boolean;
|
|
29
29
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -48,7 +48,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
48
48
|
ref?: React.Ref<HTMLInputElement>;
|
|
49
49
|
} & {
|
|
50
50
|
asChild?: boolean;
|
|
51
|
-
}, "
|
|
51
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
52
52
|
value?: string;
|
|
53
53
|
onValueChange?: (search: string) => void;
|
|
54
54
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -57,11 +57,11 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
57
57
|
*/
|
|
58
58
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
59
59
|
children?: React.ReactNode;
|
|
60
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
60
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
61
61
|
ref?: React.Ref<HTMLDivElement>;
|
|
62
62
|
} & {
|
|
63
63
|
asChild?: boolean;
|
|
64
|
-
},
|
|
64
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
65
65
|
label?: string;
|
|
66
66
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
67
67
|
/**
|
|
@@ -69,21 +69,21 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
|
69
69
|
*/
|
|
70
70
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
71
71
|
children?: React.ReactNode;
|
|
72
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
72
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
73
73
|
ref?: React.Ref<HTMLDivElement>;
|
|
74
74
|
} & {
|
|
75
75
|
asChild?: boolean;
|
|
76
|
-
},
|
|
76
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
77
77
|
/**
|
|
78
78
|
* CommandGroup - Grupo do command
|
|
79
79
|
*/
|
|
80
80
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
81
81
|
children?: React.ReactNode;
|
|
82
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
82
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
83
83
|
ref?: React.Ref<HTMLDivElement>;
|
|
84
84
|
} & {
|
|
85
85
|
asChild?: boolean;
|
|
86
|
-
},
|
|
86
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
87
87
|
heading?: React.ReactNode;
|
|
88
88
|
value?: string;
|
|
89
89
|
forceMount?: boolean;
|
|
@@ -91,11 +91,11 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
|
91
91
|
/**
|
|
92
92
|
* CommandSeparator - Separador do command
|
|
93
93
|
*/
|
|
94
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
94
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
95
95
|
ref?: React.Ref<HTMLDivElement>;
|
|
96
96
|
} & {
|
|
97
97
|
asChild?: boolean;
|
|
98
|
-
},
|
|
98
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
99
99
|
alwaysRender?: boolean;
|
|
100
100
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
101
101
|
/**
|
|
@@ -103,11 +103,11 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
|
|
|
103
103
|
*/
|
|
104
104
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
105
105
|
children?: React.ReactNode;
|
|
106
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
106
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
107
107
|
ref?: React.Ref<HTMLDivElement>;
|
|
108
108
|
} & {
|
|
109
109
|
asChild?: boolean;
|
|
110
|
-
},
|
|
110
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
|
|
111
111
|
disabled?: boolean;
|
|
112
112
|
onSelect?: (value: string) => void;
|
|
113
113
|
value?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/widget-resize-handle/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WidgetResizeHandle } from "./widget-resize-handle";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WidgetResizeHandle - Atom Component
|
|
3
|
+
*
|
|
4
|
+
* Handle para redimensionar widgets arrastando o canto inferior direito.
|
|
5
|
+
* Componente puro de UI, totalmente genérico e reutilizável.
|
|
6
|
+
*/
|
|
7
|
+
export interface WidgetResizeHandleProps {
|
|
8
|
+
/**
|
|
9
|
+
* ID do widget a ser redimensionado
|
|
10
|
+
*/
|
|
11
|
+
widgetId: string;
|
|
12
|
+
/**
|
|
13
|
+
* Largura atual do widget em unidades de grade
|
|
14
|
+
*/
|
|
15
|
+
currentWidth: number;
|
|
16
|
+
/**
|
|
17
|
+
* Altura atual do widget em unidades de grade
|
|
18
|
+
*/
|
|
19
|
+
currentHeight: number;
|
|
20
|
+
/**
|
|
21
|
+
* Callback quando widget é redimensionado
|
|
22
|
+
*/
|
|
23
|
+
onResize: (widgetId: string, w: number, h: number) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Tamanho mínimo do widget (largura)
|
|
26
|
+
*/
|
|
27
|
+
minWidth?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Tamanho mínimo do widget (altura)
|
|
30
|
+
*/
|
|
31
|
+
minHeight?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Tamanho máximo do widget (largura)
|
|
34
|
+
*/
|
|
35
|
+
maxWidth?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Tamanho máximo do widget (altura)
|
|
38
|
+
*/
|
|
39
|
+
maxHeight?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Tamanho da célula do grid em pixels
|
|
42
|
+
*/
|
|
43
|
+
cellSize?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Gap entre células em pixels
|
|
46
|
+
*/
|
|
47
|
+
gap?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Classe CSS adicional
|
|
50
|
+
*/
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Handle para redimensionar widget
|
|
55
|
+
*
|
|
56
|
+
* Componente puro de UI que permite redimensionar widgets arrastando
|
|
57
|
+
* o canto inferior direito. Usa snap to grid para alinhamento.
|
|
58
|
+
*/
|
|
59
|
+
export declare function WidgetResizeHandle({ widgetId, currentWidth, currentHeight, onResize, minWidth, minHeight, maxWidth, maxHeight, cellSize, gap, className, }: WidgetResizeHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
//# sourceMappingURL=widget-resize-handle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-resize-handle.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/widget-resize-handle/widget-resize-handle.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAE3D;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAY,EACZ,SAAa,EACb,QAAa,EACb,SAAc,EACd,QAAa,EACb,GAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,2CAyFzB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* WidgetResizeHandle - Atom Component
|
|
4
|
+
*
|
|
5
|
+
* Handle para redimensionar widgets arrastando o canto inferior direito.
|
|
6
|
+
* Componente puro de UI, totalmente genérico e reutilizável.
|
|
7
|
+
*/
|
|
8
|
+
import { Maximize2 } from "lucide-react";
|
|
9
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
10
|
+
import { cn } from "@/lib/utils";
|
|
11
|
+
/**
|
|
12
|
+
* Handle para redimensionar widget
|
|
13
|
+
*
|
|
14
|
+
* Componente puro de UI que permite redimensionar widgets arrastando
|
|
15
|
+
* o canto inferior direito. Usa snap to grid para alinhamento.
|
|
16
|
+
*/
|
|
17
|
+
export function WidgetResizeHandle({ widgetId, currentWidth, currentHeight, onResize, minWidth = 2, minHeight = 2, maxWidth = 12, maxHeight = 20, cellSize = 50, gap = 16, className, }) {
|
|
18
|
+
const [isResizing, setIsResizing] = useState(false);
|
|
19
|
+
const [startPos, setStartPos] = useState({ x: 0, y: 0 });
|
|
20
|
+
const [startSize, setStartSize] = useState({ w: currentWidth, h: currentHeight });
|
|
21
|
+
const handleRef = useRef(null);
|
|
22
|
+
const handleMouseDown = useCallback((e) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
setIsResizing(true);
|
|
26
|
+
setStartPos({ x: e.clientX, y: e.clientY });
|
|
27
|
+
setStartSize({ w: currentWidth, h: currentHeight });
|
|
28
|
+
}, [currentWidth, currentHeight]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (!isResizing)
|
|
31
|
+
return;
|
|
32
|
+
const handleMouseMove = (e) => {
|
|
33
|
+
const deltaX = e.clientX - startPos.x;
|
|
34
|
+
const deltaY = e.clientY - startPos.y;
|
|
35
|
+
// Calcula novo tamanho baseado no movimento do mouse
|
|
36
|
+
// Usa snap to grid
|
|
37
|
+
const totalCellSize = cellSize + gap;
|
|
38
|
+
const deltaW = Math.round(deltaX / totalCellSize);
|
|
39
|
+
const deltaH = Math.round(deltaY / totalCellSize);
|
|
40
|
+
// Se não houver mudança significativa, não atualiza
|
|
41
|
+
if (deltaW === 0 && deltaH === 0)
|
|
42
|
+
return;
|
|
43
|
+
const newW = Math.max(minWidth, Math.min(maxWidth, startSize.w + deltaW));
|
|
44
|
+
const newH = Math.max(minHeight, Math.min(maxHeight, startSize.h + deltaH));
|
|
45
|
+
// Atualiza apenas se mudou
|
|
46
|
+
if (newW !== currentWidth || newH !== currentHeight) {
|
|
47
|
+
onResize(widgetId, newW, newH);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const handleMouseUp = () => {
|
|
51
|
+
setIsResizing(false);
|
|
52
|
+
};
|
|
53
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
54
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
55
|
+
return () => {
|
|
56
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
57
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
58
|
+
};
|
|
59
|
+
}, [
|
|
60
|
+
isResizing,
|
|
61
|
+
startPos,
|
|
62
|
+
startSize,
|
|
63
|
+
currentWidth,
|
|
64
|
+
currentHeight,
|
|
65
|
+
widgetId,
|
|
66
|
+
minWidth,
|
|
67
|
+
minHeight,
|
|
68
|
+
maxWidth,
|
|
69
|
+
maxHeight,
|
|
70
|
+
cellSize,
|
|
71
|
+
gap,
|
|
72
|
+
onResize,
|
|
73
|
+
]);
|
|
74
|
+
return (_jsx("div", { ref: handleRef, onMouseDown: handleMouseDown, className: cn("absolute bottom-0 right-0 w-6 h-6", "flex items-center justify-center", "bg-primary/20 border border-primary/40 rounded-tl-md", "cursor-nwse-resize", "opacity-0 group-hover:opacity-100 transition-opacity", "hover:bg-primary/30", isResizing && "opacity-100 bg-primary/40", className), "aria-label": "Redimensionar widget", children: _jsx(Maximize2, { className: "w-3 h-3 text-primary" }) }));
|
|
75
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DraggableWidget - Molecule Component
|
|
3
|
+
*
|
|
4
|
+
* Wrapper para widgets que permite drag and drop e redimensionamento.
|
|
5
|
+
* Componente genérico e reutilizável para qualquer dashboard.
|
|
6
|
+
*/
|
|
7
|
+
export interface DraggableWidgetProps {
|
|
8
|
+
/**
|
|
9
|
+
* ID único do widget
|
|
10
|
+
*/
|
|
11
|
+
widgetId: string;
|
|
12
|
+
/**
|
|
13
|
+
* Tipo do widget (opcional, para identificação)
|
|
14
|
+
*/
|
|
15
|
+
widgetType?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Conteúdo do widget
|
|
18
|
+
*/
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Se está em modo de edição
|
|
22
|
+
*/
|
|
23
|
+
isEditMode: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Posição CSS Grid
|
|
26
|
+
*/
|
|
27
|
+
gridPosition: {
|
|
28
|
+
gridColumnStart: number;
|
|
29
|
+
gridColumnEnd: number;
|
|
30
|
+
gridRowStart: number;
|
|
31
|
+
gridRowEnd: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Largura atual do widget em unidades de grade
|
|
35
|
+
*/
|
|
36
|
+
currentWidth: number;
|
|
37
|
+
/**
|
|
38
|
+
* Altura atual do widget em unidades de grade
|
|
39
|
+
*/
|
|
40
|
+
currentHeight: number;
|
|
41
|
+
/**
|
|
42
|
+
* Callback quando widget é clicado para configurar
|
|
43
|
+
*/
|
|
44
|
+
onConfigure?: (widgetId: string) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Callback quando widget é removido
|
|
47
|
+
*/
|
|
48
|
+
onRemove?: (widgetId: string) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Callback quando widget é redimensionado
|
|
51
|
+
*/
|
|
52
|
+
onResize?: (widgetId: string, w: number, h: number) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Tamanho da célula do grid em pixels
|
|
55
|
+
*/
|
|
56
|
+
cellSize?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Gap entre células em pixels
|
|
59
|
+
*/
|
|
60
|
+
gap?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Classe CSS adicional
|
|
63
|
+
*/
|
|
64
|
+
className?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Componente de widget arrastável
|
|
68
|
+
*
|
|
69
|
+
* Wrapper genérico que adiciona funcionalidades de drag and drop,
|
|
70
|
+
* redimensionamento e controles de edição a qualquer widget.
|
|
71
|
+
*/
|
|
72
|
+
export declare const DraggableWidget: import("react").NamedExoticComponent<DraggableWidgetProps>;
|
|
73
|
+
//# sourceMappingURL=draggable-widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draggable-widget.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/draggable-widget/draggable-widget.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE;QACZ,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAE5D;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,4DAiI3B,CAAC"}
|