@plyaz/config 1.1.1 → 1.2.1

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.
@@ -22,14 +22,166 @@ export declare const NUMBER_SYSTEM: {
22
22
  * Base 10 - Decimal number system
23
23
  */
24
24
  readonly DECIMAL_BASE: 10;
25
+ /**
26
+ * Base 12 - Duodecimal number system
27
+ */
28
+ readonly DUODECIMAL_BASE: 12;
25
29
  /**
26
30
  * Base 16 - Hexadecimal number system
27
31
  */
28
32
  readonly HEX_BASE: 16;
33
+ /**
34
+ * Base 32 - Base32 encoding
35
+ */
36
+ readonly BASE32: 32;
29
37
  /**
30
38
  * Base 36 - Alphanumeric number system (0-9, a-z)
31
39
  */
32
40
  readonly BASE36: 36;
41
+ /**
42
+ * Base 58 - Bitcoin base58 encoding (excludes similar looking characters)
43
+ */
44
+ readonly BASE58: 58;
45
+ /**
46
+ * Base 62 - Alphanumeric with uppercase (0-9, a-z, A-Z)
47
+ */
48
+ readonly BASE62: 62;
49
+ /**
50
+ * Base 64 - Base64 encoding
51
+ */
52
+ readonly BASE64: 64;
53
+ /**
54
+ * Default padding length for hexadecimal values (e.g., "0F" instead of "F")
55
+ */
56
+ readonly HEX_PAD_LENGTH: 2;
57
+ /**
58
+ * Padding length for RGB hex colors (6 characters)
59
+ */
60
+ readonly HEX_COLOR_LENGTH: 6;
61
+ /**
62
+ * Padding length for RGBA hex colors with alpha (8 characters)
63
+ */
64
+ readonly HEX_COLOR_ALPHA_LENGTH: 8;
65
+ /**
66
+ * Standard byte size in bits
67
+ */
68
+ readonly BITS_PER_BYTE: 8;
69
+ /**
70
+ * Standard nibble size in bits (half byte)
71
+ */
72
+ readonly BITS_PER_NIBBLE: 4;
73
+ /**
74
+ * Number of bytes in a kilobyte (binary)
75
+ */
76
+ readonly BYTES_PER_KB: 1024;
77
+ /**
78
+ * Number of bytes in a megabyte (binary)
79
+ */
80
+ readonly BYTES_PER_MB: 1048576;
81
+ /**
82
+ * Number of bytes in a gigabyte (binary)
83
+ */
84
+ readonly BYTES_PER_GB: 1073741824;
85
+ /**
86
+ * Default decimal places for currency
87
+ */
88
+ readonly CURRENCY_DECIMAL_PLACES: 2;
89
+ /**
90
+ * Default decimal places for percentages
91
+ */
92
+ readonly PERCENTAGE_DECIMAL_PLACES: 2;
93
+ /**
94
+ * Default decimal places for coordinates
95
+ */
96
+ readonly COORDINATE_DECIMAL_PLACES: 6;
97
+ /**
98
+ * Maximum safe integer in JavaScript
99
+ */
100
+ readonly MAX_SAFE_INTEGER: 9007199254740991;
101
+ /**
102
+ * Minimum safe integer in JavaScript
103
+ */
104
+ readonly MIN_SAFE_INTEGER: -9007199254740991;
105
+ /**
106
+ * Maximum 32-bit signed integer
107
+ */
108
+ readonly MAX_INT32: 2147483647;
109
+ /**
110
+ * Minimum 32-bit signed integer
111
+ */
112
+ readonly MIN_INT32: -2147483648;
113
+ /**
114
+ * Maximum 16-bit unsigned integer
115
+ */
116
+ readonly MAX_UINT16: 65535;
117
+ /**
118
+ * Maximum 8-bit unsigned integer
119
+ */
120
+ readonly MAX_UINT8: 255;
121
+ /**
122
+ * Full circle in degrees
123
+ */
124
+ readonly DEGREES_FULL_CIRCLE: 360;
125
+ /**
126
+ * Half circle in degrees
127
+ */
128
+ readonly DEGREES_HALF_CIRCLE: 180;
129
+ /**
130
+ * Quarter circle in degrees (right angle)
131
+ */
132
+ readonly DEGREES_RIGHT_ANGLE: 90;
133
+ /**
134
+ * Degrees in a radian
135
+ */
136
+ readonly DEGREES_PER_RADIAN: 57.29577951308232;
137
+ /**
138
+ * Radians in a degree
139
+ */
140
+ readonly RADIANS_PER_DEGREE: 0.017453292519943295;
141
+ /**
142
+ * Pi (π)
143
+ */
144
+ readonly PI: 3.141592653589793;
145
+ /**
146
+ * Two times Pi (2π) - full circle in radians
147
+ */
148
+ readonly TWO_PI: 6.283185307179586;
149
+ /**
150
+ * Half Pi (π/2) - quarter circle in radians
151
+ */
152
+ readonly HALF_PI: 1.5707963267948966;
153
+ /**
154
+ * Euler's number (e)
155
+ */
156
+ readonly E: 2.718281828459045;
157
+ /**
158
+ * Golden ratio (φ)
159
+ */
160
+ readonly GOLDEN_RATIO: 1.618033988749895;
161
+ /**
162
+ * Square root of 2
163
+ */
164
+ readonly SQRT2: 1.4142135623730951;
165
+ /**
166
+ * Square root of 3
167
+ */
168
+ readonly SQRT3: 1.7320508075688772;
169
+ /**
170
+ * Natural logarithm of 2
171
+ */
172
+ readonly LN2: 0.6931471805599453;
173
+ /**
174
+ * Natural logarithm of 10
175
+ */
176
+ readonly LN10: 2.302585092994046;
177
+ /**
178
+ * Base 2 logarithm of E
179
+ */
180
+ readonly LOG2E: 1.4426950408889634;
181
+ /**
182
+ * Base 10 logarithm of E
183
+ */
184
+ readonly LOG10E: 0.4342944819032518;
33
185
  };
