@forgebuild/hotal-ui 0.23.19 → 0.23.40
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/dist/hotal-ui.js +4063 -3664
- package/dist/index.d.ts +68 -0
- package/package.json +45 -45
package/dist/index.d.ts
CHANGED
|
@@ -1058,6 +1058,8 @@ export interface BookingSummaryElement extends HTMLElement {
|
|
|
1058
1058
|
export interface SearchableSelectOption {
|
|
1059
1059
|
value: string;
|
|
1060
1060
|
label: string;
|
|
1061
|
+
/** Right-aligned secondary text on the row (a price, a code) -- shown in the trigger too once selected. */
|
|
1062
|
+
detail?: string;
|
|
1061
1063
|
/** Passed through untouched on the `change` event -- e.g. an ISO2 code alongside a country name. */
|
|
1062
1064
|
meta?: unknown;
|
|
1063
1065
|
}
|
|
@@ -1074,6 +1076,8 @@ export interface SearchableSelectElement extends HTMLElement {
|
|
|
1074
1076
|
placeholder?: string;
|
|
1075
1077
|
variant?: 'phone' | 'country' | '';
|
|
1076
1078
|
searchPlaceholder?: string;
|
|
1079
|
+
/** Hide the search box -- for short lists where filtering is noise. */
|
|
1080
|
+
noSearch?: boolean;
|
|
1077
1081
|
}
|
|
1078
1082
|
|
|
1079
1083
|
export interface BookingConfirmedElement extends HTMLElement {
|
|
@@ -1130,8 +1134,72 @@ export interface RestaurantOrderFormElement extends HTMLElement {
|
|
|
1130
1134
|
placeOrder?: (params: RestaurantOrderPlaceParams) => Promise<RestaurantOrderPlaceResult>;
|
|
1131
1135
|
}
|
|
1132
1136
|
|
|
1137
|
+
export interface ServiceBookingBarStrings {
|
|
1138
|
+
placeholder: string;
|
|
1139
|
+
bookLabel: string;
|
|
1140
|
+
loadingLabel: string;
|
|
1141
|
+
errorLabel: string;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
/** <service-booking-bar>: one joined control -- a service select with an
|
|
1145
|
+
* attached Book button. Picking a service dispatches `book`
|
|
1146
|
+
* ({ id, name, price }); the always-present button re-dispatches it, or
|
|
1147
|
+
* dispatches `book` with a null detail when nothing is chosen ("take me to
|
|
1148
|
+
* booking" -- the host's flow does the choosing). Both applyOnSelect and
|
|
1149
|
+
* showBookButton default true; explicit false is honoured verbatim. */
|
|
1150
|
+
export interface ServiceBookingBarElement extends HTMLElement {
|
|
1151
|
+
applyOnSelect?: boolean;
|
|
1152
|
+
showBookButton?: boolean;
|
|
1153
|
+
strings?: Partial<ServiceBookingBarStrings>;
|
|
1154
|
+
fetchTreatments?: () => Promise<SpaTreatment[]>;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
export interface GoogleReviewItem {
|
|
1158
|
+
author: string;
|
|
1159
|
+
author_photo?: string | null;
|
|
1160
|
+
rating: number;
|
|
1161
|
+
text: string;
|
|
1162
|
+
relative_time?: string;
|
|
1163
|
+
published_at?: string | null;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/** The payload <google-reviews> renders -- the shape served by the OTA's
|
|
1167
|
+
* GET /api/property/google-reviews (a cached Google Places fetch). */
|
|
1168
|
+
export interface GoogleReviewsPayload {
|
|
1169
|
+
rating: number | null;
|
|
1170
|
+
count: number;
|
|
1171
|
+
maps_url?: string | null;
|
|
1172
|
+
write_review_url?: string | null;
|
|
1173
|
+
reviews: GoogleReviewItem[];
|
|
1174
|
+
fetched_at?: string;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
export interface GoogleReviewsStrings {
|
|
1178
|
+
reviewsLabel: string;
|
|
1179
|
+
ctaLabel: string;
|
|
1180
|
+
seeAllLabel: string;
|
|
1181
|
+
loadingLabel: string;
|
|
1182
|
+
errorLabel: string;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
/** <google-reviews>: live Google rating, count, "Review us on Google" CTA
|
|
1186
|
+
* and the latest review cards. The host injects fetchReviews (typically a
|
|
1187
|
+
* site proxy in front of the OTA google-reviews endpoint); dispatches
|
|
1188
|
+
* `loaded` ({ rating, count }) when the payload arrives. Theme via --gr-*. */
|
|
1189
|
+
export interface GoogleReviewsElement extends HTMLElement {
|
|
1190
|
+
/** 'grid' (default) or 'slider' (scroll-snap track with prev/next arrows). */
|
|
1191
|
+
variant?: 'grid' | 'slider';
|
|
1192
|
+
/** Slider only: seconds between automatic advances; 0/unset = off. */
|
|
1193
|
+
autoAdvance?: number;
|
|
1194
|
+
maxReviews?: number;
|
|
1195
|
+
strings?: Partial<GoogleReviewsStrings>;
|
|
1196
|
+
fetchReviews?: () => Promise<GoogleReviewsPayload>;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1133
1199
|
declare global {
|
|
1134
1200
|
interface HTMLElementTagNameMap {
|
|
1201
|
+
'google-reviews': GoogleReviewsElement;
|
|
1202
|
+
'service-booking-bar': ServiceBookingBarElement;
|
|
1135
1203
|
'reservation-bar': ReservationBarElement;
|
|
1136
1204
|
'booking-flow': BookingFlowElement;
|
|
1137
1205
|
'menu-section': MenuSectionElement;
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@forgebuild/hotal-ui",
|
|
3
|
-
"version": "0.23.
|
|
4
|
-
"description": "Reusable Svelte UI components for booking and reservation experiences.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist"
|
|
9
|
-
],
|
|
10
|
-
"main": "./dist/hotal-ui.js",
|
|
11
|
-
"module": "./dist/hotal-ui.js",
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
|
-
"import": "./dist/hotal-ui.js"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"publishConfig": {
|
|
20
|
-
"access": "public"
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@floating-ui/dom": "^1.8.0",
|
|
24
|
-
"@stripe/stripe-js": "^9.13.0",
|
|
25
|
-
"ably": "^2.27.0",
|
|
26
|
-
"gsap": "^3.15.0",
|
|
27
|
-
"libphonenumber-js": "^1.12.41",
|
|
28
|
-
"svelte": "^5.56.8"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
|
32
|
-
"@tsconfig/svelte": "^5.0.8",
|
|
33
|
-
"@types/node": "^24.13.3",
|
|
34
|
-
"svelte-check": "^4.7.3",
|
|
35
|
-
"typescript": "~6.0.2",
|
|
36
|
-
"vite": "^8.2.0"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"dev": "vite",
|
|
40
|
-
"build": "vite build && node scripts/copy-types.mjs",
|
|
41
|
-
"prepublishOnly": "npm run build",
|
|
42
|
-
"preview": "vite preview",
|
|
43
|
-
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@forgebuild/hotal-ui",
|
|
3
|
+
"version": "0.23.40",
|
|
4
|
+
"description": "Reusable Svelte UI components for booking and reservation experiences.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"main": "./dist/hotal-ui.js",
|
|
11
|
+
"module": "./dist/hotal-ui.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/hotal-ui.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@floating-ui/dom": "^1.8.0",
|
|
24
|
+
"@stripe/stripe-js": "^9.13.0",
|
|
25
|
+
"ably": "^2.27.0",
|
|
26
|
+
"gsap": "^3.15.0",
|
|
27
|
+
"libphonenumber-js": "^1.12.41",
|
|
28
|
+
"svelte": "^5.56.8"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
|
32
|
+
"@tsconfig/svelte": "^5.0.8",
|
|
33
|
+
"@types/node": "^24.13.3",
|
|
34
|
+
"svelte-check": "^4.7.3",
|
|
35
|
+
"typescript": "~6.0.2",
|
|
36
|
+
"vite": "^8.2.0"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"dev": "vite",
|
|
40
|
+
"build": "vite build && node scripts/copy-types.mjs",
|
|
41
|
+
"prepublishOnly": "npm run build",
|
|
42
|
+
"preview": "vite preview",
|
|
43
|
+
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json"
|
|
44
|
+
}
|
|
45
|
+
}
|