@djangocfg/layouts 2.1.227 → 2.1.228

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 (97) hide show
  1. package/README.md +3 -17
  2. package/package.json +18 -18
  3. package/src/components/errors/ErrorLayout.tsx +2 -2
  4. package/src/components/errors/ErrorsTracker/index.ts +1 -0
  5. package/src/components/errors/ErrorsTracker/utils/formatters.ts +23 -1
  6. package/src/hooks/useLogout.ts +9 -12
  7. package/src/layouts/AppLayout/AppLayout.tsx +20 -8
  8. package/src/layouts/AppLayout/BaseApp.tsx +5 -28
  9. package/src/layouts/AuthLayout/AuthLayout.tsx +51 -22
  10. package/src/layouts/AuthLayout/README.md +78 -0
  11. package/src/layouts/AuthLayout/components/shared/AuthDivider.tsx +2 -2
  12. package/src/layouts/AuthLayout/components/shared/AuthError.tsx +10 -2
  13. package/src/layouts/AuthLayout/components/shared/AuthFooter.tsx +2 -2
  14. package/src/layouts/AuthLayout/components/shared/AuthHeader.tsx +3 -2
  15. package/src/layouts/AuthLayout/components/shared/AuthOTPInput.tsx +4 -1
  16. package/src/layouts/AuthLayout/components/shared/TermsCheckbox.tsx +2 -2
  17. package/src/layouts/AuthLayout/components/shared/index.ts +0 -2
  18. package/src/layouts/AuthLayout/components/steps/IdentifierStep.tsx +25 -80
  19. package/src/layouts/AuthLayout/components/steps/OTPStep.tsx +8 -13
  20. package/src/layouts/AuthLayout/components/steps/SetupStep/SetupComplete.tsx +2 -2
  21. package/src/layouts/AuthLayout/components/steps/SetupStep/SetupLoading.tsx +2 -2
  22. package/src/layouts/AuthLayout/components/steps/SetupStep/SetupQRCode.tsx +2 -2
  23. package/src/layouts/AuthLayout/components/steps/TwoFactorStep.tsx +61 -42
  24. package/src/layouts/AuthLayout/context.tsx +0 -2
  25. package/src/layouts/AuthLayout/index.ts +9 -6
  26. package/src/layouts/AuthLayout/styles/auth.css +265 -120
  27. package/src/layouts/AuthLayout/types.ts +60 -7
  28. package/src/layouts/ProfileLayout/.claude/.sidecar/activity.jsonl +2 -0
  29. package/src/layouts/ProfileLayout/.claude/.sidecar/history/2026-03-15.md +35 -0
  30. package/src/layouts/ProfileLayout/.claude/.sidecar/review.md +35 -0
  31. package/src/layouts/ProfileLayout/.claude/.sidecar/scan.log +3 -0
  32. package/src/layouts/ProfileLayout/.claude/.sidecar/tasks/T-001.md +18 -0
  33. package/src/layouts/ProfileLayout/.claude/.sidecar/tasks/T-002.md +19 -0
  34. package/src/layouts/ProfileLayout/.claude/.sidecar/tasks/T-003.md +18 -0
  35. package/src/layouts/ProfileLayout/.claude/.sidecar/tasks/T-004.md +18 -0
  36. package/src/layouts/ProfileLayout/.claude/.sidecar/tasks/T-005.md +18 -0
  37. package/src/layouts/ProfileLayout/.claude/.sidecar/usage.json +5 -0
  38. package/src/layouts/ProfileLayout/ProfileLayout.tsx +52 -403
  39. package/src/layouts/ProfileLayout/components/ActionButton.tsx +38 -0
  40. package/src/layouts/ProfileLayout/components/DeleteAccountSection.tsx +109 -148
  41. package/src/layouts/ProfileLayout/components/EditableField.tsx +119 -0
  42. package/src/layouts/ProfileLayout/components/Section.tsx +22 -0
  43. package/src/layouts/ProfileLayout/components/index.ts +4 -1
  44. package/src/layouts/ProfileLayout/context.tsx +31 -0
  45. package/src/layouts/PublicLayout/components/PublicMobileDrawer.tsx +2 -2
  46. package/src/layouts/PublicLayout/components/PublicNavigation.tsx +2 -2
  47. package/src/layouts/_components/UserMenu.tsx +2 -2
  48. package/src/layouts/types/README.md +0 -20
  49. package/src/layouts/types/index.ts +2 -2
  50. package/src/layouts/types/layout.types.ts +2 -5
  51. package/src/layouts/types/providers.types.ts +0 -27
  52. package/src/snippets/AuthDialog/AuthDialog.tsx +2 -2
  53. package/src/snippets/Breadcrumbs.tsx +2 -2
  54. package/src/snippets/index.ts +0 -67
  55. package/src/layouts/AuthLayout/components/shared/ChannelToggle.tsx +0 -56
  56. package/src/snippets/McpChat/README.md +0 -441
  57. package/src/snippets/McpChat/components/AIChatWidget.tsx +0 -361
  58. package/src/snippets/McpChat/components/AskAIButton.tsx +0 -92
  59. package/src/snippets/McpChat/components/ChatMessages.tsx +0 -138
  60. package/src/snippets/McpChat/components/ChatPanel.tsx +0 -131
  61. package/src/snippets/McpChat/components/ChatSidebar.tsx +0 -156
  62. package/src/snippets/McpChat/components/ChatWidget.tsx +0 -115
  63. package/src/snippets/McpChat/components/MessageBubble.tsx +0 -142
  64. package/src/snippets/McpChat/components/MessageInput.tsx +0 -140
  65. package/src/snippets/McpChat/components/index.ts +0 -24
  66. package/src/snippets/McpChat/config.ts +0 -94
  67. package/src/snippets/McpChat/context/AIChatContext.tsx +0 -327
  68. package/src/snippets/McpChat/context/ChatContext.tsx +0 -361
  69. package/src/snippets/McpChat/context/index.ts +0 -7
  70. package/src/snippets/McpChat/hooks/index.ts +0 -6
  71. package/src/snippets/McpChat/hooks/useAIChat.ts +0 -503
  72. package/src/snippets/McpChat/hooks/useChatLayout.ts +0 -442
  73. package/src/snippets/McpChat/hooks/useMcpChat.ts +0 -90
  74. package/src/snippets/McpChat/index.ts +0 -79
  75. package/src/snippets/McpChat/types.ts +0 -189
  76. package/src/snippets/PWAInstall/@docs/README.md +0 -92
  77. package/src/snippets/PWAInstall/@docs/research/ios-android-install-flows.md +0 -576
  78. package/src/snippets/PWAInstall/README.md +0 -235
  79. package/src/snippets/PWAInstall/components/A2HSHint.tsx +0 -236
  80. package/src/snippets/PWAInstall/components/DesktopGuide.tsx +0 -234
  81. package/src/snippets/PWAInstall/components/IOSGuide.tsx +0 -29
  82. package/src/snippets/PWAInstall/components/IOSGuideDrawer.tsx +0 -103
  83. package/src/snippets/PWAInstall/components/IOSGuideModal.tsx +0 -103
  84. package/src/snippets/PWAInstall/components/PWAPageResumeManager.tsx +0 -33
  85. package/src/snippets/PWAInstall/context/InstallContext.tsx +0 -102
  86. package/src/snippets/PWAInstall/hooks/useInstallPrompt.ts +0 -168
  87. package/src/snippets/PWAInstall/hooks/useIsPWA.ts +0 -116
  88. package/src/snippets/PWAInstall/hooks/usePWAPageResume.ts +0 -163
  89. package/src/snippets/PWAInstall/index.ts +0 -80
  90. package/src/snippets/PWAInstall/types/components.ts +0 -95
  91. package/src/snippets/PWAInstall/types/config.ts +0 -29
  92. package/src/snippets/PWAInstall/types/index.ts +0 -26
  93. package/src/snippets/PWAInstall/types/install.ts +0 -38
  94. package/src/snippets/PWAInstall/types/platform.ts +0 -29
  95. package/src/snippets/PWAInstall/utils/localStorage.ts +0 -181
  96. package/src/snippets/PWAInstall/utils/logger.ts +0 -149
  97. package/src/snippets/PWAInstall/utils/platform.ts +0 -151
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * Auth Layout Types
3
3
  *
