@rileybathurst/paddle 0.0.124 → 1.0.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 +22 -26
- package/src/PaddleLocationCard.tsx +8 -4
- package/src/PaddleSEO.tsx +7 -5
- package/src/PaddleTicket.tsx +1 -0
- package/src/PaddleTime.tsx +17 -17
- package/src/phone.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rileybathurst/paddle",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -13,36 +13,32 @@
|
|
|
13
13
|
"build-storybook": "storybook build"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"color-cards": "^1.0.
|
|
17
|
-
"gatsby": "^5.
|
|
18
|
-
"gatsby-plugin-image": "^3.
|
|
16
|
+
"color-cards": "^1.0.18",
|
|
17
|
+
"gatsby": "^5.14.3",
|
|
18
|
+
"gatsby-plugin-image": "^3.14.0",
|
|
19
19
|
"react": "^18.2.0",
|
|
20
|
-
"react-aria-components": "^1.
|
|
20
|
+
"react-aria-components": "^1.9.0",
|
|
21
21
|
"react-dom": "^18.2.0",
|
|
22
|
-
"react-markdown": "^
|
|
22
|
+
"react-markdown": "^10.1.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@chromatic-com/storybook": "^
|
|
26
|
-
"@faker-js/faker": "^8.
|
|
27
|
-
"@storybook/addon-
|
|
28
|
-
"@storybook/addon-
|
|
29
|
-
"@storybook/
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"@typescript-eslint/parser": "^7.2.0",
|
|
38
|
-
"@vitejs/plugin-react": "^4.2.1",
|
|
39
|
-
"eslint": "^8.57.0",
|
|
40
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
25
|
+
"@chromatic-com/storybook": "^4.0.0",
|
|
26
|
+
"@faker-js/faker": "^9.8.0",
|
|
27
|
+
"@storybook/addon-docs": "^9.0.3",
|
|
28
|
+
"@storybook/addon-links": "^9.0.3",
|
|
29
|
+
"@storybook/react-vite": "^9.0.3",
|
|
30
|
+
"@types/react": "^19.1.6",
|
|
31
|
+
"@types/react-dom": "^19.1.5",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^8.33.0",
|
|
33
|
+
"@typescript-eslint/parser": "^8.33.0",
|
|
34
|
+
"@vitejs/plugin-react": "^4.5.0",
|
|
35
|
+
"eslint": "^9.28.0",
|
|
36
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
41
37
|
"eslint-plugin-react-refresh": "^0.4.6",
|
|
42
|
-
"eslint-plugin-storybook": "^0.
|
|
43
|
-
"storybook": "^
|
|
44
|
-
"typescript": "^5.
|
|
45
|
-
"vite": "^
|
|
38
|
+
"eslint-plugin-storybook": "^9.0.3",
|
|
39
|
+
"storybook": "^9.0.3",
|
|
40
|
+
"typescript": "^5.8.3",
|
|
41
|
+
"vite": "^6.3.5"
|
|
46
42
|
},
|
|
47
43
|
"description": "building blocks",
|
|
48
44
|
"main": "src/index.tsx",
|
|
@@ -126,7 +126,8 @@ function Content({ svg, name, address, description, opening_time, closing_time,
|
|
|
126
126
|
|
|
127
127
|
(<>
|
|
128
128
|
<h3 className="elbrus">{name}</h3>
|
|
129
|
-
<Markdown
|
|
129
|
+
<Markdown>
|
|
130
|
+
{/* // ! removed for testing className="react-markdown" */}
|
|
130
131
|
{address.data.address}
|
|
131
132
|
</Markdown>
|
|
132
133
|
</>)}
|
|
@@ -145,7 +146,8 @@ function Content({ svg, name, address, description, opening_time, closing_time,
|
|
|
145
146
|
offSeasonDetails={offSeasonDetails}
|
|
146
147
|
/>
|
|
147
148
|
) : (
|
|
148
|
-
<Markdown
|
|
149
|
+
<Markdown>
|
|
150
|
+
{/* // ! removed for testing className="react-markdown" */}
|
|
149
151
|
{description.data.description}
|
|
150
152
|
</Markdown>
|
|
151
153
|
)}
|
|
@@ -156,6 +158,8 @@ function Content({ svg, name, address, description, opening_time, closing_time,
|
|
|
156
158
|
|
|
157
159
|
export function PaddleLocationCard({ svg, name, link, address, description, opening_time, closing_time, background, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end, phone, offSeasonDetails }: LocationCardTypes) {
|
|
158
160
|
|
|
161
|
+
const phoneNumber = Number(phone);
|
|
162
|
+
|
|
159
163
|
if (link.includes('http')) {
|
|
160
164
|
return (
|
|
161
165
|
<div className="location-wrapper">
|
|
@@ -186,7 +190,7 @@ export function PaddleLocationCard({ svg, name, link, address, description, open
|
|
|
186
190
|
|
|
187
191
|
/>
|
|
188
192
|
</a>
|
|
189
|
-
{name === "On Water Rental" && phone ? <Phone phone={
|
|
193
|
+
{name === "On Water Rental" && phone ? <Phone phone={phoneNumber} /> : null}
|
|
190
194
|
</div>
|
|
191
195
|
)
|
|
192
196
|
}
|
|
@@ -217,7 +221,7 @@ export function PaddleLocationCard({ svg, name, link, address, description, open
|
|
|
217
221
|
|
|
218
222
|
/>
|
|
219
223
|
</Link>
|
|
220
|
-
{name === "On Water Rental" && phone ? <Phone phone={
|
|
224
|
+
{name === "On Water Rental" && phone ? <Phone phone={phoneNumber} /> : null}
|
|
221
225
|
</div>
|
|
222
226
|
)
|
|
223
227
|
}
|
package/src/PaddleSEO.tsx
CHANGED
|
@@ -54,7 +54,9 @@ type SEOtypes = {
|
|
|
54
54
|
strapiLocale: {
|
|
55
55
|
name: string;
|
|
56
56
|
topbar: {
|
|
57
|
-
|
|
57
|
+
data: {
|
|
58
|
+
topbar: string;
|
|
59
|
+
};
|
|
58
60
|
};
|
|
59
61
|
url: string;
|
|
60
62
|
themeColor: string;
|
|
@@ -144,10 +146,10 @@ export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, bre
|
|
|
144
146
|
"image": "${PaddleImage}",
|
|
145
147
|
"address": {
|
|
146
148
|
"@type": "PostalAddress",
|
|
147
|
-
"streetAddress": "${strapiLocation
|
|
148
|
-
"addressLocality": "${strapiLocation
|
|
149
|
-
"addressRegion": "${strapiLocation
|
|
150
|
-
"postalCode": "${strapiLocation
|
|
149
|
+
"streetAddress": "${strapiLocation?.streetAddress}",
|
|
150
|
+
"addressLocality": "${strapiLocation?.addressLocality}",
|
|
151
|
+
"addressRegion": "${strapiLocation?.addressRegion}",
|
|
152
|
+
"postalCode": "${strapiLocation?.postalCode}",
|
|
151
153
|
"addressCountry": "US"
|
|
152
154
|
},
|
|
153
155
|
${allStrapiLocation ? `
|
package/src/PaddleTicket.tsx
CHANGED
|
@@ -12,6 +12,7 @@ export function PaddleTicket({ ogimage, slug, name, start, finish, duration, tim
|
|
|
12
12
|
duration: duration,
|
|
13
13
|
timeframe: timeframe,
|
|
14
14
|
allStrapiSunsetTourTime: allStrapiSunsetTourTime,
|
|
15
|
+
allStrapiMoonlightTourDateTime: { nodes: [] }, // Provide an empty nodes array or the correct data as needed
|
|
15
16
|
slug: slug
|
|
16
17
|
});
|
|
17
18
|
|
package/src/PaddleTime.tsx
CHANGED
|
@@ -57,7 +57,24 @@ export const PaddleTime = ({ start, finish, duration, timeframe, slug, allStrapi
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
if (duration) {
|
|
61
|
+
if (duration > 90) {
|
|
62
|
+
const hours = Math.floor(duration / 60);
|
|
63
|
+
const mins = duration % 60;
|
|
60
64
|
|
|
65
|
+
return {
|
|
66
|
+
entry: `${hours}${hairSpace}hrs ${mins > 0 ? `${mins}${hairSpace}mins` : ''} `,
|
|
67
|
+
value: "duration"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
entry: `${duration}${hairSpace} mins`,
|
|
73
|
+
value: "duration"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// this must be last as it has no way to be removed in strapi
|
|
61
78
|
if (start && finish) {
|
|
62
79
|
const startHours = sunsetStartTime ? sunsetStartTime.split(':')[0] : start.split(':')[0];
|
|
63
80
|
let startHoursInt: number = Number.parseInt(startHours);
|
|
@@ -87,23 +104,6 @@ export const PaddleTime = ({ start, finish, duration, timeframe, slug, allStrapi
|
|
|
87
104
|
}
|
|
88
105
|
}
|
|
89
106
|
|
|
90
|
-
if (duration) {
|
|
91
|
-
if (duration > 90) {
|
|
92
|
-
const hours = Math.floor(duration / 60);
|
|
93
|
-
const mins = duration % 60;
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
entry: `${hours}${hairSpace}hrs ${mins > 0 ? `${mins}${hairSpace}mins` : ''} `,
|
|
97
|
-
value: "duration"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return {
|
|
102
|
-
entry: `${duration}${hairSpace} mins`,
|
|
103
|
-
value: "duration"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
107
|
return {
|
|
108
108
|
entry: null,
|
|
109
109
|
value: null
|
package/src/phone.tsx
CHANGED
|
@@ -4,7 +4,8 @@ interface FormatPhoneNumberTypes {
|
|
|
4
4
|
phoneNumberString: number;
|
|
5
5
|
}
|
|
6
6
|
function FormatPhoneNumber({ phoneNumberString }: FormatPhoneNumberTypes) {
|
|
7
|
-
const
|
|
7
|
+
const phoneNumber = String(phoneNumberString);
|
|
8
|
+
const cleaned = `${phoneNumber}`.replace(/\D/g, '');
|
|
8
9
|
const match = cleaned.match(/^(\d{3})(\d{3})(\d{4})$/);
|
|
9
10
|
if (match) {
|
|
10
11
|
return `(${match[1]}) ${match[2]}-${match[3]}`;
|