@donotdev/ui 0.0.3 → 0.0.4

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 (32) hide show
  1. package/dist/components/auth/AuthMenu.d.ts.map +1 -1
  2. package/dist/components/auth/AuthMenu.js +4 -4
  3. package/dist/components/common/FeatureCard.d.ts +7 -19
  4. package/dist/components/common/FeatureCard.d.ts.map +1 -1
  5. package/dist/components/common/FeatureCard.js +4 -28
  6. package/dist/components/common/TechBento.d.ts +15 -3
  7. package/dist/components/common/TechBento.d.ts.map +1 -1
  8. package/dist/components/common/TechBento.js +20 -2
  9. package/dist/dndev.css +258 -151
  10. package/dist/index.js +4 -4
  11. package/dist/internal/devtools/DebugTools.js +1 -1
  12. package/dist/internal/devtools/components/ConfigTab.d.ts.map +1 -1
  13. package/dist/internal/devtools/components/ConfigTab.js +8 -6
  14. package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
  15. package/dist/internal/devtools/components/DesignTab.js +256 -45
  16. package/dist/internal/devtools/components/StoresTab.d.ts.map +1 -1
  17. package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
  18. package/dist/internal/initializers/BaseStoresInitializer.js +11 -1
  19. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  20. package/dist/internal/layout/components/AutoMetaTags.js +6 -1
  21. package/dist/internal/layout/zones/DnDevFooter.js +2 -2
  22. package/dist/styles/index.css +258 -151
  23. package/dist/utils/assetResolver.d.ts.map +1 -1
  24. package/dist/utils/assetResolver.js +22 -11
  25. package/dist/utils/index.d.ts +1 -0
  26. package/dist/utils/index.d.ts.map +1 -1
  27. package/dist/utils/index.js +1 -0
  28. package/dist/utils/tList.d.ts +30 -0
  29. package/dist/utils/tList.d.ts.map +1 -0
  30. package/dist/utils/tList.js +51 -0
  31. package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
  32. package/package.json +9 -9
