@wix/himalaya-cli 0.1614.0 → 0.1615.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.
Files changed (106) hide show
  1. package/dist/cli.mjs +1 -0
  2. package/package.json +2 -2
  3. package/template-icons/salon-spa.png +0 -0
  4. package/templates/beauty-salon/tier5-src/_shared/branded-load-state.ts +5 -2
  5. package/templates/beauty-salon/tier5-src/_shared/himi-account.ts +31 -0
  6. package/templates/beauty-salon/tier5-src/_shared/himi-booking-saved.ts +88 -0
  7. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +50 -3
  8. package/templates/beauty-salon/tier5-src/himi-booking-services/index.ts +70 -3
  9. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +40 -8
  10. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  11. package/templates/branded-lite/tier5-src/_shared/branded-load-state.ts +5 -2
  12. package/templates/branded-lite/tier5-src/_shared/himi-account.ts +31 -0
  13. package/templates/branded-lite/tier5-src/_shared/himi-booking-saved.ts +88 -0
  14. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +50 -3
  15. package/templates/branded-lite/tier5-src/himi-booking-services/index.ts +70 -3
  16. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +40 -8
  17. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  18. package/templates/branded-lite/tier5-src/himi-branded-lite-galleries/index.ts +104 -12
  19. package/templates/community-club/tier5-src/_shared/branded-load-state.ts +5 -2
  20. package/templates/community-club/tier5-src/_shared/himi-account.ts +31 -0
  21. package/templates/events-meetups/tier5-src/_shared/branded-load-state.ts +5 -2
  22. package/templates/events-meetups/tier5-src/_shared/himi-account.ts +31 -0
  23. package/templates/gym-fitness/tier5-src/_shared/branded-load-state.ts +5 -2
  24. package/templates/gym-fitness/tier5-src/_shared/himi-account.ts +31 -0
  25. package/templates/gym-fitness/tier5-src/_shared/himi-booking-saved.ts +88 -0
  26. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +50 -3
  27. package/templates/gym-fitness/tier5-src/himi-booking-services/index.ts +70 -3
  28. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +40 -8
  29. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  30. package/templates/nonprofit-cause/tier5-src/_shared/branded-load-state.ts +5 -2
  31. package/templates/nonprofit-cause/tier5-src/_shared/himi-account.ts +31 -0
  32. package/templates/podcast-creator/tier5-src/_shared/branded-load-state.ts +5 -2
  33. package/templates/podcast-creator/tier5-src/_shared/himi-account.ts +31 -0
  34. package/templates/portfolio-creative/tier5-src/_shared/branded-load-state.ts +5 -2
  35. package/templates/portfolio-creative/tier5-src/_shared/himi-account.ts +31 -0
  36. package/templates/restaurant/tier5-src/_shared/branded-load-state.ts +5 -2
  37. package/templates/restaurant/tier5-src/_shared/himi-account.ts +31 -0
  38. package/templates/retail-store/tier5-src/_shared/branded-load-state.ts +5 -2
  39. package/templates/retail-store/tier5-src/_shared/himi-account.ts +31 -0
  40. package/templates/salon-spa/README.md +53 -0
  41. package/templates/salon-spa/config.ts +272 -0
  42. package/templates/salon-spa/dev/index.ts +19893 -0
  43. package/templates/salon-spa/himalaya.content.json +49 -0
  44. package/templates/salon-spa/himalaya.template.json +14 -0
  45. package/templates/salon-spa/icon.png +0 -0
  46. package/templates/salon-spa/platforms.json +1 -0
  47. package/templates/salon-spa/tier5-src/_shared/app-locale.ts +61 -0
  48. package/templates/salon-spa/tier5-src/_shared/booking-location.ts +147 -0
  49. package/templates/salon-spa/tier5-src/_shared/booking-session.ts +222 -0
  50. package/templates/salon-spa/tier5-src/_shared/branded-lite-hosted.ts +278 -0
  51. package/templates/salon-spa/tier5-src/_shared/branded-load-state.ts +109 -0
  52. package/templates/salon-spa/tier5-src/_shared/business-chat-copy.ts +40 -0
  53. package/templates/salon-spa/tier5-src/_shared/business-chat-history.ts +48 -0
  54. package/templates/salon-spa/tier5-src/_shared/business-chat-message-model.ts +177 -0
  55. package/templates/salon-spa/tier5-src/_shared/business-chat-model.ts +56 -0
  56. package/templates/salon-spa/tier5-src/_shared/business-chat-presenter.ts +581 -0
  57. package/templates/salon-spa/tier5-src/_shared/business-chat-transport.ts +148 -0
  58. package/templates/salon-spa/tier5-src/_shared/collection-contract.ts +230 -0
  59. package/templates/salon-spa/tier5-src/_shared/collection-query.ts +193 -0
  60. package/templates/salon-spa/tier5-src/_shared/collection-service.ts +400 -0
  61. package/templates/salon-spa/tier5-src/_shared/detail-presence.ts +51 -0
  62. package/templates/salon-spa/tier5-src/_shared/empty-flags.ts +33 -0
  63. package/templates/salon-spa/tier5-src/_shared/engine-intl.ts +508 -0
  64. package/templates/salon-spa/tier5-src/_shared/himi-account.ts +164 -0
  65. package/templates/salon-spa/tier5-src/_shared/himi-booking-saved.ts +88 -0
  66. package/templates/salon-spa/tier5-src/_shared/himi-bookings.ts +318 -0
  67. package/templates/salon-spa/tier5-src/_shared/himi-copy.ts +89 -0
  68. package/templates/salon-spa/tier5-src/_shared/himi-store.ts +7 -0
  69. package/templates/salon-spa/tier5-src/_shared/himi-text.ts +24 -0
  70. package/templates/salon-spa/tier5-src/_shared/host-events.ts +66 -0
  71. package/templates/salon-spa/tier5-src/_shared/hosted-checkout.ts +70 -0
  72. package/templates/salon-spa/tier5-src/_shared/iap-attendance-form.ts +106 -0
  73. package/templates/salon-spa/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  74. package/templates/salon-spa/tier5-src/_shared/iap-attendance.ts +38 -0
  75. package/templates/salon-spa/tier5-src/_shared/iap-worker.ts +125 -0
  76. package/templates/salon-spa/tier5-src/_shared/local-preferences.ts +38 -0
  77. package/templates/salon-spa/tier5-src/_shared/member-access.ts +52 -0
  78. package/templates/salon-spa/tier5-src/_shared/member-account-routes.ts +52 -0
  79. package/templates/salon-spa/tier5-src/_shared/member-bookings.ts +94 -0
  80. package/templates/salon-spa/tier5-src/_shared/offset-page.ts +10 -0
  81. package/templates/salon-spa/tier5-src/_shared/online-actions.ts +76 -0
  82. package/templates/salon-spa/tier5-src/_shared/owner-load-error.ts +348 -0
  83. package/templates/salon-spa/tier5-src/_shared/payment-setup.ts +6 -0
  84. package/templates/salon-spa/tier5-src/_shared/rich-body.ts +78 -0
  85. package/templates/salon-spa/tier5-src/_shared/rich-content-link.ts +34 -0
  86. package/templates/salon-spa/tier5-src/_shared/weekly-goal.ts +107 -0
  87. package/templates/salon-spa/tier5-src/_shared/wix-service-price.ts +146 -0
  88. package/templates/salon-spa/tier5-src/business-chat/index.ts +669 -0
  89. package/templates/salon-spa/tier5-src/himi-booking-account/index.ts +241 -0
  90. package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +466 -0
  91. package/templates/salon-spa/tier5-src/himi-booking-saved/index.ts +103 -0
  92. package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +1170 -0
  93. package/templates/salon-spa/tier5-src/himi-booking-services/index.ts +791 -0
  94. package/templates/salon-spa/tier5-src/himi-booking-time/index.ts +1712 -0
  95. package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +950 -0
  96. package/templates/salon-spa/tier5-src/himi-branded-lite-galleries/index.ts +282 -0
  97. package/templates/salon-spa/tier5-src/himi-salon-home/index.ts +544 -0
  98. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +925 -0
  99. package/templates/salon-spa/tokens.json +341 -0
  100. package/templates/yoga-studio/tier5-src/_shared/branded-load-state.ts +5 -2
  101. package/templates/yoga-studio/tier5-src/_shared/himi-account.ts +31 -0
  102. package/templates/yoga-studio/tier5-src/_shared/himi-booking-saved.ts +88 -0
  103. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +50 -3
  104. package/templates/yoga-studio/tier5-src/himi-booking-services/index.ts +70 -3
  105. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +40 -8
  106. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
