forlogic-core 2.0.6 → 2.0.8
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/.note/memory/patterns/admin-i18n-policy.md +20 -0
- package/.note/memory/patterns/i18n-architecture.md +3 -0
- package/README.md +34 -269
- package/dist/action-plans/constants.d.ts +23 -3
- package/dist/audit-trail/utils.d.ts +5 -5
- package/dist/auth/components/EditProfileDialog.d.ts +12 -0
- package/dist/auth/contexts/AuthContext.d.ts +1 -1
- package/dist/auth/services/AuthService.d.ts +1 -1
- package/dist/components/dashboards/panels/panel-header.d.ts +1 -1
- package/dist/components/layout/SidebarActionTrigger.d.ts +3 -3
- package/dist/components/modules/ModuleAccessGuard.d.ts +1 -1
- package/dist/components/modules/icons/ModulesCardIcons.d.ts +2 -2
- package/dist/components/ui/color-picker.d.ts +2 -2
- package/dist/components/ui/combo-tree.d.ts +3 -1
- package/dist/components/ui/data-list.d.ts +2 -2
- package/dist/components/ui/dialog-wizard.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/disabled-menu-item.d.ts +1 -1
- package/dist/components/ui/empty-state.d.ts +9 -9
- package/dist/components/ui/onboarding-dialog.d.ts +1 -1
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/split-button.d.ts +2 -2
- package/dist/components/ui/terms-of-use-dialog.d.ts +3 -3
- package/dist/config/index.d.ts +1 -1
- package/dist/contexts/PageMetadataContext.d.ts +2 -2
- package/dist/crud/components/CrudTable.d.ts +13 -1
- package/dist/crud/components/FilterBar.d.ts +2 -2
- package/dist/crud/primitives/Table.d.ts +3 -3
- package/dist/crud/primitives/types.d.ts +11 -1
- package/dist/i18n/index.d.ts +1 -10
- package/dist/i18n/utils.d.ts +14 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/leadership/components/LeadershipPage.d.ts +1 -1
- package/dist/media/components/ImageRenderer.d.ts +1 -1
- package/dist/media/components/VideoEditor.d.ts +0 -20
- package/dist/media/components/VideoRenderer.d.ts +0 -6
- package/dist/qualiex/components/QualiexUserField.d.ts +1 -1
- package/dist/types.d.ts +1 -0
- package/docs/WORKSPACE_KNOWLEDGE.md +254 -0
- package/docs/design-system/README.md +1 -1
- package/docs/design-system/patterns/README.md +53 -0
- package/{.note/memory/components/action-button-for-tables.md → docs/design-system/patterns/action-button.md} +1 -2
- package/{.note/memory/components/alertdialog-permanent-deletion.md → docs/design-system/patterns/alertdialog-deletion.md} +1 -2
- package/{.note/memory/components → docs/design-system/patterns}/baseform-custom-fields.md +2 -3
- package/{.note/memory/components → docs/design-system/patterns}/baseform-usage.md +1 -2
- package/{.note/memory/patterns/body-content-scroll-usage.md → docs/design-system/patterns/body-content-scroll.md} +1 -4
- package/{.note/memory/components → docs/design-system/patterns}/combo-tree.md +1 -2
- package/docs/design-system/patterns/components-registry.md +17 -0
- package/docs/design-system/patterns/crud-bulk-actions.md +12 -0
- package/docs/design-system/patterns/crud-config-props.md +16 -0
- package/docs/design-system/patterns/crud-defaults.md +17 -0
- package/{.note/memory/patterns/crud-toolbar-layout.md → docs/design-system/patterns/crud-toolbar.md} +8 -6
- package/{.note/memory/components/delete-confirmation-dialog.md → docs/design-system/patterns/delete-confirmation.md} +1 -9
- package/{.note/memory/patterns/dialog-body-scroll-pattern.md → docs/design-system/patterns/dialog-body-scroll.md} +3 -4
- package/{.note/memory/components/dialog-sizes-and-structure.md → docs/design-system/patterns/dialog-structure.md} +1 -2
- package/{.note/memory/components → docs/design-system/patterns}/dialog-variants.md +5 -8
- package/{.note/memory → docs/design-system}/patterns/feature-flags.md +1 -0
- package/{.note/memory/patterns/header-metadata-pattern.md → docs/design-system/patterns/header-metadata.md} +1 -6
- package/docs/design-system/patterns/i18n-setup.md +117 -0
- package/{.note/memory/components/pagination-usage.md → docs/design-system/patterns/pagination.md} +1 -2
- package/{.note/memory/patterns/single-scroll-pattern.md → docs/design-system/patterns/single-scroll.md} +1 -2
- package/{.note/memory → docs/design-system}/patterns/vite-tailwind-setup.md +1 -2
- package/package.json +1 -1
- package/.note/memory/features/crud-defaults-batteries-included.md +0 -14
- package/.note/memory/features/crud-standardized-config-props.md +0 -3
- package/.note/memory/patterns/components-registry.md +0 -18
- package/.note/memory/patterns/crud-action-bar-3-zone-layout.md +0 -3
- package/.note/memory/patterns/crud-bulk-actions-dropdown-standard.md +0 -3
- package/.note/memory/patterns/i18n-setup.md +0 -43
- package/docs/AUDIT_PROMPT.md +0 -74
- package/docs/KNOWLEDGE.md +0 -109
- package/docs/PROJECT_KNOWLEDGE_TEMPLATE.md +0 -117
- package/docs/PROMPT_TEMPLATE.md +0 -77
- package/docs/STARTER_TEMPLATE.md +0 -114
- /package/{.note/memory/patterns/core-providers-setup.md → docs/design-system/patterns/core-providers.md} +0 -0
package/docs/STARTER_TEMPLATE.md
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# Starter Template — Projeto Consumidor forlogic-core
|
|
2
|
-
|
|
3
|
-
> **Como usar**: Ao criar um novo projeto no Lovable, cole este conteúdo como **primeiro prompt** para gerar a estrutura base completa.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Prompt para criar projeto base
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
Crie a estrutura base do projeto seguindo EXATAMENTE este boilerplate.
|
|
11
|
-
Leia @Admin docs/design-system/layout.md antes de começar.
|
|
12
|
-
|
|
13
|
-
### 1. vite.config.ts
|
|
14
|
-
|
|
15
|
-
import { defineConfig } from 'vite';
|
|
16
|
-
import react from '@vitejs/plugin-react-swc';
|
|
17
|
-
import path from 'path';
|
|
18
|
-
import { createSecurityHeadersPlugin } from 'forlogic-core/vite';
|
|
19
|
-
|
|
20
|
-
export default defineConfig(({ mode }) => ({
|
|
21
|
-
plugins: [
|
|
22
|
-
react(),
|
|
23
|
-
createSecurityHeadersPlugin(mode === 'development', {
|
|
24
|
-
supabaseUrls: ['https://SEU_PROJETO.supabase.co'],
|
|
25
|
-
additionalConnectSrc: ['https://*.qualiex.com'],
|
|
26
|
-
}),
|
|
27
|
-
],
|
|
28
|
-
resolve: { alias: { '@': path.resolve(__dirname, './src') } },
|
|
29
|
-
optimizeDeps: { force: true },
|
|
30
|
-
}));
|
|
31
|
-
|
|
32
|
-
### 2. tailwind.config.ts
|
|
33
|
-
|
|
34
|
-
import type { Config } from 'tailwindcss';
|
|
35
|
-
import { forlogicTailwindPreset, forlogicContentPaths } from 'forlogic-core/tailwind';
|
|
36
|
-
|
|
37
|
-
export default {
|
|
38
|
-
presets: [forlogicTailwindPreset],
|
|
39
|
-
content: ['./src/**/*.{ts,tsx}', ...forlogicContentPaths],
|
|
40
|
-
} satisfies Config;
|
|
41
|
-
|
|
42
|
-
### 3. src/App.tsx
|
|
43
|
-
|
|
44
|
-
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
|
45
|
-
import { CoreProviders, AppLayout } from 'forlogic-core';
|
|
46
|
-
import { Home, FileText, Settings } from 'lucide-react';
|
|
47
|
-
import ptBR from './i18n/pt-BR.json';
|
|
48
|
-
import { HomePage } from './pages/HomePage';
|
|
49
|
-
|
|
50
|
-
const sidebarConfig = {
|
|
51
|
-
navigation: [
|
|
52
|
-
{ label: 'Início', path: '/', icon: Home },
|
|
53
|
-
{ label: 'Registros', path: '/registros', icon: FileText },
|
|
54
|
-
{ type: 'separator' as const, label: '', path: '' },
|
|
55
|
-
{ label: 'Configurações', path: '/config', icon: Settings },
|
|
56
|
-
],
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
function AppRoutes() {
|
|
60
|
-
return (
|
|
61
|
-
<AppLayout sidebarConfig={sidebarConfig}>
|
|
62
|
-
<Routes>
|
|
63
|
-
<Route path="/" element={<HomePage />} />
|
|
64
|
-
<Route path="*" element={<Navigate to="/" replace />} />
|
|
65
|
-
</Routes>
|
|
66
|
-
</AppLayout>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export default function App() {
|
|
71
|
-
return (
|
|
72
|
-
<CoreProviders moduleAlias="SEU_MODULO" appTranslations={{ 'pt-BR': ptBR }}>
|
|
73
|
-
<BrowserRouter>
|
|
74
|
-
<AppRoutes />
|
|
75
|
-
</BrowserRouter>
|
|
76
|
-
</CoreProviders>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
### 4. src/pages/HomePage.tsx
|
|
81
|
-
|
|
82
|
-
import { usePageMetadata } from 'forlogic-core';
|
|
83
|
-
|
|
84
|
-
export function HomePage() {
|
|
85
|
-
usePageMetadata({ title: 'Início', subtitle: 'Bem-vindo ao módulo' });
|
|
86
|
-
return <div className="p-6">Conteúdo aqui</div>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
### 5. src/i18n/pt-BR.json
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
"home": "Início",
|
|
93
|
-
"records": "Registros",
|
|
94
|
-
"settings": "Configurações"
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
Substitua:
|
|
98
|
-
- SEU_PROJETO pelo ref do Supabase
|
|
99
|
-
- SEU_MODULO pelo alias do módulo (ex: "performance", "suppliers")
|
|
100
|
-
- Ajuste as rotas e sidebar conforme o módulo
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## Checklist pós-criação
|
|
106
|
-
|
|
107
|
-
- [ ] `forlogic-core` instalado como dependência
|
|
108
|
-
- [ ] `vite.config.ts` usando `createSecurityHeadersPlugin`
|
|
109
|
-
- [ ] `tailwind.config.ts` usando `forlogicTailwindPreset` + `forlogicContentPaths`
|
|
110
|
-
- [ ] `App.tsx` usando `CoreProviders` + `AppLayout`
|
|
111
|
-
- [ ] Sidebar com itens e separadores definidos
|
|
112
|
-
- [ ] `usePageMetadata` em cada página
|
|
113
|
-
- [ ] `.schema('SCHEMA_PADRAO')` em toda query Supabase
|
|
114
|
-
- [ ] Arquivo `pt-BR.json` com traduções do módulo
|
|
File without changes
|