@wix/himalaya-cli 0.2009.0 → 0.2011.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 +144 -53
- package/guides/one-app-section-mappings.md +1 -1
- package/guides/one-app-to-himi-app.md +3 -0
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/beauty-salon/tier5-src/_shared/store-ribbon.ts +11 -0
- package/templates/branded-lite/l10n/ar.json +20 -0
- package/templates/branded-lite/l10n/cs.json +20 -0
- package/templates/branded-lite/l10n/da.json +20 -0
- package/templates/branded-lite/l10n/de.json +20 -0
- package/templates/branded-lite/l10n/el.json +20 -0
- package/templates/branded-lite/l10n/es.json +20 -0
- package/templates/branded-lite/l10n/fi.json +20 -0
- package/templates/branded-lite/l10n/fr.json +20 -0
- package/templates/branded-lite/l10n/he.json +16 -0
- package/templates/branded-lite/l10n/hu.json +20 -0
- package/templates/branded-lite/l10n/id.json +20 -0
- package/templates/branded-lite/l10n/it.json +20 -0
- package/templates/branded-lite/l10n/ja.json +20 -0
- package/templates/branded-lite/l10n/ko.json +20 -0
- package/templates/branded-lite/l10n/lt.json +20 -0
- package/templates/branded-lite/l10n/nl.json +20 -0
- package/templates/branded-lite/l10n/no.json +20 -0
- package/templates/branded-lite/l10n/pl.json +20 -0
- package/templates/branded-lite/l10n/pt.json +20 -0
- package/templates/branded-lite/l10n/ru.json +20 -0
- package/templates/branded-lite/l10n/sv.json +20 -0
- package/templates/branded-lite/l10n/th.json +20 -0
- package/templates/branded-lite/l10n/tr.json +20 -0
- package/templates/branded-lite/l10n/uk.json +20 -0
- package/templates/branded-lite/l10n/vi.json +20 -0
- package/templates/branded-lite/l10n/zh.json +20 -0
- package/templates/branded-lite/recipes/members-carousel.json +55 -3
- package/templates/branded-lite/recipes/plans-card.json +630 -3
- package/templates/branded-lite/recipes/products-carousel.json +74 -10
- package/templates/branded-lite/recipes/products-grid.json +74 -10
- package/templates/branded-lite/recipes/programs-filters.json +51 -2
- package/templates/branded-lite/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/branded-lite/tier5-src/_shared/member-row-extras.ts +18 -17
- package/templates/branded-lite/tier5-src/_shared/members-directory-view.ts +12 -0
- package/templates/branded-lite/tier5-src/_shared/members-directory.ts +26 -13
- package/templates/branded-lite/tier5-src/_shared/plan-facts.ts +15 -6
- package/templates/branded-lite/tier5-src/_shared/plans-section.ts +32 -6
- package/templates/branded-lite/tier5-src/_shared/products-section.ts +5 -0
- package/templates/branded-lite/tier5-src/_shared/programs-section.ts +19 -16
- package/templates/branded-lite/tier5-src/_shared/store-ribbon.ts +11 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/gym-fitness/tier5-src/_shared/store-ribbon.ts +11 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/portfolio-creative/tier5-src/_shared/store-ribbon.ts +11 -0
- package/templates/retail-store/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/retail-store/tier5-src/_shared/store-ribbon.ts +11 -0
package/dist/cli.mjs
CHANGED
|
@@ -3964,7 +3964,6 @@ var init_himi_package = __esm({
|
|
|
3964
3964
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
3965
3965
|
var init_icon_catalog_generated = __esm({
|
|
3966
3966
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
3967
|
-
"use strict";
|
|
3968
3967
|
init_define_HHP_CATALOG();
|
|
3969
3968
|
ICON_VIEW_BOX = 24;
|
|
3970
3969
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -45466,6 +45465,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
45466
45465
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
45467
45466
|
var init_idiom = __esm({
|
|
45468
45467
|
"../../core/ts/src/idiom.ts"() {
|
|
45468
|
+
"use strict";
|
|
45469
45469
|
init_define_HHP_CATALOG();
|
|
45470
45470
|
IDIOM_CONTEXTS = {
|
|
45471
45471
|
ios: { native: ["ios"] },
|
|
@@ -47235,7 +47235,6 @@ function shouldRevealError(args) {
|
|
|
47235
47235
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
47236
47236
|
var init_validation = __esm({
|
|
47237
47237
|
"../../core/ts/src/validation.ts"() {
|
|
47238
|
-
"use strict";
|
|
47239
47238
|
init_define_HHP_CATALOG();
|
|
47240
47239
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
47241
47240
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -213062,35 +213061,73 @@ function withProps(node4, id, props2) {
|
|
|
213062
213061
|
}
|
|
213063
213062
|
function plansSection(id, s5, index, ctx, options2) {
|
|
213064
213063
|
if (!ctx.hasScreen("himi_plan")) throw new RecipeError("this scaffold has no himi_plan screen for a plan card to open");
|
|
213065
|
-
const
|
|
213064
|
+
const { detailsLabel, ...load8 } = options2;
|
|
213065
|
+
const svc = ctx.uses("plans", `plans${index}`, { ...load8 });
|
|
213066
213066
|
const children2 = [];
|
|
213067
213067
|
const title = str16(s5.title).trim();
|
|
213068
213068
|
if (s5.showTitle === true && title) children2.push(text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
|
|
213069
|
-
children2.push(ctx.recipe("plans-card", { svc, id, detailScreen: "himi_plan", detailsLabel:
|
|
213070
|
-
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params:
|
|
213069
|
+
children2.push(ctx.recipe("plans-card", { svc, id, detailScreen: "himi_plan", detailsLabel, benefitsLabel: PLAN_BENEFITS_LABEL }), ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
213070
|
+
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: ctx.workerCopy(MODULES.plans.file) } });
|
|
213071
213071
|
}
|
|
213072
213072
|
function textAlign(alignment) {
|
|
213073
213073
|
return alignment === "center" ? "center" : alignment === "right" || alignment === "end" ? "trailing" : "leading";
|
|
213074
213074
|
}
|
|
213075
|
+
function mergedCopyPack(packs) {
|
|
213076
|
+
const out2 = {};
|
|
213077
|
+
const text32 = {};
|
|
213078
|
+
for (const pack of packs) {
|
|
213079
|
+
for (const [key4, value2] of Object.entries(pack)) {
|
|
213080
|
+
if (key4 !== "textCopy") {
|
|
213081
|
+
if (!(key4 in out2)) out2[key4] = value2;
|
|
213082
|
+
continue;
|
|
213083
|
+
}
|
|
213084
|
+
try {
|
|
213085
|
+
Object.assign(text32, { ...JSON.parse(value2), ...text32 });
|
|
213086
|
+
} catch {
|
|
213087
|
+
}
|
|
213088
|
+
}
|
|
213089
|
+
}
|
|
213090
|
+
const texts = Object.entries(text32).sort(([a3], [b3]) => a3 < b3 ? -1 : a3 > b3 ? 1 : 0);
|
|
213091
|
+
if (texts.length) out2.textCopy = JSON.stringify(Object.fromEntries(texts));
|
|
213092
|
+
return out2;
|
|
213093
|
+
}
|
|
213094
|
+
function bannerTextStyle(item2) {
|
|
213095
|
+
const style = str16(item2.fontStyle).trim();
|
|
213096
|
+
if (/^heading(XL|XXL)/i.test(style)) return "title1";
|
|
213097
|
+
if (/^headingL/i.test(style)) return "title2";
|
|
213098
|
+
if (/^heading/i.test(style)) return "title3";
|
|
213099
|
+
if (/^body/i.test(style)) return /bold/i.test(style) ? "bodyEmphasis" : /small/i.test(style) ? "footnote" : "body";
|
|
213100
|
+
return item2.type === "title" ? "title3" : "body";
|
|
213101
|
+
}
|
|
213102
|
+
function bannerTextColor(color) {
|
|
213103
|
+
const match = /^#?([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(str16(color).trim());
|
|
213104
|
+
if (!match || /^[0-9a-f]{6}00$/i.test(match[1])) return "";
|
|
213105
|
+
const hex2 = match[1].length === 3 ? match[1].split("").map((c2) => c2 + c2).join("") : match[1].slice(0, 6);
|
|
213106
|
+
return `#${hex2.toLowerCase()}`;
|
|
213107
|
+
}
|
|
213108
|
+
function bannerText(id, value2, style, align, color) {
|
|
213109
|
+
const words = text10(id, value2, style, { textAlign: align, color: "textOnAccent" }, { fillMaxWidth: true });
|
|
213110
|
+
return color ? vstack(`${id}.scope`, [words], 0, { fillMaxWidth: true, theme: { colors: { textOnAccent: color } } }, align) : words;
|
|
213111
|
+
}
|
|
213075
213112
|
function weekFirstDayOf(locale) {
|
|
213076
213113
|
return locale ? String(firstWeekdayOf(locale)) : void 0;
|
|
213077
213114
|
}
|
|
213078
213115
|
function membersDirectory(id, s5, index, ctx) {
|
|
213079
213116
|
const svc = ctx.uses("members", `members${index}`, { showRole: true, showActivity: true, showBadges: true, showFollow: true, letterBands: true });
|
|
213080
|
-
return composed2(id, s5, svc, ctx.recipeNodes("members-list", { svc, id, detailScreen: "himi_member" }));
|
|
213117
|
+
return composed2(id, s5, svc, ctx.recipeNodes("members-list", { svc, id, detailScreen: "himi_member" }), ctx.workerCopy(MODULES.members.file));
|
|
213081
213118
|
}
|
|
213082
|
-
function loadOnAppear(nodes3, svc) {
|
|
213119
|
+
function loadOnAppear(nodes3, svc, params = {}) {
|
|
213083
213120
|
const at2 = nodes3.findIndex((n2) => !obj20(n2.modifiers).hiddenPath);
|
|
213084
213121
|
if (at2 < 0) return false;
|
|
213085
|
-
nodes3[at2] = { ...nodes3[at2], modifiers: { ...obj20(nodes3[at2].modifiers), onAppear: { actionId: `tier5.${svc}.load`, params
|
|
213122
|
+
nodes3[at2] = { ...nodes3[at2], modifiers: { ...obj20(nodes3[at2].modifiers), onAppear: { actionId: `tier5.${svc}.load`, params } } };
|
|
213086
213123
|
return true;
|
|
213087
213124
|
}
|
|
213088
|
-
function composed2(id, s5, svc, nodes3) {
|
|
213125
|
+
function composed2(id, s5, svc, nodes3, params = {}) {
|
|
213089
213126
|
const out2 = [];
|
|
213090
213127
|
const title = str16(s5.title).trim();
|
|
213091
213128
|
if (s5.showTitle === true && title) out2.push(vstack(`${id}.heading`, [text10(`${id}.title`, title, "title3")], 0, inset(8, 4)));
|
|
213092
|
-
if (loadOnAppear(nodes3, svc)) out2.push(...nodes3);
|
|
213093
|
-
else out2.push(vstack(`${id}.box`, nodes3, 0, { onAppear: { actionId: `tier5.${svc}.load`, params
|
|
213129
|
+
if (loadOnAppear(nodes3, svc, params)) out2.push(...nodes3);
|
|
213130
|
+
else out2.push(vstack(`${id}.box`, nodes3, 0, { onAppear: { actionId: `tier5.${svc}.load`, params } }));
|
|
213094
213131
|
return out2;
|
|
213095
213132
|
}
|
|
213096
213133
|
function programsLimit(section3, settings) {
|
|
@@ -213136,23 +213173,10 @@ function galleryCollage(id, index, ctx, options2) {
|
|
|
213136
213173
|
const svc = ctx.uses("galleries", `galleries${index}`, { limit: 1, showName: options2.showName, collage: true });
|
|
213137
213174
|
return vstack(`${id}.box`, [galleriesRecipe("galleries-collage", svc, id, ctx), ...ctx.optionalRecipe("section-error", { svc, id, action: "load" })], 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
213138
213175
|
}
|
|
213139
|
-
function sectionCopy(ctx, ...
|
|
213140
|
-
const
|
|
213141
|
-
|
|
213142
|
-
|
|
213143
|
-
for (const [key4, value2] of Object.entries(ctx.workerCopy(module))) {
|
|
213144
|
-
if (key4 !== "textCopy") {
|
|
213145
|
-
params[key4] = value2;
|
|
213146
|
-
continue;
|
|
213147
|
-
}
|
|
213148
|
-
try {
|
|
213149
|
-
texts = { ...texts, ...JSON.parse(value2) };
|
|
213150
|
-
} catch {
|
|
213151
|
-
}
|
|
213152
|
-
}
|
|
213153
|
-
}
|
|
213154
|
-
if (texts) params.textCopy = JSON.stringify(Object.fromEntries(Object.entries(texts).sort(([a3], [b3]) => a3 < b3 ? -1 : a3 > b3 ? 1 : 0)));
|
|
213155
|
-
return params;
|
|
213176
|
+
function sectionCopy(ctx, module, ...helpers) {
|
|
213177
|
+
const pack = ctx.workerCopy(module);
|
|
213178
|
+
for (const helper of helpers) ctx.workerCopy(helper);
|
|
213179
|
+
return pack;
|
|
213156
213180
|
}
|
|
213157
213181
|
function groupsSection(recipe, type2) {
|
|
213158
213182
|
return (id, s5, st2, index, ctx, sectionId) => {
|
|
@@ -213601,6 +213625,7 @@ function generateScreens(input) {
|
|
|
213601
213625
|
const unmapped = [];
|
|
213602
213626
|
const widgets = [];
|
|
213603
213627
|
let widgetsOmitted = false;
|
|
213628
|
+
const pageCopy = { modules: /* @__PURE__ */ new Set(), packs: [] };
|
|
213604
213629
|
const ctx = {
|
|
213605
213630
|
raw,
|
|
213606
213631
|
business: obj20(input.business),
|
|
@@ -213608,7 +213633,14 @@ function generateScreens(input) {
|
|
|
213608
213633
|
page: { label: label4, screenId, layoutItemId },
|
|
213609
213634
|
taken: taken2,
|
|
213610
213635
|
hasScreen: (id) => !input.takenScreenIds || input.takenScreenIds.has(id),
|
|
213611
|
-
|
|
213636
|
+
// Every section on a page loads into ONE page worker, and its copy stash keeps only the last pack a load delivered. So each
|
|
213637
|
+
// copy-carrying load gets the same pack, the union of every module the page's sections read, filled in once the page is built.
|
|
213638
|
+
workerCopy: (module) => {
|
|
213639
|
+
pageCopy.modules.add(module);
|
|
213640
|
+
const pack = {};
|
|
213641
|
+
pageCopy.packs.push(pack);
|
|
213642
|
+
return pack;
|
|
213643
|
+
},
|
|
213612
213644
|
action: (action) => controlAction(input, screenId, action, () => {
|
|
213613
213645
|
if (input.hasModule && !input.hasModule(MODULES.memberAction.file)) return false;
|
|
213614
213646
|
const svc = memberActionService(screenId);
|
|
@@ -213738,6 +213770,10 @@ function generateScreens(input) {
|
|
|
213738
213770
|
extras.length = extra;
|
|
213739
213771
|
}
|
|
213740
213772
|
});
|
|
213773
|
+
if (pageCopy.packs.length) {
|
|
213774
|
+
const pack = mergedCopyPack([...pageCopy.modules].sort().map((module) => input.workerCopy?.(module) ?? {}));
|
|
213775
|
+
for (const each of pageCopy.packs) Object.assign(each, pack);
|
|
213776
|
+
}
|
|
213741
213777
|
out2.unmapped.push(...unmapped);
|
|
213742
213778
|
const keptForWidgets = !children2.length && widgetsOmitted && !unmapped.length && elements2.length > 0 && elements2.every((element) => str16(obj20(sections2[str16(element.elementId)]).sectionDefinitionId) === CUSTOM_WIDGET_SECTION);
|
|
213743
213779
|
if (children2.length || keptForWidgets) out2.customWidgets.push(...widgets);
|
|
@@ -214115,7 +214151,7 @@ function addNavigation(out2, plan, taken2, pageIconOf) {
|
|
|
214115
214151
|
out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
|
|
214116
214152
|
out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
|
|
214117
214153
|
}
|
|
214118
|
-
var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj20, arr4, str16, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, REPEATER_ON_IMAGE_INSET, REPEATER_ON_SHADE_THEME, REPEATER_ON_BARE_IMAGE_THEME, REPEATER_IMAGE_SHADE, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
|
|
214154
|
+
var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj20, arr4, str16, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, REPEATER_ON_IMAGE_INSET, REPEATER_ON_SHADE_THEME, REPEATER_ON_BARE_IMAGE_THEME, REPEATER_IMAGE_SHADE, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, PLAN_SELECT_LABEL, PLAN_DETAILS_LABEL, PLAN_BENEFITS_LABEL, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
|
|
214119
214155
|
var init_generate = __esm({
|
|
214120
214156
|
"src/one-app/generate.ts"() {
|
|
214121
214157
|
init_define_HHP_CATALOG();
|
|
@@ -214400,6 +214436,9 @@ var init_generate = __esm({
|
|
|
214400
214436
|
BUSINESS_CHAT_SCREEN = "himi_business_chat";
|
|
214401
214437
|
SUBSCRIPTIONS_MAX = 5;
|
|
214402
214438
|
selectedPlanIds = (st2) => arr4(st2.selectedPlanIds).filter((v2) => typeof v2 === "string" && !!v2);
|
|
214439
|
+
PLAN_SELECT_LABEL = "Select";
|
|
214440
|
+
PLAN_DETAILS_LABEL = "See Details";
|
|
214441
|
+
PLAN_BENEFITS_LABEL = "Show Benefits";
|
|
214403
214442
|
MEMBERS_RAIL = 10;
|
|
214404
214443
|
PROGRAMS_DEFAULT_LIMIT = 2;
|
|
214405
214444
|
PROGRAMS_INLINE_MAX = 20;
|
|
@@ -214596,9 +214635,9 @@ var init_generate = __esm({
|
|
|
214596
214635
|
if (asked > columns) ctx.gap(elementId, "platform_elements_repeater_section", `the source lays the items in ${asked} columns; a phone shows ${columns}, so the cards stay readable, and a wider screen shows ${asked}`);
|
|
214597
214636
|
return vstack(`${id}.box`, [node3(`${id}.grid`, "Grid", { columns, ...asked > columns ? { columnsMedium: asked } : {}, spacing: gap, items: cards }, { fillMaxWidth: true })], 0, inset(8, 8));
|
|
214598
214637
|
},
|
|
214599
|
-
// The source lays its texts
|
|
214600
|
-
//
|
|
214601
|
-
// them
|
|
214638
|
+
// The source lays its texts and its button straight on the picture, where it places them (`verticalAlign`, `horizontalAlign`), in
|
|
214639
|
+
// the colors and type sizes it authored, over the picture in its own crop (`aspectRatio`, `cornerRadius`). They sit there here too,
|
|
214640
|
+
// with no panel behind them: the source draws none. With no picture the texts and the button simply stack.
|
|
214602
214641
|
platform_elements_interactive_banner_section: (id, _s2, st2, _i2, ctx, elementId) => {
|
|
214603
214642
|
const url = str16(st2.imageUri);
|
|
214604
214643
|
const tap = controlTap(ctx, obj20(st2.action), elementId, "platform_elements_interactive_banner_section", "the banner");
|
|
@@ -214617,16 +214656,18 @@ var init_generate = __esm({
|
|
|
214617
214656
|
if (item2.type === "button") {
|
|
214618
214657
|
if (tap) buttons.push(node3(`${id}.b${i2}`, "Button", { title: str16(item2.text).trim(), style: "primary", size: "md", fullWidth: false, action: tap }));
|
|
214619
214658
|
else ctx.gap(elementId, "platform_elements_interactive_banner_section", `the banner button "${str16(item2.text).trim()}" is left out: it has no action the app can run`);
|
|
214620
|
-
} else texts.push(
|
|
214659
|
+
} else if (picture) texts.push(bannerText(`${id}.t${i2}`, str16(item2.text).trim(), bannerTextStyle(item2), align, bannerTextColor(item2.color)));
|
|
214660
|
+
else texts.push(text10(`${id}.t${i2}`, str16(item2.text).trim(), bannerTextStyle(item2), { textAlign: align }, { fillMaxWidth: true }));
|
|
214621
214661
|
});
|
|
214622
214662
|
const tapped = tap ? { onTap: tap } : {};
|
|
214623
214663
|
if (!picture) {
|
|
214624
214664
|
const parts = [...texts, ...buttons];
|
|
214625
214665
|
return parts.length ? vstack(`${id}.box`, parts, 8, { ...inset(8, 8), ...tapped }, align === "center" ? "center" : "leading") : null;
|
|
214626
214666
|
}
|
|
214627
|
-
const
|
|
214628
|
-
const over = vstack(`${id}.over`, [...
|
|
214629
|
-
|
|
214667
|
+
const words = texts.length ? [vstack(`${id}.texts`, texts, 4, { fillMaxWidth: true }, align)] : [];
|
|
214668
|
+
const over = vstack(`${id}.over`, [...words, ...buttons], 12, { fillMaxWidth: true, padding: { leading: 16, trailing: 16, top: 16, bottom: 16 } }, align);
|
|
214669
|
+
const vertical = st2.verticalAlign === "top" || st2.verticalAlign === "bottom" ? { verticalAlignment: st2.verticalAlign } : {};
|
|
214670
|
+
return vstack(`${id}.box`, [node3(`${id}.stack`, "ZStack", { alignment: align, ...vertical, children: [picture, over] }, { fillMaxWidth: true })], 0, { ...inset(8, 8), ...tapped });
|
|
214630
214671
|
},
|
|
214631
214672
|
// A web page inside the screen. The source sizes it to its content; a fixed height is the nearest fixed equivalent.
|
|
214632
214673
|
platform_elements_web_view_section: (id, _s2, st2, _i2, ctx, elementId) => {
|
|
@@ -214761,17 +214802,26 @@ var init_generate = __esm({
|
|
|
214761
214802
|
children2.push(list5, ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
214762
214803
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
214763
214804
|
},
|
|
214764
|
-
// The selected plans as cards: name, pitch, price, validity,
|
|
214765
|
-
// A scaffold without the plans recipe keeps the title and a link to the template's plans screen, as every data
|
|
214766
|
-
|
|
214805
|
+
// The selected plans as cards: name, pitch, price, validity, the One App's "See Details" button and the benefits list (unless the
|
|
214806
|
+
// source hides it). A scaffold without the plans recipe keeps the title and a link to the template's plans screen, as every data
|
|
214807
|
+
// section does.
|
|
214808
|
+
memberships_plan_cards_carousel: (id, s5, st2, index, ctx) => plansSection(id, s5, index, ctx, { planIds: selectedPlanIds(st2), showBenefits: st2.shouldDisplayBenefitsList !== false, detailsLabel: PLAN_DETAILS_LABEL }),
|
|
214767
214809
|
// The paid-plans section is the same cards over the site's plans: the chosen ones in the source's order, else every plan in the
|
|
214768
|
-
// source's sorting
|
|
214810
|
+
// source's sorting, with the One App's "Select" button. Its default benefits layout ("expand", also when the source names none) folds
|
|
214811
|
+
// the benefits under a collapsed "Show Benefits" disclosure; any other layout lists them and is reported.
|
|
214769
214812
|
platform_paid_plans_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
214770
214813
|
const sorting = str16(st2.sorting).trim(), layout2 = str16(st2.benefitsLayoutType).trim();
|
|
214771
214814
|
const order = sorting === "oldest-first" || sorting === "newest-first" ? sorting : void 0;
|
|
214772
214815
|
if (sorting && !order) ctx.gap(sectionId, "platform_paid_plans_section", `the source sorts its plans "${sorting}"; the section shows them in the site's order`);
|
|
214773
|
-
|
|
214774
|
-
|
|
214816
|
+
const folded = !layout2 || layout2 === "expand";
|
|
214817
|
+
if (!folded) ctx.gap(sectionId, "platform_paid_plans_section", `the source lays its plan benefits out as "${layout2}"; the cards list every benefit`);
|
|
214818
|
+
return plansSection(id, s5, index, ctx, {
|
|
214819
|
+
planIds: selectedPlanIds(st2),
|
|
214820
|
+
showBenefits: true,
|
|
214821
|
+
...order ? { order } : {},
|
|
214822
|
+
...folded ? { benefits: "disclosure" } : {},
|
|
214823
|
+
detailsLabel: PLAN_SELECT_LABEL
|
|
214824
|
+
});
|
|
214775
214825
|
},
|
|
214776
214826
|
// The site's first Pro Gallery galleries as cover cards (a rail, or full-width cards when the source turns its carousel off), as many as
|
|
214777
214827
|
// the source's `maxGalleries`; with exactly one (and the carousel on) the source shows that gallery as a collage, and so does the section. Like the source, which lists a member's non-hidden, non-empty galleries, the
|
|
@@ -214954,12 +215004,16 @@ var init_generate = __esm({
|
|
|
214954
215004
|
ctx.gap(sectionId, type2, `the section shows the member's points and tier; the points' expiry and the "Rewards available (N)" line are not shown (the Rewards screen shows them)`);
|
|
214955
215005
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
214956
215006
|
},
|
|
214957
|
-
|
|
215007
|
+
// The selected Pages document inline, under the section's own heading when the source shows one ("Studio guide"). A section whose
|
|
215008
|
+
// heading is off or empty gets none: the document's text is never given a title it was not authored with.
|
|
215009
|
+
pages_section: (id, s5, _st, index, ctx, elementId) => {
|
|
214958
215010
|
const placement = ctx.placements.get(`${ctx.page.layoutItemId}:${elementId}:${index}`);
|
|
214959
215011
|
if (placement?.state === "ready" && placement.component) {
|
|
214960
215012
|
const left = arr4(placement.gaps).map(str16).filter(Boolean);
|
|
214961
215013
|
if (left.length) ctx.gap(elementId, "pages_section", `the Pages document has content the section cannot show (${left.join(", ")}); its text and images are shown without it`);
|
|
214962
|
-
|
|
215014
|
+
const title = str16(s5.title).trim();
|
|
215015
|
+
const heading = s5.showTitle === true && title ? [text10(`${id}.title`, title, "title3", {}, { fillMaxWidth: true })] : [];
|
|
215016
|
+
return vstack(`${id}.box`, [...heading, placement.component], heading.length ? 8 : 0, inset(8, 8));
|
|
214963
215017
|
}
|
|
214964
215018
|
return ctx.unsupported(elementId, "pages_section", placement ? `its Pages document is not ready in pages-content.json (state "${str16(placement.state)}")` : "its Pages document is not in pages-content.json: re-run `himi one-app migrate` to collect it");
|
|
214965
215019
|
},
|
|
@@ -215069,15 +215123,20 @@ var init_generate = __esm({
|
|
|
215069
215123
|
...categoryIds.length ? { categoryIds } : {}
|
|
215070
215124
|
});
|
|
215071
215125
|
const card2 = ctx.recipe("programs-card", { svc, id, detailScreen: "himi_program" });
|
|
215072
|
-
|
|
215126
|
+
let filterNodes = filters.status || filters.category ? ctx.optionalRecipe("programs-filters", {
|
|
215073
215127
|
svc,
|
|
215074
215128
|
id,
|
|
215075
215129
|
statusLabel: "Show programs",
|
|
215076
215130
|
categoryLabel: "Filter by category",
|
|
215077
215131
|
allProgramsLabel: "All programs",
|
|
215078
215132
|
joinedLabel: "Programs I joined",
|
|
215079
|
-
allCategoriesLabel: "All categories"
|
|
215133
|
+
allCategoriesLabel: "All categories",
|
|
215134
|
+
signInScreen: "himi_sign_in"
|
|
215080
215135
|
}) : [];
|
|
215136
|
+
if (filterNodes.length && filters.status && !ctx.hasScreen("himi_sign_in")) {
|
|
215137
|
+
filterNodes = filterNodes.map((n2) => withoutNode(n2, `${id}.signin.button`));
|
|
215138
|
+
ctx.gap(sectionId, "achievements_list_section", 'a guest on "Programs I joined" is asked to sign in; this scaffold has no himi_sign_in screen, so the prompt has no Sign in button');
|
|
215139
|
+
}
|
|
215081
215140
|
if ((filters.status || filters.category) && !filterNodes.length) {
|
|
215082
215141
|
ctx.gap(sectionId, "achievements_list_section", "the source shows category and participant-status filters; this scaffold ships no programs-filters recipe, so the list has no filter controls");
|
|
215083
215142
|
}
|
|
@@ -215101,19 +215160,26 @@ var init_generate = __esm({
|
|
|
215101
215160
|
if (show2 && show2 !== "all") return ctx.unsupported(sectionId, "platform_general_members_section", `its members filter ${JSON.stringify(show2)} is not one this generator knows`);
|
|
215102
215161
|
return membersDirectory(id, s5, index, ctx);
|
|
215103
215162
|
},
|
|
215104
|
-
// The members rail: avatar cards from the members directory module in rail mode
|
|
215105
|
-
//
|
|
215163
|
+
// The members rail: avatar cards from the members directory module in rail mode, each with the member's presence line ("Active now")
|
|
215164
|
+
// and the directory's Follow (a visitor is asked to sign in; the write is the member's own), and View All to the members directory.
|
|
215165
|
+
// `display` picks the members: everyone (also when the source set none), or only those who hold a badge. Followers and admins have no
|
|
215166
|
+
// read the directory makes, so those two are reported. A member's private profile is not in the directory read, so it never shows.
|
|
215106
215167
|
member_horizontal_list_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
215107
215168
|
const type2 = "member_horizontal_list_section", display = str16(st2.display).trim() || "all-members";
|
|
215108
215169
|
if (display !== "all-members" && display !== "members-with-badges") return ctx.unsupported(sectionId, type2, `its "${display}" list needs a read the members directory does not make (followers, admins)`);
|
|
215109
215170
|
const onlyWithBadges = display === "members-with-badges";
|
|
215110
|
-
const svc = ctx.uses("members", `membersRail${index}`, { showBadges: onlyWithBadges, rail: { limit: MEMBERS_RAIL, ...onlyWithBadges ? { onlyWithBadges } : {} } });
|
|
215171
|
+
const svc = ctx.uses("members", `membersRail${index}`, { showBadges: onlyWithBadges, showActivity: true, showFollow: true, rail: { limit: MEMBERS_RAIL, ...onlyWithBadges ? { onlyWithBadges } : {} } });
|
|
215111
215172
|
const children2 = [];
|
|
215112
215173
|
const title = str16(s5.title).trim();
|
|
215113
|
-
|
|
215174
|
+
const showTitle = s5.showTitle === true && !!title;
|
|
215175
|
+
const viewAll = ctx.hasScreen("himi_members") ? node3(`${id}.all`, "Button", { title: "View All", style: "link", size: "md", action: { actionId: "himi.open", params: { screenId: "himi_members" } } }, { hiddenPath: `$service:${svc}.noMembers` }) : null;
|
|
215176
|
+
if (showTitle && viewAll) children2.push(hstack(`${id}.head`, [text10(`${id}.title`, title, "title3", { maxLines: 2 }, { ...inset(0, 0, 0), weight: 1 }), viewAll], 12));
|
|
215177
|
+
else if (showTitle) children2.push(text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
|
|
215114
215178
|
children2.push(ctx.recipe("members-carousel", { svc, id, detailScreen: "himi_member" }), ...ctx.optionalRecipe("section-error", { svc, id, action: "retry" }));
|
|
215179
|
+
if (viewAll && !showTitle) children2.push({ ...viewAll, body: { ...obj20(viewAll.body), props: { ...obj20(obj20(viewAll.body).props), style: "secondary", fullWidth: true } } });
|
|
215180
|
+
if (!viewAll) ctx.gap(sectionId, type2, "the source's View All opens the members directory; this scaffold has no himi_members screen, so it is left out");
|
|
215115
215181
|
ctx.gap(sectionId, type2, `the source lists its members in a horizontal list; the section shows the first ${MEMBERS_RAIL} as a rail${onlyWithBadges ? ", picked from the first page of members (those who hold a badge)" : ""}`);
|
|
215116
|
-
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params:
|
|
215182
|
+
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: ctx.workerCopy(MODULES.members.file) } });
|
|
215117
215183
|
},
|
|
215118
215184
|
// A blog list: the shared blog-list module configured from the section's own settings; unlimited follows the cursor,
|
|
215119
215185
|
// a limited list shows N posts and offers "See All Posts" for the full list in the same category.
|
|
@@ -270524,7 +270590,7 @@ function sectionWorkerCopy(contentDir2, locale) {
|
|
|
270524
270590
|
let params = {};
|
|
270525
270591
|
if (/^[a-z0-9-]+$/.test(module)) {
|
|
270526
270592
|
try {
|
|
270527
|
-
const source2 =
|
|
270593
|
+
const source2 = sharedModuleSources(join166(contentDir2, "tier5-src", "_shared"), module).join("\n");
|
|
270528
270594
|
params = pinnedWorkerParams(locale, contentDir2, source2) ?? keyedWorkerCopy(contentDir2, locale, source2);
|
|
270529
270595
|
} catch {
|
|
270530
270596
|
params = {};
|
|
@@ -270534,6 +270600,31 @@ function sectionWorkerCopy(contentDir2, locale) {
|
|
|
270534
270600
|
return params;
|
|
270535
270601
|
};
|
|
270536
270602
|
}
|
|
270603
|
+
function sharedModuleSources(dir, module) {
|
|
270604
|
+
const seen = /* @__PURE__ */ new Set();
|
|
270605
|
+
const sources = [];
|
|
270606
|
+
const visit = (name, required3) => {
|
|
270607
|
+
if (seen.has(name)) return;
|
|
270608
|
+
seen.add(name);
|
|
270609
|
+
let source2;
|
|
270610
|
+
try {
|
|
270611
|
+
source2 = readFileSync156(join166(dir, `${name}.ts`), "utf8");
|
|
270612
|
+
} catch (error) {
|
|
270613
|
+
if (required3) throw error;
|
|
270614
|
+
return;
|
|
270615
|
+
}
|
|
270616
|
+
sources.push(source2);
|
|
270617
|
+
const file2 = ts40.createSourceFile(`${name}.ts`, source2, ts40.ScriptTarget.Latest, false);
|
|
270618
|
+
for (const statement of file2.statements) {
|
|
270619
|
+
const specifier = ts40.isImportDeclaration(statement) || ts40.isExportDeclaration(statement) ? statement.moduleSpecifier : void 0;
|
|
270620
|
+
if (!specifier || !ts40.isStringLiteral(specifier)) continue;
|
|
270621
|
+
const helper = /^\.\/([a-z0-9-]+)\.js$/.exec(specifier.text)?.[1];
|
|
270622
|
+
if (helper) visit(helper, false);
|
|
270623
|
+
}
|
|
270624
|
+
};
|
|
270625
|
+
visit(module, true);
|
|
270626
|
+
return sources;
|
|
270627
|
+
}
|
|
270537
270628
|
function keyedWorkerCopy(contentDir2, locale, source2) {
|
|
270538
270629
|
const tag2 = locale?.default ?? "en";
|
|
270539
270630
|
const others = (locale?.translations ?? []).filter((t2) => t2 !== tag2);
|
|
@@ -79,7 +79,7 @@ The **Himalaya implementation** cell is blank for every unassigned row. Notes on
|
|
|
79
79
|
|
|
80
80
|
| Source sectionDefinitionId | Source viewer component | Himalaya implementation | Placement / reuse | Class | Settings, actions and gaps |
|
|
81
81
|
| --- | --- | --- | --- | --- | --- |
|
|
82
|
-
| `achievements_list_section` | `wix-one-app-achievements.SectionMemberChallengesScreen` | [Programs list/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/apps/himi-branded-lite/dev/index.ts) + [programs worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + shared programs module (list layout) with the `programs-card`, `programs-filters` and `programs-see-all` recipes | Composed inline; member list and program detail reused | Partial | The migration generator composes the list inline: full-width cards (duration, participants and price follow `isDurationVisible`, `isParticipantsVisible`, `isPriceVisible`), the category chips and the "All programs / Programs I joined" control (
|
|
82
|
+
| `achievements_list_section` | `wix-one-app-achievements.SectionMemberChallengesScreen` | [Programs list/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/apps/himi-branded-lite/dev/index.ts) + [programs worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + shared programs module (list layout) with the `programs-card`, `programs-filters` and `programs-see-all` recipes | Composed inline; member list and program detail reused | Partial | The migration generator composes the list inline: full-width cards (duration, participants and price follow `isDurationVisible`, `isParticipantsVisible`, `isPriceVisible`), the category chips and the "All programs / Programs I joined" control (shown to a visitor too and with a single program, as the source's filter menu is; "All categories" alone on a site with no categories; a visitor on "Programs I joined" is asked to sign in; both hidden when `isFilterVisible` is false, each axis also follows `filterSettings.byCategory` / `byParticipantStatus`), a card action of Join for a visitor too (it opens `himi_program`, which asks them to sign in), the 2-card mode and "See all" to `himi_programs` only while more programs exist. The card count is the definition's `extraProps.limit` (2, verified in the Catalyst definitions file); an authored `extraProps.limit` or `settings.limit` wins, an infinite flag or a non-count limit shows the whole list, and a limit above 20 shows 20 and reports a gap. A page made only of this section gets a generated screen with the list inline (it is not routed to `himi_programs`). `himi_member_programs` (worker `himi-branded-lite-member-programs`) is the member list: each card carries the signed-in member's standing from Participants v3 / Join Applications v3 (Joined, Program complete, Program ended, Pending request, Request approved, Invited, Participation suspended), a progress bar once started, the price before joining, the same two filters, cursor paging and pull-to-refresh; an ended program the member never joined is dropped. The card opens `himi_program`, which enrols through Join Applications v3 (a free program confirms the participant, a private one sends a request for owner approval, an approved paid application goes to payment), shows the same standing, and offers Cancel request only while a request waits for approval. Also read from the source: the section's chosen category (`categorySettings`) scopes the list, and a MANUAL `sortingSettings.challengesOrder` leads it (the other programs of the category follow; the category chips offer only the chosen categories, and none when one is chosen); a program's cover falls back to its video poster. Still open: join / cancel-request actions on the card itself, and Pricing Plans benefits ("Included in your plan"). |
|
|
83
83
|
| `achievements_carousel_section` | `wix-one-app-achievements.MemberChallengesCarousel` | [Programs data/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + shared programs module (carousel layout) with the `programs-carousel` recipe | Composed inline | Partial | The migration generator composes the carousel inline: the section title (unless `showTitle` is false), one page of snapping cards with page dots, duration, participants and price per `isDurationVisible`, `isParticipantsVisible`, `isPriceVisible`, a MANUAL `sortingSettings.challengesOrder` that puts the selected programs first (the other programs of the category follow), scoped to the section's chosen category (`categorySettings`), a retry when the read fails, and a card that opens `himi_program`. It shows 5 cards, the definition's `extraProps.limit`; an authored `extraProps.limit` or `settings.limit` wins, a non-count limit shows the most one page holds, and a limit above 20 shows 20 and reports a gap. The source carousel has no setting for its call to action (a collected app carries only the visibility flags, `sortingSettings` and `filterSettings`), so the "See All" button to `himi_programs` is always drawn under the cards, with the `programs-see-all` recipe; a scaffold without that recipe or without `himi_programs` reports a gap. Still open: the button is shown even when no more programs exist than the cards (the worker only clears its `noSeeAll` gate for an inline list). |
|
|
84
84
|
| `achievements_participant_carousel_section` | `wix-one-app-achievements.ParticipantChallengesCarousel` | Shared programs module (carousel layout, `participating`) with the `programs-participant-carousel` recipe | Composed inline | Partial | Signed-in only: hidden whole, title included, for a visitor, when the member has no programs, or when the read fails. The cards are the member's own programs with their progress (no price), and each opens `himi_program`. It shows 5 cards, the definition's `extraProps.limit`; an authored `extraProps.limit` or `settings.limit` is respected up to 20 cards (one read page). The "Programs I joined" CTA opens `himi_member_programs` and shows only with the section title, as in the source viewer. A scaffold without `himi_program` reports the section unsupported; one without `himi_member_programs` leaves out the CTA. Still open: a MANUAL selection/order is ignored, and a limit above 20 shows 20; the generator reports no gap for either. |
|
|
85
85
|
|
|
@@ -1119,6 +1119,9 @@ Copy the resulting component into an editable app source file, then insert it
|
|
|
1119
1119
|
into the actual generated screen's payload. Keep it outside collection-bound
|
|
1120
1120
|
rows that a worker replaces on load. Rendering a separate unused sample or merely
|
|
1121
1121
|
changing the catalog classification does not restore a migrated placement.
|
|
1122
|
+
When the source section shows its own heading (`showTitle: true` and a non-empty
|
|
1123
|
+
`title`, such as "Studio guide"), `generate` places that heading above the
|
|
1124
|
+
document; a section whose heading is off or empty gets none.
|
|
1122
1125
|
The component uses literal `RichContent.documentJson`; no source prose is a
|
|
1123
1126
|
service binding. The existing viewer preserves text, supported formatting, media
|
|
1124
1127
|
and safe http(s)/mailto/tel links. Legacy bare website domains gain HTTPS before
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2011.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": "3170709b25bc3d4b6c9542b2065dfe4f7d3929504624f701497af812"
|
|
86
86
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// retitles them like any other worker string.
|
|
12
12
|
import { normalizeFormattedPrice, productImage, productOptions, productPrice, type StoreProduct } from "./himi-store.js";
|
|
13
13
|
import { readSavedProducts, toggleSavedProduct } from "./himi-store-saved.js";
|
|
14
|
+
import { ribbonText } from "./store-ribbon.js";
|
|
14
15
|
import { cleanTitle, initials } from "./himi-text.js";
|
|
15
16
|
import { copyParam, copyTemplate } from "./himi-copy.js";
|
|
16
17
|
import { formatCurrency } from "./engine-intl.js";
|
|
@@ -185,13 +186,7 @@ function swatchFields(hexes: string[], onSale: boolean) {
|
|
|
185
186
|
};
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
|
|
189
|
-
* local type, not a `StoreProduct` member: other workers already extend that type with their own `ribbon`. */
|
|
190
|
-
export function ribbonText(p: StoreProduct): string {
|
|
191
|
-
const ribbon = (p as { ribbon?: unknown }).ribbon;
|
|
192
|
-
const name = typeof ribbon === "string" ? ribbon : typeof (ribbon as { name?: unknown } | null | undefined)?.name === "string" ? (ribbon as { name: string }).name : "";
|
|
193
|
-
return name.trim();
|
|
194
|
-
}
|
|
189
|
+
export { ribbonText };
|
|
195
190
|
|
|
196
191
|
/** What the tag row (Sale tag, ribbon, swatches) shows. One rule for every screen that rebuilds it, including
|
|
197
192
|
* after the App Store presentation changes `onSale`: the ribbon wins over the Sale tag, so a product never
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// The merchant's ribbon on a product ("New", "Best Seller"…), on its own so a section that shows only tiles (products-section) reads it
|
|
2
|
+
// without the shop's sort, filter and saved-products code (himi-store-facets re-exports it).
|
|
3
|
+
import type { StoreProduct } from "./himi-store.js";
|
|
4
|
+
|
|
5
|
+
/** The ribbon the merchant set, whichever catalog answered: V3 `{ id, name }`, V1 a plain string. Read through a
|
|
6
|
+
* local type, not a `StoreProduct` member: other workers already extend that type with their own `ribbon`. */
|
|
7
|
+
export function ribbonText(p: StoreProduct): string {
|
|
8
|
+
const ribbon = (p as { ribbon?: unknown }).ribbon;
|
|
9
|
+
const name = typeof ribbon === "string" ? ribbon : typeof (ribbon as { name?: unknown } | null | undefined)?.name === "string" ? (ribbon as { name: string }).name : "";
|
|
10
|
+
return name.trim();
|
|
11
|
+
}
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "المسؤول",
|
|
6652
6652
|
"origin": "one-app:wix-one-app-selections:SELECTION_MEMBERSHIP_STATUS_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "المالك",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "خطة مجانية",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "عرض المزايا",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "عرض الكل",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, zero {لا أعضاء} one {عضو واحد} two {عضوان} few {# أعضاء} many {# عضوًا} other {# عضو}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Správce",
|
|
6652
6652
|
"origin": "one-app:wix-one-app-selections:SELECTION_MEMBERSHIP_STATUS_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Vlastník",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Bezplatný plán",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Zobrazit výhody",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Zobrazit vše",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# člen} few {# členové} other {# členů}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Admin",
|
|
6652
6652
|
"origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Ejer",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Gratis plan",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Vis fordele",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Se alle",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# medlem} other {# medlemmer}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Admin",
|
|
6652
6652
|
"origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Inhaber",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Kostenloser Plan",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Vorteile anzeigen",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Alle ansehen",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# Mitglied} other {# Mitglieder}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Διαχειριστής",
|
|
6652
6652
|
"origin": "one-app:wix-one-app-selections:SELECTION_MEMBERSHIP_STATUS_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Ιδιοκτήτης",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Δωρεάν πρόγραμμα",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Εμφάνιση πλεονεκτημάτων",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Προβολή όλων",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# μέλος} other {# μέλη}}",
|