@wix/himalaya-cli 0.1027.0 → 0.1029.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/cli.mjs +176 -31
- package/dist/preview-assets.generated.bin +0 -0
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +15 -3
- package/templates/beauty-salon-owner/dev/index.ts +22 -27
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/branded-lite/dev/index.ts +32 -4
- package/templates/community-club-owner/dev/index.ts +22 -27
- package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/events-meetups-owner/dev/index.ts +22 -27
- package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/gym-fitness/dev/index.ts +15 -3
- package/templates/gym-fitness-owner/dev/index.ts +22 -27
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/nonprofit-cause-owner/dev/index.ts +22 -27
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/owner-lite/dev/index.ts +22 -27
- package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/podcast-creator-owner/dev/index.ts +22 -27
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/portfolio-creative-owner/dev/index.ts +22 -27
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/restaurant-owner/dev/index.ts +22 -27
- package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/retail-store-owner/dev/index.ts +22 -27
- package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +23 -3
- package/templates/yoga-studio/dev/index.ts +15 -1
- package/templates/yoga-studio-owner/dev/index.ts +22 -27
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +23 -3
|
@@ -55108,7 +55108,7 @@ const SCREENS = runtimeSetting({
|
|
|
55108
55108
|
"spacing": 3,
|
|
55109
55109
|
"children": [
|
|
55110
55110
|
{
|
|
55111
|
-
"id": "himi_owner_lite_aria.msg_$item.id.
|
|
55111
|
+
"id": "himi_owner_lite_aria.msg_$item.id.content",
|
|
55112
55112
|
"body": {
|
|
55113
55113
|
"package": "himalaya",
|
|
55114
55114
|
"type": "HStack",
|
|
@@ -55127,43 +55127,34 @@ const SCREENS = runtimeSetting({
|
|
|
55127
55127
|
}
|
|
55128
55128
|
},
|
|
55129
55129
|
{
|
|
55130
|
-
"id": "",
|
|
55130
|
+
"id": "himi_owner_lite_aria.msg_$item.id.bubble",
|
|
55131
55131
|
"body": {
|
|
55132
55132
|
"package": "himalaya",
|
|
55133
55133
|
"type": "Text",
|
|
55134
55134
|
"props": {
|
|
55135
|
-
"text": "$item.
|
|
55136
|
-
"style": "
|
|
55137
|
-
"
|
|
55138
|
-
"maxLines": 1
|
|
55135
|
+
"text": "$item.content",
|
|
55136
|
+
"style": "body",
|
|
55137
|
+
"maxLines": 50
|
|
55139
55138
|
}
|
|
55140
|
-
}
|
|
55141
|
-
}
|
|
55142
|
-
]
|
|
55143
|
-
}
|
|
55144
|
-
}
|
|
55145
|
-
},
|
|
55146
|
-
{
|
|
55147
|
-
"id": "himi_owner_lite_aria.msg_$item.id.content",
|
|
55148
|
-
"body": {
|
|
55149
|
-
"package": "himalaya",
|
|
55150
|
-
"type": "HStack",
|
|
55151
|
-
"props": {
|
|
55152
|
-
"spacing": 0,
|
|
55153
|
-
"children": [
|
|
55154
|
-
{
|
|
55155
|
-
"id": "",
|
|
55156
|
-
"body": {
|
|
55157
|
-
"package": "himalaya",
|
|
55158
|
-
"type": "Spacer",
|
|
55159
|
-
"props": {}
|
|
55160
55139
|
},
|
|
55161
55140
|
"modifiers": {
|
|
55141
|
+
"accessibilityLabel": "$item.spoken",
|
|
55142
|
+
"padding": {
|
|
55143
|
+
"leading": 16,
|
|
55144
|
+
"trailing": 16,
|
|
55145
|
+
"top": 8,
|
|
55146
|
+
"bottom": 8
|
|
55147
|
+
},
|
|
55148
|
+
"background": {
|
|
55149
|
+
"token": "surfaceSecondary"
|
|
55150
|
+
},
|
|
55151
|
+
"cornerRadius": 20,
|
|
55152
|
+
"maxWidth": 300,
|
|
55162
55153
|
"hiddenPath": "$item.notUser"
|
|
55163
55154
|
}
|
|
55164
55155
|
},
|
|
55165
55156
|
{
|
|
55166
|
-
"id": "",
|
|
55157
|
+
"id": "himi_owner_lite_aria.msg_$item.id.text",
|
|
55167
55158
|
"body": {
|
|
55168
55159
|
"package": "himalaya",
|
|
55169
55160
|
"type": "Text",
|
|
@@ -55172,6 +55163,10 @@ const SCREENS = runtimeSetting({
|
|
|
55172
55163
|
"style": "body",
|
|
55173
55164
|
"maxLines": 50
|
|
55174
55165
|
}
|
|
55166
|
+
},
|
|
55167
|
+
"modifiers": {
|
|
55168
|
+
"accessibilityLabel": "$item.spoken",
|
|
55169
|
+
"hiddenPath": "$item.notAria"
|
|
55175
55170
|
}
|
|
55176
55171
|
}
|
|
55177
55172
|
]
|
|
@@ -83,6 +83,11 @@ export interface AriaBubble {
|
|
|
83
83
|
* that right-aligns the owner renders two templates and collapses one. */
|
|
84
84
|
notUser: boolean;
|
|
85
85
|
notAria: boolean;
|
|
86
|
+
/** What a screen reader says for the row: the author, then the words. A
|
|
87
|
+
* screen that draws the speaker only as a bubble and a side of the screen
|
|
88
|
+
* (`messageStyle: 'userBubble'`) has no visible author line to read, and
|
|
89
|
+
* without this the owner's question and Aria's reply sound the same. */
|
|
90
|
+
spoken: string;
|
|
86
91
|
link1Label: string; link1Url: string; link1Hidden: boolean;
|
|
87
92
|
link2Label: string; link2Url: string; link2Hidden: boolean;
|
|
88
93
|
link3Label: string; link3Url: string; link3Hidden: boolean;
|
|
@@ -561,9 +566,23 @@ export function disclosedLabel(link: { label: string; url: string }): string {
|
|
|
561
566
|
* machinery dies. (Measured: 20 tests, every one of them about polling.) */
|
|
562
567
|
export { stripMarkdown };
|
|
563
568
|
|
|
569
|
+
/** The screen-reader line for a bubble — see `AriaBubble.spoken`. */
|
|
570
|
+
export function spokenOf(who: string, content: string): string {
|
|
571
|
+
return who ? `${who}: ${content}` : content;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/** A persisted transcript from before `spoken` existed, made whole. A `$item.`
|
|
575
|
+
* path missing on a row does not substitute, so a row without the field would
|
|
576
|
+
* announce the literal binding until the next rebuild replaced it. */
|
|
577
|
+
export function withSpoken(bubbles: AriaBubble[]): AriaBubble[] {
|
|
578
|
+
return bubbles.every((b) => typeof b.spoken === "string")
|
|
579
|
+
? bubbles
|
|
580
|
+
: bubbles.map((b) => (typeof b.spoken === "string" ? b : { ...b, spoken: spokenOf(b.who, b.content) }));
|
|
581
|
+
}
|
|
582
|
+
|
|
564
583
|
/** A greeting or optimistic bubble: no links, all slots defaulted. */
|
|
565
584
|
export function plainBubble(id: string, role: string, who: string, content: string): AriaBubble {
|
|
566
|
-
return { id, role, who, content, notUser: role !== "USER", notAria: role === "USER", ...linkFieldsOf("", role) };
|
|
585
|
+
return { id, role, who, content, notUser: role !== "USER", notAria: role === "USER", spoken: spokenOf(who, content), ...linkFieldsOf("", role) };
|
|
567
586
|
}
|
|
568
587
|
|
|
569
588
|
/** Server transcript → bubbles. USER text is literal; ASSISTANT replies are
|
|
@@ -644,6 +663,7 @@ function bubbleOf(id: string, role: string, who: string, raw: string, writing: b
|
|
|
644
663
|
content,
|
|
645
664
|
notUser: role !== "USER",
|
|
646
665
|
notAria: role === "USER",
|
|
666
|
+
spoken: spokenOf(who, content),
|
|
647
667
|
...linkFieldsOf(prose, role),
|
|
648
668
|
};
|
|
649
669
|
}
|
|
@@ -2004,7 +2024,7 @@ export function createAriaChat(o: AriaChatOptions): AriaChatCore {
|
|
|
2004
2024
|
// a rehydrated turn there was no ladder at all, leaving "Aria is
|
|
2005
2025
|
// typing…" on screen with nothing ever fetching the answer.
|
|
2006
2026
|
if (s._pending || s.status === "sending") {
|
|
2007
|
-
const held: AriaChatState = { ...s, status: "sending", prompts: [] };
|
|
2027
|
+
const held: AriaChatState = { ...s, status: "sending", prompts: [], messages: withSpoken(s.messages) };
|
|
2008
2028
|
return cadence(held, o.poll ? o.poll.fastMs : null, null);
|
|
2009
2029
|
}
|
|
2010
2030
|
// …but the self-kick pass runs BEFORE the pack is stashed, so the
|
|
@@ -2013,7 +2033,7 @@ export function createAriaChat(o: AriaChatOptions): AriaChatCore {
|
|
|
2013
2033
|
// still the only thing on screen — `prompts` is already recomputed
|
|
2014
2034
|
// here, and a chip pack that localizes beside a greeting that does not
|
|
2015
2035
|
// is the visible half of the same bug.
|
|
2016
|
-
const messages = isGreetingOnly(s.messages) ? greetingOnly() : s.messages;
|
|
2036
|
+
const messages = isGreetingOnly(s.messages) ? greetingOnly() : withSpoken(s.messages);
|
|
2017
2037
|
return { ...s, status: "ready", messages, prompts: promptsFor(messages, promptList()) };
|
|
2018
2038
|
}
|
|
2019
2039
|
try {
|
|
@@ -265,11 +265,25 @@ const SCREENS = runtimeSetting({
|
|
|
265
265
|
"leading": 20,
|
|
266
266
|
"trailing": 20,
|
|
267
267
|
"top": 24,
|
|
268
|
-
"bottom":
|
|
268
|
+
"bottom": 24
|
|
269
269
|
},
|
|
270
270
|
"fillMaxWidth": true
|
|
271
271
|
}
|
|
272
272
|
},
|
|
273
|
+
{
|
|
274
|
+
"id": ".gap",
|
|
275
|
+
"body": {
|
|
276
|
+
"package": "himalaya",
|
|
277
|
+
"type": "VStack",
|
|
278
|
+
"props": {
|
|
279
|
+
"children": []
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"modifiers": {
|
|
283
|
+
"height": 16,
|
|
284
|
+
"fillMaxWidth": true
|
|
285
|
+
}
|
|
286
|
+
},
|
|
273
287
|
{
|
|
274
288
|
"id": "",
|
|
275
289
|
"body": {
|
|
@@ -54894,7 +54894,7 @@ const SCREENS = runtimeSetting({
|
|
|
54894
54894
|
"spacing": 3,
|
|
54895
54895
|
"children": [
|
|
54896
54896
|
{
|
|
54897
|
-
"id": "himi_owner_lite_aria.msg_$item.id.
|
|
54897
|
+
"id": "himi_owner_lite_aria.msg_$item.id.content",
|
|
54898
54898
|
"body": {
|
|
54899
54899
|
"package": "himalaya",
|
|
54900
54900
|
"type": "HStack",
|
|
@@ -54913,43 +54913,34 @@ const SCREENS = runtimeSetting({
|
|
|
54913
54913
|
}
|
|
54914
54914
|
},
|
|
54915
54915
|
{
|
|
54916
|
-
"id": "",
|
|
54916
|
+
"id": "himi_owner_lite_aria.msg_$item.id.bubble",
|
|
54917
54917
|
"body": {
|
|
54918
54918
|
"package": "himalaya",
|
|
54919
54919
|
"type": "Text",
|
|
54920
54920
|
"props": {
|
|
54921
|
-
"text": "$item.
|
|
54922
|
-
"style": "
|
|
54923
|
-
"
|
|
54924
|
-
"maxLines": 1
|
|
54921
|
+
"text": "$item.content",
|
|
54922
|
+
"style": "body",
|
|
54923
|
+
"maxLines": 50
|
|
54925
54924
|
}
|
|
54926
|
-
}
|
|
54927
|
-
}
|
|
54928
|
-
]
|
|
54929
|
-
}
|
|
54930
|
-
}
|
|
54931
|
-
},
|
|
54932
|
-
{
|
|
54933
|
-
"id": "himi_owner_lite_aria.msg_$item.id.content",
|
|
54934
|
-
"body": {
|
|
54935
|
-
"package": "himalaya",
|
|
54936
|
-
"type": "HStack",
|
|
54937
|
-
"props": {
|
|
54938
|
-
"spacing": 0,
|
|
54939
|
-
"children": [
|
|
54940
|
-
{
|
|
54941
|
-
"id": "",
|
|
54942
|
-
"body": {
|
|
54943
|
-
"package": "himalaya",
|
|
54944
|
-
"type": "Spacer",
|
|
54945
|
-
"props": {}
|
|
54946
54925
|
},
|
|
54947
54926
|
"modifiers": {
|
|
54927
|
+
"accessibilityLabel": "$item.spoken",
|
|
54928
|
+
"padding": {
|
|
54929
|
+
"leading": 16,
|
|
54930
|
+
"trailing": 16,
|
|
54931
|
+
"top": 8,
|
|
54932
|
+
"bottom": 8
|
|
54933
|
+
},
|
|
54934
|
+
"background": {
|
|
54935
|
+
"token": "surfaceSecondary"
|
|
54936
|
+
},
|
|
54937
|
+
"cornerRadius": 20,
|
|
54938
|
+
"maxWidth": 300,
|
|
54948
54939
|
"hiddenPath": "$item.notUser"
|
|
54949
54940
|
}
|
|
54950
54941
|
},
|
|
54951
54942
|
{
|
|
54952
|
-
"id": "",
|
|
54943
|
+
"id": "himi_owner_lite_aria.msg_$item.id.text",
|
|
54953
54944
|
"body": {
|
|
54954
54945
|
"package": "himalaya",
|
|
54955
54946
|
"type": "Text",
|
|
@@ -54958,6 +54949,10 @@ const SCREENS = runtimeSetting({
|
|
|
54958
54949
|
"style": "body",
|
|
54959
54950
|
"maxLines": 50
|
|
54960
54951
|
}
|
|
54952
|
+
},
|
|
54953
|
+
"modifiers": {
|
|
54954
|
+
"accessibilityLabel": "$item.spoken",
|
|
54955
|
+
"hiddenPath": "$item.notAria"
|
|
54961
54956
|
}
|
|
54962
54957
|
}
|
|
54963
54958
|
]
|
|
@@ -83,6 +83,11 @@ export interface AriaBubble {
|
|
|
83
83
|
* that right-aligns the owner renders two templates and collapses one. */
|
|
84
84
|
notUser: boolean;
|
|
85
85
|
notAria: boolean;
|
|
86
|
+
/** What a screen reader says for the row: the author, then the words. A
|
|
87
|
+
* screen that draws the speaker only as a bubble and a side of the screen
|
|
88
|
+
* (`messageStyle: 'userBubble'`) has no visible author line to read, and
|
|
89
|
+
* without this the owner's question and Aria's reply sound the same. */
|
|
90
|
+
spoken: string;
|
|
86
91
|
link1Label: string; link1Url: string; link1Hidden: boolean;
|
|
87
92
|
link2Label: string; link2Url: string; link2Hidden: boolean;
|
|
88
93
|
link3Label: string; link3Url: string; link3Hidden: boolean;
|
|
@@ -561,9 +566,23 @@ export function disclosedLabel(link: { label: string; url: string }): string {
|
|
|
561
566
|
* machinery dies. (Measured: 20 tests, every one of them about polling.) */
|
|
562
567
|
export { stripMarkdown };
|
|
563
568
|
|
|
569
|
+
/** The screen-reader line for a bubble — see `AriaBubble.spoken`. */
|
|
570
|
+
export function spokenOf(who: string, content: string): string {
|
|
571
|
+
return who ? `${who}: ${content}` : content;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/** A persisted transcript from before `spoken` existed, made whole. A `$item.`
|
|
575
|
+
* path missing on a row does not substitute, so a row without the field would
|
|
576
|
+
* announce the literal binding until the next rebuild replaced it. */
|
|
577
|
+
export function withSpoken(bubbles: AriaBubble[]): AriaBubble[] {
|
|
578
|
+
return bubbles.every((b) => typeof b.spoken === "string")
|
|
579
|
+
? bubbles
|
|
580
|
+
: bubbles.map((b) => (typeof b.spoken === "string" ? b : { ...b, spoken: spokenOf(b.who, b.content) }));
|
|
581
|
+
}
|
|
582
|
+
|
|
564
583
|
/** A greeting or optimistic bubble: no links, all slots defaulted. */
|
|
565
584
|
export function plainBubble(id: string, role: string, who: string, content: string): AriaBubble {
|
|
566
|
-
return { id, role, who, content, notUser: role !== "USER", notAria: role === "USER", ...linkFieldsOf("", role) };
|
|
585
|
+
return { id, role, who, content, notUser: role !== "USER", notAria: role === "USER", spoken: spokenOf(who, content), ...linkFieldsOf("", role) };
|
|
567
586
|
}
|
|
568
587
|
|
|
569
588
|
/** Server transcript → bubbles. USER text is literal; ASSISTANT replies are
|
|
@@ -644,6 +663,7 @@ function bubbleOf(id: string, role: string, who: string, raw: string, writing: b
|
|
|
644
663
|
content,
|
|
645
664
|
notUser: role !== "USER",
|
|
646
665
|
notAria: role === "USER",
|
|
666
|
+
spoken: spokenOf(who, content),
|
|
647
667
|
...linkFieldsOf(prose, role),
|
|
648
668
|
};
|
|
649
669
|
}
|
|
@@ -2004,7 +2024,7 @@ export function createAriaChat(o: AriaChatOptions): AriaChatCore {
|
|
|
2004
2024
|
// a rehydrated turn there was no ladder at all, leaving "Aria is
|
|
2005
2025
|
// typing…" on screen with nothing ever fetching the answer.
|
|
2006
2026
|
if (s._pending || s.status === "sending") {
|
|
2007
|
-
const held: AriaChatState = { ...s, status: "sending", prompts: [] };
|
|
2027
|
+
const held: AriaChatState = { ...s, status: "sending", prompts: [], messages: withSpoken(s.messages) };
|
|
2008
2028
|
return cadence(held, o.poll ? o.poll.fastMs : null, null);
|
|
2009
2029
|
}
|
|
2010
2030
|
// …but the self-kick pass runs BEFORE the pack is stashed, so the
|
|
@@ -2013,7 +2033,7 @@ export function createAriaChat(o: AriaChatOptions): AriaChatCore {
|
|
|
2013
2033
|
// still the only thing on screen — `prompts` is already recomputed
|
|
2014
2034
|
// here, and a chip pack that localizes beside a greeting that does not
|
|
2015
2035
|
// is the visible half of the same bug.
|
|
2016
|
-
const messages = isGreetingOnly(s.messages) ? greetingOnly() : s.messages;
|
|
2036
|
+
const messages = isGreetingOnly(s.messages) ? greetingOnly() : withSpoken(s.messages);
|
|
2017
2037
|
return { ...s, status: "ready", messages, prompts: promptsFor(messages, promptList()) };
|
|
2018
2038
|
}
|
|
2019
2039
|
try {
|