@wix/himalaya-cli 0.1750.0 → 0.1752.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/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +16 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/himi-package.d.ts +478 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/host-compatibility.d.ts +56 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/icon-catalog.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +154 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/native-engine.d.ts +49 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/copy.generated.d.ts +16 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/feedback.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast-service.d.ts +105 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast.d.ts +116 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +27 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +326 -13
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +757 -83
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +156 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth/worker.mjs +133 -13
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +139 -13
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin → 2671d1cadb15daa5e59440f4c924e30c221ab3d405e8a56a0ab1cdbe4764af3d.bin} +1 -1
- package/dist/browser-plane/sw.js +7 -7
- package/dist/cli.mjs +37219 -33014
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/app-config.md +1 -1
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +4 -0
- package/guides/designing-himi-screens.md +7 -0
- package/guides/getting-started.md +2 -0
- package/guides/headless-loop.md +1 -1
- package/guides/himi-json-output.md +25 -3
- package/guides/himi-skill.md +2 -0
- package/guides/index.json +6 -0
- package/guides/push-cli-onboarding.md +13 -0
- package/guides/qa-builds.md +15 -2
- package/guides/recipe-podcast.md +149 -0
- package/guides/releasing-with-himi-serve.md +51 -0
- package/guides/store-submission.md +46 -1
- package/guides/tier-5-add-a-screen.md +16 -2
- package/guides/wix-business-context.md +29 -0
- package/guides/wix-platform-usage.md +7 -2
- package/package.json +10 -10
- package/template-icons/fitness-gym.png +0 -0
- package/templates/beauty-salon/dev/index.ts +1 -1
- package/templates/beauty-salon/l10n/en.json +1 -1
- package/templates/beauty-salon/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/branded-lite/dev/index.ts +101 -1
- package/templates/branded-lite/l10n/en.json +22 -1
- package/templates/branded-lite/l10n/es.json +22 -0
- package/templates/branded-lite/l10n/fr.json +18 -0
- package/templates/branded-lite/l10n/he.json +15 -0
- package/templates/branded-lite/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/branded-lite/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/branded-lite/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
- package/templates/brandy/README.md +33 -0
- package/templates/brandy/config.ts +51 -7
- package/templates/brandy/dev/index.ts +23 -9
- package/templates/community-club/l10n/en.json +1 -1
- package/templates/community-club/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/community-club/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/events-meetups/l10n/en.json +1 -1
- package/templates/events-meetups/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/events-meetups/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/fitness-gym/README.md +53 -0
- package/templates/fitness-gym/config.ts +560 -0
- package/templates/fitness-gym/dev/index.ts +25787 -0
- package/templates/fitness-gym/himalaya.content.json +64 -0
- package/templates/fitness-gym/himalaya.template.json +15 -0
- package/templates/fitness-gym/icon.png +0 -0
- package/templates/fitness-gym/platforms.json +1 -0
- package/templates/fitness-gym/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/fitness-gym/tier5-src/_shared/booking-location.ts +147 -0
- package/templates/fitness-gym/tier5-src/_shared/booking-session.ts +224 -0
- package/templates/fitness-gym/tier5-src/_shared/branded-lite-hosted.ts +280 -0
- package/templates/fitness-gym/tier5-src/_shared/branded-load-state.ts +109 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-copy.ts +40 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-history.ts +51 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-message-model.ts +177 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-model.ts +56 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-presenter.ts +576 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-transport.ts +148 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-contract.ts +228 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-query.ts +193 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +400 -0
- package/templates/fitness-gym/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +523 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-account.ts +194 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-booking-saved.ts +88 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-bookings.ts +318 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-copy.ts +116 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-store.ts +7 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-text.ts +24 -0
- package/templates/fitness-gym/tier5-src/_shared/host-events.ts +66 -0
- package/templates/fitness-gym/tier5-src/_shared/hosted-checkout.ts +70 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance-form.ts +106 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance.ts +38 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-worker.ts +127 -0
- package/templates/fitness-gym/tier5-src/_shared/inbox-rooms.ts +68 -0
- package/templates/fitness-gym/tier5-src/_shared/local-preferences.ts +38 -0
- package/templates/fitness-gym/tier5-src/_shared/member-access.ts +63 -0
- package/templates/fitness-gym/tier5-src/_shared/member-account-routes.ts +52 -0
- package/templates/fitness-gym/tier5-src/_shared/member-bookings.ts +107 -0
- package/templates/fitness-gym/tier5-src/_shared/member-screen.ts +99 -0
- package/templates/fitness-gym/tier5-src/_shared/notification-target.ts +141 -0
- package/templates/fitness-gym/tier5-src/_shared/offset-page.ts +10 -0
- package/templates/fitness-gym/tier5-src/_shared/online-actions.ts +76 -0
- package/templates/fitness-gym/tier5-src/_shared/owner-load-error.ts +348 -0
- package/templates/fitness-gym/tier5-src/_shared/payment-setup.ts +6 -0
- package/templates/fitness-gym/tier5-src/_shared/pricing-plan-display.ts +64 -0
- package/templates/fitness-gym/tier5-src/_shared/program-description.ts +11 -0
- package/templates/fitness-gym/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/fitness-gym/tier5-src/_shared/program-standing.ts +46 -0
- package/templates/fitness-gym/tier5-src/_shared/rich-body.ts +78 -0
- package/templates/fitness-gym/tier5-src/_shared/rich-content-link.ts +34 -0
- package/templates/fitness-gym/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/fitness-gym/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/fitness-gym/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-bi.ts +85 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-member-links.ts +114 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-service-price.ts +146 -0
- package/templates/fitness-gym/tier5-src/business-chat/index.ts +732 -0
- package/templates/fitness-gym/tier5-src/business-contact/index.ts +6 -0
- package/templates/fitness-gym/tier5-src/himi-booking-account/index.ts +267 -0
- package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +468 -0
- package/templates/fitness-gym/tier5-src/himi-booking-service/index.ts +1190 -0
- package/templates/fitness-gym/tier5-src/himi-booking-services/index.ts +791 -0
- package/templates/fitness-gym/tier5-src/himi-booking-time/index.ts +1729 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-agenda/index.ts +988 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-member-programs/index.ts +656 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-plans/index.ts +495 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-program/facts.ts +52 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-program/index.ts +845 -0
- package/templates/fitness-gym/tier5-src/himi-fitcoach-goal/index.ts +190 -0
- package/templates/fitness-gym/tier5-src/himi-fitcoach-home/index.ts +619 -0
- package/templates/fitness-gym/tier5-src/himi-store-account/index.ts +1007 -0
- package/templates/fitness-gym/tier5-src/wix-spaces-my-subscriptions/index.ts +84 -0
- package/templates/fitness-gym/tier5-src/wix-spaces-subscription-detail/index.ts +139 -0
- package/templates/fitness-gym/tokens.json +414 -0
- package/templates/gym-fitness/dev/index.ts +1 -1
- package/templates/gym-fitness/l10n/en.json +1 -1
- package/templates/gym-fitness/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/medical-services/dev/index.ts +2 -1
- package/templates/medical-services/tier5-src/himi-booking-account/index.ts +16 -1
- package/templates/nonprofit-cause/l10n/en.json +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/personal-fitness-trainer/dev/index.ts +2 -2
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/podcast-creator/dev/index.ts +100 -0
- package/templates/podcast-creator/l10n/en.json +22 -1
- package/templates/podcast-creator/l10n/es.json +22 -0
- package/templates/podcast-creator/l10n/fr.json +18 -0
- package/templates/podcast-creator/l10n/he.json +15 -0
- package/templates/podcast-creator/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/podcast-creator/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
- package/templates/portfolio-creative/l10n/en.json +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/restaurant/l10n/en.json +1 -1
- package/templates/restaurant/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/restaurant/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/retail-store/l10n/en.json +1 -1
- package/templates/retail-store/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/retail-store/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/salon-spa/dev/index.ts +1 -1
- package/templates/salon-spa/tier5-src/himi-booking-account/index.ts +16 -1
- package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/yoga-studio/dev/index.ts +1 -1
- package/templates/yoga-studio/l10n/en.json +1 -1
- package/templates/yoga-studio/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
|
@@ -136,7 +136,6 @@ var copy_generated_default = {
|
|
|
136
136
|
"auth.gate.forgotPassword": "Forgot password?",
|
|
137
137
|
"auth.gate.backToSignIn": "Back to sign in",
|
|
138
138
|
"auth.gate.continueWith": "Continue with {provider}",
|
|
139
|
-
"auth.gate.sendCodeVia": "Send code via",
|
|
140
139
|
"auth.gate.resendCode": "Didn't get it? Resend code",
|
|
141
140
|
"auth.gate.field.code": "Verification code",
|
|
142
141
|
"auth.gate.pushWaiting": "Approve the sign-in on your other device.",
|
|
@@ -148,6 +147,19 @@ var copy_generated_default = {
|
|
|
148
147
|
"auth.gate.password.hide": "Hide password",
|
|
149
148
|
"auth.gate.notice.codeResent": "A new code was sent.",
|
|
150
149
|
"auth.gate.notice.codeSentVia": "Code sent via {method}.",
|
|
150
|
+
"auth.gate.tryAnotherWay": "Try another way",
|
|
151
|
+
"auth.gate.chooseAnotherWay": "Choose another way to verify",
|
|
152
|
+
"auth.gate.method.sms": "SMS",
|
|
153
|
+
"auth.gate.method.voice": "Phone call",
|
|
154
|
+
"auth.gate.method.totp": "Authenticator app",
|
|
155
|
+
"auth.gate.method.push": "Approve on another device",
|
|
156
|
+
"auth.gate.codePrompt.sms": "We sent a code by SMS to {destination}.",
|
|
157
|
+
"auth.gate.codePrompt.smsNoHint": "We sent a code to your phone by SMS.",
|
|
158
|
+
"auth.gate.codePrompt.voice": "We're calling {destination} to read you a code.",
|
|
159
|
+
"auth.gate.codePrompt.voiceNoHint": "We're calling your phone to read you a code.",
|
|
160
|
+
"auth.gate.codePrompt.email": "We sent a code to {destination}.",
|
|
161
|
+
"auth.gate.codePrompt.emailNoHint": "We sent a code to your email.",
|
|
162
|
+
"auth.gate.codePrompt.totp": "Enter the code from your authenticator app.",
|
|
151
163
|
"auth.gate.notice.resetSent": "If that email is registered, a reset link is on its way.",
|
|
152
164
|
"auth.biometric.unlockWith": "Unlock with {method}",
|
|
153
165
|
"auth.biometric.orPassword": "or sign in with your password",
|
|
@@ -219,6 +231,9 @@ var copy_generated_default = {
|
|
|
219
231
|
"auth.feedback.totp": "That code did not work. Enter the current code from your authenticator app.",
|
|
220
232
|
"auth.feedback.network": "We could not connect. Check your connection and try again.",
|
|
221
233
|
"auth.feedback.rate_limited": "Too many attempts. Wait a few minutes and try again.",
|
|
234
|
+
"auth.feedback.delivery_failed": "We couldn't send the code. Try again, or try another way.",
|
|
235
|
+
"auth.feedback.sms_region_unsupported": "SMS codes aren't available in your region. Try another way.",
|
|
236
|
+
"auth.feedback.verification_expired": "This verification has expired. Go back and sign in again.",
|
|
222
237
|
"auth.feedback.unavailable": "This action is not available here. Use a supported sign-in method or open the app.",
|
|
223
238
|
"auth.feedback.cancelled": "Sign-in was cancelled. Try again when you are ready.",
|
|
224
239
|
"auth.feedback.verification_required": "Complete verification to continue, then try again.",
|
|
@@ -248,6 +263,11 @@ var failureKeys = {
|
|
|
248
263
|
unavailable: "auth.feedback.unavailable",
|
|
249
264
|
cancelled: "auth.feedback.cancelled",
|
|
250
265
|
verification_required: "auth.feedback.verification_required",
|
|
266
|
+
// A second factor's code could not be sent, SMS is not offered in the region, or the pending
|
|
267
|
+
// verification expired (Wix legacy 2FA 8034 / 8056 / 8002 — the native engines raise them).
|
|
268
|
+
delivery_failed: "auth.feedback.delivery_failed",
|
|
269
|
+
sms_region_unsupported: "auth.feedback.sms_region_unsupported",
|
|
270
|
+
verification_expired: "auth.feedback.verification_expired",
|
|
251
271
|
unknown: "auth.feedback.unknown"
|
|
252
272
|
};
|
|
253
273
|
var codes = new Set(Object.keys(failureKeys));
|
|
@@ -265,7 +285,12 @@ var aliases = {
|
|
|
265
285
|
RECAPTCHA_REQUIRED: "verification_required",
|
|
266
286
|
INVALID_CODE: "invalid_code",
|
|
267
287
|
EXPIRED_CODE: "expired_code",
|
|
268
|
-
TOO_MANY_REQUESTS: "rate_limited"
|
|
288
|
+
TOO_MANY_REQUESTS: "rate_limited",
|
|
289
|
+
// The TS WixNativeAuthEngine's legacy-2FA kinds (8004 / 8034 / 8056 / 8002).
|
|
290
|
+
rateLimited: "rate_limited",
|
|
291
|
+
deliveryFailed: "delivery_failed",
|
|
292
|
+
smsRegionUnsupported: "sms_region_unsupported",
|
|
293
|
+
verificationExpired: "verification_expired"
|
|
269
294
|
};
|
|
270
295
|
var iamCredentialCodes = /* @__PURE__ */ new Set(["-19999", "-19976"]);
|
|
271
296
|
function authMessage(key, translate) {
|
|
@@ -9045,6 +9045,9 @@ var screenDescriptorSchema = {
|
|
|
9045
9045
|
// RFC 0066 amendment — "" / "visible" (default) | "hidden". A free string like every
|
|
9046
9046
|
// chrome discriminator: an unknown value coalesces to "visible" (invariant 6).
|
|
9047
9047
|
tabBarVisibility: { type: "string" },
|
|
9048
|
+
// "" / "pinned" (default) | "floating" — how the host draws `stickyFooter`. A free string
|
|
9049
|
+
// like every chrome discriminator: an unknown value coalesces to "pinned" (invariant 6).
|
|
9050
|
+
stickyFooterPlacement: { type: "string" },
|
|
9048
9051
|
// RFC 0002 — Tier-5 worker bundle reference (LogicBundleRef). Without this in
|
|
9049
9052
|
// the schema, `additionalProperties:false` rejected EVERY T5 descriptor, so the
|
|
9050
9053
|
// admin's pre-push validation 400'd any edit of a T5 screen.
|
|
@@ -13923,6 +13926,16 @@ var ICON_CATALOG = {
|
|
|
13923
13926
|
"license": "Apache-2.0",
|
|
13924
13927
|
"libVersion": "0.45.9"
|
|
13925
13928
|
},
|
|
13929
|
+
"whatsapp": {
|
|
13930
|
+
"category": "brand",
|
|
13931
|
+
"path": [
|
|
13932
|
+
"M17.472 14.382C17.175 14.233 15.714 13.515 15.442 13.415C15.169 13.316 14.971 13.267 14.772 13.565C14.575 13.862 14.005 14.531 13.832 14.729C13.659 14.928 13.485 14.952 13.188 14.804C12.891 14.654 11.933 14.341 10.798 13.329C9.915 12.541 9.318 11.568 9.145 11.27C8.972 10.973 9.127 10.812 9.275 10.664C9.409 10.531 9.573 10.317 9.721 10.144C9.87 9.97 9.919 9.846 10.019 9.647C10.118 9.449 10.069 9.276 9.994 9.127C9.919 8.978 9.325 7.515 9.078 6.92C8.836 6.341 8.591 6.42 8.409 6.41C8.236 6.402 8.038 6.4 7.839 6.4C7.641 6.4 7.319 6.474 7.047 6.772C6.775 7.069 6.007 7.788 6.007 9.251C6.007 10.713 7.072 12.126 7.22 12.325C7.369 12.523 9.316 15.525 12.297 16.812C13.006 17.118 13.559 17.301 13.991 17.437C14.703 17.664 15.351 17.632 15.862 17.555C16.433 17.47 17.62 16.836 17.868 16.142C18.116 15.448 18.116 14.853 18.041 14.729C17.967 14.605 17.769 14.531 17.471 14.382M12.05 21.785L12.046 21.785C10.276 21.785 8.538 21.309 7.015 20.407L6.654 20.193L2.913 21.175L3.911 17.527L3.676 17.153C2.686 15.577 2.163 13.754 2.166 11.893C2.167 6.443 6.602 2.009 12.054 2.009C14.694 2.009 17.176 3.039 19.042 4.907C20.902 6.758 21.943 9.277 21.935 11.901C21.932 17.351 17.498 21.785 12.05 21.785M20.463 3.488C18.237 1.248 15.208 -0.008 12.05 0C5.495 0 0.16 5.335 0.157 11.892C0.157 13.988 0.704 16.034 1.745 17.837L0.057 24L6.362 22.346C8.106 23.296 10.059 23.794 12.045 23.794L12.05 23.794C18.604 23.794 23.94 18.459 23.943 11.901C23.953 8.745 22.7 5.715 20.463 3.488Z"
|
|
13933
|
+
],
|
|
13934
|
+
"style": "filled",
|
|
13935
|
+
"source": "simple-icons/whatsapp",
|
|
13936
|
+
"license": "CC0-1.0",
|
|
13937
|
+
"libVersion": "16.36.0"
|
|
13938
|
+
},
|
|
13926
13939
|
"wifi": {
|
|
13927
13940
|
"category": "status",
|
|
13928
13941
|
"path": [
|
|
@@ -14092,6 +14105,7 @@ var ICON_NORMALIZED_INDEX = {
|
|
|
14092
14105
|
"eye": "visible",
|
|
14093
14106
|
"volume": "volume",
|
|
14094
14107
|
"warning": "warning",
|
|
14108
|
+
"whatsapp": "whatsapp",
|
|
14095
14109
|
"wifi": "wifi",
|
|
14096
14110
|
"unknown": "_unknown"
|
|
14097
14111
|
};
|
|
@@ -14232,6 +14246,7 @@ var ICON_NAMES = [
|
|
|
14232
14246
|
"visible",
|
|
14233
14247
|
"volume",
|
|
14234
14248
|
"warning",
|
|
14249
|
+
"whatsapp",
|
|
14235
14250
|
"wifi",
|
|
14236
14251
|
"xmark"
|
|
14237
14252
|
];
|
|
@@ -14499,6 +14514,18 @@ var AppRegistryClient = class {
|
|
|
14499
14514
|
}
|
|
14500
14515
|
};
|
|
14501
14516
|
|
|
14517
|
+
// ../../core/ts/src/himi-package.ts
|
|
14518
|
+
var SCREEN_ID_RE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
14519
|
+
function isSafePackageSegment(id) {
|
|
14520
|
+
return SCREEN_ID_RE.test(id);
|
|
14521
|
+
}
|
|
14522
|
+
var DEFAULT_HIMI_PACKAGE_ARCHIVE_LIMITS = {
|
|
14523
|
+
maxCompressedBytes: 64 * 1024 * 1024,
|
|
14524
|
+
maxExpandedBytes: 256 * 1024 * 1024,
|
|
14525
|
+
maxEntries: 1e4,
|
|
14526
|
+
maxDecompressionRatio: 1e3
|
|
14527
|
+
};
|
|
14528
|
+
|
|
14502
14529
|
// ../../core/ts/src/site-screen-form.ts
|
|
14503
14530
|
var isRec = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
14504
14531
|
var DUAL_FORM_T3_RENDERER = "webview_native_bridge";
|
|
@@ -15129,6 +15156,10 @@ function assertSiteKind(kind) {
|
|
|
15129
15156
|
}
|
|
15130
15157
|
}
|
|
15131
15158
|
var SITE_LAYOUTS = ["auto", "tabs", "drawer", "sidebar", "single"];
|
|
15159
|
+
var SITE_PAGE_TITLES = ["auto", "always", "never"];
|
|
15160
|
+
var SITE_TOP_BAR_MAX_ACTIONS = 3;
|
|
15161
|
+
var SITE_BUILTIN_NATIVE_SCREENS = ["himi_notification_settings", "himi_account", "himi_base44_account"];
|
|
15162
|
+
var SITE_PRIVATE_NATIVE_SCREENS = ["himi_delete_account"];
|
|
15132
15163
|
var SITE_SHELL_MAX_TABS = 4;
|
|
15133
15164
|
var SITE_SCREEN_PREFIX = "site_";
|
|
15134
15165
|
var SITE_PAGE_SCREEN_ID = "site_page";
|
|
@@ -15250,6 +15281,22 @@ function siteWebViewPreset(site) {
|
|
|
15250
15281
|
keepAlive: true
|
|
15251
15282
|
};
|
|
15252
15283
|
}
|
|
15284
|
+
function sitePageShowsTitle(site, page) {
|
|
15285
|
+
if (page?.showTitle !== void 0) return page.showTitle;
|
|
15286
|
+
const rule = site.pageTitle ?? "auto";
|
|
15287
|
+
if (rule === "always") return true;
|
|
15288
|
+
if (rule === "never") return false;
|
|
15289
|
+
if (site.menuSource === "runtime") return true;
|
|
15290
|
+
return page === void 0 || (page.placement ?? "tab") === "overflow";
|
|
15291
|
+
}
|
|
15292
|
+
function siteScreenTopBar(site, showsTitle, pageId) {
|
|
15293
|
+
const opensSelf = (action) => pageId !== void 0 && action.target.page === pageId;
|
|
15294
|
+
const actions = site.topBar?.actions ?? [];
|
|
15295
|
+
if (showsTitle && !actions.some(opensSelf)) return void 0;
|
|
15296
|
+
const bar = siteTopBarDefault(site, { requireTab: false });
|
|
15297
|
+
const kept = bar?.actions?.filter((_, i) => !opensSelf(actions[i])) ?? [];
|
|
15298
|
+
return { ...kept.length > 0 ? { actions: kept } : {}, ...showsTitle ? {} : { titleDisplay: "hidden" } };
|
|
15299
|
+
}
|
|
15253
15300
|
function enforceSiteKind(site, config) {
|
|
15254
15301
|
if (site.kind !== "web") return config;
|
|
15255
15302
|
const { hostedSiteAdapter: _adapter, sessionBridge: _bridge, ...rest } = config;
|
|
@@ -15258,6 +15305,7 @@ function enforceSiteKind(site, config) {
|
|
|
15258
15305
|
function defineSiteTab(site, page) {
|
|
15259
15306
|
assertSitePage(page);
|
|
15260
15307
|
const preset = siteWebViewPreset(site);
|
|
15308
|
+
const topBar = siteScreenTopBar(site, sitePageShowsTitle(site, page), page.id);
|
|
15261
15309
|
return {
|
|
15262
15310
|
screenId: siteScreenId(page),
|
|
15263
15311
|
renderer: "webview_native_bridge",
|
|
@@ -15267,7 +15315,8 @@ function defineSiteTab(site, page) {
|
|
|
15267
15315
|
schemaVersion: 1,
|
|
15268
15316
|
// Wix serves page HTML `no-cache`; the descriptor itself is cheap to revalidate.
|
|
15269
15317
|
cacheControl: { maxAge: 600, staleWhileRevalidate: 86400 },
|
|
15270
|
-
webViewConfig: enforceSiteKind(site, { ...preset, ...page.webView ?? {} })
|
|
15318
|
+
webViewConfig: enforceSiteKind(site, { ...preset, ...page.webView ?? {} }),
|
|
15319
|
+
...topBar ? { topBar } : {}
|
|
15271
15320
|
};
|
|
15272
15321
|
}
|
|
15273
15322
|
function defineSitePageScreen(site) {
|
|
@@ -15280,7 +15329,8 @@ function defineSitePageScreen(site) {
|
|
|
15280
15329
|
capabilitiesRequired: [],
|
|
15281
15330
|
schemaVersion: 1,
|
|
15282
15331
|
cacheControl: { maxAge: 600, staleWhileRevalidate: 86400 },
|
|
15283
|
-
webViewConfig: { ...preset, keepAlive: false }
|
|
15332
|
+
webViewConfig: { ...preset, keepAlive: false },
|
|
15333
|
+
.../* @__PURE__ */ ((topBar) => topBar ? { topBar } : {})(siteScreenTopBar(site, sitePageShowsTitle(site)))
|
|
15284
15334
|
};
|
|
15285
15335
|
}
|
|
15286
15336
|
var SITE_PAGE_NODE_ID = "site_page_view";
|
|
@@ -15384,8 +15434,8 @@ function siteNavConfig(site) {
|
|
|
15384
15434
|
...site.menuSource === "runtime" ? { menuSource: "runtime" } : {}
|
|
15385
15435
|
};
|
|
15386
15436
|
}
|
|
15387
|
-
function siteLinkableScreens(site) {
|
|
15388
|
-
const tabIds =
|
|
15437
|
+
function siteLinkableScreens(site, opts) {
|
|
15438
|
+
const tabIds = siteSelectableTabIds(site, siteNav(site, opts).tabs);
|
|
15389
15439
|
const pages = site.pages.map((page) => ({
|
|
15390
15440
|
screenId: siteScreenId(page),
|
|
15391
15441
|
isPublic: true,
|
|
@@ -15393,7 +15443,22 @@ function siteLinkableScreens(site) {
|
|
|
15393
15443
|
parentScreenId: "",
|
|
15394
15444
|
tabId: tabIds.has(page.id) ? page.id : ""
|
|
15395
15445
|
}));
|
|
15396
|
-
|
|
15446
|
+
const native = (site.nativePages ?? []).map((page) => ({
|
|
15447
|
+
screenId: page.screenId,
|
|
15448
|
+
// `requiresAuth` implies `public`: the sign-in gate is for an outside link, which a private screen
|
|
15449
|
+
// never receives.
|
|
15450
|
+
isPublic: page.public ?? (page.requiresAuth === true || SITE_BUILTIN_NATIVE_SCREENS.includes(page.screenId)),
|
|
15451
|
+
paramKeys: [],
|
|
15452
|
+
parentScreenId: "",
|
|
15453
|
+
tabId: tabIds.has(page.id) ? page.id : "",
|
|
15454
|
+
...page.requiresAuth ? { requiresAuth: true } : {}
|
|
15455
|
+
}));
|
|
15456
|
+
return [...pages, ...native, { screenId: SITE_PAGE_SCREEN_ID, isPublic: true, paramKeys: [], parentScreenId: "", tabId: "" }];
|
|
15457
|
+
}
|
|
15458
|
+
function siteSelectableTabIds(site, tabs) {
|
|
15459
|
+
const layout = site.layout ?? "auto";
|
|
15460
|
+
const noTabBar = layout === "drawer" || layout === "single" || layout === "auto" && tabs.length <= 1;
|
|
15461
|
+
return new Set((noTabBar ? tabs.slice(0, 1) : tabs).map((tab) => tab.id));
|
|
15397
15462
|
}
|
|
15398
15463
|
function pathSegments(path) {
|
|
15399
15464
|
return path.split("/").filter(Boolean);
|
|
@@ -15461,26 +15526,142 @@ function siteNavKind(site) {
|
|
|
15461
15526
|
throw new Error(`site layout ${JSON.stringify(layout)} must be one of ${SITE_LAYOUTS.join(", ")}`);
|
|
15462
15527
|
}
|
|
15463
15528
|
}
|
|
15464
|
-
function siteSidebar(site) {
|
|
15465
|
-
assertSiteShellConfig(site);
|
|
15466
|
-
return site.
|
|
15529
|
+
function siteSidebar(site, opts) {
|
|
15530
|
+
assertSiteShellConfig(site, opts);
|
|
15531
|
+
return siteNavEntries(site).filter((entry) => entry.placement !== "overflow").map((entry) => ({ id: entry.id, screenId: entry.screenId, label: entry.title, icon: entry.icon }));
|
|
15532
|
+
}
|
|
15533
|
+
function siteNavEntries(site) {
|
|
15534
|
+
const entries = site.pages.map((page) => ({
|
|
15535
|
+
id: page.id,
|
|
15536
|
+
screenId: siteScreenId(page),
|
|
15537
|
+
title: page.title,
|
|
15538
|
+
icon: page.icon ?? "globe",
|
|
15539
|
+
placement: page.placement ?? "tab",
|
|
15540
|
+
native: false
|
|
15541
|
+
}));
|
|
15542
|
+
for (const page of site.nativePages ?? []) {
|
|
15543
|
+
const entry = {
|
|
15544
|
+
id: page.id,
|
|
15545
|
+
screenId: page.screenId,
|
|
15546
|
+
title: page.title,
|
|
15547
|
+
icon: page.icon ?? "grid",
|
|
15548
|
+
placement: page.placement ?? "tab",
|
|
15549
|
+
native: true
|
|
15550
|
+
};
|
|
15551
|
+
if (page.after === void 0) {
|
|
15552
|
+
entries.push(entry);
|
|
15553
|
+
continue;
|
|
15554
|
+
}
|
|
15555
|
+
let at = entries.findIndex((e) => e.id === page.after) + 1;
|
|
15556
|
+
while (at < entries.length && entries[at].native) at += 1;
|
|
15557
|
+
entries.splice(at, 0, entry);
|
|
15558
|
+
}
|
|
15559
|
+
return entries.map(({ native: _native, ...entry }) => entry);
|
|
15467
15560
|
}
|
|
15468
15561
|
function siteNav(site, opts) {
|
|
15469
15562
|
assertSiteShellConfig(site, opts);
|
|
15470
15563
|
const tabs = [];
|
|
15471
15564
|
const drawer = [];
|
|
15472
|
-
for (const
|
|
15473
|
-
const
|
|
15474
|
-
const icon = page.icon ?? "globe";
|
|
15565
|
+
for (const entry of siteNavEntries(site)) {
|
|
15566
|
+
const { id, screenId, title: label2, icon, placement } = entry;
|
|
15475
15567
|
if (placement === "tab" && tabs.length < SITE_SHELL_MAX_TABS) {
|
|
15476
|
-
tabs.push({ id
|
|
15568
|
+
tabs.push({ id, screenId, label: label2, icon });
|
|
15477
15569
|
}
|
|
15478
15570
|
if (placement !== "overflow") {
|
|
15479
|
-
drawer.push({ id: `drawer_${
|
|
15571
|
+
drawer.push({ id: `drawer_${id}`, screenId, label: label2, icon });
|
|
15480
15572
|
}
|
|
15481
15573
|
}
|
|
15482
15574
|
return { tabs, drawer };
|
|
15483
15575
|
}
|
|
15576
|
+
function assertSiteNativePagesBuilt(site, screenIds) {
|
|
15577
|
+
const built = new Set(screenIds);
|
|
15578
|
+
const missing = (site.nativePages ?? []).filter((page) => !built.has(page.screenId));
|
|
15579
|
+
if (missing.length > 0) {
|
|
15580
|
+
throw new Error(
|
|
15581
|
+
`site nativePages place screens the app does not build: ${missing.map((p) => `${p.id} \u2192 ${p.screenId}`).join(", ")} \u2014 add each screen to dev/index.ts (screens.exact), or fix its screenId`
|
|
15582
|
+
);
|
|
15583
|
+
}
|
|
15584
|
+
}
|
|
15585
|
+
function assertSiteNativePagesAuth(site, gatedSignIn) {
|
|
15586
|
+
if (gatedSignIn) return;
|
|
15587
|
+
const gated = (site.nativePages ?? []).filter((page) => page.requiresAuth);
|
|
15588
|
+
if (gated.length > 0) {
|
|
15589
|
+
throw new Error(
|
|
15590
|
+
`site nativePages ${gated.map((p) => JSON.stringify(p.id)).join(", ")} set requiresAuth, but this app has no sign-in that gates deep links (only a wix member binding does; a base44 sign-in does not yet): the screen would open signed out. Add a wix binding, or drop requiresAuth`
|
|
15591
|
+
);
|
|
15592
|
+
}
|
|
15593
|
+
}
|
|
15594
|
+
function siteNativeScreenTopBar(site, screenId, opts) {
|
|
15595
|
+
const actions = site.topBar?.actions ?? [];
|
|
15596
|
+
const opensSelf = (action) => action.target.screen === screenId;
|
|
15597
|
+
if (!actions.some(opensSelf)) return void 0;
|
|
15598
|
+
const bar = siteTopBarDefault(site, { requireTab: false, ...opts });
|
|
15599
|
+
const kept = bar?.actions?.filter((_, i) => !opensSelf(actions[i])) ?? [];
|
|
15600
|
+
return kept.length > 0 ? { actions: kept } : {};
|
|
15601
|
+
}
|
|
15602
|
+
function withSiteNativeScreenTopBar(site, descriptor, opts) {
|
|
15603
|
+
const d = descriptor;
|
|
15604
|
+
if (!d || typeof d.screenId !== "string" || d.topBar !== void 0) return descriptor;
|
|
15605
|
+
const topBar = siteNativeScreenTopBar(site, d.screenId, opts);
|
|
15606
|
+
return topBar ? { ...d, topBar } : descriptor;
|
|
15607
|
+
}
|
|
15608
|
+
function withSiteNativeScreenTopBarBuilder(site, build, opts) {
|
|
15609
|
+
return (ctx) => {
|
|
15610
|
+
const built = build(ctx);
|
|
15611
|
+
if (built && typeof built.then === "function") {
|
|
15612
|
+
return built.then((d) => withSiteNativeScreenTopBar(site, d, opts));
|
|
15613
|
+
}
|
|
15614
|
+
return withSiteNativeScreenTopBar(site, built, opts);
|
|
15615
|
+
};
|
|
15616
|
+
}
|
|
15617
|
+
function openRowAction(tabId, screenId) {
|
|
15618
|
+
return tabId ? { actionId: "himi.tab", params: { tab: tabId } } : { actionId: "himi.open", params: { screenId } };
|
|
15619
|
+
}
|
|
15620
|
+
function externalUrlAction(url) {
|
|
15621
|
+
return {
|
|
15622
|
+
actionId: "himi.open",
|
|
15623
|
+
presentation: "alert",
|
|
15624
|
+
params: { url, mode: "system_browser" },
|
|
15625
|
+
args: {
|
|
15626
|
+
title: "Open in browser?",
|
|
15627
|
+
message: `This link opens ${new URL(url).host} outside the app.`,
|
|
15628
|
+
confirmActionId: "capability.open_url.open",
|
|
15629
|
+
confirmLabel: "Open",
|
|
15630
|
+
cancelLabel: "Cancel"
|
|
15631
|
+
}
|
|
15632
|
+
};
|
|
15633
|
+
}
|
|
15634
|
+
function siteTopBarDefault(site, opts) {
|
|
15635
|
+
const nav = siteNav(site, opts);
|
|
15636
|
+
const actions = site.topBar?.actions ?? [];
|
|
15637
|
+
if (actions.length === 0) return void 0;
|
|
15638
|
+
const layout = site.layout ?? "auto";
|
|
15639
|
+
const noTabBar = layout === "drawer" || layout === "single" || layout === "auto" && nav.tabs.length <= 1;
|
|
15640
|
+
const tabIds = new Set(noTabBar ? [] : nav.tabs.map((tab) => tab.id));
|
|
15641
|
+
if (site.menuSource === "runtime") for (const page of site.pages) tabIds.delete(page.id);
|
|
15642
|
+
const available = opts?.nativeScreens;
|
|
15643
|
+
return {
|
|
15644
|
+
actions: actions.map((action) => {
|
|
15645
|
+
const target = action.target;
|
|
15646
|
+
let onTap;
|
|
15647
|
+
if (target.page !== void 0) {
|
|
15648
|
+
const page = site.pages.find((p) => p.id === target.page);
|
|
15649
|
+
onTap = openRowAction(tabIds.has(page.id) ? page.id : void 0, siteScreenId(page));
|
|
15650
|
+
} else if (target.screen !== void 0) {
|
|
15651
|
+
const native = (site.nativePages ?? []).find((p) => p.screenId === target.screen);
|
|
15652
|
+
if (!native && available && !available.includes(target.screen)) {
|
|
15653
|
+
throw new Error(
|
|
15654
|
+
`site topBar action ${action.id}: screen ${JSON.stringify(target.screen)} is neither a native page nor one of this shell's native screens (${available.join(", ") || "none"})`
|
|
15655
|
+
);
|
|
15656
|
+
}
|
|
15657
|
+
onTap = openRowAction(native && tabIds.has(native.id) ? native.id : void 0, target.screen);
|
|
15658
|
+
} else {
|
|
15659
|
+
onTap = externalUrlAction(target.url);
|
|
15660
|
+
}
|
|
15661
|
+
return { id: action.id, icon: action.icon, accessibilityLabel: action.label, onTap };
|
|
15662
|
+
})
|
|
15663
|
+
};
|
|
15664
|
+
}
|
|
15484
15665
|
function assertSitePage(page) {
|
|
15485
15666
|
if (!page || typeof page.id !== "string" || !PAGE_ID.test(page.id)) {
|
|
15486
15667
|
throw new Error(`site page id ${JSON.stringify(page?.id)} must match ${PAGE_ID}`);
|
|
@@ -15524,6 +15705,127 @@ function assertSiteShellConfig(site, opts) {
|
|
|
15524
15705
|
if (opts?.requireTab !== false && !site.pages.some((page) => (page.placement ?? "tab") === "tab")) {
|
|
15525
15706
|
throw new Error('a site shell needs at least one page with placement "tab"');
|
|
15526
15707
|
}
|
|
15708
|
+
assertSiteNativePages(site);
|
|
15709
|
+
assertSiteTopBar(site);
|
|
15710
|
+
if (site.pageTitle !== void 0 && !SITE_PAGE_TITLES.includes(site.pageTitle)) {
|
|
15711
|
+
throw new Error(`site pageTitle ${JSON.stringify(site.pageTitle)} must be one of ${SITE_PAGE_TITLES.join(", ")}`);
|
|
15712
|
+
}
|
|
15713
|
+
for (const page of site.pages) {
|
|
15714
|
+
if (page.showTitle !== void 0 && typeof page.showTitle !== "boolean") {
|
|
15715
|
+
throw new Error(`site page ${page.id}: showTitle must be a boolean`);
|
|
15716
|
+
}
|
|
15717
|
+
}
|
|
15718
|
+
}
|
|
15719
|
+
var PLACEMENTS = ["tab", "drawer", "overflow"];
|
|
15720
|
+
var ICONS = new Set(ICON_NAMES);
|
|
15721
|
+
function assertSiteNativePages(site) {
|
|
15722
|
+
if (site.nativePages === void 0) return;
|
|
15723
|
+
if (!Array.isArray(site.nativePages)) throw new Error("site nativePages must be an array");
|
|
15724
|
+
const ids = new Set(site.pages.map((page) => page.id));
|
|
15725
|
+
const screenIds = /* @__PURE__ */ new Set();
|
|
15726
|
+
for (const page of site.nativePages) {
|
|
15727
|
+
const where = `site native page ${JSON.stringify(page?.id)}`;
|
|
15728
|
+
if (!page || typeof page.id !== "string" || !PAGE_ID.test(page.id)) {
|
|
15729
|
+
throw new Error(`site native page id ${JSON.stringify(page?.id)} must match ${PAGE_ID}`);
|
|
15730
|
+
}
|
|
15731
|
+
if (page.id.startsWith("drawer_")) {
|
|
15732
|
+
throw new Error(`${where} must not start with "drawer_" (reserved for drawer and native rows)`);
|
|
15733
|
+
}
|
|
15734
|
+
if (site.pages.some((p) => p.id === page.id)) {
|
|
15735
|
+
throw new Error(`${where} shares its id with a site page \u2014 a native page and a site page need distinct ids`);
|
|
15736
|
+
}
|
|
15737
|
+
if (ids.has(page.id)) throw new Error(`site native page id ${page.id} is declared twice`);
|
|
15738
|
+
if (typeof page.screenId !== "string" || !isSafePackageSegment(page.screenId)) {
|
|
15739
|
+
throw new Error(`${where}: screenId ${JSON.stringify(page.screenId)} is not a valid screen id ([A-Za-z0-9][A-Za-z0-9._-]{0,127})`);
|
|
15740
|
+
}
|
|
15741
|
+
if (page.screenId.startsWith(SITE_SCREEN_PREFIX)) {
|
|
15742
|
+
throw new Error(`${where}: screenId ${JSON.stringify(page.screenId)} must not start with "${SITE_SCREEN_PREFIX}" (the site pages' screens)`);
|
|
15743
|
+
}
|
|
15744
|
+
if (screenIds.has(page.screenId)) throw new Error(`${where}: screen ${page.screenId} is already placed by another native page`);
|
|
15745
|
+
if (SITE_PRIVATE_NATIVE_SCREENS.includes(page.screenId)) {
|
|
15746
|
+
throw new Error(`${where}: screen ${page.screenId} is private (reached from its parent screen, never placed or linked)`);
|
|
15747
|
+
}
|
|
15748
|
+
for (const key of ["public", "requiresAuth"]) {
|
|
15749
|
+
if (page[key] !== void 0 && typeof page[key] !== "boolean") throw new Error(`${where}: ${key} must be a boolean`);
|
|
15750
|
+
}
|
|
15751
|
+
if (page.requiresAuth && page.public === false) throw new Error(`${where}: requiresAuth applies to a public page only`);
|
|
15752
|
+
if (typeof page.title !== "string" || !page.title.trim()) throw new Error(`${where} needs a title`);
|
|
15753
|
+
if (page.icon !== void 0 && !ICONS.has(page.icon)) {
|
|
15754
|
+
throw new Error(`${where}: icon ${JSON.stringify(page.icon)} is not a design-system icon`);
|
|
15755
|
+
}
|
|
15756
|
+
if (page.placement !== void 0 && !PLACEMENTS.includes(page.placement)) {
|
|
15757
|
+
throw new Error(`${where}: placement must be one of ${PLACEMENTS.join(", ")}`);
|
|
15758
|
+
}
|
|
15759
|
+
if (page.after !== void 0 && !ids.has(page.after)) {
|
|
15760
|
+
throw new Error(`${where}: after ${JSON.stringify(page.after)} must name a site page or an earlier native page`);
|
|
15761
|
+
}
|
|
15762
|
+
ids.add(page.id);
|
|
15763
|
+
screenIds.add(page.screenId);
|
|
15764
|
+
}
|
|
15765
|
+
const firstTab = siteNavEntries(site).find((entry) => entry.placement === "tab");
|
|
15766
|
+
const native = site.nativePages.find((page) => page.id === firstTab?.id);
|
|
15767
|
+
if (native && site.pages.some((page) => (page.placement ?? "tab") === "tab")) {
|
|
15768
|
+
throw new Error(`site native page ${JSON.stringify(native.id)} would be the first tab, ahead of every site tab page \u2014 give it an \`after\` that names a tab page`);
|
|
15769
|
+
}
|
|
15770
|
+
}
|
|
15771
|
+
function assertSiteTopBar(site) {
|
|
15772
|
+
if (site.topBar === void 0) return;
|
|
15773
|
+
if (!site.topBar || typeof site.topBar !== "object" || Array.isArray(site.topBar)) throw new Error("site topBar must be an object");
|
|
15774
|
+
const actions = site.topBar.actions ?? [];
|
|
15775
|
+
if (!Array.isArray(actions)) throw new Error("site topBar.actions must be an array");
|
|
15776
|
+
if (actions.length > SITE_TOP_BAR_MAX_ACTIONS) {
|
|
15777
|
+
throw new Error(`site topBar.actions has ${actions.length} icons; at most ${SITE_TOP_BAR_MAX_ACTIONS} fit beside the title`);
|
|
15778
|
+
}
|
|
15779
|
+
const seen = /* @__PURE__ */ new Set();
|
|
15780
|
+
const nativeScreens = new Set((site.nativePages ?? []).map((page) => page.screenId));
|
|
15781
|
+
for (const action of actions) {
|
|
15782
|
+
if (!action || typeof action.id !== "string" || !PAGE_ID.test(action.id)) {
|
|
15783
|
+
throw new Error(`site topBar action id ${JSON.stringify(action?.id)} must match ${PAGE_ID}`);
|
|
15784
|
+
}
|
|
15785
|
+
const where = `site topBar action ${action.id}`;
|
|
15786
|
+
if (seen.has(action.id)) throw new Error(`site topBar action id ${action.id} is declared twice`);
|
|
15787
|
+
seen.add(action.id);
|
|
15788
|
+
if (typeof action.icon !== "string" || !ICONS.has(action.icon)) {
|
|
15789
|
+
throw new Error(`${where}: icon ${JSON.stringify(action.icon)} is not a design-system icon`);
|
|
15790
|
+
}
|
|
15791
|
+
if (typeof action.label !== "string" || !action.label.trim()) {
|
|
15792
|
+
throw new Error(`${where} needs a label (the icon's accessible name)`);
|
|
15793
|
+
}
|
|
15794
|
+
const target = action.target;
|
|
15795
|
+
const keys = target && typeof target === "object" && !Array.isArray(target) ? Object.keys(target) : [];
|
|
15796
|
+
if (keys.length !== 1 || !["page", "screen", "url"].includes(keys[0]) || typeof target[keys[0]] !== "string") {
|
|
15797
|
+
throw new Error(`${where}: target must be exactly one of { page }, { screen } or { url }, got ${JSON.stringify(action.target)}`);
|
|
15798
|
+
}
|
|
15799
|
+
const value = target[keys[0]];
|
|
15800
|
+
if (keys[0] === "page" && !site.pages.some((page) => page.id === value)) {
|
|
15801
|
+
throw new Error(`${where}: target page ${JSON.stringify(value)} is not a site page id`);
|
|
15802
|
+
}
|
|
15803
|
+
if (keys[0] === "screen" && !nativeScreens.has(value) && !SITE_BUILTIN_NATIVE_SCREENS.includes(value)) {
|
|
15804
|
+
throw new Error(
|
|
15805
|
+
`${where}: target screen ${JSON.stringify(value)} is neither a native page's screenId nor a built-in native screen (${SITE_BUILTIN_NATIVE_SCREENS.join(", ")})`
|
|
15806
|
+
);
|
|
15807
|
+
}
|
|
15808
|
+
if (keys[0] === "url") assertExternalUrl(site, value, where);
|
|
15809
|
+
}
|
|
15810
|
+
}
|
|
15811
|
+
function assertExternalUrl(site, value, where) {
|
|
15812
|
+
let url;
|
|
15813
|
+
try {
|
|
15814
|
+
url = new URL(value);
|
|
15815
|
+
} catch {
|
|
15816
|
+
throw new Error(`${where}: target url ${JSON.stringify(value)} is not a URL`);
|
|
15817
|
+
}
|
|
15818
|
+
if (url.protocol !== "https:" || url.username || url.password || !url.host) {
|
|
15819
|
+
throw new Error(`${where}: target url ${JSON.stringify(value)} must be https without credentials`);
|
|
15820
|
+
}
|
|
15821
|
+
const rawPath = value.replace(/^[a-z][a-z0-9+.-]*:\/\/[^/?#]*/i, "").split(/[?#]/, 1)[0] ?? "";
|
|
15822
|
+
if (rawPath.split("/").some((seg) => /^(\.|%2e){1,2}$/i.test(seg))) {
|
|
15823
|
+
throw new Error(`${where}: target url ${JSON.stringify(value)} must not contain "." or ".." path segments`);
|
|
15824
|
+
}
|
|
15825
|
+
const onSite = resolveSiteLink(value, { origins: siteAllowedOrigins(site.origin, site.kind), routes: [], fallbackScreenId: SITE_PAGE_SCREEN_ID });
|
|
15826
|
+
if (onSite) {
|
|
15827
|
+
throw new Error(`${where}: target url ${JSON.stringify(value)} is on the site itself \u2014 declare it as a page (placement "overflow" for no row) and target { page }`);
|
|
15828
|
+
}
|
|
15527
15829
|
}
|
|
15528
15830
|
|
|
15529
15831
|
// ../../core/ts/src/site-web-sdk.generated.ts
|
|
@@ -15901,6 +16203,7 @@ export {
|
|
|
15901
16203
|
RICH_CONTENT_EDITOR_TOOLS,
|
|
15902
16204
|
RTL_LOCALES,
|
|
15903
16205
|
SIDEBAR_RAIL_WIDTH,
|
|
16206
|
+
SITE_BUILTIN_NATIVE_SCREENS,
|
|
15904
16207
|
SITE_KINDS,
|
|
15905
16208
|
SITE_LAYOUTS,
|
|
15906
16209
|
SITE_MENU_DEFAULT_ICON,
|
|
@@ -15921,9 +16224,12 @@ export {
|
|
|
15921
16224
|
SITE_NODE_SCREEN_RENDERER,
|
|
15922
16225
|
SITE_PAGE_NODE_ID,
|
|
15923
16226
|
SITE_PAGE_SCREEN_ID,
|
|
16227
|
+
SITE_PAGE_TITLES,
|
|
16228
|
+
SITE_PRIVATE_NATIVE_SCREENS,
|
|
15924
16229
|
SITE_SCREEN_FORMS,
|
|
15925
16230
|
SITE_SCREEN_PREFIX,
|
|
15926
16231
|
SITE_SHELL_MAX_TABS,
|
|
16232
|
+
SITE_TOP_BAR_MAX_ACTIONS,
|
|
15927
16233
|
SITE_WEB_SDK_GENERATED_PREFIX,
|
|
15928
16234
|
SITE_WEB_SDK_HEALTH_BUNDLE,
|
|
15929
16235
|
SIZE_CLASS_BREAKPOINTS,
|
|
@@ -15952,6 +16258,8 @@ export {
|
|
|
15952
16258
|
appLogicBundleConflict,
|
|
15953
16259
|
appLogicBundleRef,
|
|
15954
16260
|
appServicesAllowed,
|
|
16261
|
+
assertSiteNativePagesAuth,
|
|
16262
|
+
assertSiteNativePagesBuilt,
|
|
15955
16263
|
assertSiteShellConfig,
|
|
15956
16264
|
availableLocales,
|
|
15957
16265
|
bakeLegacyImport,
|
|
@@ -16062,15 +16370,18 @@ export {
|
|
|
16062
16370
|
siteMenuIsRuntime,
|
|
16063
16371
|
siteMenuPath,
|
|
16064
16372
|
siteMenuPathKey,
|
|
16373
|
+
siteNativeScreenTopBar,
|
|
16065
16374
|
siteNav,
|
|
16066
16375
|
siteNavConfig,
|
|
16067
16376
|
siteNavKind,
|
|
16068
16377
|
siteOriginsAdmit,
|
|
16069
16378
|
sitePageNode,
|
|
16379
|
+
sitePageShowsTitle,
|
|
16070
16380
|
sitePageUrl,
|
|
16071
16381
|
siteScreenId,
|
|
16072
16382
|
siteScreens,
|
|
16073
16383
|
siteSidebar,
|
|
16384
|
+
siteTopBarDefault,
|
|
16074
16385
|
siteWebSdkBundleName,
|
|
16075
16386
|
siteWebSdkCompanion,
|
|
16076
16387
|
siteWebViewPreset,
|
|
@@ -16100,6 +16411,8 @@ export {
|
|
|
16100
16411
|
webViewOriginAllowed,
|
|
16101
16412
|
webViewSiteTrustAppFindings,
|
|
16102
16413
|
widgetSnapshotSchema,
|
|
16414
|
+
withSiteNativeScreenTopBar,
|
|
16415
|
+
withSiteNativeScreenTopBarBuilder,
|
|
16103
16416
|
withSiteWebSdk,
|
|
16104
16417
|
workerSubtreePolicyErrors,
|
|
16105
16418
|
workerSubtreeSha256,
|