34
186
  /**
35
187
  * Mathematical and percentage constants
@@ -0,0 +1,4 @@
1
+ 'use strict';// @plyaz package - Built with tsup
2
+ var t={x:"https://x.com/Plyaz_",instagram:"https://instagram.com/plyaz_",linkedin:"https://linkedin.com/company/plyaz"},o={docs:"https://plyaz.gitbook.io/plyaz",community:"https://community.plyaz.co.uk",support:"mailto:help@plyaz.co.uk"};
3
+ exports.PRODUCT_LINKS=o;exports.SOCIAL_LINKS=t;//# sourceMappingURL=social.cjs.map
4
+ //# sourceMappingURL=social.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/social.ts"],"names":["SOCIAL_LINKS","PRODUCT_LINKS"],"mappings":";AAAO,IAAMA,EAAe,CAC1B,CAAA,CAAG,sBAAA,CACH,SAAA,CAAW,+BACX,QAAA,CAAU,oCACZ,CAAA,CAEaC,CAAAA,CAAgB,CAC3B,IAAA,CAAM,gCAAA,CACN,SAAA,CAAW,+BAAA,CACX,QAAS,yBACX","file":"social.cjs","sourcesContent":["export const SOCIAL_LINKS = {\n x: 'https://x.com/Plyaz_',\n instagram: 'https://instagram.com/plyaz_',\n linkedin: 'https://linkedin.com/company/plyaz',\n} as const;\n\nexport const PRODUCT_LINKS = {\n docs: 'https://plyaz.gitbook.io/plyaz',\n community: 'https://community.plyaz.co.uk',\n support: 'mailto:help@plyaz.co.uk',\n} as const;\n"]}
@@ -0,0 +1,4 @@
1
+ // @plyaz package - Built with tsup
2
+ var t={x:"https://x.com/Plyaz_",instagram:"https://instagram.com/plyaz_",linkedin:"https://linkedin.com/company/plyaz"},o={docs:"https://plyaz.gitbook.io/plyaz",community:"https://community.plyaz.co.uk",support:"mailto:help@plyaz.co.uk"};
3
+ export{o as PRODUCT_LINKS,t as SOCIAL_LINKS};//# sourceMappingURL=social.mjs.map
4
+ //# sourceMappingURL=social.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/social.ts"],"names":["SOCIAL_LINKS","PRODUCT_LINKS"],"mappings":";AAAO,IAAMA,EAAe,CAC1B,CAAA,CAAG,sBAAA,CACH,SAAA,CAAW,+BACX,QAAA,CAAU,oCACZ,CAAA,CAEaC,CAAAA,CAAgB,CAC3B,IAAA,CAAM,gCAAA,CACN,SAAA,CAAW,+BAAA,CACX,QAAS,yBACX","file":"social.mjs","sourcesContent":["export const SOCIAL_LINKS = {\n x: 'https://x.com/Plyaz_',\n instagram: 'https://instagram.com/plyaz_',\n linkedin: 'https://linkedin.com/company/plyaz',\n} as const;\n\nexport const PRODUCT_LINKS = {\n docs: 'https://plyaz.gitbook.io/plyaz',\n community: 'https://community.plyaz.co.uk',\n support: 'mailto:help@plyaz.co.uk',\n} as const;\n"]}
@@ -10,6 +10,38 @@
10
10
  * Time conversion and duration constants
11
11
  */
