@jjlmoya/utils-travel 1.9.0 → 1.11.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.
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-travel",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
7
7
  "exports": {
8
8
  ".": "./src/index.ts",
9
- "./data": "./src/data.ts"
9
+ "./data": "./src/data.ts",
10
+ "./entries": "./src/entries.ts"
10
11
  },
11
12
  "files": [
12
13
  "src"
package/src/entries.ts ADDED
@@ -0,0 +1,14 @@
1
+ export { luggageCalculator } from './tool/luggage-calculator/entry';
2
+ export type { Airline, LuggageCalculatorUI, LuggageCalculatorLocaleContent } from './tool/luggage-calculator/entry';
3
+ export { miniAdventures } from './tool/mini-adventures/entry';
4
+ export type { AdventureCategory, Adventure, Achievement, MiniAdventuresUI } from './tool/mini-adventures/entry';
5
+ export { suitcaseChecklist } from './tool/suitcase-checklist/entry';
6
+ export type { ChecklistItem, ChecklistCategory, SuitcaseChecklistUI } from './tool/suitcase-checklist/entry';
7
+ export { tipCalculator } from './tool/tip-calculator/entry';
8
+ export type { TipCountry, TipCalculatorUI } from './tool/tip-calculator/entry';
9
+ export { travelCategory } from './category';
10
+ import { luggageCalculator } from './tool/luggage-calculator/entry';
11
+ import { miniAdventures } from './tool/mini-adventures/entry';
12
+ import { suitcaseChecklist } from './tool/suitcase-checklist/entry';
13
+ import { tipCalculator } from './tool/tip-calculator/entry';
14
+ export const ALL_ENTRIES = [luggageCalculator, miniAdventures, suitcaseChecklist, tipCalculator];
@@ -0,0 +1,53 @@
1
+ import type { TravelToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface Airline {
4
+ name: string;
5
+ personal: string;
6
+ personalWeight: string;
7
+ cabin: string;
8
+ cabinWeight: string;
9
+ icon: string;
10
+ }
11
+
12
+ export interface LuggageCalculatorUI {
13
+ [key: string]: unknown;
14
+ title: string;
15
+ searchLabel: string;
16
+ searchPlaceholder: string;
17
+ personalItemTitle: string;
18
+ cabinBagTitle: string;
19
+ weightLabel: string;
20
+ noResults: string;
21
+ modalNoteTitle: string;
22
+ modalNoteText: string;
23
+ personalItemDetail: string;
24
+ cabinBagDetail: string;
25
+ airlines: Airline[];
26
+ }
27
+
28
+ export type LuggageCalculatorLocaleContent = ToolLocaleContent<LuggageCalculatorUI>;
29
+
30
+ export const luggageCalculator: TravelToolEntry<LuggageCalculatorUI> = {
31
+ id: 'luggage-calculator',
32
+ icons: {
33
+ bg: 'mdi:bag-suitcase',
34
+ fg: 'mdi:airplane',
35
+ },
36
+ i18n: {
37
+ de: () => import('./i18n/de').then((m) => m.content),
38
+ en: () => import('./i18n/en').then((m) => m.content),
39
+ es: () => import('./i18n/es').then((m) => m.content),
40
+ fr: () => import('./i18n/fr').then((m) => m.content),
41
+ id: () => import('./i18n/id').then((m) => m.content),
42
+ it: () => import('./i18n/it').then((m) => m.content),
43
+ ja: () => import('./i18n/ja').then((m) => m.content),
44
+ ko: () => import('./i18n/ko').then((m) => m.content),
45
+ nl: () => import('./i18n/nl').then((m) => m.content),
46
+ pl: () => import('./i18n/pl').then((m) => m.content),
47
+ pt: () => import('./i18n/pt').then((m) => m.content),
48
+ ru: () => import('./i18n/ru').then((m) => m.content),
49
+ sv: () => import('./i18n/sv').then((m) => m.content),
50
+ tr: () => import('./i18n/tr').then((m) => m.content),
51
+ zh: () => import('./i18n/zh').then((m) => m.content),
52
+ },
53
+ };
@@ -1,58 +1,5 @@
1
- import type { TravelToolEntry, ToolDefinition, ToolLocaleContent } from '../../types';
2
-
3
- export interface Airline {
4
- name: string;
5
- personal: string;
6
- personalWeight: string;
7
- cabin: string;
8
- cabinWeight: string;
9
- icon: string;
10
- }
11
-
12
- export interface LuggageCalculatorUI {
13
- [key: string]: unknown;
14
- title: string;
15
- searchLabel: string;
16
- searchPlaceholder: string;
17
- personalItemTitle: string;
18
- cabinBagTitle: string;
19
- weightLabel: string;
20
- noResults: string;
21
- modalNoteTitle: string;
22
- modalNoteText: string;
23
- personalItemDetail: string;
24
- cabinBagDetail: string;
25
- airlines: Airline[];
26
- }
27
-
28
- export type LuggageCalculatorLocaleContent = ToolLocaleContent<LuggageCalculatorUI>;
29
-
30
- export const luggageCalculator: TravelToolEntry<LuggageCalculatorUI> = {
31
- id: 'luggage-calculator',
32
- icons: {
33
- bg: 'mdi:bag-suitcase',
34
- fg: 'mdi:airplane',
35
- },
36
- i18n: {
37
- de: () => import('./i18n/de').then((m) => m.content),
38
- en: () => import('./i18n/en').then((m) => m.content),
39
- es: () => import('./i18n/es').then((m) => m.content),
40
- fr: () => import('./i18n/fr').then((m) => m.content),
41
- id: () => import('./i18n/id').then((m) => m.content),
42
- it: () => import('./i18n/it').then((m) => m.content),
43
- ja: () => import('./i18n/ja').then((m) => m.content),
44
- ko: () => import('./i18n/ko').then((m) => m.content),
45
- nl: () => import('./i18n/nl').then((m) => m.content),
46
- pl: () => import('./i18n/pl').then((m) => m.content),
47
- pt: () => import('./i18n/pt').then((m) => m.content),
48
- ru: () => import('./i18n/ru').then((m) => m.content),
49
- sv: () => import('./i18n/sv').then((m) => m.content),
50
- tr: () => import('./i18n/tr').then((m) => m.content),
51
- zh: () => import('./i18n/zh').then((m) => m.content),
52
- },
53
- };
54
-
55
-
1
+ import { luggageCalculator } from './entry';
2
+ export * from './entry';
56
3
  export const LUGGAGE_CALCULATOR_TOOL: ToolDefinition = {
57
4
  entry: luggageCalculator,
58
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,70 @@
1
+ import type { TravelToolEntry } from '../../types';
2
+
3
+ export interface AdventureCategory {
4
+ id: string;
5
+ label: string;
6
+ icon: string;
7
+ color: string;
8
+ styling: string;
9
+ }
10
+
11
+ export interface Adventure {
12
+ id: number;
13
+ text: string;
14
+ categoryId: string;
15
+ }
16
+
17
+ export interface Achievement {
18
+ id: string;
19
+ milestone: number;
20
+ label: string;
21
+ categoryId: string | 'global';
22
+ icon: string;
23
+ description: string;
24
+ }
25
+
26
+ export interface MiniAdventuresUI {
27
+ [key: string]: unknown;
28
+ title: string;
29
+ homeTitle: string;
30
+ homeDesc: string;
31
+ generateBtn: string;
32
+ anotherBtn: string;
33
+ doneBtn: string;
34
+ shareBtn: string;
35
+ categories: Record<string, AdventureCategory>;
36
+ adventures: Adventure[];
37
+ achievements: Achievement[];
38
+ stats: {
39
+ adventures: string;
40
+ badges: string;
41
+ progress: string;
42
+ trophies: string;
43
+ };
44
+ shareTemplate: string;
45
+ }
46
+
47
+ export const miniAdventures: TravelToolEntry<MiniAdventuresUI> = {
48
+ id: 'mini-adventures',
49
+ icons: {
50
+ bg: 'mdi:compass-outline',
51
+ fg: 'mdi:map-marker-distance',
52
+ },
53
+ i18n: {
54
+ de: () => import('./i18n/de').then((m) => m.content),
55
+ en: () => import('./i18n/en').then((m) => m.content),
56
+ es: () => import('./i18n/es').then((m) => m.content),
57
+ fr: () => import('./i18n/fr').then((m) => m.content),
58
+ id: () => import('./i18n/id').then((m) => m.content),
59
+ it: () => import('./i18n/it').then((m) => m.content),
60
+ ja: () => import('./i18n/ja').then((m) => m.content),
61
+ ko: () => import('./i18n/ko').then((m) => m.content),
62
+ nl: () => import('./i18n/nl').then((m) => m.content),
63
+ pl: () => import('./i18n/pl').then((m) => m.content),
64
+ pt: () => import('./i18n/pt').then((m) => m.content),
65
+ ru: () => import('./i18n/ru').then((m) => m.content),
66
+ sv: () => import('./i18n/sv').then((m) => m.content),
67
+ tr: () => import('./i18n/tr').then((m) => m.content),
68
+ zh: () => import('./i18n/zh').then((m) => m.content),
69
+ },
70
+ };
@@ -1,75 +1,5 @@
1
- import type { TravelToolEntry, ToolDefinition } from '../../types';
2
-
3
- export interface AdventureCategory {
4
- id: string;
5
- label: string;
6
- icon: string;
7
- color: string;
8
- styling: string;
9
- }
10
-
11
- export interface Adventure {
12
- id: number;
13
- text: string;
14
- categoryId: string;
15
- }
16
-
17
- export interface Achievement {
18
- id: string;
19
- milestone: number;
20
- label: string;
21
- categoryId: string | 'global';
22
- icon: string;
23
- description: string;
24
- }
25
-
26
- export interface MiniAdventuresUI {
27
- [key: string]: unknown;
28
- title: string;
29
- homeTitle: string;
30
- homeDesc: string;
31
- generateBtn: string;
32
- anotherBtn: string;
33
- doneBtn: string;
34
- shareBtn: string;
35
- categories: Record<string, AdventureCategory>;
36
- adventures: Adventure[];
37
- achievements: Achievement[];
38
- stats: {
39
- adventures: string;
40
- badges: string;
41
- progress: string;
42
- trophies: string;
43
- };
44
- shareTemplate: string;
45
- }
46
-
47
- export const miniAdventures: TravelToolEntry<MiniAdventuresUI> = {
48
- id: 'mini-adventures',
49
- icons: {
50
- bg: 'mdi:compass-outline',
51
- fg: 'mdi:map-marker-distance',
52
- },
53
- i18n: {
54
- de: () => import('./i18n/de').then((m) => m.content),
55
- en: () => import('./i18n/en').then((m) => m.content),
56
- es: () => import('./i18n/es').then((m) => m.content),
57
- fr: () => import('./i18n/fr').then((m) => m.content),
58
- id: () => import('./i18n/id').then((m) => m.content),
59
- it: () => import('./i18n/it').then((m) => m.content),
60
- ja: () => import('./i18n/ja').then((m) => m.content),
61
- ko: () => import('./i18n/ko').then((m) => m.content),
62
- nl: () => import('./i18n/nl').then((m) => m.content),
63
- pl: () => import('./i18n/pl').then((m) => m.content),
64
- pt: () => import('./i18n/pt').then((m) => m.content),
65
- ru: () => import('./i18n/ru').then((m) => m.content),
66
- sv: () => import('./i18n/sv').then((m) => m.content),
67
- tr: () => import('./i18n/tr').then((m) => m.content),
68
- zh: () => import('./i18n/zh').then((m) => m.content),
69
- },
70
- };
71
-
72
-
1
+ import { miniAdventures } from './entry';
2
+ export * from './entry';
73
3
  export const MINI_ADVENTURES_TOOL: ToolDefinition = {
74
4
  entry: miniAdventures,
75
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,75 @@
1
+ import type { TravelToolEntry } from '../../types';
2
+
3
+ export interface ChecklistItem {
4
+ label: string;
5
+ dynamicId?: string;
6
+ }
7
+
8
+ export interface ChecklistCategory {
9
+ id: string;
10
+ title: string;
11
+ icon: string;
12
+ items: ChecklistItem[];
13
+ }
14
+
15
+ export interface SuitcaseChecklistUI {
16
+ [key: string]: unknown;
17
+ title: string;
18
+ form: {
19
+ destTitle: string;
20
+ destTypes: Array<{ id: string; name: string; icon: string }>;
21
+ daysTitle: string;
22
+ intlTitle: string;
23
+ intlLabel: string;
24
+ reasonTitle: string;
25
+ reasons: Array<{ id: string; name: string; icon: string }>;
26
+ submitBtn: string;
27
+ };
28
+ results: {
29
+ title: string;
30
+ editBtn: string;
31
+ printBtn: string;
32
+ tipsTitle: string;
33
+ progressText: string;
34
+ };
35
+ itemsDb: Record<string, ChecklistCategory>;
36
+ specificItems: {
37
+ destType: Record<string, ChecklistCategory>;
38
+ travelType: Record<string, ChecklistCategory>;
39
+ };
40
+ tips: {
41
+ military: string;
42
+ longTravel: string;
43
+ intlPassport: string;
44
+ intlBank: string;
45
+ intlAdapter: string;
46
+ coldLayers: string;
47
+ coldHeavyOn: string;
48
+ beachWet: string;
49
+ };
50
+ }
51
+
52
+ export const suitcaseChecklist: TravelToolEntry<SuitcaseChecklistUI> = {
53
+ id: 'suitcase-checklist',
54
+ icons: {
55
+ bg: 'mdi:bag-checked',
56
+ fg: 'mdi:format-list-checks',
57
+ },
58
+ i18n: {
59
+ de: () => import('./i18n/de').then((m) => m.content),
60
+ en: () => import('./i18n/en').then((m) => m.content),
61
+ es: () => import('./i18n/es').then((m) => m.content),
62
+ fr: () => import('./i18n/fr').then((m) => m.content),
63
+ id: () => import('./i18n/id').then((m) => m.content),
64
+ it: () => import('./i18n/it').then((m) => m.content),
65
+ ja: () => import('./i18n/ja').then((m) => m.content),
66
+ ko: () => import('./i18n/ko').then((m) => m.content),
67
+ nl: () => import('./i18n/nl').then((m) => m.content),
68
+ pl: () => import('./i18n/pl').then((m) => m.content),
69
+ pt: () => import('./i18n/pt').then((m) => m.content),
70
+ ru: () => import('./i18n/ru').then((m) => m.content),
71
+ sv: () => import('./i18n/sv').then((m) => m.content),
72
+ tr: () => import('./i18n/tr').then((m) => m.content),
73
+ zh: () => import('./i18n/zh').then((m) => m.content),
74
+ },
75
+ };
@@ -1,80 +1,5 @@
1
- import type { TravelToolEntry, ToolDefinition } from '../../types';
2
-
3
- export interface ChecklistItem {
4
- label: string;
5
- dynamicId?: string;
6
- }
7
-
8
- export interface ChecklistCategory {
9
- id: string;
10
- title: string;
11
- icon: string;
12
- items: ChecklistItem[];
13
- }
14
-
15
- export interface SuitcaseChecklistUI {
16
- [key: string]: unknown;
17
- title: string;
18
- form: {
19
- destTitle: string;
20
- destTypes: Array<{ id: string; name: string; icon: string }>;
21
- daysTitle: string;
22
- intlTitle: string;
23
- intlLabel: string;
24
- reasonTitle: string;
25
- reasons: Array<{ id: string; name: string; icon: string }>;
26
- submitBtn: string;
27
- };
28
- results: {
29
- title: string;
30
- editBtn: string;
31
- printBtn: string;
32
- tipsTitle: string;
33
- progressText: string;
34
- };
35
- itemsDb: Record<string, ChecklistCategory>;
36
- specificItems: {
37
- destType: Record<string, ChecklistCategory>;
38
- travelType: Record<string, ChecklistCategory>;
39
- };
40
- tips: {
41
- military: string;
42
- longTravel: string;
43
- intlPassport: string;
44
- intlBank: string;
45
- intlAdapter: string;
46
- coldLayers: string;
47
- coldHeavyOn: string;
48
- beachWet: string;
49
- };
50
- }
51
-
52
- export const suitcaseChecklist: TravelToolEntry<SuitcaseChecklistUI> = {
53
- id: 'suitcase-checklist',
54
- icons: {
55
- bg: 'mdi:bag-checked',
56
- fg: 'mdi:format-list-checks',
57
- },
58
- i18n: {
59
- de: () => import('./i18n/de').then((m) => m.content),
60
- en: () => import('./i18n/en').then((m) => m.content),
61
- es: () => import('./i18n/es').then((m) => m.content),
62
- fr: () => import('./i18n/fr').then((m) => m.content),
63
- id: () => import('./i18n/id').then((m) => m.content),
64
- it: () => import('./i18n/it').then((m) => m.content),
65
- ja: () => import('./i18n/ja').then((m) => m.content),
66
- ko: () => import('./i18n/ko').then((m) => m.content),
67
- nl: () => import('./i18n/nl').then((m) => m.content),
68
- pl: () => import('./i18n/pl').then((m) => m.content),
69
- pt: () => import('./i18n/pt').then((m) => m.content),
70
- ru: () => import('./i18n/ru').then((m) => m.content),
71
- sv: () => import('./i18n/sv').then((m) => m.content),
72
- tr: () => import('./i18n/tr').then((m) => m.content),
73
- zh: () => import('./i18n/zh').then((m) => m.content),
74
- },
75
- };
76
-
77
-
1
+ import { suitcaseChecklist } from './entry';
2
+ export * from './entry';
78
3
  export const SUITCASE_CHECKLIST_TOOL: ToolDefinition = {
79
4
  entry: suitcaseChecklist,
80
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,53 @@
1
+ import type { TravelToolEntry } from '../../types';
2
+
3
+ export interface TipCountry {
4
+ id: string;
5
+ name: string;
6
+ min: number;
7
+ max: number;
8
+ default: number;
9
+ culture: string;
10
+ }
11
+
12
+ export interface TipCalculatorUI {
13
+ [key: string]: unknown;
14
+ title: string;
15
+ badge: string;
16
+ billLabel: string;
17
+ countryLabel: string;
18
+ tipLabel: string;
19
+ splitLabel: string;
20
+ summaryTip: string;
21
+ summarySubtotal: string;
22
+ summaryTotalPerson: string;
23
+ protocolTitle: string;
24
+ placeholderAmount: string;
25
+ placeholderFilter: string;
26
+ placeholderSelect: string;
27
+ countries: TipCountry[];
28
+ }
29
+
30
+ export const tipCalculator: TravelToolEntry<TipCalculatorUI> = {
31
+ id: 'tip-calculator',
32
+ icons: {
33
+ bg: 'mdi:cash-multiple',
34
+ fg: 'mdi:earth',
35
+ },
36
+ i18n: {
37
+ de: () => import('./i18n/de').then((m) => m.content),
38
+ en: () => import('./i18n/en').then((m) => m.content),
39
+ es: () => import('./i18n/es').then((m) => m.content),
40
+ fr: () => import('./i18n/fr').then((m) => m.content),
41
+ id: () => import('./i18n/id').then((m) => m.content),
42
+ it: () => import('./i18n/it').then((m) => m.content),
43
+ ja: () => import('./i18n/ja').then((m) => m.content),
44
+ ko: () => import('./i18n/ko').then((m) => m.content),
45
+ nl: () => import('./i18n/nl').then((m) => m.content),
46
+ pl: () => import('./i18n/pl').then((m) => m.content),
47
+ pt: () => import('./i18n/pt').then((m) => m.content),
48
+ ru: () => import('./i18n/ru').then((m) => m.content),
49
+ sv: () => import('./i18n/sv').then((m) => m.content),
50
+ tr: () => import('./i18n/tr').then((m) => m.content),
51
+ zh: () => import('./i18n/zh').then((m) => m.content),
52
+ },
53
+ };
@@ -1,58 +1,5 @@
1
- import type { TravelToolEntry, ToolDefinition } from '../../types';
2
-
3
- export interface TipCountry {
4
- id: string;
5
- name: string;
6
- min: number;
7
- max: number;
8
- default: number;
9
- culture: string;
10
- }
11
-
12
- export interface TipCalculatorUI {
13
- [key: string]: unknown;
14
- title: string;
15
- badge: string;
16
- billLabel: string;
17
- countryLabel: string;
18
- tipLabel: string;
19
- splitLabel: string;
20
- summaryTip: string;
21
- summarySubtotal: string;
22
- summaryTotalPerson: string;
23
- protocolTitle: string;
24
- placeholderAmount: string;
25
- placeholderFilter: string;
26
- placeholderSelect: string;
27
- countries: TipCountry[];
28
- }
29
-
30
- export const tipCalculator: TravelToolEntry<TipCalculatorUI> = {
31
- id: 'tip-calculator',
32
- icons: {
33
- bg: 'mdi:cash-multiple',
34
- fg: 'mdi:earth',
35
- },
36
- i18n: {
37
- de: () => import('./i18n/de').then((m) => m.content),
38
- en: () => import('./i18n/en').then((m) => m.content),
39
- es: () => import('./i18n/es').then((m) => m.content),
40
- fr: () => import('./i18n/fr').then((m) => m.content),
41
- id: () => import('./i18n/id').then((m) => m.content),
42
- it: () => import('./i18n/it').then((m) => m.content),
43
- ja: () => import('./i18n/ja').then((m) => m.content),
44
- ko: () => import('./i18n/ko').then((m) => m.content),
45
- nl: () => import('./i18n/nl').then((m) => m.content),
46
- pl: () => import('./i18n/pl').then((m) => m.content),
47
- pt: () => import('./i18n/pt').then((m) => m.content),
48
- ru: () => import('./i18n/ru').then((m) => m.content),
49
- sv: () => import('./i18n/sv').then((m) => m.content),
50
- tr: () => import('./i18n/tr').then((m) => m.content),
51
- zh: () => import('./i18n/zh').then((m) => m.content),
52
- },
53
- };
54
-
55
-
1
+ import { tipCalculator } from './entry';
2
+ export * from './entry';
56
3
  export const TIP_CALCULATOR_TOOL: ToolDefinition = {
57
4
  entry: tipCalculator,
58
5
  Component: () => import('./component.astro'),
package/src/tools.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { ALL_ENTRIES } from './entries';
1
2
  import { LUGGAGE_CALCULATOR_TOOL } from './tool/luggage-calculator';
2
3
  import { TIP_CALCULATOR_TOOL } from './tool/tip-calculator';
3
4
  import { SUITCASE_CHECKLIST_TOOL } from './tool/suitcase-checklist';
@@ -12,4 +13,3 @@ export const ALL_TOOLS: ToolDefinition[] = [
12
13
  ];
13
14
 
14
15
 
15
- export const ALL_ENTRIES = ALL_TOOLS.map(t => t.entry);