@wix/himalaya-cli 0.1830.0 → 0.1831.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/iap-checkout.mjs +6 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +6 -2
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{990204a4cb9e61e96206131bbaeb9401543753fd5301735b5029eb6906921329.bin → 70836790496f742deee3b0e0c83394af3b9fc275d091c6497786d90201392cf4.bin} +1 -1
- package/dist/browser-plane/sw.js +8 -8
- package/dist/cli.mjs +1219 -1072
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/designing-himi-screens.md +46 -18
- package/guides/getting-started.md +1 -1
- package/guides/himi-skill.md +1 -1
- package/guides/index.json +6 -0
- package/guides/skill.md +1 -0
- package/guides/web-ux.md +134 -0
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +4 -0
- package/templates/beauty-salon/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +1 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +4 -1
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +5 -2
- package/templates/branded-lite/dev/index.ts +7 -0
- package/templates/branded-lite/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +4 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +5 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-video/index.ts +4 -4
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +5 -2
- package/templates/community-club/dev/index.ts +1 -0
- package/templates/community-club/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/conference/dev/index.ts +2 -0
- package/templates/conference/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/events-meetups/dev/index.ts +1 -0
- package/templates/events-meetups/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/fitness-gym/dev/index.ts +2 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/fitness-gym/tier5-src/himi-booking-time/index.ts +1 -1
- package/templates/fitness-gym/tier5-src/himi-branded-lite-plans/index.ts +4 -1
- package/templates/fitness-gym/tier5-src/himi-branded-lite-program/index.ts +5 -2
- package/templates/gym-fitness/dev/index.ts +5 -0
- package/templates/gym-fitness/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +4 -1
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +5 -2
- package/templates/medical-services/dev/index.ts +2 -0
- package/templates/medical-services/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/medical-services/tier5-src/himi-booking-time/index.ts +1 -1
- package/templates/nonprofit-cause/dev/index.ts +2 -0
- package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +4 -1
- package/templates/personal-fitness-trainer/dev/index.ts +4 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/personal-fitness-trainer/tier5-src/himi-booking-time/index.ts +1 -1
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-plans/index.ts +4 -1
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-video/index.ts +4 -4
- package/templates/podcast-creator/dev/index.ts +2 -0
- package/templates/podcast-creator/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +4 -1
- package/templates/portfolio-creative/dev/index.ts +2 -0
- package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +5 -2
- package/templates/restaurant/dev/index.ts +1 -0
- package/templates/restaurant/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/retail-store/dev/index.ts +1 -0
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +5 -2
- package/templates/salon-spa/dev/index.ts +2 -0
- package/templates/salon-spa/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/salon-spa/tier5-src/himi-booking-time/index.ts +1 -1
- package/templates/wholesale-store/dev/index.ts +1 -0
- package/templates/wholesale-store/tier5-src/himi-store-product/index.ts +5 -2
- package/templates/yoga-studio/dev/index.ts +5 -0
- package/templates/yoga-studio/tier5-src/_shared/iap-attendance-purchase.ts +21 -2
- package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +4 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +5 -2
|
Binary file
|
|
@@ -99,6 +99,8 @@ they decide what a phone screen looks like, and this guide decides how to compos
|
|
|
99
99
|
Render `--device tablet` (834 points) and `--device desktop` and look for a half of the screen
|
|
100
100
|
with nothing in it, or a row whose price sits a screen's width from its name. Space below
|
|
101
101
|
a short list is fine.
|
|
102
|
+
A screen that also runs in a browser has its own rules for the desktop and the phone web
|
|
103
|
+
(pointer, keyboard, links, line length, public pages): read `himi docs web-ux`.
|
|
102
104
|
|
|
103
105
|
---
|
|
104
106
|
|
|
@@ -837,23 +839,49 @@ air and render on every current binary.
|
|
|
837
839
|
|
|
838
840
|
## 6. Motion & delight — deliberate, never decorative
|
|
839
841
|
|
|
840
|
-
Motion earns its place by clarifying, not by moving:
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
and
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
842
|
+
Motion earns its place by clarifying, not by moving. The renderers already time the common cases:
|
|
843
|
+
a press scales to 0.96 over about 160ms, a `transition` enters from a slight scale and fade over
|
|
844
|
+
about 240ms and exits faster than it entered, and a `StatefulSection` cross-fades its skeleton
|
|
845
|
+
into the content. The author's job is to choose where motion happens, almost never how long it
|
|
846
|
+
takes, and how often.
|
|
847
|
+
|
|
848
|
+
- **One entrance per screen.** At most one node carries `appear` or `transition`: the section that
|
|
849
|
+
is the point of the screen. A list that cascades in uses one `staggerMs` on the list with the
|
|
850
|
+
`transition` on its row template, which is the same one entrance. Never `appear` on every
|
|
851
|
+
section, and nothing animates on what people do many times a minute: a tab switch, a toggle, a
|
|
852
|
+
filter chip, typing.
|
|
853
|
+
- **`pressFeedback` only where a tap is.** The renderer applies it only to an interactive node, so
|
|
854
|
+
set it beside `modifiers.onTap` or on a `Button`, or leave the default; on a plain `Card` it does
|
|
855
|
+
nothing and reads as a promise the screen does not keep. `haptic` rides the same tap.
|
|
856
|
+
- **Celebration only at a completion moment.** `confetti`, `meshGradient`, `animatedGradient` and
|
|
857
|
+
`vectorAnim: "success"` belong to the one screen that ends a purchase, a booking or a goal. A
|
|
858
|
+
home, a list, a detail or a form carries none.
|
|
859
|
+
- **Motion names a token, never a number.** `appear`, `pressMotion` and a transition's `motion`
|
|
860
|
+
take a `{ token: "smooth" }` naming an entry of the app's `motions` registry in `tokens.json`
|
|
861
|
+
(add the entry there if it is missing). A bare string or a number is not the schema's shape: the
|
|
862
|
+
web renderer tolerates it and the native decoders are not required to.
|
|
863
|
+
- **Crisp for data, smooth for content, bouncy for play.** `modifiers.motion` picks the personality
|
|
864
|
+
of a subtree: `"crisp"` for a dashboard, a cart, a form or a working screen, `"smooth"` (the
|
|
865
|
+
default) for content, `"bouncy"` only for something people drag or play with.
|
|
866
|
+
- **Leave `respectReducedMotion` at its default, true.** With reduce motion on, `transition`,
|
|
867
|
+
`appear`, `parallax`, `revealOnScroll`, `confetti`, `animatedGradient` and `staggerMs` stop by
|
|
868
|
+
themselves and the content is shown in place; set it `false` only on motion that is the
|
|
869
|
+
information itself, such as a progress indicator someone is waiting on, never on decoration.
|
|
870
|
+
Haptics follow their own setting and stay on.
|
|
871
|
+
- **A shared element has one `transitionId`, on both ends.** The same id on the list tile's `Image`
|
|
872
|
+
and the detail's hero morphs frame and corner radius between them across the navigation; keep
|
|
873
|
+
the hero at the tile's `aspectRatio` so only its size changes. A row template carries a templated
|
|
874
|
+
id (`transitionId: "card-$item.id"`); a literal id used once matches nothing, and one used on
|
|
875
|
+
more than two nodes matches nothing either. The same id also morphs **within one screen**: when
|
|
876
|
+
one update removes a node carrying `transitionId: X` and inserts another carrying `X` (a card
|
|
877
|
+
finishing in a "creating" strip and appearing in the grid), the inserted node animates from the
|
|
878
|
+
removed one's frame on its own `motion`; under reduce motion it swaps instantly. Renderers: iOS
|
|
879
|
+
`matchedGeometryEffect` in a per-screen namespace; Android a bounds-handoff `graphicsLayer`
|
|
880
|
+
animation; web FLIP. Demo: demo-app Motion → In-screen match.
|
|
881
|
+
|
|
882
|
+
Use `animateContentSize` on a container that grows (a disclosure, "read more"), not a
|
|
883
|
+
`transition`, which would replay an entrance on content that was already there. If every element
|
|
884
|
+
moves, nothing reads as important.
|
|
857
885
|
|
|
858
886
|
---
|
|
859
887
|
|
|
@@ -972,7 +1000,7 @@ Run this punch list on the screen (it's also a good reviewer checklist):
|
|
|
972
1000
|
- [ ] When a business book exists, do those fallbacks use the site's OWN words (`book.copy`) rather than stock phrases — and in `book.copy.language`?
|
|
973
1001
|
- [ ] Spacing on the `xs…xl` scale, consistent rhythm within vs. between groups?
|
|
974
1002
|
- [ ] `accessibility_label` on every icon / image / non-text control (separate from `id`)?
|
|
975
|
-
- [ ] `
|
|
1003
|
+
- [ ] Motion (§6) — at most one entrance, `pressFeedback` only on taps, no celebration outside a completion screen, motion named by token, `respectReducedMotion` left at its default?
|
|
976
1004
|
- [ ] Verified in **both** light and dark (and highContrast for load-bearing color)?
|
|
977
1005
|
- [ ] RTL-safe — leading/trailing alignment + logical insets throughout?
|
|
978
1006
|
- [ ] Kit-clean — no hardcoded look a kit would override; `material`/gradient/background precedence respected?
|
|
@@ -377,7 +377,7 @@ and the loading/empty/error/ready idiom they all share
|
|
|
377
377
|
(the `recipe-four-state` guide (its installed skill, or `himi docs recipe-four-state`) — every recipe that loads or writes data shows a loading state,
|
|
378
378
|
a classified error state and a recovery action where the user can fix the failure). Then — **before you
|
|
379
379
|
design** — read the `designing-himi-screens` guide (its installed skill, or `himi docs designing-himi-screens`) for its phone rules and product
|
|
380
|
-
screen shapes, the `ios-ux` guide (its installed skill, or `himi docs ios-ux`) and the `android-ux` guide (its installed skill, or `himi docs android-ux`) for each platform, and, for a
|
|
380
|
+
screen shapes, the `ios-ux` guide (its installed skill, or `himi docs ios-ux`) and the `android-ux` guide (its installed skill, or `himi docs android-ux`) for each platform, the `web-ux` guide (its installed skill, or `himi docs web-ux`) when it runs in a browser, and, for a
|
|
381
381
|
multi-screen app, the mobile contract in the `mobile-ux` guide (its installed skill, or `himi docs mobile-ux`); then follow
|
|
382
382
|
*Author a Tier-5 screen*. Judge each screen with
|
|
383
383
|
`himi render <screenId> --platform ios --device iphone` and `--platform android --device pixel`,
|
package/guides/himi-skill.md
CHANGED
|
@@ -400,7 +400,7 @@ and the loading/empty/error/ready idiom they all share
|
|
|
400
400
|
(the `recipe-four-state` guide (its installed skill, or `himi docs recipe-four-state`) — every recipe that loads or writes data shows a loading state,
|
|
401
401
|
a classified error state and a recovery action where the user can fix the failure). Then — **before you
|
|
402
402
|
design** — read the `designing-himi-screens` guide (its installed skill, or `himi docs designing-himi-screens`) for its phone rules and product
|
|
403
|
-
screen shapes, the `ios-ux` guide (its installed skill, or `himi docs ios-ux`) and the `android-ux` guide (its installed skill, or `himi docs android-ux`) for each platform, and, for a
|
|
403
|
+
screen shapes, the `ios-ux` guide (its installed skill, or `himi docs ios-ux`) and the `android-ux` guide (its installed skill, or `himi docs android-ux`) for each platform, the `web-ux` guide (its installed skill, or `himi docs web-ux`) when it runs in a browser, and, for a
|
|
404
404
|
multi-screen app, the mobile contract in the `mobile-ux` guide (its installed skill, or `himi docs mobile-ux`); then follow
|
|
405
405
|
*Author a Tier-5 screen*. Judge each screen with
|
|
406
406
|
`himi render <screenId> --platform ios --device iphone` and `--platform android --device pixel`,
|
package/guides/index.json
CHANGED
|
@@ -221,6 +221,12 @@
|
|
|
221
221
|
"category": "Design & UX",
|
|
222
222
|
"file": "android-ux.md"
|
|
223
223
|
},
|
|
224
|
+
{
|
|
225
|
+
"id": "web-ux",
|
|
226
|
+
"title": "Design for the web",
|
|
227
|
+
"category": "Design & UX",
|
|
228
|
+
"file": "web-ux.md"
|
|
229
|
+
},
|
|
224
230
|
{
|
|
225
231
|
"id": "tokens",
|
|
226
232
|
"title": "Design tokens reference",
|
package/guides/skill.md
CHANGED
|
@@ -30,6 +30,7 @@ guides in full: its installed skill, or else its own URL (or `himi docs <id>` fr
|
|
|
30
30
|
- https://apps.wix.com/_api/himi-serve/docs/ios-ux.md — Apple's patterns mapped to the Himi field that builds each one.
|
|
31
31
|
- https://apps.wix.com/_api/himi-serve/docs/android-ux.md — Material's patterns mapped the same way.
|
|
32
32
|
- https://apps.wix.com/_api/himi-serve/docs/designing-himi-screens.md — composing one screen from components and tokens.
|
|
33
|
+
- https://apps.wix.com/_api/himi-serve/docs/web-ux.md — also this one when the app runs in a browser (desktop or phone web).
|
|
33
34
|
|
|
34
35
|
A grep or summarized excerpt does not satisfy this. The iOS and Android guides are what make the
|
|
35
36
|
app native: the shell already draws the tab bar, title and Back on each platform, a shared `Fab`
|
package/guides/web-ux.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Designing a Himi App for the Web
|
|
2
|
+
|
|
3
|
+
Read this before you compose a screen that will also run in a browser, on a desktop or on a
|
|
4
|
+
phone, and again before you render it at `--device desktop`. Each rule is a decision and the Himi
|
|
5
|
+
field that builds it. Read it with `himi docs designing-himi-screens` (its phone rules and its
|
|
6
|
+
wide-surface rules still apply) and with `himi docs ios-ux` and `himi docs android-ux`: the
|
|
7
|
+
browser renders the **same** descriptor as the iPhone and Android apps, so a decision made here is
|
|
8
|
+
made for every platform.
|
|
9
|
+
|
|
10
|
+
**On the web a Himi app is a web app.** The web host draws the app's navigation and one content
|
|
11
|
+
column around each screen. Two kinds of screen carry most of the web's weight, and both are built
|
|
12
|
+
from the same components as a phone screen:
|
|
13
|
+
|
|
14
|
+
- **A working screen** — orders, bookings, an inbox, a dashboard: a list beside the selected item,
|
|
15
|
+
filters, and actions that act on what is selected.
|
|
16
|
+
- **A public page** — the first screen someone sees before signing in: what the business is, why
|
|
17
|
+
it matters, and one way to start. It is a screen of the app, not a separate site. A page of the
|
|
18
|
+
customer's existing Wix site belongs in a `WebView` (`sitePage(site, { path })`, see
|
|
19
|
+
`designing-himi-screens` §4), not rebuilt by hand.
|
|
20
|
+
|
|
21
|
+
## What the web host does for you
|
|
22
|
+
|
|
23
|
+
- **The shell draws the navigation, and its chrome depends on the width.** With
|
|
24
|
+
`navigation.navKind: "responsive"` in `config.ts` the host draws a sidebar rail from an 840px
|
|
25
|
+
container and bottom tabs below it; `"sidebar"` draws the rail, `"bottomTabs"` (the default)
|
|
26
|
+
draws tabs and `"single"` draws neither. A screen never draws a tab row or a sidebar of its own.
|
|
27
|
+
- **The host centres every screen in a column, and the column's width is the app's choice.**
|
|
28
|
+
Beside a sidebar rail the screen sits in a column capped at the `contentMaxWidth` token's
|
|
29
|
+
`expanded` value (920px by default). With tabs, a stack or `single`, the whole app is one centred
|
|
30
|
+
column `contentMaxWidth.base` wide at every desktop width: 480px by default, a phone column in
|
|
31
|
+
the middle of the window. `himi render --device desktop` draws exactly what the host will, so the
|
|
32
|
+
PNG is the check.
|
|
33
|
+
- **Every tappable node already has hover, a focus ring and the keyboard.** A node with
|
|
34
|
+
`modifiers.onTap` dims slightly under a pointer, gets a tab stop, a 2px accent focus ring and
|
|
35
|
+
Enter / Space; a `pressFeedback` previews on hover. None of it is authored: the design decision is
|
|
36
|
+
which node carries `onTap`.
|
|
37
|
+
- **There is no status bar and no home indicator.** At phone width the browser's own address bar
|
|
38
|
+
takes the top, and the app's bar sits right under it.
|
|
39
|
+
|
|
40
|
+
## Open up the desktop width
|
|
41
|
+
|
|
42
|
+
- **Choose the width the app needs before you compose a screen.** A phone-sized task (sign-in, one
|
|
43
|
+
form, a settings list) reads well in the default 480px column, and needs nothing. A working app
|
|
44
|
+
with destinations sets `navigation.navKind: "responsive"` in `config.ts`: from 840px the rail
|
|
45
|
+
appears and every screen gets the `expanded` column beside it. An app or page with no
|
|
46
|
+
destinations to list (a public page, a single-screen tool) widens the column itself in
|
|
47
|
+
`tokens.json`: `"contentMaxWidth": { "base": 1120, "medium": 720, "expanded": 1120 }`. `base` is
|
|
48
|
+
the website's desktop column; a phone is narrower than it, and tablets and the Mac window use
|
|
49
|
+
`medium` and `expanded`. Without one of these, every `columnsMedium`, `columnsExpanded` and
|
|
50
|
+
`SplitView` below stays in its phone shape on the desktop, because the column never reaches 600.
|
|
51
|
+
|
|
52
|
+
## A working screen at desktop width
|
|
53
|
+
|
|
54
|
+
- **The list sits beside the selected item.** In the wide column, a working screen is a `SplitView` with the list as
|
|
55
|
+
its `primary` (`primaryMaxWidth: 360` to 420) and the selected item as its `detail`: side by
|
|
56
|
+
side from 840px, stacked below. When the detail is short, a `grid({ columns: 1, columnsMedium:
|
|
57
|
+
2 })` splits from 600 instead.
|
|
58
|
+
- **Rows or a table, never a card per item.** A row is a `ListItem` (or the inbox `hstack` row in
|
|
59
|
+
`designing-himi-screens`) with its status as a `Badge` and its time or amount in `trailing`; a
|
|
60
|
+
record with four or more columns that people compare is a `DataTable`.
|
|
61
|
+
- **Filters are on the screen, above the list.** A `SegmentedControl` for two to four states, a
|
|
62
|
+
`FilterChips` row for more, a `SearchField` when there are dozens of items. Filtering is never
|
|
63
|
+
hidden behind a menu on desktop.
|
|
64
|
+
- **An action on the selection sits in the bar or beside the selection, never a footer across the
|
|
65
|
+
window.** A bulk action ("Mark shipped") is a `topBar.items` entry or a `tonal` button at the
|
|
66
|
+
top of the list; the detail pane's own action ends the detail. No `stickyFooter`.
|
|
67
|
+
|
|
68
|
+
## A public page
|
|
69
|
+
|
|
70
|
+
- **A photo first.** The page opens with one strong photo (an `Image` with `contentMode: "fill"`
|
|
71
|
+
and a fixed height, edge to edge), and the name and a one-sentence promise over or under it.
|
|
72
|
+
- **The benefits side by side from 600.** Three short blocks, each a title and two lines, in
|
|
73
|
+
`grid({ columns: 1, columnsMedium: 3 })`: stacked on a phone, one row in a widened desktop column.
|
|
74
|
+
- **Prose in a measured column.** Body text reads at 60 to 90 characters a line, 560 to 720px:
|
|
75
|
+
put the copy in a `vstack` with `maxWidth: 720` inside a `center`-aligned parent. The photo and
|
|
76
|
+
the benefit grid may run wider; a paragraph never runs the window.
|
|
77
|
+
- **One call to action, in the page.** One filled `Button` ("Book a class", "Reserve a table")
|
|
78
|
+
after the promise; a reminder at the end of the page is `tonal`, never a second filled one (`himi
|
|
79
|
+
validate` warns: `multiple_prominent_actions`); no `stickyFooter`, which on a desktop is a
|
|
80
|
+
bar across the whole column, far from the promise it acts on. Every other action is `tonal`, `secondary` or a link.
|
|
81
|
+
|
|
82
|
+
## Every screen at 390, 840 and 1280
|
|
83
|
+
|
|
84
|
+
- **Photo tiles change shape with the width.** `grid({ columns: 2, columnsMedium: 3,
|
|
85
|
+
columnsExpanded: 4 })`; a shelf stays a horizontal rail with more covers than fit. Two columns in
|
|
86
|
+
a 920px column are two 450px tiles: a phone stretched.
|
|
87
|
+
- **A row keeps its time, price or count beside its title.** Short, bounded rows (a day's classes,
|
|
88
|
+
a menu) go in `grid({ columns: 1, columnsMedium: 2 })` so each cell is 400 to 600px and its
|
|
89
|
+
`trailing` meta stays beside the name. Only a long or paged list at the scroll root (a chat list,
|
|
90
|
+
a feed) runs the full width with its meta at the far edge.
|
|
91
|
+
- **A form is a column, not the window.** From 600, put the fields beside their explanation with
|
|
92
|
+
`grid({ columns: 1, columnsMedium: 2 })` and the submit `Button` as the last child of the fields
|
|
93
|
+
column; or keep one column and cap it with `maxWidth: 480` in a `center` parent (sign-in). A
|
|
94
|
+
`TextField` with no column around it is as wide as the app's whole column.
|
|
95
|
+
- **Enter submits the last field.** Give the form's last single-line field `submitLabel: "go"`
|
|
96
|
+
(or `"send"`, `"search"`) and an `onSubmit` with the same action as the button, so the keyboard
|
|
97
|
+
path ends where the pointer path does.
|
|
98
|
+
|
|
99
|
+
## Pointer and keyboard
|
|
100
|
+
|
|
101
|
+
- **One tap target per tile or row.** Put `modifiers.onTap` on the tile's `vstack` or the row, and
|
|
102
|
+
nothing inside it: an `Image` with its own `onTap` inside a tile that taps gives the pointer two
|
|
103
|
+
targets and the keyboard two stops. An image on its own, outside any tap, opens full screen by
|
|
104
|
+
itself (`himi docs image-preview`).
|
|
105
|
+
- **A link navigates; a button acts.** Text that opens a URL is a `style: "link"` button whose
|
|
106
|
+
action is `capability.open_url.open` with `params: { url }`, given the link role as a modifier:
|
|
107
|
+
`withModifiers(button({ title: "Instagram", style: "link", action }), { accessibilityRole:
|
|
108
|
+
"link" })`. It keeps the width of its words and a screen reader says "link". A row that opens a URL
|
|
109
|
+
(directions, a phone number, a profile) is a link too: give the row `accessibilityRole: "link"`
|
|
110
|
+
in its modifiers beside its `onTap`. A filled button never opens a URL; a button changes state or submits. Inside
|
|
111
|
+
prose, a `RichText` span with `marks: ["link"]`.
|
|
112
|
+
- **At most one `initialFocus` per screen.** Keyboard focus lands there on arrival: the search field
|
|
113
|
+
of a search screen, the first field of a form. Without one the host focuses the content column so
|
|
114
|
+
a screen reader reads the title, which is right for most screens.
|
|
115
|
+
|
|
116
|
+
## Dark and right-to-left
|
|
117
|
+
|
|
118
|
+
- **The scheme follows the OS, live.** Every colour comes from a scheme-aware token, never a hex
|
|
119
|
+
literal on a node; check with `himi render <screen> --device desktop --scheme dark`.
|
|
120
|
+
- **Right-to-left mirrors the whole page.** The rail moves to the right, a split's primary pane
|
|
121
|
+
moves to the right, `leading` and `trailing` flip. Check with `--device desktop --rtl`.
|
|
122
|
+
|
|
123
|
+
## Check it
|
|
124
|
+
|
|
125
|
+
Render `himi render <screen> --device iphone`, `--device tablet` and `--device desktop`, then
|
|
126
|
+
`--device desktop --scheme dark` and `--device desktop --rtl`.
|
|
127
|
+
|
|
128
|
+
- The desktop render is a phone column only when the task is phone-sized; otherwise it has no
|
|
129
|
+
empty half, no phone bar across the column, no paragraph wider than about 720px, and more in view
|
|
130
|
+
than the phone shows (more columns or a split).
|
|
131
|
+
- No short row has its meta a screen's width from its title.
|
|
132
|
+
- Each tile or row is one tap target; a URL opens from a link; there is one filled `Button`.
|
|
133
|
+
- The dark render has no light panel left behind; the RTL render has the rail and the list pane on
|
|
134
|
+
the right.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1831.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"artifactId": "himalaya-cli"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"falconPackageHash": "
|
|
85
|
+
"falconPackageHash": "3a999aa656f046af9927c9e90fad9ea641f5776f956c7d818a7d6834"
|
|
86
86
|
}
|
|
@@ -30111,6 +30111,7 @@ const SCREENS = runtimeSetting({
|
|
|
30111
30111
|
"title": "$service:himiBrandedPlans.detail.joinLabel",
|
|
30112
30112
|
"style": "primary",
|
|
30113
30113
|
"disabledPath": "$service:himiBrandedPlans.detail.joinDisabled",
|
|
30114
|
+
"loadingPath": "$service:himiBrandedPlans.detail.joinBusy",
|
|
30114
30115
|
"action": {
|
|
30115
30116
|
"actionId": "tier5.himiBrandedPlans.join"
|
|
30116
30117
|
}
|
|
@@ -36404,6 +36405,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
36404
36405
|
"style": "primary",
|
|
36405
36406
|
"fullWidth": true,
|
|
36406
36407
|
"disabledPath": "$service:himiStoreProduct.buyDisabled",
|
|
36408
|
+
"loadingPath": "$service:himiStoreProduct.buyBusy",
|
|
36407
36409
|
"action": {
|
|
36408
36410
|
"actionId": "tier5.himiStoreProduct.buy"
|
|
36409
36411
|
}
|
|
@@ -40943,6 +40945,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
40943
40945
|
"props": {
|
|
40944
40946
|
"title": "$service:himiBookingTime.iapBuyLabel",
|
|
40945
40947
|
"disabledPath": "$service:himiBookingTime.iapBuyDisabled",
|
|
40948
|
+
"loadingPath": "$service:himiBookingTime.iapBusy",
|
|
40946
40949
|
"style": "primary",
|
|
40947
40950
|
"fullWidth": true,
|
|
40948
40951
|
"action": {
|
|
@@ -41974,6 +41977,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
41974
41977
|
"props": {
|
|
41975
41978
|
"title": "$service:himiBookingTime.iapBuyLabel",
|
|
41976
41979
|
"disabledPath": "$service:himiBookingTime.iapBuyDisabled",
|
|
41980
|
+
"loadingPath": "$service:himiBookingTime.iapBusy",
|
|
41977
41981
|
"style": "primary",
|
|
41978
41982
|
"fullWidth": true,
|
|
41979
41983
|
"action": {
|
|
@@ -40,6 +40,8 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
40
40
|
let platform = "unknown";
|
|
41
41
|
let started = false;
|
|
42
42
|
let inFlight = false;
|
|
43
|
+
/** The ticket or time `buy` is selling, so a different selection never shows its spinner. */
|
|
44
|
+
let inFlightTarget = "";
|
|
43
45
|
let formError = "";
|
|
44
46
|
let sequence = 0;
|
|
45
47
|
let formRevision = 0;
|
|
@@ -106,7 +108,23 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
106
108
|
if (!retained) initialize(form);
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
|
|
111
|
+
/** Whether the Buy for `target` (the selected ticket or time) shows the spinner: while this worker's
|
|
112
|
+
* `buy` runs, only for its target; otherwise whenever the shared checkout is busy, unless the sale is
|
|
113
|
+
* known to be another target's. A restarted worker knows none, so it follows the checkout. */
|
|
114
|
+
function busyFor(target: string | undefined, purchaseBusy: boolean, state: ReturnType<typeof commerce.state>): boolean {
|
|
115
|
+
if (target === undefined) return purchaseBusy || inFlight;
|
|
116
|
+
if (inFlight) return inFlightTarget === target;
|
|
117
|
+
if (!purchaseBusy || !reference) return purchaseBusy;
|
|
118
|
+
const anotherTarget = (item: string) => [...attempts].some(([known, attempt]) => known !== target && item.endsWith(`#${encodeURIComponent(attempt)}`));
|
|
119
|
+
const prefix = `${reference.kind}:${reference.id}#`;
|
|
120
|
+
const processing = state.payments.filter((p) => p.access === "processing");
|
|
121
|
+
if (processing.some((p) => p.item.startsWith(prefix) && !anotherTarget(p.item))) return true;
|
|
122
|
+
if (state.item !== null) return !anotherTarget(state.item);
|
|
123
|
+
// No item: a recovered sale. It may be this one unless its payments all name other tickets or times.
|
|
124
|
+
return processing.length === 0 || processing.some((p) => p.item === "payment");
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function fields(selected = true, publishPoll = true, selectionKey?: string): AttendancePurchaseFields {
|
|
110
128
|
syncSession();
|
|
111
129
|
if (!reference || !metadata) return ATTENDANCE_INITIAL;
|
|
112
130
|
const currency = metadata.currency ?? "";
|
|
@@ -137,7 +155,7 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
137
155
|
else if (apple && own && state.phase === "cancelled") note = copyParam(`${prefix}.purchaseCancelledText`, "Purchase cancelled. Your place is not confirmed.");
|
|
138
156
|
return {
|
|
139
157
|
iapBuyHidden: !apple, iapBuyDisabled: !enabled || !selected || !member || !form.supported() || purchase.buyDisabled || inFlight,
|
|
140
|
-
iapBuyLabel: purchase.buyLabel || copy.buy, iapBusy: purchase.buyBusy
|
|
158
|
+
iapBuyLabel: purchase.buyLabel || copy.buy, iapBusy: busyFor(selectionKey !== undefined ? `${reference.kind}:${reference.id}:${selectionKey}` : options.kind === "eventsTicket" ? `${reference.kind}:${reference.id}:${reference.id}` : undefined, purchase.buyBusy, state),
|
|
141
159
|
iapPrice: apple ? price.priceText : "", iapRetryHidden: !apple || (price.hidePriceRetry && commerce.scopeComplete()),
|
|
142
160
|
iapNote: note,
|
|
143
161
|
iapFormHidden: !apple || !selected || !form.supported(), iapFormError: formError,
|
|
@@ -173,6 +191,7 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
173
191
|
...(options.kind === "bookingsService" ? { booking: { slot: selection.slot ?? {}, contactDetails: form.buyer() } } : { ticket: { eventId: selection.eventId ?? "", ...form.ticket(ref.id) } }),
|
|
174
192
|
} };
|
|
175
193
|
inFlight = true;
|
|
194
|
+
inFlightTarget = target;
|
|
176
195
|
formError = "";
|
|
177
196
|
options.onChange();
|
|
178
197
|
try {
|
|
@@ -733,7 +733,7 @@ function derive(input: S): S {
|
|
|
733
733
|
message: regular && !regularCheckoutAllowed && s.message === copyParam("time.purchaseUnavailable", "Purchasing is temporarily unavailable.") ? "" : s.message,
|
|
734
734
|
hasSlots,
|
|
735
735
|
// A waitlist pick or a course is not an in-app purchase: neither enables the Apple button.
|
|
736
|
-
...applePurchase.fields(hasSelected && !selectedWaitlist && !s.isCourse),
|
|
736
|
+
...applePurchase.fields(hasSelected && !selectedWaitlist && !s.isCourse, true, s.selectedSlotId),
|
|
737
737
|
hasSelected,
|
|
738
738
|
noSelected: !hasSelected,
|
|
739
739
|
// The shared sign-in card: no sign-in for a course this screen cannot sell (as below).
|
|
@@ -71,6 +71,8 @@ interface PlanRow {
|
|
|
71
71
|
applePeriod: string;
|
|
72
72
|
joinLabel: string;
|
|
73
73
|
joinDisabled: boolean;
|
|
74
|
+
/** An App Store sale of this plan is under way: Join shows its spinner. */
|
|
75
|
+
joinBusy: boolean;
|
|
74
76
|
joinNote: string;
|
|
75
77
|
}
|
|
76
78
|
|
|
@@ -183,7 +185,7 @@ function planRow(plan: WixPlan): PlanRow {
|
|
|
183
185
|
free: isFreePlan(plan),
|
|
184
186
|
appleSupported: isAppleSellablePlan(plan.pricing),
|
|
185
187
|
applePeriod: applePlanPeriod(plan.pricing),
|
|
186
|
-
joined: false, joinLabel: copyParam("plans.joinCta", "Continue"), joinDisabled: true, joinNote: "",
|
|
188
|
+
joined: false, joinLabel: copyParam("plans.joinCta", "Continue"), joinDisabled: true, joinBusy: false, joinNote: "",
|
|
187
189
|
};
|
|
188
190
|
}
|
|
189
191
|
|
|
@@ -258,6 +260,7 @@ function pricedState(state: State): State {
|
|
|
258
260
|
joined,
|
|
259
261
|
joinLabel: joined ? copyParam("plans.joinedLabel", "Current plan") : apple ? purchase.buyLabel : row.joinLabel,
|
|
260
262
|
joinDisabled: joined || (apple ? purchase.buyDisabled || !appleOffered(row, view) : price.actionDisabled || !regularReady) || joining.has(row.id),
|
|
263
|
+
joinBusy: apple && purchase.buyBusy,
|
|
261
264
|
joinNote: apple ? appleOffered(row, view) ? purchase.buyNote : iapPriceCopy("plans").purchaseUnavailable : price.actionNote };
|
|
262
265
|
});
|
|
263
266
|
const detail = priced.find(row => row.id === detailInputId()) ?? null;
|
|
@@ -331,6 +331,8 @@ interface S {
|
|
|
331
331
|
buyHidden: boolean;
|
|
332
332
|
buyLabel: string;
|
|
333
333
|
buyDisabled: boolean;
|
|
334
|
+
/** A sale is under way: the Buy button shows its spinner. */
|
|
335
|
+
buyBusy: boolean;
|
|
334
336
|
buyNote: string;
|
|
335
337
|
/** Shown once the eCom order reads paid, never on the payment's approval alone. */
|
|
336
338
|
purchasedNote: string;
|
|
@@ -477,7 +479,7 @@ const defineService = withIapPresentation<S>({
|
|
|
477
479
|
register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
|
|
478
480
|
adapters: [storesProductOrders],
|
|
479
481
|
onCreate: commerce => { productPricing = commerce; }, prefix: "product",
|
|
480
|
-
transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "paintCached"], concurrentPublishActions: ["buy"],
|
|
482
|
+
transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyBusy", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "paintCached"], concurrentPublishActions: ["buy"],
|
|
481
483
|
items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
|
|
482
484
|
present: (state, price, allowed, _appleIapOrResolving, resolving) => {
|
|
483
485
|
const purchase = applePurchase(state);
|
|
@@ -493,7 +495,7 @@ const defineService = withIapPresentation<S>({
|
|
|
493
495
|
...state, price: price(inputId()), ...(purchase.appleRoute ? { wasPrice: "", wasPriceEmpty: false, notOnSale: true } : {}), optionsIncomplete: productState.optionsIncomplete || !allowed(inputId()) || lastProduct?.productType?.toLowerCase() === "digital",
|
|
494
496
|
cartHint, noCartHint: !cartHint || state.added, addDisabled: productState.addDisabled || blocked || pending,
|
|
495
497
|
cartHidden: purchase.appleRoute,
|
|
496
|
-
buyHidden: !purchase.appleRoute || purchase.accessReady, buyLabel: purchase.buyLabel, buyDisabled: purchase.buyDisabled,
|
|
498
|
+
buyHidden: !purchase.appleRoute || purchase.accessReady, buyLabel: purchase.buyLabel, buyDisabled: purchase.buyDisabled, buyBusy: purchase.buyBusy,
|
|
497
499
|
buyNote: state.buyNote === offlineWriteMessage ? state.buyNote : purchase.buyNote,
|
|
498
500
|
purchasedNote: purchase.accessReady ? copyParam("product.purchasedText", "Purchased") : "",
|
|
499
501
|
};
|
|
@@ -620,6 +622,7 @@ const svc = defineService<S, {
|
|
|
620
622
|
buyHidden: true,
|
|
621
623
|
buyLabel: "",
|
|
622
624
|
buyDisabled: true,
|
|
625
|
+
buyBusy: false,
|
|
623
626
|
buyNote: "",
|
|
624
627
|
purchasedNote: "",
|
|
625
628
|
}),
|
|
@@ -40899,6 +40899,7 @@ const SCREENS = runtimeSetting({
|
|
|
40899
40899
|
"title": "$service:himiBrandedPlans.detail.joinLabel",
|
|
40900
40900
|
"style": "primary",
|
|
40901
40901
|
"disabledPath": "$service:himiBrandedPlans.detail.joinDisabled",
|
|
40902
|
+
"loadingPath": "$service:himiBrandedPlans.detail.joinBusy",
|
|
40902
40903
|
"action": {
|
|
40903
40904
|
"actionId": "tier5.himiBrandedPlans.join"
|
|
40904
40905
|
}
|
|
@@ -87364,6 +87365,7 @@ const SCREENS = runtimeSetting({
|
|
|
87364
87365
|
"style": "primary",
|
|
87365
87366
|
"fullWidth": true,
|
|
87366
87367
|
"disabledPath": "$service:himiBrandedVideo.buyDisabled",
|
|
87368
|
+
"loadingPath": "$service:himiBrandedVideo.buyBusy",
|
|
87367
87369
|
"action": {
|
|
87368
87370
|
"actionId": "tier5.himiBrandedVideo.buy"
|
|
87369
87371
|
}
|
|
@@ -104844,6 +104846,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
104844
104846
|
"style": "primary",
|
|
104845
104847
|
"fullWidth": true,
|
|
104846
104848
|
"disabledPath": "$service:himiStoreProduct.buyDisabled",
|
|
104849
|
+
"loadingPath": "$service:himiStoreProduct.buyBusy",
|
|
104847
104850
|
"action": {
|
|
104848
104851
|
"actionId": "tier5.himiStoreProduct.buy"
|
|
104849
104852
|
}
|
|
@@ -109390,6 +109393,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
109390
109393
|
"props": {
|
|
109391
109394
|
"title": "$service:himiBookingTime.iapBuyLabel",
|
|
109392
109395
|
"disabledPath": "$service:himiBookingTime.iapBuyDisabled",
|
|
109396
|
+
"loadingPath": "$service:himiBookingTime.iapBusy",
|
|
109393
109397
|
"style": "primary",
|
|
109394
109398
|
"fullWidth": true,
|
|
109395
109399
|
"action": {
|
|
@@ -110421,6 +110425,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
110421
110425
|
"props": {
|
|
110422
110426
|
"title": "$service:himiBookingTime.iapBuyLabel",
|
|
110423
110427
|
"disabledPath": "$service:himiBookingTime.iapBuyDisabled",
|
|
110428
|
+
"loadingPath": "$service:himiBookingTime.iapBusy",
|
|
110424
110429
|
"style": "primary",
|
|
110425
110430
|
"fullWidth": true,
|
|
110426
110431
|
"action": {
|
|
@@ -111890,6 +111895,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
111890
111895
|
"style": "primary",
|
|
111891
111896
|
"fullWidth": true,
|
|
111892
111897
|
"disabledPath": "$service:himiBrandedProgram.buyDisabled",
|
|
111898
|
+
"loadingPath": "$service:himiBrandedProgram.buyBusy",
|
|
111893
111899
|
"action": {
|
|
111894
111900
|
"actionId": "tier5.himiBrandedProgram.buy"
|
|
111895
111901
|
}
|
|
@@ -114343,6 +114349,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
114343
114349
|
"props": {
|
|
114344
114350
|
"title": "$service:himiEventDetail.iapBuyLabel",
|
|
114345
114351
|
"disabledPath": "$service:himiEventDetail.iapBuyDisabled",
|
|
114352
|
+
"loadingPath": "$service:himiEventDetail.iapBusy",
|
|
114346
114353
|
"style": "primary",
|
|
114347
114354
|
"fullWidth": true,
|
|
114348
114355
|
"action": {
|
|
@@ -40,6 +40,8 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
40
40
|
let platform = "unknown";
|
|
41
41
|
let started = false;
|
|
42
42
|
let inFlight = false;
|
|
43
|
+
/** The ticket or time `buy` is selling, so a different selection never shows its spinner. */
|
|
44
|
+
let inFlightTarget = "";
|
|
43
45
|
let formError = "";
|
|
44
46
|
let sequence = 0;
|
|
45
47
|
let formRevision = 0;
|
|
@@ -106,7 +108,23 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
106
108
|
if (!retained) initialize(form);
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
|
|
111
|
+
/** Whether the Buy for `target` (the selected ticket or time) shows the spinner: while this worker's
|
|
112
|
+
* `buy` runs, only for its target; otherwise whenever the shared checkout is busy, unless the sale is
|
|
113
|
+
* known to be another target's. A restarted worker knows none, so it follows the checkout. */
|
|
114
|
+
function busyFor(target: string | undefined, purchaseBusy: boolean, state: ReturnType<typeof commerce.state>): boolean {
|
|
115
|
+
if (target === undefined) return purchaseBusy || inFlight;
|
|
116
|
+
if (inFlight) return inFlightTarget === target;
|
|
117
|
+
if (!purchaseBusy || !reference) return purchaseBusy;
|
|
118
|
+
const anotherTarget = (item: string) => [...attempts].some(([known, attempt]) => known !== target && item.endsWith(`#${encodeURIComponent(attempt)}`));
|
|
119
|
+
const prefix = `${reference.kind}:${reference.id}#`;
|
|
120
|
+
const processing = state.payments.filter((p) => p.access === "processing");
|
|
121
|
+
if (processing.some((p) => p.item.startsWith(prefix) && !anotherTarget(p.item))) return true;
|
|
122
|
+
if (state.item !== null) return !anotherTarget(state.item);
|
|
123
|
+
// No item: a recovered sale. It may be this one unless its payments all name other tickets or times.
|
|
124
|
+
return processing.length === 0 || processing.some((p) => p.item === "payment");
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function fields(selected = true, publishPoll = true, selectionKey?: string): AttendancePurchaseFields {
|
|
110
128
|
syncSession();
|
|
111
129
|
if (!reference || !metadata) return ATTENDANCE_INITIAL;
|
|
112
130
|
const currency = metadata.currency ?? "";
|
|
@@ -137,7 +155,7 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
137
155
|
else if (apple && own && state.phase === "cancelled") note = copyParam(`${prefix}.purchaseCancelledText`, "Purchase cancelled. Your place is not confirmed.");
|
|
138
156
|
return {
|
|
139
157
|
iapBuyHidden: !apple, iapBuyDisabled: !enabled || !selected || !member || !form.supported() || purchase.buyDisabled || inFlight,
|
|
140
|
-
iapBuyLabel: purchase.buyLabel || copy.buy, iapBusy: purchase.buyBusy
|
|
158
|
+
iapBuyLabel: purchase.buyLabel || copy.buy, iapBusy: busyFor(selectionKey !== undefined ? `${reference.kind}:${reference.id}:${selectionKey}` : options.kind === "eventsTicket" ? `${reference.kind}:${reference.id}:${reference.id}` : undefined, purchase.buyBusy, state),
|
|
141
159
|
iapPrice: apple ? price.priceText : "", iapRetryHidden: !apple || (price.hidePriceRetry && commerce.scopeComplete()),
|
|
142
160
|
iapNote: note,
|
|
143
161
|
iapFormHidden: !apple || !selected || !form.supported(), iapFormError: formError,
|
|
@@ -173,6 +191,7 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
173
191
|
...(options.kind === "bookingsService" ? { booking: { slot: selection.slot ?? {}, contactDetails: form.buyer() } } : { ticket: { eventId: selection.eventId ?? "", ...form.ticket(ref.id) } }),
|
|
174
192
|
} };
|
|
175
193
|
inFlight = true;
|
|
194
|
+
inFlightTarget = target;
|
|
176
195
|
formError = "";
|
|
177
196
|
options.onChange();
|
|
178
197
|
try {
|
|
@@ -733,7 +733,7 @@ function derive(input: S): S {
|
|
|
733
733
|
message: regular && !regularCheckoutAllowed && s.message === copyParam("time.purchaseUnavailable", "Purchasing is temporarily unavailable.") ? "" : s.message,
|
|
734
734
|
hasSlots,
|
|
735
735
|
// A waitlist pick or a course is not an in-app purchase: neither enables the Apple button.
|
|
736
|
-
...applePurchase.fields(hasSelected && !selectedWaitlist && !s.isCourse),
|
|
736
|
+
...applePurchase.fields(hasSelected && !selectedWaitlist && !s.isCourse, true, s.selectedSlotId),
|
|
737
737
|
hasSelected,
|
|
738
738
|
noSelected: !hasSelected,
|
|
739
739
|
// The shared sign-in card: no sign-in for a course this screen cannot sell (as below).
|
|
@@ -71,6 +71,8 @@ interface PlanRow {
|
|
|
71
71
|
applePeriod: string;
|
|
72
72
|
joinLabel: string;
|
|
73
73
|
joinDisabled: boolean;
|
|
74
|
+
/** An App Store sale of this plan is under way: Join shows its spinner. */
|
|
75
|
+
joinBusy: boolean;
|
|
74
76
|
joinNote: string;
|
|
75
77
|
}
|
|
76
78
|
|
|
@@ -183,7 +185,7 @@ function planRow(plan: WixPlan): PlanRow {
|
|
|
183
185
|
free: isFreePlan(plan),
|
|
184
186
|
appleSupported: isAppleSellablePlan(plan.pricing),
|
|
185
187
|
applePeriod: applePlanPeriod(plan.pricing),
|
|
186
|
-
joined: false, joinLabel: copyParam("plans.joinCta", "Continue"), joinDisabled: true, joinNote: "",
|
|
188
|
+
joined: false, joinLabel: copyParam("plans.joinCta", "Continue"), joinDisabled: true, joinBusy: false, joinNote: "",
|
|
187
189
|
};
|
|
188
190
|
}
|
|
189
191
|
|
|
@@ -258,6 +260,7 @@ function pricedState(state: State): State {
|
|
|
258
260
|
joined,
|
|
259
261
|
joinLabel: joined ? copyParam("plans.joinedLabel", "Current plan") : apple ? purchase.buyLabel : row.joinLabel,
|
|
260
262
|
joinDisabled: joined || (apple ? purchase.buyDisabled || !appleOffered(row, view) : price.actionDisabled || !regularReady) || joining.has(row.id),
|
|
263
|
+
joinBusy: apple && purchase.buyBusy,
|
|
261
264
|
joinNote: apple ? appleOffered(row, view) ? purchase.buyNote : iapPriceCopy("plans").purchaseUnavailable : price.actionNote };
|
|
262
265
|
});
|
|
263
266
|
const detail = priced.find(row => row.id === detailInputId()) ?? null;
|