@cranberry-money/shared-constants 8.6.0 → 8.8.0

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.
@@ -3,21 +3,45 @@
3
3
  */
4
4
  export declare const CACHE_TIMING: {
5
5
  /**
6
- * Auth data stale time - 5 minutes
6
+ * Very short cache - 30 seconds
7
7
  */
8
- readonly AUTH_STALE_TIME: number;
8
+ readonly VERY_SHORT_STALE_TIME: number;
9
9
  /**
10
10
  * Trades data stale time - 2 minutes
11
11
  */
12
12
  readonly TRADES_STALE_TIME: number;
13
13
  /**
14
- * Asset allocation data stale time - 10 minutes
14
+ * Auth data stale time - 5 minutes
15
15
  */
16
- readonly ASSET_ALLOCATION_STALE_TIME: number;
16
+ readonly AUTH_STALE_TIME: number;
17
17
  /**
18
18
  * Default stale time for general data - 5 minutes
19
19
  */
20
20
  readonly DEFAULT_STALE_TIME: number;
21
+ /**
22
+ * Asset allocation data stale time - 10 minutes
23
+ */
24
+ readonly ASSET_ALLOCATION_STALE_TIME: number;
25
+ /**
26
+ * Long cache time - 30 minutes
27
+ */
28
+ readonly LONG_STALE_TIME: number;
29
+ /**
30
+ * Default garbage collection time - 2 minutes
31
+ */
32
+ readonly DEFAULT_GC_TIME: number;
33
+ /**
34
+ * Medium garbage collection time - 5 minutes
35
+ */
36
+ readonly MEDIUM_GC_TIME: number;
37
+ /**
38
+ * Long garbage collection time - 10 minutes
39
+ */
40
+ readonly LONG_GC_TIME: number;
41
+ /**
42
+ * Very long garbage collection time - 30 minutes
43
+ */
44
+ readonly VERY_LONG_GC_TIME: number;
21
45
  };
22
46
  export type CacheTiming = typeof CACHE_TIMING;
23
47
  //# sourceMappingURL=cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/ui/cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,YAAY;IACvB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/ui/cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,YAAY;IACvB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC"}
package/dist/ui/cache.js CHANGED
@@ -3,19 +3,43 @@
3
3
  */
4
4
  export const CACHE_TIMING = {
5
5
  /**
6
- * Auth data stale time - 5 minutes
6
+ * Very short cache - 30 seconds
7
7
  */
8
- AUTH_STALE_TIME: 5 * 60 * 1000,
8
+ VERY_SHORT_STALE_TIME: 30 * 1000,
9
9
  /**
10
10
  * Trades data stale time - 2 minutes
11
11
  */
12
12
  TRADES_STALE_TIME: 2 * 60 * 1000,
13
13
  /**
14
- * Asset allocation data stale time - 10 minutes
14
+ * Auth data stale time - 5 minutes
15
15
  */
16
- ASSET_ALLOCATION_STALE_TIME: 10 * 60 * 1000,
16
+ AUTH_STALE_TIME: 5 * 60 * 1000,
17
17
  /**
18
18
  * Default stale time for general data - 5 minutes
19
19
  */
20
20
  DEFAULT_STALE_TIME: 5 * 60 * 1000,
21
+ /**
22
+ * Asset allocation data stale time - 10 minutes
23
+ */
24
+ ASSET_ALLOCATION_STALE_TIME: 10 * 60 * 1000,
25
+ /**
26
+ * Long cache time - 30 minutes
27
+ */
28
+ LONG_STALE_TIME: 30 * 60 * 1000,
29
+ /**
30
+ * Default garbage collection time - 2 minutes
31
+ */
32
+ DEFAULT_GC_TIME: 2 * 60 * 1000,
33
+ /**
34
+ * Medium garbage collection time - 5 minutes
35
+ */
36
+ MEDIUM_GC_TIME: 5 * 60 * 1000,
37
+ /**
38
+ * Long garbage collection time - 10 minutes
39
+ */
40
+ LONG_GC_TIME: 10 * 60 * 1000,
41
+ /**
42
+ * Very long garbage collection time - 30 minutes
43
+ */
44
+ VERY_LONG_GC_TIME: 30 * 60 * 1000,
21
45
  };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Chart configuration constants