@@ -164,38 +164,49 @@ export class AssetResolver {
164
164
  const manifest = this.getAssetManifest();
165
165
  if (manifest?.favicon?.set) {
166
166
  const set = manifest.favicon.set;
167
+ // Use icon-512x512.png as fallback (generated from logo.svg)
168
+ const fallbackIcon = this.assetExists('/icon-512x512.png')
169
+ ? '/icon-512x512.png'
170
+ : this.assetExists('/icon-192x192.png')
171
+ ? '/icon-192x192.png'
172
+ : '/logo.svg';
167
173
  // Filter out null values and provide framework fallbacks
168
174
  const resolvedSet = {
169
175
  svg: set.svg || '/favicon.svg',
170
176
  ico: set.ico || '/favicon.ico',
171
- png16: set.png16 || '/logo.png',
172
- png32: set.png32 || '/logo.png',
173
- apple180: set.apple180 || '/logo.png',
174
- android192: set.android192 || '/logo.png',
175
- android512: set.android512 || '/logo.png',
177
+ png16: set.png16 || fallbackIcon,
178
+ png32: set.png32 || fallbackIcon,
179
+ apple180: set.apple180 || fallbackIcon,
180
+ android192: set.android192 || fallbackIcon,
181
+ android512: set.android512 || fallbackIcon,
176
182
  };
177
183
  this.cache.set(cacheKey, resolvedSet);
178
184
  return resolvedSet;
179
185
  }
180
- // Manual detection fallback
186
+ // Manual detection fallback - use generated icons instead of logo.png
187
+ const fallbackIcon = this.assetExists('/icon-512x512.png')
188
+ ? '/icon-512x512.png'
189
+ : this.assetExists('/icon-192x192.png')
190
+ ? '/icon-192x192.png'
191
+ : '/logo.svg';
181
192
  const faviconSet = {
182
193
  svg: this.assetExists('/favicon.svg') ? '/favicon.svg' : '/logo.svg',
183
194
  ico: this.assetExists('/favicon.ico') ? '/favicon.ico' : '/favicon.svg',
184
195
  png16: this.assetExists('/favicon-16x16.png')
185
196
  ? '/favicon-16x16.png'
186
- : '/logo.png',
197
+ : fallbackIcon,
187
198
  png32: this.assetExists('/favicon-32x32.png')
188
199
  ? '/favicon-32x32.png'
189
- : '/logo.png',
200
+ : fallbackIcon,
190
201
  apple180: this.assetExists('/apple-touch-icon.png')
191
202
  ? '/apple-touch-icon.png'
192
- : '/logo.png',
203
+ : fallbackIcon,
193
204
  android192: this.assetExists('/icon-192x192.png')
194
205
  ? '/icon-192x192.png'
195
- : '/logo.png',
206
+ : fallbackIcon,
196
207
  android512: this.assetExists('/icon-512x512.png')
197
208
  ? '/icon-512x512.png'
198
- : '/logo.png',
209
+ : fallbackIcon,
199
210
  };
200
211
  this.cache.set(cacheKey, faviconSet);
201
212
  return faviconSet;
@@ -13,4 +13,5 @@ export * from './useStripeBillingSafe';
13
13
  export * from './useBillingVisibility';
14
14
  export * from './useCrudSafe';
15
15
  export * from './useOAuthSafe';
16
+ export * from './tList';
16
17
  //# 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;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,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;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
@@ -14,3 +14,4 @@ export * from './useStripeBillingSafe';
14
14
  export * from './useBillingVisibility';
15
15
  export * from './useCrudSafe';
16
16
  export * from './useOAuthSafe';
17
+ export * from './tList';
@@ -0,0 +1,30 @@
1
+ import type { LucideIcon } from 'lucide-react';
2
+ import type { TFunction } from 'i18next';
3
+ import type { ReactNode } from 'react';
4
+ /**
5
+ * Renders a translated array as a List with optional icon
6
+ *
7
+ * Opinionated helper that reduces boilerplate for the common pattern:
8
+ * `<List icon={<CheckCircle size={16} />} items={translateArray(t, key, count)} />`
9
+ *
10
+ * @param t - Translation function from useTranslation
11
+ * @param key - Translation key prefix for the array
12
+ * @param count - Maximum number of items to fetch
13
+ * @param icon - Lucide icon, null for no icon, or undefined for default (CheckCircle)
14
+ * @param size - Optional icon size (default: 16)
15
+ * @returns ReactNode containing the List component
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * // With default icon (CheckCircle)
20
+ * <Card content={tList(t, 'features.items', 4)} />
21
+ *
22
+ * // With custom icon
23
+ * <Card content={tList(t, 'features.items', 4, Star)} />
24
+ *
25
+ * // Without icon (for emoji-prefixed labels like "🚀 Kick-off")
26
+ * <Card content={tList(t, 'features.items', 4, null)} />
27
+ * ```
28
+ */
29
+ export declare function tList(t: TFunction, key: string, count: number, icon?: LucideIcon | null, size?: number): ReactNode;
30
+ //# sourceMappingURL=tList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tList.d.ts","sourceRoot":"","sources":["../../src/utils/tList.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAevC;;;;;;;;;;;;;;;;;;;;;;;;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"}
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // packages/ui/src/utils/tList.tsx
3
+ /**
4
+ * @fileoverview Translated List helper
5
+ * @description Opinionated helper for rendering translated content as List
6
+ *
7
+ * @version 0.0.1
8
+ * @since 0.0.4
9
+ * @author AMBROISE PARK Consulting
10
+ */
11
+ import { CheckCircle } from 'lucide-react';
12
+ import { List } from '@donotdev/components';
13
+ import { translateArray } from '@donotdev/core';
14
+ /**
15
+ * Framework default icon for list items
16
+ */
17
+ const DEFAULT_ICON = CheckCircle;
18
+ /**
19
+ * Framework default icon size (matches --icon-sm)
20
+ */
21
+ const DEFAULT_SIZE = 16;
22
+ /**
23
+ * Renders a translated array as a List with optional icon
24
+ *
25
+ * Opinionated helper that reduces boilerplate for the common pattern:
26
+ * `<List icon={<CheckCircle size={16} />} items={translateArray(t, key, count)} />`
27
+ *
28
+ * @param t - Translation function from useTranslation
29
+ * @param key - Translation key prefix for the array
30
+ * @param count - Maximum number of items to fetch
31
+ * @param icon - Lucide icon, null for no icon, or undefined for default (CheckCircle)
32
+ * @param size - Optional icon size (default: 16)
33
+ * @returns ReactNode containing the List component
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * // With default icon (CheckCircle)
38
+ * <Card content={tList(t, 'features.items', 4)} />
39
+ *
40
+ * // With custom icon
41
+ * <Card content={tList(t, 'features.items', 4, Star)} />
42
+ *
43
+ * // Without icon (for emoji-prefixed labels like "🚀 Kick-off")
44
+ * <Card content={tList(t, 'features.items', 4, null)} />
45
+ * ```
46
+ */
47
+ export function tList(t, key, count, icon = DEFAULT_ICON, size = DEFAULT_SIZE) {
48
+ const Icon = icon;
49
+ const iconElement = Icon ? _jsx(Icon, { size: size }) : undefined;
50
+ return (_jsx(List, { icon: iconElement, items: translateArray(t, key, count), style: { listStyle: 'none', paddingInlineStart: 0 } }));
51
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/vite-routing/AppRoutes.tsx"],"names":[],"mappings":"AAoDA,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAuFlE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAA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,sBAAsB,yCA8D9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -53,14 +53,14 @@
53
53
  "react-hook-form": "^7.68.0"
54
54
  },
55
55
  "peerDependencies": {
56
- "@donotdev/adv-comps": "0.0.3",
57
- "@donotdev/auth": "0.0.3",
58
- "@donotdev/billing": "0.0.3",
59
- "@donotdev/components": "0.0.3",
60
- "@donotdev/core": "0.0.3",
61
- "@donotdev/crud": "0.0.3",
62
- "@donotdev/firebase": "0.0.3",
63
- "@donotdev/oauth": "0.0.3",
56
+ "@donotdev/adv-comps": "0.0.4",
57
+ "@donotdev/auth": "0.0.4",
58
+ "@donotdev/billing": "0.0.4",
59
+ "@donotdev/components": "0.0.4",
60
+ "@donotdev/core": "0.0.4",
61
+ "@donotdev/crud": "0.0.4",
62
+ "@donotdev/firebase": "0.0.4",
63
+ "@donotdev/oauth": "0.0.4",
64
64
  "firebase": "^12.5.0",
65
65
  "lucide-react": "^0.562.0",
66
66
  "react": "^19.2.3",