@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rileybathurst/paddle",
3
3
  "private": false,
4
- "version": "0.0.124",
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.15",
17
- "gatsby": "^5.13.6",
18
- "gatsby-plugin-image": "^3.13.1",
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.2.1",
20
+ "react-aria-components": "^1.9.0",
21
21
  "react-dom": "^18.2.0",
22
- "react-markdown": "^9.0.1"
22
+ "react-markdown": "^10.1.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@chromatic-com/storybook": "^1.3.4",
26
- "@faker-js/faker": "^8.4.1",
27
- "@storybook/addon-essentials": "^8.0.10",
28
- "@storybook/addon-interactions": "^8.0.10",
29
- "@storybook/addon-links": "^8.0.10",
30
- "@storybook/blocks": "^8.0.10",
31
- "@storybook/react": "^8.0.10",
32
- "@storybook/react-vite": "^8.0.10",
33
- "@storybook/test": "^8.0.10",
34
- "@types/react": "^18.2.66",
35
- "@types/react-dom": "^18.2.22",
36
- "@typescript-eslint/eslint-plugin": "^7.2.0",
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.8.0",
43
- "storybook": "^8.0.10",
44
- "typescript": "^5.2.2",
45
- "vite": "^5.2.0"
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 className="react-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 className="react-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={phone} /> : null}
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={phone} /> : null}
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
- topbar: string;
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.streetAddress}",
148
- "addressLocality": "${strapiLocation.addressLocality}",
149
- "addressRegion": "${strapiLocation.addressRegion}",
150
- "postalCode": "${strapiLocation.postalCode}",
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 ? `
@@ -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
 
@@ -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 cleaned = `${phoneNumberString}`.replace(/\D/g, '');
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]}`;