12
12
  export declare const TIME_CONSTANTS: {
13
+ /**
14
+ * One millisecond in milliseconds
15
+ */
16
+ readonly MILLISECOND: 1;
17
+ /**
18
+ * One second in milliseconds
19
+ */
20
+ readonly SECOND: 1000;
21
+ /**
22
+ * One minute in milliseconds
23
+ */
24
+ readonly MINUTE: 60000;
25
+ /**
26
+ * One hour in milliseconds
27
+ */
28
+ readonly HOUR: 3600000;
29
+ /**
30
+ * One day in milliseconds
31
+ */
32
+ readonly DAY: 86400000;
33
+ /**
34
+ * One week in milliseconds
35
+ */
36
+ readonly WEEK: 604800000;
37
+ /**
38
+ * One month in milliseconds (30 days average)
39
+ */
40
+ readonly MONTH: 2592000000;
41
+ /**
42
+ * One year in milliseconds (365 days)
43
+ */
44
+ readonly YEAR: 31536000000;
13
45
  /**
14
46
  * Number of milliseconds in one second
15
47
  */
@@ -26,14 +58,118 @@ export declare const TIME_CONSTANTS: {
26
58
  * Number of hours in one day
27
59
  */
28
60
  readonly HOURS_PER_DAY: 24;
61
+ /**
62
+ * Number of days in one week
63
+ */
64
+ readonly DAYS_PER_WEEK: 7;
65
+ /**
66
+ * Number of days in one month (average)
67
+ */
68
+ readonly DAYS_PER_MONTH: 30;
69
+ /**
70
+ * Number of days in one year
71
+ */
72
+ readonly DAYS_PER_YEAR: 365;
73
+ /**
74
+ * Number of weeks in one year
75
+ */
76
+ readonly WEEKS_PER_YEAR: 52;
77
+ /**
78
+ * Number of months in one year
79
+ */
80
+ readonly MONTHS_PER_YEAR: 12;
81
+ /**
82
+ * 100 milliseconds
83
+ */
84
+ readonly HUNDRED_MS: 100;
85
+ /**
86
+ * 250 milliseconds
87
+ */
88
+ readonly QUARTER_SECOND: 250;
89
+ /**
90
+ * 500 milliseconds (half second)
91
+ */
92
+ readonly HALF_SECOND: 500;
93
+ /**
94
+ * 2 seconds in milliseconds
95
+ */
96
+ readonly TWO_SECONDS: 2000;
97
+ /**
98
+ * 3 seconds in milliseconds
99
+ */
100
+ readonly THREE_SECONDS: 3000;
101
+ /**
102
+ * 5 seconds in milliseconds
103
+ */
104
+ readonly FIVE_SECONDS: 5000;
105
+ /**
106
+ * 10 seconds in milliseconds
107
+ */
108
+ readonly TEN_SECONDS: 10000;
109
+ /**
110
+ * 30 seconds in milliseconds
111
+ */
112
+ readonly THIRTY_SECONDS: 30000;
113
+ /**
114
+ * 2 minutes in milliseconds
115
+ */
116
+ readonly TWO_MINUTES: 120000;
117
+ /**
118
+ * 5 minutes in milliseconds
119
+ */
120
+ readonly FIVE_MINUTES: 300000;
121
+ /**
122
+ * 10 minutes in milliseconds
123
+ */
124
+ readonly TEN_MINUTES: 600000;
125
+ /**
126
+ * 15 minutes in milliseconds
127
+ */
128
+ readonly FIFTEEN_MINUTES: 900000;
129
+ /**
130
+ * 30 minutes in milliseconds
131
+ */
132
+ readonly THIRTY_MINUTES: 1800000;
133
+ /**
134
+ * 1 hour in milliseconds
135
+ */
136
+ readonly ONE_HOUR: 3600000;
137
+ /**
138
+ * 2 hours in milliseconds
139
+ */
140
+ readonly TWO_HOURS: 7200000;
141
+ /**
142
+ * 6 hours in milliseconds
143
+ */
144
+ readonly SIX_HOURS: 21600000;
145
+ /**
146
+ * 12 hours in milliseconds
147
+ */
148
+ readonly TWELVE_HOURS: 43200000;
29
149
  /**
30
150
  * Default timeout duration in milliseconds (5 seconds)
31
151
  */
32
152
  readonly DEFAULT_TIMEOUT: 5000;
153
+ /**
154
+ * Default short timeout in milliseconds (1 second)
155
+ */
156
+ readonly DEFAULT_SHORT_TIMEOUT: 1000;
157
+ /**
158
+ * Default long timeout in milliseconds (30 seconds)
159
+ */
160
+ readonly DEFAULT_LONG_TIMEOUT: 30000;
33
161
  /**
34
162
  * Default retry delay in milliseconds (100ms)
35
163
  */
36
164
  readonly DEFAULT_RETRY_DELAY: 100;
165
+ /**
166
+ * Default exponential backoff base delay in milliseconds (1 second)
167
+ */
168
+ readonly DEFAULT_BACKOFF_BASE: 1000;
169
+ /**
170
+ * Default maximum backoff delay in milliseconds (30 seconds)
171
+ */
172
+ readonly DEFAULT_MAX_BACKOFF: 30000;
37
173
  /**
38
174
  * Default number of retry attempts
39
175
  */
@@ -42,18 +178,86 @@ export declare const TIME_CONSTANTS: {
42
178
  * Default debounce delay in milliseconds (50ms)
43
179
  */
44
180
  readonly DEFAULT_DEBOUNCE_DELAY: 50;
181
+ /**
182
+ * Default throttle delay in milliseconds (100ms)
183
+ */
184
+ readonly DEFAULT_THROTTLE_DELAY: 100;
45
185
  /**
46
186
  * Default animation frame duration in milliseconds (~60fps)
47
187
  */
48
188
  readonly DEFAULT_ANIMATION_FRAME: 16.67;
189
+ /**
190
+ * Default transition duration in milliseconds (300ms)
191
+ */
192
+ readonly DEFAULT_TRANSITION_DURATION: 300;
49
193
  /**
50
194
  * Default cache time-to-live in seconds (5 minutes)
51
195
  */
52
196
  readonly DEFAULT_CACHE_TTL: 300;
197
+ /**
198
+ * Default short cache TTL in seconds (1 minute)
199
+ */
200
+ readonly DEFAULT_SHORT_CACHE_TTL: 60;
201
+ /**
202
+ * Default long cache TTL in seconds (1 hour)
203
+ */
204
+ readonly DEFAULT_LONG_CACHE_TTL: 3600;
205
+ /**
206
+ * Default session timeout in milliseconds (30 minutes)
207
+ */
208
+ readonly DEFAULT_SESSION_TIMEOUT: 1800000;
209
+ /**
210
+ * Default idle timeout in milliseconds (15 minutes)
211
+ */
212
+ readonly DEFAULT_IDLE_TIMEOUT: 900000;
213
+ /**
214
+ * Default poll interval in milliseconds (5 seconds)
215
+ */
216
+ readonly DEFAULT_POLL_INTERVAL: 5000;
217
+ /**
218
+ * Default heartbeat interval in milliseconds (30 seconds)
219
+ */
220
+ readonly DEFAULT_HEARTBEAT_INTERVAL: 30000;
53
221
  /**
54
222
  * Default port number for servers
55
223
  */
56
224
  readonly DEFAULT_PORT: 3000;
225
+ /**
226
+ * Default HTTP port
227
+ */
228
+ readonly HTTP_PORT: 80;
229
+ /**
230
+ * Default HTTPS port
231
+ */
232
+ readonly HTTPS_PORT: 443;
233
+ /**
234
+ * Default WebSocket port
235
+ */
236
+ readonly WEBSOCKET_PORT: 8080;
237
+ /**
238
+ * Default database port (PostgreSQL)
239
+ */
240
+ readonly DATABASE_PORT: 5432;
241
+ /**
242
+ * Default Redis port
243
+ */
244
+ readonly REDIS_PORT: 6379;
245
+ /**
246
+ * WebSocket normal closure code
247
+ */
248
+ readonly WEBSOCKET_CLOSE_NORMAL: 1000;
249
+ /**
250
+ * WebSocket going away code
251
+ */
252
+ readonly WEBSOCKET_CLOSE_GOING_AWAY: 1001;
253
+ /**
254
+ * WebSocket protocol error code
255
+ */
256
+ readonly WEBSOCKET_CLOSE_PROTOCOL_ERROR: 1002;
257
+ /**
258
+ * WebSocket unsupported data code
259
+ */
260
+ readonly WEBSOCKET_CLOSE_UNSUPPORTED: 1003;
57
261
  /**
58
262
  * WebSocket abnormal closure code
59
263
  */
@@ -62,6 +266,18 @@ export declare const TIME_CONSTANTS: {
62
266
  * WebSocket retry delay in milliseconds (500ms)
63
267
  */
64
268
  readonly WEBSOCKET_RETRY_DELAY: 500;
269
+ /**
270
+ * WebSocket ping interval in milliseconds (30 seconds)
271
+ */
272
+ readonly WEBSOCKET_PING_INTERVAL: 30000;
273
+ /**
274
+ * WebSocket reconnect delay in milliseconds (1 second)
275
+ */
276
+ readonly WEBSOCKET_RECONNECT_DELAY: 1000;
277
+ /**
278
+ * WebSocket max reconnect delay in milliseconds (30 seconds)
279
+ */
280
+ readonly WEBSOCKET_MAX_RECONNECT_DELAY: 30000;
65
281
  };
66
282
  /**
67
283
  * Type for time constant values
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/config",
3
- "version": "1.1.1",
3
+ "version": "1.2.1",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared configs and constants for @playz ecosystem.",
@@ -15,6 +15,12 @@
15
15
  "require": "./dist/index.cjs",
16
16
  "default": "./dist/index.mjs"
17
17
  },
18
+ "./social": {
19
+ "types": "./dist/social.d.ts",
20
+ "import": "./dist/social.mjs",
21
+ "require": "./dist/social.cjs",
22
+ "default": "./dist/social.mjs"
23
+ },
18
24
  "./translations": {
19
25
  "types": "./dist/translations/index.d.ts"
20
26
  },