3
+ */
4
+ export declare const CHART_CONFIG: {
5
+ /**
6
+ * SVG dimensions for allocation charts
7
+ */
8
+ readonly ALLOCATION_CHART: {
9
+ readonly RADIUS: 45;
10
+ readonly CIRCUMFERENCE: number;
11
+ readonly STROKE_WIDTH: 10;
12
+ readonly CENTER_X: 50;
13
+ readonly CENTER_Y: 50;
14
+ readonly VIEWBOX: "0 0 100 100";
15
+ };
16
+ /**
17
+ * Chart.js default configurations
18
+ */
19
+ readonly DEFAULT_CHART_OPTIONS: {
20
+ readonly RESPONSIVE: true;
21
+ readonly MAINTAIN_ASPECT_RATIO: false;
22
+ readonly ANIMATION_DURATION: 750;
23
+ };
24
+ /**
25
+ * Performance chart settings
26
+ */
27
+ readonly PERFORMANCE_CHART: {
28
+ readonly LINE_TENSION: 0.4;
29
+ readonly POINT_RADIUS: 0;
30
+ readonly POINT_HOVER_RADIUS: 6;
31
+ readonly BORDER_WIDTH: 2;
32
+ };
33
+ };
34
+ export type ChartConfig = typeof CHART_CONFIG;
35
+ //# sourceMappingURL=chart-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-config.d.ts","sourceRoot":"","sources":["../../src/ui/chart-config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,YAAY;IACvB;;OAEG;;;;;;;;;IAUH;;OAEG;;;;;;IAOH;;OAEG;;;;;;;CAOK,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Chart configuration constants
3
+ */
4
+ export const CHART_CONFIG = {
5
+ /**
6
+ * SVG dimensions for allocation charts
7
+ */
8
+ ALLOCATION_CHART: {
9
+ RADIUS: 45,
10
+ CIRCUMFERENCE: 2 * Math.PI * 45,
11
+ STROKE_WIDTH: 10,
12
+ CENTER_X: 50,
13
+ CENTER_Y: 50,
14
+ VIEWBOX: '0 0 100 100',
15
+ },
16
+ /**
17
+ * Chart.js default configurations
18
+ */
19
+ DEFAULT_CHART_OPTIONS: {
20
+ RESPONSIVE: true,
21
+ MAINTAIN_ASPECT_RATIO: false,
22
+ ANIMATION_DURATION: 750,
23
+ },
24
+ /**
25
+ * Performance chart settings
26
+ */
27
+ PERFORMANCE_CHART: {
28
+ LINE_TENSION: 0.4,
29
+ POINT_RADIUS: 0,
30
+ POINT_HOVER_RADIUS: 6,
31
+ BORDER_WIDTH: 2,
32
+ },
33
+ };
@@ -8,4 +8,6 @@ export * from './status-colors-unified';
8
8
  export * from './timing';
9
9
  export * from './cache';
10
10
  export * from './zIndex';
11
+ export * from './navigation';
12
+ export * from './chart-config';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
package/dist/ui/index.js CHANGED
@@ -8,3 +8,5 @@ export * from './status-colors-unified';
8
8
  export * from './timing';
9
9
  export * from './cache';
10
10
  export * from './zIndex';