4
- * Re-exports from @djangocfg/api/auth for convenience.
5
- * Single source of truth is in @djangocfg/api/auth/types.
4
+ * - Pure auth logic types re-exported from @djangocfg/api/auth
5
+ * - UI/layout types defined here api package has no business knowing about them
6
6
  */
7
7
 
8
+ import type React from 'react';
9
+
8
10
  export type {
9
- AuthChannel,
10
11
  AuthStep,
11
12
  AuthFormState,
12
13
  AuthFormStateHandlers,
@@ -15,8 +16,60 @@ export type {
15
16
  AuthFormAutoSubmit,
16
17
  AuthFormReturn,
17
18
  UseAuthFormOptions,
18
- AuthLayoutConfig,
19
- AuthFormContextType,
20
- AuthLayoutProps,
21
- AuthHelpProps,
22
19
  } from '@djangocfg/api/auth';
20
+
21
+ import type { AuthFormReturn } from '@djangocfg/api/auth';
22
+
23
+ // ─────────────────────────────────────────────────────────────────────────────
24
+ // Layout Config — UI-specific configuration for AuthLayout
25
+ // ─────────────────────────────────────────────────────────────────────────────
26
+
27
+ export interface AuthLayoutConfig {
28
+ /** Support page URL */
29
+ supportUrl?: string;
30
+ /** Terms of service URL */
31
+ termsUrl?: string;
32
+ /** Privacy policy URL */
33
+ privacyUrl?: string;
34
+ /** Source URL for tracking */
35
+ sourceUrl: string;
36
+ /** Enable GitHub OAuth button */
37
+ enableGithubAuth?: boolean;
38
+ /** Logo URL for success screen (SVG recommended) */
39
+ logoUrl?: string;
40
+ /** URL to redirect after successful auth (default: /dashboard) */
41
+ redirectUrl?: string;
42
+ /**
43
+ * Enable 2FA setup prompt after successful authentication.
44
+ * @default true
45
+ */
46
+ enable2FASetup?: boolean;
47
+ }
48
+
49
+ // ─────────────────────────────────────────────────────────────────────────────
50
+ // Context — form state + layout config merged for step components
51
+ // ─────────────────────────────────────────────────────────────────────────────
52
+
53
+ export interface AuthFormContextType extends AuthFormReturn, AuthLayoutConfig {}
54
+
55
+ // ─────────────────────────────────────────────────────────────────────────────
56
+ // Component Props
57
+ // ─────────────────────────────────────────────────────────────────────────────
58
+
59
+ export interface AuthLayoutProps extends AuthLayoutConfig {
60
+ children?: React.ReactNode;
61
+ className?: string;
62
+ /** Callback when identifier step succeeds */
63
+ onIdentifierSuccess?: (identifier: string) => void;
64
+ /** Callback when OTP verification succeeds */
65
+ onOTPSuccess?: () => void;
66
+ /** Callback when OAuth succeeds */
67
+ onOAuthSuccess?: (user: any, isNewUser: boolean, provider: string) => void;
68
+ /** Callback on any error */
69
+ onError?: (message: string) => void;
70
+ }
71
+
72
+ export interface AuthHelpProps {
73
+ className?: string;
74
+ variant?: 'default' | 'compact';
75
+ }
@@ -0,0 +1,2 @@
1
+ {"ts":"2026-03-15T05:27:58.550593Z","action":"update_check","tokens":0,"model":"deepseek/deepseek-v3.2","details":{}}
2
+ {"ts":"2026-03-15T05:28:21.054276Z","action":"review","tokens":1533,"model":"deepseek/deepseek-v3.2","details":{"items_found":5}}
@@ -0,0 +1,35 @@
1
+ # Sidecar Review -- 2026-03-15T05:28:21.052657+00:00
2
+
3
+ ## Staleness
4
+
5
+ - [?] Cannot assess staleness because documentation contents are unavailable. However, given the high commit activity (20 commits in 2 days), any documentation older than 30 days is almost certainly stale and contradictory to the current codebase state (e.g., new 'debuger', 'monitor', and OTP features).
6
+ Files: Documentation referenced in file list
7
+ Action: Provide documentation content to check modification dates against commit history. Update all documentation to reflect recent changes like the debug panel, monitoring integration, and OTP brute-force protection.
8
+ (id: 46040dd3aace)
9
+
10
+ ## Contradictions
11
+
12
+ - [~] The commit 'updaded rq' (2026-03-14) has a typo and inconsistent formatting compared to other commits (e.g., 'chore(deps): bump django-rq version to 4.0.0'). This suggests poor documentation practices in commit messages, which can lead to confusion about project changes.
13
+ Files: Commit history analysis
14
+ Action: Enforce a commit message convention (e.g., Conventional Commits) and consider amending the 'updaded rq' commit for clarity. Ensure future commits are consistently formatted.
15
+ (id: 6e3e54dfac9f)
16
+
17
+ ## Missing Documentation
18
+
19
+ - [!] No documentation content was provided for analysis. The provided metadata lists documentation files but their contents are unavailable, making it impossible to verify accuracy, check for staleness, or identify contradictions with the codebase.
20
+ Files: All documentation files
21
+ Action: Provide the actual content of the documentation files listed in the metadata (e.g., README.md, API docs, configuration guides) to enable a proper analysis for staleness, contradictions, and gaps.
22
+ (id: fb1ef89d45a4)
23
+
24
+ - [?] The top-level source directories '__tests__' and 'components' have no associated documentation content provided. Recent commits mention features like 'debuger', 'monitor', 'accounts', and 'otp', which likely reside in these directories, but their documentation cannot be verified.
25
+ Files: __tests__, components
26
+ Action: Review and provide documentation for the '__tests__' and 'components' directories, ensuring it covers the features mentioned in recent commits (e.g., debug panel, OTP brute-force protection, monitoring integration).
27
+ (id: d538d5624ebb)
28
+
29
+ - [!] No dependencies were detected, but recent git commits show active dependency management (e.g., 'bump django-cfg version to 1.7.77', 'bump django-rq version to 4.0.0'). This indicates a contradiction between the reported state and project activity, and documentation for these key dependencies is missing.
30
+ Files: Dependency files (e.g., pyproject.toml, requirements.txt)
31
+ Action: Provide the actual dependency files (pyproject.toml, package.json, or requirements.txt) to check for contradictions with documentation and ensure all critical packages like 'django-cfg' and 'django-rq' are documented.
32
+ (id: fe7c9fa20e8b)
33
+
34
+ ---
35
+ Model: deepseek/deepseek-v3.2 | Tokens: 1533
@@ -0,0 +1,35 @@
1
+ # Sidecar Review -- 2026-03-15T05:28:21.052657+00:00
2
+
3
+ ## Staleness
4
+
5
+ - [?] Cannot assess staleness because documentation contents are unavailable. However, given the high commit activity (20 commits in 2 days), any documentation older than 30 days is almost certainly stale and contradictory to the current codebase state (e.g., new 'debuger', 'monitor', and OTP features).
6
+ Files: Documentation referenced in file list
7
+ Action: Provide documentation content to check modification dates against commit history. Update all documentation to reflect recent changes like the debug panel, monitoring integration, and OTP brute-force protection.
8
+ (id: 46040dd3aace)
9
+
10
+ ## Contradictions
11
+
12
+ - [~] The commit 'updaded rq' (2026-03-14) has a typo and inconsistent formatting compared to other commits (e.g., 'chore(deps): bump django-rq version to 4.0.0'). This suggests poor documentation practices in commit messages, which can lead to confusion about project changes.
13
+ Files: Commit history analysis
14
+ Action: Enforce a commit message convention (e.g., Conventional Commits) and consider amending the 'updaded rq' commit for clarity. Ensure future commits are consistently formatted.
15
+ (id: 6e3e54dfac9f)
16
+
17
+ ## Missing Documentation
18
+
19
+ - [!] No documentation content was provided for analysis. The provided metadata lists documentation files but their contents are unavailable, making it impossible to verify accuracy, check for staleness, or identify contradictions with the codebase.
20
+ Files: All documentation files
21
+ Action: Provide the actual content of the documentation files listed in the metadata (e.g., README.md, API docs, configuration guides) to enable a proper analysis for staleness, contradictions, and gaps.
22
+ (id: fb1ef89d45a4)
23
+
24
+ - [?] The top-level source directories '__tests__' and 'components' have no associated documentation content provided. Recent commits mention features like 'debuger', 'monitor', 'accounts', and 'otp', which likely reside in these directories, but their documentation cannot be verified.
25
+ Files: __tests__, components
26
+ Action: Review and provide documentation for the '__tests__' and 'components' directories, ensuring it covers the features mentioned in recent commits (e.g., debug panel, OTP brute-force protection, monitoring integration).
27
+ (id: d538d5624ebb)
28
+
29
+ - [!] No dependencies were detected, but recent git commits show active dependency management (e.g., 'bump django-cfg version to 1.7.77', 'bump django-rq version to 4.0.0'). This indicates a contradiction between the reported state and project activity, and documentation for these key dependencies is missing.
30
+ Files: Dependency files (e.g., pyproject.toml, requirements.txt)
31
+ Action: Provide the actual dependency files (pyproject.toml, package.json, or requirements.txt) to check for contradictions with documentation and ensure all critical packages like 'django-cfg' and 'django-rq' are documented.
32
+ (id: fe7c9fa20e8b)
33
+
34
+ ---
35
+ Model: deepseek/deepseek-v3.2 | Tokens: 1533
@@ -0,0 +1,3 @@
1
+ Review generated: 5 items found
2
+ Tokens used: 1533 (deepseek/deepseek-v3.2)
3
+ Converted 5 items to tasks
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - All documentation files
4
+ created_at: '2026-03-15T05:28:21.056182Z'
5
+ id: T-001
6
+ priority: high
7
+ source: sidecar_review
8
+ source_item_id: fb1ef89d45a4
9
+ status: pending
10
+ title: '[gap] No documentation content was provided for analysis. The provided metadata
11
+ lists'
12
+ ---
13
+
14
+ No documentation content was provided for analysis. The provided metadata lists documentation files but their contents are unavailable, making it impossible to verify accuracy, check for staleness, or identify contradictions with the codebase.
15
+
16
+ **Files:** All documentation files
17
+
18
+ **Action:** Provide the actual content of the documentation files listed in the metadata (e.g., README.md, API docs, configuration guides) to enable a proper analysis for staleness, contradictions, and gaps.
@@ -0,0 +1,19 @@
1
+ ---
2
+ context_files:
3
+ - __tests__
4
+ - components
5
+ created_at: '2026-03-15T05:28:21.057118Z'
6
+ id: T-002
7
+ priority: medium
8
+ source: sidecar_review
9
+ source_item_id: d538d5624ebb
10
+ status: pending
11
+ title: '[gap] The top-level source directories ''__tests__'' and ''components'' have
12
+ no associated'
13
+ ---
14
+
15
+ The top-level source directories '__tests__' and 'components' have no associated documentation content provided. Recent commits mention features like 'debuger', 'monitor', 'accounts', and 'otp', which likely reside in these directories, but their documentation cannot be verified.
16
+
17
+ **Files:** __tests__, components
18
+
19
+ **Action:** Review and provide documentation for the '__tests__' and 'components' directories, ensuring it covers the features mentioned in recent commits (e.g., debug panel, OTP brute-force protection, monitoring integration).
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - Dependency files (e.g., pyproject.toml, requirements.txt)
4
+ created_at: '2026-03-15T05:28:21.057738Z'
5
+ id: T-003
6
+ priority: high
7
+ source: sidecar_review
8
+ source_item_id: fe7c9fa20e8b
9
+ status: pending
10
+ title: '[gap] No dependencies were detected, but recent git commits show active dependency
11
+ man'
12
+ ---
13
+
14
+ No dependencies were detected, but recent git commits show active dependency management (e.g., 'bump django-cfg version to 1.7.77', 'bump django-rq version to 4.0.0'). This indicates a contradiction between the reported state and project activity, and documentation for these key dependencies is missing.
15
+
16
+ **Files:** Dependency files (e.g., pyproject.toml, requirements.txt)
17
+
18
+ **Action:** Provide the actual dependency files (pyproject.toml, package.json, or requirements.txt) to check for contradictions with documentation and ensure all critical packages like 'django-cfg' and 'django-rq' are documented.
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - Documentation referenced in file list
4
+ created_at: '2026-03-15T05:28:21.058352Z'
5
+ id: T-004
6
+ priority: medium
7
+ source: sidecar_review
8
+ source_item_id: 46040dd3aace
9
+ status: pending
10
+ title: '[staleness] Cannot assess staleness because documentation contents are unavailable.
11
+ However,'
12
+ ---
13
+
14
+ Cannot assess staleness because documentation contents are unavailable. However, given the high commit activity (20 commits in 2 days), any documentation older than 30 days is almost certainly stale and contradictory to the current codebase state (e.g., new 'debuger', 'monitor', and OTP features).
15
+
16
+ **Files:** Documentation referenced in file list
17
+
18
+ **Action:** Provide documentation content to check modification dates against commit history. Update all documentation to reflect recent changes like the debug panel, monitoring integration, and OTP brute-force protection.
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - Commit history analysis
4
+ created_at: '2026-03-15T05:28:21.059002Z'
5
+ id: T-005
6
+ priority: low
7
+ source: sidecar_review
8
+ source_item_id: 6e3e54dfac9f
9
+ status: pending
10
+ title: '[contradiction] The commit ''updaded rq'' (2026-03-14) has a typo and inconsistent
11
+ formatting comp'
12
+ ---
13
+
14
+ The commit 'updaded rq' (2026-03-14) has a typo and inconsistent formatting compared to other commits (e.g., 'chore(deps): bump django-rq version to 4.0.0'). This suggests poor documentation practices in commit messages, which can lead to confusion about project changes.
15
+
16
+ **Files:** Commit history analysis
17
+
18
+ **Action:** Enforce a commit message convention (e.g., Conventional Commits) and consider amending the 'updaded rq' commit for clarity. Ensure future commits are consistently formatted.
@@ -0,0 +1,5 @@
1
+ {
2
+ "date": "2026-03-15",
3
+ "tokens": 1533,
4
+ "calls": 1
5
+ }