@donotdev/ui 0.0.7 → 0.0.9
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/assets/fonts/fonts.css +4 -4
- package/dist/components/auth/AuthHeader.d.ts +5 -0
- package/dist/components/auth/AuthHeader.d.ts.map +1 -1
- package/dist/components/auth/AuthHeader.js +22 -8
- package/dist/components/auth/AuthMenu.d.ts +6 -1
- package/dist/components/auth/AuthMenu.d.ts.map +1 -1
- package/dist/components/auth/AuthMenu.js +3 -3
- package/dist/components/common/AppLoading.d.ts +1 -1
- package/dist/components/common/AppLoading.d.ts.map +1 -1
- package/dist/components/common/AppLoading.js +0 -1
- package/dist/components/common/Loader.d.ts +4 -4
- package/dist/components/common/Loader.d.ts.map +1 -1
- package/dist/components/common/Loader.js +11 -12
- package/dist/components/common/LoadingMessage.d.ts +1 -9
- package/dist/components/common/LoadingMessage.d.ts.map +1 -1
- package/dist/components/common/LoadingMessage.js +0 -1
- package/dist/components/common/LoadingScreen.d.ts +1 -9
- package/dist/components/common/LoadingScreen.d.ts.map +1 -1
- package/dist/components/common/LoadingScreen.js +0 -1
- package/dist/components/common/RedirectOverlay.d.ts +37 -0
- package/dist/components/common/RedirectOverlay.d.ts.map +1 -0
- package/dist/components/common/RedirectOverlay.js +243 -0
- package/dist/components/common/TechBento.d.ts.map +1 -1
- package/dist/components/common/TechBento.js +1 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/components/common/index.d.ts.map +1 -1
- package/dist/components/common/index.js +1 -0
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts +1 -9
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts.map +1 -1
- package/dist/components/layout/components/FloatingLanguageSwitcher.js +0 -1
- package/dist/components/layout/components/header/CacheSettings.d.ts.map +1 -1
- package/dist/components/layout/components/header/HeaderMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/SettingsMenu.js +1 -2
- package/dist/components/layout/components/header/ThemeToggle.d.ts +1 -1
- package/dist/components/layout/components/header/ThemeToggle.d.ts.map +1 -1
- package/dist/components/layout/components/header/ThemeToggle.js +5 -4
- package/dist/crud/components/DisplayFieldRenderer.d.ts +3 -11
- package/dist/crud/components/DisplayFieldRenderer.d.ts.map +1 -1
- package/dist/crud/components/DisplayFieldRenderer.js +4 -3
- package/dist/crud/components/EntityDisplayRenderer.d.ts +2 -2
- package/dist/crud/components/fields/display/AvatarFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/BadgeFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/ButtonFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/CheckboxFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/DateFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/DateFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/DateFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/DropdownDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/FileFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/HiddenFieldDisplay.d.ts +3 -3
- package/dist/crud/components/fields/display/HiddenFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/HiddenFieldDisplay.js +0 -9
- package/dist/crud/components/fields/display/ImageFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/ImageFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/ImageFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/LinkFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/LinkFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/LinkFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/MapFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/MapFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/MapFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/MultiDropdownDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/MultiDropdownDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/MultiDropdownDisplay.js +0 -1
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/NumberFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/NumberFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/NumberFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/PasswordFieldDisplay.d.ts +3 -3
- package/dist/crud/components/fields/display/PasswordFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/PasswordFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/PhoneNumberDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/PhoneNumberDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/PhoneNumberDisplay.js +0 -1
- package/dist/crud/components/fields/display/RadioFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/RadioFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/RadioFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/RangeFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/RangeFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/RangeFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/RichTextDisplay.d.ts +25 -0
- package/dist/crud/components/fields/display/RichTextDisplay.d.ts.map +1 -0
- package/dist/crud/components/fields/display/RichTextDisplay.js +104 -0
- package/dist/crud/components/fields/display/TextAreaDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/TextAreaDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/TextAreaDisplay.js +0 -1
- package/dist/crud/components/fields/display/TextFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/TimestampFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/TimestampFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/TimestampFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/index.d.ts +1 -0
- package/dist/crud/components/fields/display/index.d.ts.map +1 -1
- package/dist/crud/components/fields/display/index.js +1 -0
- package/dist/dndev.css +827 -126
- package/dist/index.js +64 -4
- package/dist/internal/common/ErrorFallback.d.ts +1 -10
- package/dist/internal/common/ErrorFallback.d.ts.map +1 -1
- package/dist/internal/common/GlobalErrorFallback.d.ts +1 -9
- package/dist/internal/common/GlobalErrorFallback.d.ts.map +1 -1
- package/dist/internal/common/RouteErrorFallback.js +1 -1
- package/dist/internal/devtools/components/DebugDialog.d.ts.map +1 -1
- package/dist/internal/devtools/components/DebugDialog.js +3 -1
- package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
- package/dist/internal/devtools/components/DesignTab.js +25 -3
- package/dist/internal/devtools/components/MaskedValue.d.ts.map +1 -1
- package/dist/internal/devtools/components/MaskedValue.js +1 -1
- package/dist/internal/devtools/components/StoresTab.js +1 -1
- package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
- package/dist/internal/initializers/BaseStoresInitializer.js +1 -2
- package/dist/internal/initializers/NextJsStoresInitializer.d.ts.map +1 -1
- package/dist/internal/layout/DnDevLayout.d.ts.map +1 -1
- package/dist/internal/layout/DnDevLayout.js +4 -5
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/PerformanceHints.d.ts.map +1 -1
- package/dist/internal/layout/components/PerformanceHints.js +3 -2
- package/dist/internal/layout/components/footer/FooterLegalLinks.js +2 -2
- package/dist/internal/layout/config/defaults.d.ts +0 -10
- package/dist/internal/layout/config/defaults.d.ts.map +1 -1
- package/dist/internal/layout/config/defaults.js +12 -1
- package/dist/internal/layout/config/presets/admin.d.ts +2 -2
- package/dist/internal/layout/config/presets/admin.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/admin.js +15 -6
- package/dist/internal/layout/config/presets/blog.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/blog.js +7 -1
- package/dist/internal/layout/config/presets/docs.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/docs.js +7 -5
- package/dist/internal/layout/config/presets/game.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/game.js +7 -2
- package/dist/internal/layout/config/presets/moolti.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/moolti.js +10 -3
- package/dist/internal/layout/zones/DnDevFooter.d.ts +1 -13
- package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevHeader.d.ts +1 -14
- package/dist/internal/layout/zones/DnDevHeader.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevMergedBar.d.ts +2 -14
- package/dist/internal/layout/zones/DnDevMergedBar.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevMergedBar.js +11 -3
- package/dist/internal/layout/zones/DnDevSidebar.d.ts +1 -14
- package/dist/internal/layout/zones/DnDevSidebar.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.js +4 -1
- package/dist/routing/AuthGuard.d.ts.map +1 -1
- package/dist/routing/GoTo.d.ts +3 -1
- package/dist/routing/GoTo.d.ts.map +1 -1
- package/dist/routing/GoTo.js +6 -2
- package/dist/routing/GoToDialog.d.ts +1 -1
- package/dist/routing/GoToDialog.d.ts.map +1 -1
- package/dist/routing/GoToDialog.js +3 -5
- package/dist/routing/NavigationItem.d.ts +1 -1
- package/dist/routing/NavigationItem.d.ts.map +1 -1
- package/dist/routing/NavigationItem.js +0 -1
- package/dist/routing/hooks/hooks.next.d.ts +1 -0
- package/dist/routing/hooks/hooks.next.d.ts.map +1 -1
- package/dist/routing/hooks/hooks.next.js +1 -1
- package/dist/routing/hooks/hooks.vite.d.ts +1 -0
- package/dist/routing/hooks/hooks.vite.d.ts.map +1 -1
- package/dist/routing/hooks/hooks.vite.js +1 -1
- package/dist/routing/hooks/useNavigate.next.d.ts.map +1 -1
- package/dist/routing/hooks/useNavigate.next.js +1 -1
- package/dist/routing/hooks/useNavigate.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useRouteParam.next.d.ts +18 -0
- package/dist/routing/hooks/useRouteParam.next.d.ts.map +1 -0
- package/dist/routing/hooks/useRouteParam.next.js +38 -0
- package/dist/routing/hooks/useRouteParam.vite.d.ts +18 -0
- package/dist/routing/hooks/useRouteParam.vite.d.ts.map +1 -0
- package/dist/routing/hooks/useRouteParam.vite.js +38 -0
- package/dist/routing/index.d.ts +1 -1
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +1 -1
- package/dist/routing/useGoTo.d.ts.map +1 -1
- package/dist/styles/index.css +823 -122
- package/dist/utils/assetResolver.d.ts +1 -1
- package/dist/utils/assetResolver.d.ts.map +1 -1
- package/dist/utils/assetResolver.js +1 -2
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/tList.d.ts +1 -1
- package/dist/utils/tList.d.ts.map +1 -1
- package/dist/utils/useAuthSafe.d.ts +0 -33
- package/dist/utils/useAuthSafe.d.ts.map +1 -1
- package/dist/utils/useAuthSafe.js +34 -1
- package/dist/utils/useCrudSafe.d.ts +12 -6
- package/dist/utils/useCrudSafe.d.ts.map +1 -1
- package/dist/utils/useCrudSafe.js +11 -7
- package/dist/utils/useOAuthSafe.d.ts.map +1 -1
- package/dist/utils/useStripeBillingSafe.d.ts +1 -34
- package/dist/utils/useStripeBillingSafe.d.ts.map +1 -1
- package/dist/utils/useStripeBillingSafe.js +34 -1
- package/dist/vite-routing/AppRoutes.d.ts +1 -1
- package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
- package/dist/vite-routing/AppRoutes.js +0 -1
- package/dist/vite-routing/RootLayout.d.ts.map +1 -1
- package/dist/vite-routing/RootLayout.js +6 -6
- package/package.json +9 -9
|
@@ -139,5 +139,5 @@ export declare function resolveLogo(customPath?: string): string;
|
|
|
139
139
|
* @author AMBROISE PARK Consulting
|
|
140
140
|
*/
|
|
141
141
|
export declare function resolveFaviconSet(): FaviconSet;
|
|
142
|
-
export
|
|
142
|
+
export {};
|
|
143
143
|
//# sourceMappingURL=assetResolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assetResolver.d.ts","sourceRoot":"","sources":["../../src/utils/assetResolver.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,cAAc;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;A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AI,MAAM;IAuB/B;;;OAGG;IACH,MAAM,CAAC,UAAU,IAAI,IAAI;IASzB;;OAEG;IACH,MAAM,CAAC,YAAY;;;;;;;;CAQpB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAE9C"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export * from './useAuthSafe';
|
|
|
11
11
|
export * from './useAuthVisibility';
|
|
12
12
|
export * from './useStripeBillingSafe';
|
|
13
13
|
export * from './useBillingVisibility';
|
|
14
|
-
export * from './useCrudSafe';
|
|
15
14
|
export * from './useOAuthSafe';
|
|
16
15
|
export * from './tList';
|
|
17
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
package/dist/utils/index.js
CHANGED
package/dist/utils/tList.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tList.d.ts","sourceRoot":"","sources":["../../src/utils/tList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tList.d.ts","sourceRoot":"","sources":["../../src/utils/tList.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CACnB,CAAC,EAAE,SAAS,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,UAAU,GAAG,IAAmB,EACtC,IAAI,GAAE,MAAqB,GAC1B,SAAS,CAUX"}
|
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Safe useAuth wrapper for graceful degradation
|
|
3
|
-
* @description Provides auth functionality when @donotdev/auth is installed,
|
|
4
|
-
* gracefully degrades to no-op when not installed.
|
|
5
|
-
*
|
|
6
|
-
* ## CRITICAL: DO NOT USE DYNAMIC IMPORTS
|
|
7
|
-
*
|
|
8
|
-
* This file MUST use sync `import * as authModule from '@donotdev/auth'`
|
|
9
|
-
* at module level. DO NOT refactor to use async `import('@donotdev/auth').then(...)`.
|
|
10
|
-
*
|
|
11
|
-
* ### Why sync import is required:
|
|
12
|
-
*
|
|
13
|
-
* 1. **Bundler aliasing**: Vite/webpack alias missing packages to empty modules
|
|
14
|
-
* at BUILD TIME. The import completes immediately (no async).
|
|
15
|
-
*
|
|
16
|
-
* 2. **Rules of Hooks**: If we use async dynamic import:
|
|
17
|
-
* - First render: `realUseAuth = null` → uses stub (0 hooks)
|
|
18
|
-
* - Async completes: `realUseAuth = useAuth` → now has hooks
|
|
19
|
-
* - Next render: React sees different hook count → CRASH
|
|
20
|
-
*
|
|
21
|
-
* 3. **Monorepo gotcha**: Dynamic imports resolve workspace packages even when
|
|
22
|
-
* the consuming app doesn't have them as dependencies. This causes the
|
|
23
|
-
* real hook to activate unexpectedly → Rules of Hooks violation.
|
|
24
|
-
*
|
|
25
|
-
* 4. **Decision is immutable**: With sync import, `authModule?.useAuth` is
|
|
26
|
-
* evaluated ONCE at module load. It's either the real hook or undefined.
|
|
27
|
-
* This never changes during the app lifecycle.
|
|
28
|
-
*
|
|
29
|
-
* @see docs/development/GRACEFUL_DEGRADATION.md
|
|
30
|
-
* @version 0.0.4
|
|
31
|
-
* @since 0.0.1
|
|
32
|
-
* @author AMBROISE PARK Consulting
|
|
33
|
-
*/
|
|
34
1
|
import type { AuthAPI } from '@donotdev/core';
|
|
35
2
|
/**
|
|
36
3
|
* Safe wrapper for useAuth hook.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuthSafe.d.ts","sourceRoot":"","sources":["../../src/utils/useAuthSafe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAuthSafe.d.ts","sourceRoot":"","sources":["../../src/utils/useAuthSafe.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAmB9C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAKvE;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,SAAoC,CAAC"}
|
|
@@ -1,8 +1,41 @@
|
|
|
1
1
|
// packages/ui/src/utils/useAuthSafe.ts
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Safe useAuth wrapper for graceful degradation
|
|
4
|
+
* @description Provides auth functionality when @donotdev/auth is installed,
|
|
5
|
+
* gracefully degrades to no-op when not installed.
|
|
6
|
+
*
|
|
7
|
+
* ## CRITICAL: DO NOT USE DYNAMIC IMPORTS
|
|
8
|
+
*
|
|
9
|
+
* This file MUST use sync `import * as authModule from '@donotdev/auth'`
|
|
10
|
+
* at module level. DO NOT refactor to use async `import('@donotdev/auth').then(...)`.
|
|
11
|
+
*
|
|
12
|
+
* ### Why sync import is required:
|
|
13
|
+
*
|
|
14
|
+
* 1. **Bundler aliasing**: Vite/webpack alias missing packages to empty modules
|
|
15
|
+
* at BUILD TIME. The import completes immediately (no async).
|
|
16
|
+
*
|
|
17
|
+
* 2. **Rules of Hooks**: If we use async dynamic import:
|
|
18
|
+
* - First render: `realUseAuth = null` → uses stub (0 hooks)
|
|
19
|
+
* - Async completes: `realUseAuth = useAuth` → now has hooks
|
|
20
|
+
* - Next render: React sees different hook count → CRASH
|
|
21
|
+
*
|
|
22
|
+
* 3. **Monorepo gotcha**: Dynamic imports resolve workspace packages even when
|
|
23
|
+
* the consuming app doesn't have them as dependencies. This causes the
|
|
24
|
+
* real hook to activate unexpectedly → Rules of Hooks violation.
|
|
25
|
+
*
|
|
26
|
+
* 4. **Decision is immutable**: With sync import, `authModule?.useAuth` is
|
|
27
|
+
* evaluated ONCE at module load. It's either the real hook or undefined.
|
|
28
|
+
* This never changes during the app lifecycle.
|
|
29
|
+
*
|
|
30
|
+
* @see docs/development/GRACEFUL_DEGRADATION.md
|
|
31
|
+
* @version 0.0.4
|
|
32
|
+
* @since 0.0.1
|
|
33
|
+
* @author AMBROISE PARK Consulting
|
|
34
|
+
*/
|
|
35
|
+
import * as authModule from '@donotdev/auth';
|
|
2
36
|
import { DEGRADED_AUTH_API } from '@donotdev/core';
|
|
3
37
|
// Sync import - bundler aliases to empty module if not installed
|
|
4
38
|
// Decision made ONCE at module load time, never changes
|
|
5
|
-
import * as authModule from '@donotdev/auth';
|
|
6
39
|
// Extract useAuth if available (undefined if package not installed/aliased)
|
|
7
40
|
const realUseAuth = authModule?.useAuth;
|
|
8
41
|
/**
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { CrudAPI, dndevSchema } from '@donotdev/core';
|
|
1
|
+
import type { CrudAPI, dndevSchema, Entity } from '@donotdev/core';
|
|
2
2
|
type BackendType = 'firestore' | 'functions';
|
|
3
|
-
interface
|
|
3
|
+
interface UseCrudSafeOptions<T> {
|
|
4
4
|
backend?: BackendType;
|
|
5
5
|
schema?: dndevSchema<T>;
|
|
6
|
+
entity?: Entity;
|
|
7
|
+
staleTime?: number;
|
|
8
|
+
noCache?: boolean;
|
|
6
9
|
}
|
|
7
10
|
/**
|
|
8
11
|
* Safe wrapper for useCrud hook.
|
|
@@ -10,17 +13,20 @@ interface UseCrudOptions<T> {
|
|
|
10
13
|
* - If @donotdev/crud installed → uses real hook (handles Firebase/consent internally)
|
|
11
14
|
* - If not installed → returns degraded API values
|
|
12
15
|
*
|
|
13
|
-
* @param
|
|
16
|
+
* @param entityOrCollection - Entity definition or collection name
|
|
14
17
|
* @param options - Options including backend type and schema
|
|
15
18
|
* @returns CRUD operations and state, or degraded API if crud unavailable
|
|
16
19
|
*
|
|
17
20
|
* @example
|
|
18
21
|
* ```typescript
|
|
19
|
-
*
|
|
20
|
-
* const {
|
|
22
|
+
* // With entity
|
|
23
|
+
* const { add, update } = useCrudSafe(carEntity);
|
|
24
|
+
*
|
|
25
|
+
* // With collection string
|
|
26
|
+
* const { get, set } = useCrudSafe('users', { schema: UserSchema });
|
|
21
27
|
* ```
|
|
22
28
|
*/
|
|
23
|
-
export declare function useCrudSafe<T = unknown>(
|
|
29
|
+
export declare function useCrudSafe<T = unknown>(entityOrCollection: Entity | string, options?: UseCrudSafeOptions<T>): CrudAPI<T>;
|
|
24
30
|
/**
|
|
25
31
|
* Check if CRUD module is available (for conditional UI rendering)
|
|
26
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrudSafe.d.ts","sourceRoot":"","sources":["../../src/utils/useCrudSafe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCrudSafe.d.ts","sourceRoot":"","sources":["../../src/utils/useCrudSafe.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAInE,KAAK,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE7C,UAAU,kBAAkB,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAkBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,OAAO,EACrC,kBAAkB,EAAE,MAAM,GAAG,MAAM,EACnC,OAAO,GAAE,kBAAkB,CAAC,CAAC,CAAM,GAClC,OAAO,CAAC,CAAC,CAAC,CAKZ;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,SAAoC,CAAC"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @fileoverview Safe useCrud wrapper for graceful degradation
|
|
4
4
|
* @description Provides CRUD functionality when @donotdev/crud is installed,
|
|
5
|
-
* gracefully degrades to no-op when not installed.
|
|
5
|
+
* gracefully degrades to no-op when not installed. This is the recommended
|
|
6
|
+
* way to use CRUD in optional/plugin contexts.
|
|
6
7
|
*
|
|
7
8
|
* ## CRITICAL: DO NOT USE DYNAMIC IMPORTS
|
|
8
9
|
*
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
* This never changes during the app lifecycle.
|
|
29
30
|
*
|
|
30
31
|
* @see docs/development/GRACEFUL_DEGRADATION.md
|
|
31
|
-
* @version 0.0.
|
|
32
|
+
* @version 0.0.6
|
|
32
33
|
* @since 0.0.1
|
|
33
34
|
* @author AMBROISE PARK Consulting
|
|
34
35
|
*/
|
|
@@ -49,19 +50,22 @@ function useCrudStub() {
|
|
|
49
50
|
* - If @donotdev/crud installed → uses real hook (handles Firebase/consent internally)
|
|
50
51
|
* - If not installed → returns degraded API values
|
|
51
52
|
*
|
|
52
|
-
* @param
|
|
53
|
+
* @param entityOrCollection - Entity definition or collection name
|
|
53
54
|
* @param options - Options including backend type and schema
|
|
54
55
|
* @returns CRUD operations and state, or degraded API if crud unavailable
|
|
55
56
|
*
|
|
56
57
|
* @example
|
|
57
58
|
* ```typescript
|
|
58
|
-
*
|
|
59
|
-
* const {
|
|
59
|
+
* // With entity
|
|
60
|
+
* const { add, update } = useCrudSafe(carEntity);
|
|
61
|
+
*
|
|
62
|
+
* // With collection string
|
|
63
|
+
* const { get, set } = useCrudSafe('users', { schema: UserSchema });
|
|
60
64
|
* ```
|
|
61
65
|
*/
|
|
62
|
-
export function useCrudSafe(
|
|
66
|
+
export function useCrudSafe(entityOrCollection, options = {}) {
|
|
63
67
|
if (realUseCrud) {
|
|
64
|
-
return realUseCrud(
|
|
68
|
+
return realUseCrud(entityOrCollection, options);
|
|
65
69
|
}
|
|
66
70
|
return useCrudStub();
|
|
67
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOAuthSafe.d.ts","sourceRoot":"","sources":["../../src/utils/useOAuthSafe.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useOAuthSafe.d.ts","sourceRoot":"","sources":["../../src/utils/useOAuthSafe.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiB/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAK1E;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAqC,CAAC"}
|
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Safe useStripeBilling wrapper for graceful degradation
|
|
3
|
-
* @description Provides billing functionality when @donotdev/billing is installed,
|
|
4
|
-
* gracefully degrades to no-op when not installed.
|
|
5
|
-
*
|
|
6
|
-
* ## CRITICAL: DO NOT USE DYNAMIC IMPORTS
|
|
7
|
-
*
|
|
8
|
-
* This file MUST use sync `import * as billingModule from '@donotdev/billing'`
|
|
9
|
-
* at module level. DO NOT refactor to use async `import('@donotdev/billing').then(...)`.
|
|
10
|
-
*
|
|
11
|
-
* ### Why sync import is required:
|
|
12
|
-
*
|
|
13
|
-
* 1. **Bundler aliasing**: Vite/webpack alias missing packages to empty modules
|
|
14
|
-
* at BUILD TIME. The import completes immediately (no async).
|
|
15
|
-
*
|
|
16
|
-
* 2. **Rules of Hooks**: If we use async dynamic import:
|
|
17
|
-
* - First render: `realUseStripeBilling = null` → uses stub (0 hooks)
|
|
18
|
-
* - Async completes: `realUseStripeBilling = useStripeBilling` → now has hooks
|
|
19
|
-
* - Next render: React sees different hook count → CRASH
|
|
20
|
-
*
|
|
21
|
-
* 3. **Monorepo gotcha**: Dynamic imports resolve workspace packages even when
|
|
22
|
-
* the consuming app doesn't have them as dependencies. This causes the
|
|
23
|
-
* real hook to activate unexpectedly → Rules of Hooks violation.
|
|
24
|
-
*
|
|
25
|
-
* 4. **Decision is immutable**: With sync import, `billingModule?.useStripeBilling`
|
|
26
|
-
* is evaluated ONCE at module load. It's either the real hook or undefined.
|
|
27
|
-
* This never changes during the app lifecycle.
|
|
28
|
-
*
|
|
29
|
-
* @see docs/development/GRACEFUL_DEGRADATION.md
|
|
30
|
-
* @version 0.0.4
|
|
31
|
-
* @since 0.0.1
|
|
32
|
-
* @author AMBROISE PARK Consulting
|
|
33
|
-
*/
|
|
34
|
-
import type { BillingAPI } from '@donotdev/core';
|
|
35
1
|
import type { BillingAuthState } from '@donotdev/billing';
|
|
2
|
+
import type { BillingAPI } from '@donotdev/core';
|
|
36
3
|
export type { BillingAuthState } from '@donotdev/billing';
|
|
37
4
|
/**
|
|
38
5
|
* Safe wrapper for useStripeBilling hook.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStripeBillingSafe.d.ts","sourceRoot":"","sources":["../../src/utils/useStripeBillingSafe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useStripeBillingSafe.d.ts","sourceRoot":"","sources":["../../src/utils/useStripeBillingSafe.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAoB1D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,UAAU,EAC7D,GAAG,EAAE,CAAC,EACN,SAAS,CAAC,EAAE,gBAAgB,GAC3B,UAAU,CAAC,CAAC,CAAC,CAKf;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,SAA6C,CAAC"}
|
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
// packages/ui/src/utils/useStripeBillingSafe.ts
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Safe useStripeBilling wrapper for graceful degradation
|
|
4
|
+
* @description Provides billing functionality when @donotdev/billing is installed,
|
|
5
|
+
* gracefully degrades to no-op when not installed.
|
|
6
|
+
*
|
|
7
|
+
* ## CRITICAL: DO NOT USE DYNAMIC IMPORTS
|
|
8
|
+
*
|
|
9
|
+
* This file MUST use sync `import * as billingModule from '@donotdev/billing'`
|
|
10
|
+
* at module level. DO NOT refactor to use async `import('@donotdev/billing').then(...)`.
|
|
11
|
+
*
|
|
12
|
+
* ### Why sync import is required:
|
|
13
|
+
*
|
|
14
|
+
* 1. **Bundler aliasing**: Vite/webpack alias missing packages to empty modules
|
|
15
|
+
* at BUILD TIME. The import completes immediately (no async).
|
|
16
|
+
*
|
|
17
|
+
* 2. **Rules of Hooks**: If we use async dynamic import:
|
|
18
|
+
* - First render: `realUseStripeBilling = null` → uses stub (0 hooks)
|
|
19
|
+
* - Async completes: `realUseStripeBilling = useStripeBilling` → now has hooks
|
|
20
|
+
* - Next render: React sees different hook count → CRASH
|
|
21
|
+
*
|
|
22
|
+
* 3. **Monorepo gotcha**: Dynamic imports resolve workspace packages even when
|
|
23
|
+
* the consuming app doesn't have them as dependencies. This causes the
|
|
24
|
+
* real hook to activate unexpectedly → Rules of Hooks violation.
|
|
25
|
+
*
|
|
26
|
+
* 4. **Decision is immutable**: With sync import, `billingModule?.useStripeBilling`
|
|
27
|
+
* is evaluated ONCE at module load. It's either the real hook or undefined.
|
|
28
|
+
* This never changes during the app lifecycle.
|
|
29
|
+
*
|
|
30
|
+
* @see docs/development/GRACEFUL_DEGRADATION.md
|
|
31
|
+
* @version 0.0.4
|
|
32
|
+
* @since 0.0.1
|
|
33
|
+
* @author AMBROISE PARK Consulting
|
|
34
|
+
*/
|
|
3
35
|
import * as billingModule from '@donotdev/billing';
|
|
36
|
+
import { DEGRADED_BILLING_API } from '@donotdev/core';
|
|
4
37
|
// Check if real hook exists (will be undefined if Vite aliased to empty module)
|
|
5
38
|
const realUseStripeBilling = billingModule?.useStripeBilling;
|
|
6
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/vite-routing/AppRoutes.tsx"],"names":[],"mappings":"AAoDA,OAAO,
|
|
1
|
+
{"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/vite-routing/AppRoutes.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAY,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAyF7D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,GAAG,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,UAAU,sBAAsB;IAC9B,4CAA4C;IAC5C,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,yCA8D9D"}
|
|
@@ -48,7 +48,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
48
48
|
*/
|
|
49
49
|
import { lazy, Suspense } from 'react';
|
|
50
50
|
import { createBrowserRouter } from 'react-router-dom';
|
|
51
|
-
import {} from '@donotdev/core';
|
|
52
51
|
import { RootLayout } from './RootLayout';
|
|
53
52
|
import Loader from '../components/common/Loader';
|
|
54
53
|
import { AuthGuard } from '../routing/AuthGuard';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../src/vite-routing/RootLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../src/vite-routing/RootLayout.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA0LnD;;GAEG;AACH,UAAU,oBAAoB;IAC5B,2BAA2B;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAgC1D"}
|
|
@@ -12,11 +12,9 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
12
12
|
* @since 0.0.1
|
|
13
13
|
* @author AMBROISE PARK Consulting
|
|
14
14
|
*/
|
|
15
|
-
import { Suspense, lazy, useEffect, useRef } from 'react';
|
|
16
|
-
import { useLayoutEffect } from 'react';
|
|
15
|
+
import { Suspense, lazy, useEffect, useLayoutEffect, useRef } from 'react';
|
|
17
16
|
import { Outlet, useLocation } from 'react-router-dom';
|
|
18
|
-
import { globalEmitter, isClient } from '@donotdev/core';
|
|
19
|
-
import Loader from '../components/common/Loader';
|
|
17
|
+
import { globalEmitter, isClient, QueryProviders } from '@donotdev/core';
|
|
20
18
|
import { DnDevLayout } from '../internal/layout/DnDevLayout';
|
|
21
19
|
import { UIProviders } from '../internal/providers/UIProviders';
|
|
22
20
|
// Only lazy load non-critical components (not in render path)
|
|
@@ -32,6 +30,9 @@ const PWAUpdateNotification = lazy(() => import('../internal/layout/components/P
|
|
|
32
30
|
const LicenseWatermark = lazy(() => import('../components/license/LicenseWatermark').then((m) => ({
|
|
33
31
|
default: m.LicenseWatermark,
|
|
34
32
|
})));
|
|
33
|
+
const RedirectOverlay = lazy(() => import('../components/common/RedirectOverlay').then((m) => ({
|
|
34
|
+
default: m.RedirectOverlay,
|
|
35
|
+
})));
|
|
35
36
|
/**
|
|
36
37
|
* CustomScrollRestoration - Scroll restoration for custom scroll containers
|
|
37
38
|
*
|
|
@@ -62,7 +63,6 @@ function CustomScrollRestoration() {
|
|
|
62
63
|
return;
|
|
63
64
|
// Save current scroll position before navigating
|
|
64
65
|
const currentKey = location.key;
|
|
65
|
-
const currentScroll = mainElement.scrollTop;
|
|
66
66
|
// Check if this is a back/forward navigation (location.state can indicate this)
|
|
67
67
|
// For now, we'll use a simple heuristic: if we have a saved position, it's likely POP
|
|
68
68
|
const savedPosition = scrollPositions.current.get(currentKey);
|
|
@@ -206,5 +206,5 @@ function RouteReadySignal({ children }) {
|
|
|
206
206
|
* @author AMBROISE PARK Consulting
|
|
207
207
|
*/
|
|
208
208
|
export function RootLayout({ layout }) {
|
|
209
|
-
return (_jsxs(UIProviders, { children: [_jsx(Suspense, { fallback: null, children: _jsx(AutoMetaTags, {}) }), _jsxs(FrameworkReadySignal, { children: [_jsx(DnDevLayout, { layout: layout, children: _jsx(RouteReadySignal, { children: _jsx(Outlet, {}) }) }), _jsx(CustomScrollRestoration, {}), _jsxs(Suspense, { fallback: null, children: [_jsx(ConsentBanner, {}), _jsx(PWAUpdateNotification, {}), _jsx(LicenseWatermark, {})] })] })] }));
|
|
209
|
+
return (_jsx(QueryProviders, { children: _jsxs(UIProviders, { children: [_jsx(Suspense, { fallback: null, children: _jsx(AutoMetaTags, {}) }), _jsxs(FrameworkReadySignal, { children: [_jsx(DnDevLayout, { layout: layout, children: _jsx(RouteReadySignal, { children: _jsx(Outlet, {}) }) }), _jsx(CustomScrollRestoration, {}), _jsxs(Suspense, { fallback: null, children: [_jsx(ConsentBanner, {}), _jsx(PWAUpdateNotification, {}), _jsx(LicenseWatermark, {}), _jsx(RedirectOverlay, {})] })] })] }) }));
|
|
210
210
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donotdev/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"react-hook-form": "^7.71.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@donotdev/adv-comps": "0.0.
|
|
56
|
-
"@donotdev/auth": "0.0.
|
|
57
|
-
"@donotdev/billing": "0.0.
|
|
58
|
-
"@donotdev/components": "0.0.
|
|
59
|
-
"@donotdev/core": "0.0.
|
|
60
|
-
"@donotdev/crud": "0.0.
|
|
61
|
-
"@donotdev/firebase": "0.0.
|
|
62
|
-
"@donotdev/oauth": "0.0.
|
|
55
|
+
"@donotdev/adv-comps": "^0.0.8",
|
|
56
|
+
"@donotdev/auth": "^0.0.5",
|
|
57
|
+
"@donotdev/billing": "^0.0.5",
|
|
58
|
+
"@donotdev/components": "^0.0.12",
|
|
59
|
+
"@donotdev/core": "^0.0.12",
|
|
60
|
+
"@donotdev/crud": "^0.0.5",
|
|
61
|
+
"@donotdev/firebase": "^0.0.5",
|
|
62
|
+
"@donotdev/oauth": "^0.0.5",
|
|
63
63
|
"firebase": "^12.5.0",
|
|
64
64
|
"lucide-react": "^0.562.0",
|
|
65
65
|
"react": "^19.2.3",
|