11
+ export * from './navigation';
12
+ export * from './chart-config';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Navigation constants for consistent routing and labeling across applications
3
+ */
4
+ /**
5
+ * Application routes
6
+ */
7
+ export declare const NAVIGATION_ROUTES: {
8
+ readonly HOME: "/";
9
+ readonly ABOUT: "/about";
10
+ readonly CONTACT: "/contact";
11
+ readonly SIGN_IN: "/signin";
12
+ readonly DASHBOARD: "/dashboard";
13
+ readonly ASSET_ALLOCATION: "/asset-allocation";
14
+ readonly CASH_TRANSACTIONS: "/cash-transactions";
15
+ readonly TARGET_TRADES: "/target-trades";
16
+ readonly TRADES: "/trades";
17
+ readonly SIGNUP_USER: "/signup/user";
18
+ readonly SIGNUP_EMAIL_CONFIRMATION: "/signup/email_confirmation";
19
+ readonly SIGNUP_USER_PROFILE: "/signup/user_profile";
20
+ readonly SIGNUP_TAX_RESIDENCIES: "/signup/tax_residencies";
21
+ readonly SIGNUP_INVESTMENT_PREFERENCES: "/signup/investment_preferences";
22
+ readonly SIGNUP_PORTFOLIO_SELECTION: "/signup/portfolio_selection";
23
+ readonly SIGNUP_PORTFOLIO_PERFORMANCE: "/signup/portfolio_performance";
24
+ readonly SIGNUP_REVIEW: "/signup/review";
25
+ readonly SIGNUP_ASSET_ALLOCATION: "/signup/asset_allocation";
26
+ };
27
+ /**
28
+ * Navigation menu labels
29
+ */
30
+ export declare const NAVIGATION_LABELS: {
31
+ readonly HOME: "Home";
32
+ readonly ABOUT: "About";
33
+ readonly CONTACT: "Contact";
34
+ readonly SIGN_IN: "Sign In";
35
+ readonly DASHBOARD: "Dashboard";
36
+ readonly ALLOCATION: "Allocation";
37
+ readonly CASH: "Cash";
38
+ readonly ORDERS: "Orders";
39
+ readonly TRADES: "Trades";
40
+ readonly SIGN_OUT: "Sign Out";
41
+ readonly SIGNING_OUT: "Signing Out...";
42
+ };
43
+ export type NavigationRoutes = typeof NAVIGATION_ROUTES;
44
+ export type NavigationLabels = typeof NAVIGATION_LABELS;
45
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/ui/navigation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAwBpB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;CAepB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Navigation constants for consistent routing and labeling across applications
3
+ */
4
+ /**
5
+ * Application routes
6
+ */
7
+ export const NAVIGATION_ROUTES = {
8
+ // Public routes
9
+ HOME: '/',
10
+ ABOUT: '/about',
11
+ CONTACT: '/contact',
12
+ SIGN_IN: '/signin',
13
+ // Authenticated routes
14
+ DASHBOARD: '/dashboard',
15
+ ASSET_ALLOCATION: '/asset-allocation',
16
+ CASH_TRANSACTIONS: '/cash-transactions',
17
+ TARGET_TRADES: '/target-trades',
18
+ TRADES: '/trades',
19
+ // Signup flow routes
20
+ SIGNUP_USER: '/signup/user',
21
+ SIGNUP_EMAIL_CONFIRMATION: '/signup/email_confirmation',
22
+ SIGNUP_USER_PROFILE: '/signup/user_profile',
23
+ SIGNUP_TAX_RESIDENCIES: '/signup/tax_residencies',
24
+ SIGNUP_INVESTMENT_PREFERENCES: '/signup/investment_preferences',
25
+ SIGNUP_PORTFOLIO_SELECTION: '/signup/portfolio_selection',
26
+ SIGNUP_PORTFOLIO_PERFORMANCE: '/signup/portfolio_performance',
27
+ SIGNUP_REVIEW: '/signup/review',
28
+ SIGNUP_ASSET_ALLOCATION: '/signup/asset_allocation',
29
+ };
30
+ /**
31
+ * Navigation menu labels
32
+ */
33
+ export const NAVIGATION_LABELS = {
34
+ // Public menu items
35
+ HOME: 'Home',
36
+ ABOUT: 'About',
37
+ CONTACT: 'Contact',
38
+ SIGN_IN: 'Sign In',
39
+ // Authenticated menu items
40
+ DASHBOARD: 'Dashboard',
41
+ ALLOCATION: 'Allocation',
42
+ CASH: 'Cash',
43
+ ORDERS: 'Orders',
44
+ TRADES: 'Trades',
45
+ SIGN_OUT: 'Sign Out',
46
+ SIGNING_OUT: 'Signing Out...',
47
+ };
@@ -35,6 +35,14 @@ export declare const DISPLAY_LIMITS: {
35
35
  readonly MAX_NOTES_LENGTH: 1000;
36
36
  readonly MAX_FILE_SIZE_MB: 10;
37
37
  readonly MAX_FILE_NAME_LENGTH: 255;
38
+ readonly DASHBOARD_RECENT_TRADES: 5;
39
+ readonly DASHBOARD_TARGET_TRADES: 5;
40
+ readonly DASHBOARD_TRANSACTIONS: 5;
41
+ readonly DASHBOARD_WITHDRAWALS: 5;
42
+ readonly DEFAULT_PAGE_SIZE: 20;
43
+ readonly PAGE_SIZE_OPTIONS: readonly [10, 20, 50, 100];
44
+ readonly AUTOCOMPLETE_MAX_RESULTS: 10;
45
+ readonly RECENT_SEARCHES_MAX: 5;
38
46
  };
39
47
  export declare const ALLOCATION_DEFAULTS: {
40
48
  readonly DEFAULT_PERCENTAGE: 10;
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/utilities/defaults.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAIX,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAIX,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAIX,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAIX,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAIX,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC"}
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/utilities/defaults.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAIX,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAIX,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAIX,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAIX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAiBjB,CAAC;AAIX,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC"}
@@ -46,6 +46,17 @@ export const DISPLAY_LIMITS = {
46
46
  MAX_NOTES_LENGTH: COMMON_THRESHOLDS.MAX_NOTES_LENGTH,
47
47
  MAX_FILE_SIZE_MB: COMMON_THRESHOLDS.MAX_FILE_SIZE_MB,
48
48
  MAX_FILE_NAME_LENGTH: COMMON_THRESHOLDS.MAX_FILE_NAME_LENGTH,
49
+ // Dashboard display limits
50
+ DASHBOARD_RECENT_TRADES: 5,
51
+ DASHBOARD_TARGET_TRADES: 5,
52
+ DASHBOARD_TRANSACTIONS: 5,
53
+ DASHBOARD_WITHDRAWALS: 5,
54
+ // Table pagination
55
+ DEFAULT_PAGE_SIZE: 20,
56
+ PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
57
+ // Search limits
58
+ AUTOCOMPLETE_MAX_RESULTS: 10,
59
+ RECENT_SEARCHES_MAX: 5,
49
60
  };
50
61
  // Asset allocation defaults
51
62
  // Now references consolidated defaults
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cranberry-money/shared-constants",
3
- "version": "8.6.0",
3
+ "version": "8.8.0",
4
4
  "description": "Shared constants for MyPortfolio platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",