@@ -0,0 +1,53 @@
1
+ # __HIMI_APP_NAME__ — from the `salon-spa` template
2
+
3
+ A beauty salon / aesthetics clinic / day spa app over a real Wix site: a home with the signature-treatment rail, categories, an offer and the team; Categories with search; the shared Branded Lite booking flow in salon words — treatments by category, a treatment with a favorites heart, times by staff with checkout for paid treatments, My Bookings; Favorites; Our space (Pro Gallery); Message the salon (the Wix Inbox chat); About & visit. Boots as a VISITOR (the treatment menu paints with no login); booking, My Bookings and the chat open Branded Lite's sign-in form as a sheet.
4
+
5
+ Everything here is now yours to edit — screens in `dev/`, logic in `tier5-src/`,
6
+ identity and navigation in `config.ts`, look and feel in `tokens.json`.
7
+
8
+ ## Point at your Wix site
9
+
10
+ Your **Wix Headless `clientId` binds the data** — the visitor token minted from it already
11
+ names your site, so reads need nothing else. Set these before `himi build` / preview so calls
12
+ hit YOUR site (the placeholders are not a real backend):
13
+
14
+ export WIX_CLIENT_ID="<headless-oauth-client-id>"
15
+ export WIX_SITE_URL="https://your-site.wixsite.com/…"
16
+ export WIX_SITE_ID="<metasite-id>"
17
+
18
+ `WIX_SITE_ID` is the site that client belongs to. The member login takes it from the environment
19
+ while `WIX_CLIENT_ID` is the client the config uses. A native build needs it for member sign-up on
20
+ a CAPTCHA-protected site, push registration and in-app purchases.
21
+
22
+ Full details, including how to ship a binary a customer can install against their own
23
+ site: `himi docs branded-lite-site-binding`.
24
+
25
+ ## The loop
26
+
27
+ himi build # compile tier5-src/* -> dist/bundles
28
+ himi validate # screens, bindings and worker boot
29
+ himi render <screenId> --tree # render a screen right here, no device needed
30
+ himi test # exercise every action your screens declare
31
+ himi login --browser --target wix # sign in with your Wix account (once)
32
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
33
+ himi push --draft # publish a DRAFT release + get preview links
34
+
35
+ Build, validate, render and test run entirely on your machine. Only `login` and
36
+ `push` reach Wix. No per-app install is needed: the CLI ships the `@wix/himalaya`
37
+ runtime it compiles against.
38
+
39
+ ## Pattern index — where to look for each recipe
40
+
41
+ | Pattern | Screens |
42
+ |---|---|
43
+ | Data-derived categories (grid of round tiles) | salon_home categories, salon_treatments |
44
+ | Category deep link (an anchor into a shared list) | category tile → himi_services (category nav param) |
45
+ | Horizontal rails (bound LazyList) | salon_home signature treatments, team |
46
+ | Reusing a shared screen in your own words (stock-string copy rewrite) | himi_services, himi_service, himi_time, himi_bookings |
47
+ | Favorites on device (a heart on a shared detail) | himi_service heart → salon_favorites |
48
+ | Four-state screens (loading/empty/error/loaded) | every list screen |
49
+ | Gateway Pro Gallery covers + photo grid | himi_galleries → himi_gallery |
50
+ | Member chat with the business (Wix Inbox) | himi_business_chat |
51
+
52
+ Guides: `himi docs recipe-dynamic-list`, `himi docs tier-5-add-a-screen`,
53
+ `himi docs designing-himi-screens`. Seed references: `himi agent-init`.
@@ -0,0 +1,272 @@
1
+ // Your app's configuration — identity, auth, navigation, capabilities and tokens.
2
+ // Inspect the live values any time with `himi context`; see `himi docs app-config`.
3
+ import { defineApp } from "@himalaya/core";
4
+ import { WixConsumerAuthProvider } from "@himalaya/wix-auth";
5
+ import { ConsoleTelemetrySink } from "@himalaya/telemetry-console";
6
+
7
+ export default defineApp({
8
+ id: "__HIMI_APP_DOTID__",
9
+ name: "__HIMI_APP_NAME__",
10
+ bundleId: "__HIMI_APP_DOTID__",
11
+ applicationId: "__HIMI_APP_DOTID__",
12
+ // Placeholders — an over-the-air app never consumes these. Leave as-is.
13
+ schemaPackage: "@example/__HIMI_APP_SLUG__-schema",
14
+ schemaPackageRange: { min: 9900, max: 9909 },
15
+ // Placeholders — only a local server would read these. Leave as-is.
16
+ ports: { devServer: 8190, web: 5390 },
17
+ auth: WixConsumerAuthProvider({
18
+ // POINT THESE AT YOUR SITE — set WIX_CLIENT_ID (a public headless OAuth client id)
19
+ // and WIX_SITE_URL (your live site URL). The placeholders below are NOT a real
20
+ // backend; the app boots but reads nothing until you set them. The site needs
21
+ // Wix Bookings; Pro Gallery and the Wix Inbox chat are optional.
22
+ clientId: process.env.WIX_CLIENT_ID ?? "YOUR_WIX_CLIENT_ID",
23
+ siteUrl: process.env.WIX_SITE_URL ?? "https://your-site.example.com",
24
+ // The OAuth redirect must be ALLOWLISTED on the headless client in `clientId`.
25
+ redirectUri: process.env.WIX_REDIRECT_URI ?? "himalaya-__HIMI_APP_SLUG__://oauth/callback",
26
+ bootAsVisitor: true,
27
+ preserveVisitorOnSignOut: true,
28
+ }),
29
+ telemetry: ConsoleTelemetrySink(),
30
+ serverUrls: {
31
+ screen: "http://localhost:8190/v1",
32
+ actions: "http://localhost:8190/v1/actions",
33
+ sync: "http://localhost:8190/v1/sync",
34
+ },
35
+ capabilities: ["wix_api","local_database","open_url","share","secure_storage","wix_platform","app_info","wix_chat","calendar","iap","wix_cashier"],
36
+ designTokensPath: "./tokens.json",
37
+ navigation: {
38
+ "navKind": "responsive",
39
+ "scheme": "himalaya-__HIMI_APP_SLUG__",
40
+ "deepLinkPatterns": [],
41
+ "linkableScreens": [
42
+ {
43
+ "screenId": "salon_home",
44
+ "isPublic": true,
45
+ "paramKeys": [],
46
+ "parentScreenId": "",
47
+ "tabId": "home"
48
+ },
49
+ {
50
+ "screenId": "salon_treatments",
51
+ "isPublic": true,
52
+ "paramKeys": [],
53
+ "parentScreenId": "salon_home",
54
+ "tabId": "home"
55
+ },
56
+ {
57
+ "screenId": "himi_services",
58
+ "isPublic": true,
59
+ "paramKeys": [
60
+ "category",
61
+ "categoryActivation"
62
+ ],
63
+ "parentScreenId": "salon_home",
64
+ "tabId": "home"
65
+ },
66
+ {
67
+ "screenId": "himi_service",
68
+ "isPublic": true,
69
+ "paramKeys": [
70
+ "id",
71
+ "sessionId",
72
+ "start"
73
+ ],
74
+ "parentScreenId": "himi_services",
75
+ "tabId": "home"
76
+ },
77
+ {
78
+ "screenId": "himi_time",
79
+ "isPublic": true,
80
+ "paramKeys": [
81
+ "id",
82
+ "course",
83
+ "start",
84
+ "sessionId"
85
+ ],
86
+ "parentScreenId": "himi_service",
87
+ "tabId": "home"
88
+ },
89
+ {
90
+ "screenId": "himi_agenda",
91
+ "isPublic": true,
92
+ "paramKeys": [],
93
+ "parentScreenId": "himi_services",
94
+ "tabId": "home"
95
+ },
96
+ {
97
+ "screenId": "himi_galleries",
98
+ "isPublic": true,
99
+ "paramKeys": [],
100
+ "parentScreenId": "salon_home",
101
+ "tabId": "home"
102
+ },
103
+ {
104
+ "screenId": "himi_gallery",
105
+ "isPublic": true,
106
+ "paramKeys": [
107
+ "id",
108
+ "name",
109
+ "subtitle",
110
+ "source"
111
+ ],
112
+ "parentScreenId": "himi_galleries",
113
+ "tabId": "home"
114
+ },
115
+ {
116
+ "screenId": "salon_about",
117
+ "isPublic": true,
118
+ "paramKeys": [],
119
+ "parentScreenId": "salon_home",
120
+ "tabId": "home"
121
+ },
122
+ {
123
+ "screenId": "himi_bookings",
124
+ "isPublic": false,
125
+ "paramKeys": [],
126
+ "parentScreenId": "",
127
+ "tabId": "bookings"
128
+ },
129
+ {
130
+ "screenId": "salon_favorites",
131
+ "isPublic": true,
132
+ "paramKeys": [],
133
+ "parentScreenId": "",
134
+ "tabId": "favorites"
135
+ },
136
+ {
137
+ "screenId": "himi_account",
138
+ "isPublic": true,
139
+ "paramKeys": [],
140
+ "parentScreenId": "",
141
+ "tabId": "profile"
142
+ },
143
+ {
144
+ "screenId": "himi_sign_in",
145
+ "isPublic": true,
146
+ "paramKeys": [
147
+ "mode",
148
+ "intent",
149
+ "modal",
150
+ "returnTab",
151
+ "contextName",
152
+ "returnScreenId",
153
+ "returnId",
154
+ "returnChannelId",
155
+ "authContinuation"
156
+ ],
157
+ "parentScreenId": "himi_account",
158
+ "tabId": "profile"
159
+ },
160
+ {
161
+ "screenId": "himi_business_chat",
162
+ "isPublic": false,
163
+ "paramKeys": [],
164
+ "parentScreenId": "salon_home",
165
+ "tabId": "home"
166
+ }
167
+ ],
168
+ "tabBar": {
169
+ "presentation": "native",
170
+ "items": [
171
+ {
172
+ "id": "home",
173
+ "screenId": "salon_home",
174
+ "label": "Home",
175
+ "icon": "home",
176
+ "selectedIcon": "home_fill"
177
+ },
178
+ {
179
+ "id": "bookings",
180
+ "screenId": "himi_bookings",
181
+ "label": "Bookings",
182
+ "icon": "calendar"
183
+ },
184
+ {
185
+ "id": "favorites",
186
+ "screenId": "salon_favorites",
187
+ "label": "Favorites",
188
+ "icon": "heart",
189
+ "selectedIcon": "heart_fill"
190
+ },
191
+ {
192
+ "id": "profile",
193
+ "screenId": "himi_account",
194
+ "label": "Profile",
195
+ "icon": "person",
196
+ "selectedIcon": "person_fill"
197
+ }
198
+ ]
199
+ }
200
+ },
201
+ // This app talks to a language model (dual LLM / remote model).
202
+ agent: {
203
+ "onDevice": {
204
+ "ios": "foundation_models",
205
+ "android": "mediapipe"
206
+ },
207
+ "remote": {
208
+ "providerId": "anthropic",
209
+ "config": {
210
+ "model": "claude-haiku-4-5"
211
+ }
212
+ },
213
+ "privateModeToggle": false
214
+ },
215
+ entities: {},
216
+ // Your on-device database. It must declare every entity a worker reads or writes,
217
+ // or those calls fail closed — keep it in step with `local_database` above.
218
+ dataSchema: {
219
+ "version": 1,
220
+ "entities": [
221
+ {
222
+ "name": "services",
223
+ "encrypted": false,
224
+ "fields": [
225
+ {
226
+ "name": "id",
227
+ "type": "string",
228
+ "required": true
229
+ },
230
+ {
231
+ "name": "name",
232
+ "type": "string"
233
+ }
234
+ ]
235
+ },
236
+ {
237
+ "name": "booking_prefs",
238
+ "encrypted": false,
239
+ "fields": [
240
+ {
241
+ "name": "id",
242
+ "type": "string",
243
+ "required": true
244
+ },
245
+ {
246
+ "name": "locationId",
247
+ "type": "string"
248
+ },
249
+ {
250
+ "name": "locationLabel",
251
+ "type": "string"
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "name": "member_bookings",
257
+ "encrypted": true,
258
+ "fields": [
259
+ {
260
+ "name": "id",
261
+ "type": "string",
262
+ "required": true
263
+ },
264
+ {
265
+ "name": "serviceId",
266
+ "type": "string"
267
+ }
268
+ ]
269
+ }
270
+ ]
271
+ },
272
+ });