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.
Files changed (78) hide show
  1. package/.note/memory/patterns/admin-i18n-policy.md +20 -0
  2. package/.note/memory/patterns/i18n-architecture.md +3 -0
  3. package/README.md +34 -269
  4. package/dist/action-plans/constants.d.ts +23 -3
  5. package/dist/audit-trail/utils.d.ts +5 -5
  6. package/dist/auth/components/EditProfileDialog.d.ts +12 -0
  7. package/dist/auth/contexts/AuthContext.d.ts +1 -1
  8. package/dist/auth/services/AuthService.d.ts +1 -1
  9. package/dist/components/dashboards/panels/panel-header.d.ts +1 -1
  10. package/dist/components/layout/SidebarActionTrigger.d.ts +3 -3
  11. package/dist/components/modules/ModuleAccessGuard.d.ts +1 -1
  12. package/dist/components/modules/icons/ModulesCardIcons.d.ts +2 -2
  13. package/dist/components/ui/color-picker.d.ts +2 -2
  14. package/dist/components/ui/combo-tree.d.ts +3 -1
  15. package/dist/components/ui/data-list.d.ts +2 -2
  16. package/dist/components/ui/dialog-wizard.d.ts +1 -1
  17. package/dist/components/ui/dialog.d.ts +1 -1
  18. package/dist/components/ui/disabled-menu-item.d.ts +1 -1
  19. package/dist/components/ui/empty-state.d.ts +9 -9
  20. package/dist/components/ui/onboarding-dialog.d.ts +1 -1
  21. package/dist/components/ui/popover.d.ts +1 -1
  22. package/dist/components/ui/split-button.d.ts +2 -2
  23. package/dist/components/ui/terms-of-use-dialog.d.ts +3 -3
  24. package/dist/config/index.d.ts +1 -1
  25. package/dist/contexts/PageMetadataContext.d.ts +2 -2
  26. package/dist/crud/components/CrudTable.d.ts +13 -1
  27. package/dist/crud/components/FilterBar.d.ts +2 -2
  28. package/dist/crud/primitives/Table.d.ts +3 -3
  29. package/dist/crud/primitives/types.d.ts +11 -1
  30. package/dist/i18n/index.d.ts +1 -10
  31. package/dist/i18n/utils.d.ts +14 -0
  32. package/dist/index.css +1 -1
  33. package/dist/index.css.map +1 -1
  34. package/dist/index.esm.js +1 -1
  35. package/dist/index.js +1 -1
  36. package/dist/leadership/components/LeadershipPage.d.ts +1 -1
  37. package/dist/media/components/ImageRenderer.d.ts +1 -1
  38. package/dist/media/components/VideoEditor.d.ts +0 -20
  39. package/dist/media/components/VideoRenderer.d.ts +0 -6
  40. package/dist/qualiex/components/QualiexUserField.d.ts +1 -1
  41. package/dist/types.d.ts +1 -0
  42. package/docs/WORKSPACE_KNOWLEDGE.md +254 -0
  43. package/docs/design-system/README.md +1 -1
  44. package/docs/design-system/patterns/README.md +53 -0
  45. package/{.note/memory/components/action-button-for-tables.md → docs/design-system/patterns/action-button.md} +1 -2
  46. package/{.note/memory/components/alertdialog-permanent-deletion.md → docs/design-system/patterns/alertdialog-deletion.md} +1 -2
  47. package/{.note/memory/components → docs/design-system/patterns}/baseform-custom-fields.md +2 -3
  48. package/{.note/memory/components → docs/design-system/patterns}/baseform-usage.md +1 -2
  49. package/{.note/memory/patterns/body-content-scroll-usage.md → docs/design-system/patterns/body-content-scroll.md} +1 -4
  50. package/{.note/memory/components → docs/design-system/patterns}/combo-tree.md +1 -2
  51. package/docs/design-system/patterns/components-registry.md +17 -0
  52. package/docs/design-system/patterns/crud-bulk-actions.md +12 -0
  53. package/docs/design-system/patterns/crud-config-props.md +16 -0
  54. package/docs/design-system/patterns/crud-defaults.md +17 -0
  55. package/{.note/memory/patterns/crud-toolbar-layout.md → docs/design-system/patterns/crud-toolbar.md} +8 -6
  56. package/{.note/memory/components/delete-confirmation-dialog.md → docs/design-system/patterns/delete-confirmation.md} +1 -9
  57. package/{.note/memory/patterns/dialog-body-scroll-pattern.md → docs/design-system/patterns/dialog-body-scroll.md} +3 -4
  58. package/{.note/memory/components/dialog-sizes-and-structure.md → docs/design-system/patterns/dialog-structure.md} +1 -2
  59. package/{.note/memory/components → docs/design-system/patterns}/dialog-variants.md +5 -8
  60. package/{.note/memory → docs/design-system}/patterns/feature-flags.md +1 -0
  61. package/{.note/memory/patterns/header-metadata-pattern.md → docs/design-system/patterns/header-metadata.md} +1 -6
  62. package/docs/design-system/patterns/i18n-setup.md +117 -0
  63. package/{.note/memory/components/pagination-usage.md → docs/design-system/patterns/pagination.md} +1 -2
  64. package/{.note/memory/patterns/single-scroll-pattern.md → docs/design-system/patterns/single-scroll.md} +1 -2
  65. package/{.note/memory → docs/design-system}/patterns/vite-tailwind-setup.md +1 -2
  66. package/package.json +1 -1
  67. package/.note/memory/features/crud-defaults-batteries-included.md +0 -14
  68. package/.note/memory/features/crud-standardized-config-props.md +0 -3
  69. package/.note/memory/patterns/components-registry.md +0 -18
  70. package/.note/memory/patterns/crud-action-bar-3-zone-layout.md +0 -3
  71. package/.note/memory/patterns/crud-bulk-actions-dropdown-standard.md +0 -3
  72. package/.note/memory/patterns/i18n-setup.md +0 -43
  73. package/docs/AUDIT_PROMPT.md +0 -74
  74. package/docs/KNOWLEDGE.md +0 -109
  75. package/docs/PROJECT_KNOWLEDGE_TEMPLATE.md +0 -117
  76. package/docs/PROMPT_TEMPLATE.md +0 -77
  77. package/docs/STARTER_TEMPLATE.md +0 -114
  78. /package/{.note/memory/patterns/core-providers-setup.md → docs/design-system/patterns/core-providers.md} +0 -0
@@ -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