@wix/himalaya-cli 0.1311.0 → 0.1312.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 +55 -34
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/web-page-native-sdk.md +18 -8
- package/guides/webview-page-sdk.md +9 -3
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +25 -25
- package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/beauty-salon-owner/dev/index.ts +844 -510
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/beauty-salon-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product/index.ts +10 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-service/index.ts +10 -0
- package/templates/branded-lite/dev/index.ts +120 -120
- package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/community-club/dev/index.ts +20 -20
- package/templates/community-club/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/community-club/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/community-club-owner/dev/index.ts +957 -595
- package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/community-club-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/community-club-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/community-club-owner/tier5-src/himi-owner-lite-event/index.ts +10 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/community-club-owner/tier5-src/himi-owner-lite-product/index.ts +10 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/events-meetups/dev/index.ts +15 -15
- package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/events-meetups-owner/dev/index.ts +726 -433
- package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/events-meetups-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event/index.ts +10 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/gym-fitness/dev/index.ts +30 -30
- package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/gym-fitness-owner/dev/index.ts +1041 -644
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/gym-fitness-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event/index.ts +10 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product/index.ts +10 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-service/index.ts +10 -0
- package/templates/nonprofit-cause/dev/index.ts +20 -20
- package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/nonprofit-cause-owner/dev/index.ts +810 -482
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/nonprofit-cause-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event/index.ts +10 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-service/index.ts +10 -0
- package/templates/owner-lite/dev/index.ts +1066 -648
- package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/owner-lite/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/owner-lite/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/owner-lite/tier5-src/himi-owner-lite-event/index.ts +10 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/owner-lite/tier5-src/himi-owner-lite-product/index.ts +10 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-service/index.ts +10 -0
- package/templates/podcast-creator/dev/index.ts +20 -20
- package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/podcast-creator-owner/dev/index.ts +957 -595
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/podcast-creator-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event/index.ts +10 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product/index.ts +10 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/portfolio-creative/dev/index.ts +20 -20
- package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/portfolio-creative-owner/dev/index.ts +844 -510
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/portfolio-creative-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product/index.ts +10 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-service/index.ts +10 -0
- package/templates/restaurant/dev/index.ts +15 -15
- package/templates/restaurant/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/restaurant-owner/dev/index.ts +1041 -644
- package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/restaurant-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-event/index.ts +10 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-product/index.ts +10 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-service/index.ts +10 -0
- package/templates/retail-store/dev/index.ts +10 -10
- package/templates/retail-store/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/retail-store-owner/dev/index.ts +760 -461
- package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/retail-store-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/retail-store-owner/tier5-src/_shared/offset-page.ts +10 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-product/index.ts +10 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/yoga-studio/dev/index.ts +30 -30
- package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/yoga-studio-owner/dev/index.ts +810 -482
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +10 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +3 -1
- package/templates/yoga-studio-owner/tier5-src/_shared/detail-facts.ts +26 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-ask/blocks.ts +7 -3
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-ask/index.ts +2 -2
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event/index.ts +10 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-manage/logic.ts +3 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post/index.ts +10 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-posts/index.ts +21 -2
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-search/index.ts +6 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-search/vertical-sources.ts +178 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-service/index.ts +10 -0
package/dist/cli.mjs
CHANGED
|
@@ -7530,6 +7530,7 @@ function buttonVariant(style) {
|
|
|
7530
7530
|
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS, BUTTON_VARIANTS;
|
|
7531
7531
|
var init_tokens = __esm({
|
|
7532
7532
|
"../../core/ts/src/tokens.ts"() {
|
|
7533
|
+
"use strict";
|
|
7533
7534
|
SYSTEM_FONT_FAMILY = "$system";
|
|
7534
7535
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
7535
7536
|
BUTTON_MIN_HIT_TARGET = 44;
|
|
@@ -123277,7 +123278,8 @@ var init_renderNode = __esm({
|
|
|
123277
123278
|
};
|
|
123278
123279
|
}, [open]);
|
|
123279
123280
|
const modal = isOverlayModal("Menu", props.modal);
|
|
123280
|
-
const
|
|
123281
|
+
const rawAnchorLabel = props.anchor?.modifiers?.accessibilityLabel;
|
|
123282
|
+
const anchorLabel = String((typeof rawAnchorLabel === "string" && rawAnchorLabel.startsWith("$item") ? resolveItemDeep2(rawAnchorLabel, ctx) : rawAnchorLabel) || "More actions");
|
|
123281
123283
|
const flexGrow = typeof wrap?.flex === "string" ? parseFloat(wrap.flex) : typeof wrap?.flex === "number" ? wrap.flex : Number(wrap?.flexGrow ?? 0);
|
|
123282
123284
|
const fill = wrap?.width === "100%" || Number.isFinite(flexGrow) && flexGrow > 0;
|
|
123283
123285
|
const popupPlacement = fill ? { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 20, marginTop: 4 } : { position: "absolute", top: "100%", right: 0, zIndex: 20, marginTop: 4 };
|
|
@@ -128991,6 +128993,9 @@ import { readFileSync as readFileSync49, existsSync as existsSync45, watch, mkdi
|
|
|
128991
128993
|
import { basename as basename10, dirname as dirname28, extname as extname2, join as join44, relative as relative8, resolve as resolve37, normalize as normalize3, sep as sep10 } from "node:path";
|
|
128992
128994
|
import { createHash as createHash20, randomUUID as randomUUID5 } from "node:crypto";
|
|
128993
128995
|
import { fileURLToPath as fileURLToPath20, pathToFileURL as pathToFileURL6 } from "node:url";
|
|
128996
|
+
function readLogicBundle(read, tier5Dir, name) {
|
|
128997
|
+
return read(tier5Dir ?? TIER5_ROOT2, name) ?? (tier5Dir && tier5Dir !== TIER5_ROOT2 ? read(TIER5_ROOT2, name) : void 0);
|
|
128998
|
+
}
|
|
128994
128999
|
function deepMerge3(base, patch) {
|
|
128995
129000
|
if (patch === null || typeof patch !== "object" || Array.isArray(patch)) return patch;
|
|
128996
129001
|
const out2 = Array.isArray(base) ? [...base] : { ...base };
|
|
@@ -129143,7 +129148,7 @@ async function runScreenDiagnostics(state, screenId, descriptor) {
|
|
|
129143
129148
|
const nativeActions = await nativeActionsFor(state);
|
|
129144
129149
|
const lb = descriptor.logicBundle;
|
|
129145
129150
|
const bundleName = lb?.url ? /\/v1\/bundles\/([A-Za-z0-9_-]+)/.exec(lb.url)?.[1] : void 0;
|
|
129146
|
-
const bundleJs = bundleName ? readBuiltBundle2
|
|
129151
|
+
const bundleJs = bundleName ? readLogicBundle(readBuiltBundle2, state.tier5Dir, bundleName) : void 0;
|
|
129147
129152
|
const appWorkerActions = appWorkerActionsFor2(
|
|
129148
129153
|
state.app?.module.config,
|
|
129149
129154
|
state.tier5Dir ?? TIER5_ROOT2
|
|
@@ -131050,7 +131055,7 @@ async function handleAdminPlayground(req, res, state) {
|
|
|
131050
131055
|
const nativeActions = await nativeActionsFor(state);
|
|
131051
131056
|
const lb = descriptor.logicBundle;
|
|
131052
131057
|
const bundleName = lb?.url ? /\/v1\/bundles\/([A-Za-z0-9_-]+)/.exec(lb.url)?.[1] : void 0;
|
|
131053
|
-
const bundleJs = bundleName ? readBuiltBundle2
|
|
131058
|
+
const bundleJs = bundleName ? readLogicBundle(readBuiltBundle2, state.tier5Dir, bundleName) : void 0;
|
|
131054
131059
|
const appWorkerActions = appWorkerActionsFor2(
|
|
131055
131060
|
state.app?.module.config,
|
|
131056
131061
|
state.tier5Dir ?? TIER5_ROOT2
|
|
@@ -135694,6 +135699,20 @@ function readTokensForLint(preloaded) {
|
|
|
135694
135699
|
async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
135695
135700
|
const app = preloaded.name;
|
|
135696
135701
|
const tier5Dir = opts.tier5Dir ?? TIER5_DIR;
|
|
135702
|
+
const bundlePath = (name) => {
|
|
135703
|
+
const own4 = join45(tier5Dir, `${name}.bundle.js`);
|
|
135704
|
+
if (existsSync46(own4)) return own4;
|
|
135705
|
+
const shared = join45(TIER5_DIR, `${name}.bundle.js`);
|
|
135706
|
+
return resolve38(tier5Dir) !== TIER5_DIR && existsSync46(shared) ? shared : void 0;
|
|
135707
|
+
};
|
|
135708
|
+
const bundleDirFor = (name) => {
|
|
135709
|
+
const path2 = name ? bundlePath(name) : void 0;
|
|
135710
|
+
return path2 ? dirname29(path2) : tier5Dir;
|
|
135711
|
+
};
|
|
135712
|
+
const readBundle = (name) => {
|
|
135713
|
+
const path2 = bundlePath(name);
|
|
135714
|
+
return path2 ? readFileSync50(path2, "utf8") : void 0;
|
|
135715
|
+
};
|
|
135697
135716
|
const collect2 = opts.collect;
|
|
135698
135717
|
const config = preloaded.module.config;
|
|
135699
135718
|
if (isFunctionsOnlyConfig(config)) {
|
|
@@ -135771,7 +135790,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
135771
135790
|
let mockBootFailed;
|
|
135772
135791
|
let mockUnserved;
|
|
135773
135792
|
if (collect2?.render?.live) {
|
|
135774
|
-
const bundleJs = bundleName ?
|
|
135793
|
+
const bundleJs = bundleName ? readBundle(bundleName) : void 0;
|
|
135775
135794
|
if (!bundleJs) {
|
|
135776
135795
|
base2 = null;
|
|
135777
135796
|
} else {
|
|
@@ -135788,14 +135807,14 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
135788
135807
|
liveReturned = counting.returned();
|
|
135789
135808
|
liveErrors = live3.errors;
|
|
135790
135809
|
}
|
|
135791
|
-
} else if (collect2?.render?.mocks && collect2.render.hydrate !== false && bundleName &&
|
|
135810
|
+
} else if (collect2?.render?.mocks && collect2.render.hydrate !== false && bundleName && readBundle(bundleName)) {
|
|
135792
135811
|
const calls = [];
|
|
135793
135812
|
const unserved = [];
|
|
135794
135813
|
const snap = await bootAndSnapshotState({
|
|
135795
135814
|
screenId: renderedScreenId ?? String(descriptor?.screenId ?? bundleName),
|
|
135796
135815
|
// `--input` rides on the descriptor's own input, as a navigator hands it over.
|
|
135797
135816
|
descriptor: collect2.render.input && descriptor && typeof descriptor === "object" ? { ...descriptor, input } : descriptor,
|
|
135798
|
-
bundleJs:
|
|
135817
|
+
bundleJs: readBundle(bundleName),
|
|
135799
135818
|
knownScreenIds: /* @__PURE__ */ new Set(),
|
|
135800
135819
|
rules: collect2.render.mocks.rules ?? null,
|
|
135801
135820
|
...collect2.render.mocks.cmsSeed ? { cmsSeed: collect2.render.mocks.cmsSeed } : {},
|
|
@@ -135818,11 +135837,11 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
135818
135837
|
mockUnserved = unserved;
|
|
135819
135838
|
} else {
|
|
135820
135839
|
mockBootFailed = true;
|
|
135821
|
-
base2 = hydrationServices(
|
|
135840
|
+
base2 = hydrationServices(bundleDirFor(bundleName), bundleName, input);
|
|
135822
135841
|
}
|
|
135823
135842
|
} else {
|
|
135824
135843
|
base2 = collect2?.render?.hydrate === false ? null : hydrationServices(
|
|
135825
|
-
|
|
135844
|
+
bundleDirFor(bundleName),
|
|
135826
135845
|
bundleName,
|
|
135827
135846
|
input
|
|
135828
135847
|
);
|
|
@@ -135877,7 +135896,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
135877
135896
|
if (addrCache.has(name)) return addrCache.get(name);
|
|
135878
135897
|
let bytes2;
|
|
135879
135898
|
try {
|
|
135880
|
-
|
|
135899
|
+
const path2 = bundlePath(name);
|
|
135900
|
+
if (!path2) return null;
|
|
135901
|
+
bytes2 = readFileSync50(path2);
|
|
135881
135902
|
} catch {
|
|
135882
135903
|
return null;
|
|
135883
135904
|
}
|
|
@@ -136104,12 +136125,12 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
136104
136125
|
descriptor: JSON.parse(json6),
|
|
136105
136126
|
descriptorJson: json6,
|
|
136106
136127
|
bundleName,
|
|
136107
|
-
bundleJs: bundleName ?
|
|
136128
|
+
bundleJs: bundleName ? readBundle(bundleName) ?? null : null,
|
|
136108
136129
|
...bundleMapFor(tier5Dir, bundleName ?? void 0)
|
|
136109
136130
|
});
|
|
136110
136131
|
}
|
|
136111
136132
|
if (collect2?.lint) {
|
|
136112
|
-
const bundleJs = bundleName ?
|
|
136133
|
+
const bundleJs = bundleName ? readBundle(bundleName) : void 0;
|
|
136113
136134
|
const report3 = validateScreenDescriptor(screenId, descriptor, {
|
|
136114
136135
|
tokens: lintTokens,
|
|
136115
136136
|
allowedComponents,
|
|
@@ -136141,7 +136162,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
136141
136162
|
const lb = logicBundleOf(descriptor);
|
|
136142
136163
|
const bundleName = lb ? bundleNameFromUrl(lb.url) : null;
|
|
136143
136164
|
if (collect2?.lint) {
|
|
136144
|
-
const bundleJs = bundleName ?
|
|
136165
|
+
const bundleJs = bundleName ? readBundle(bundleName) : void 0;
|
|
136145
136166
|
const report3 = validateScreenDescriptor(wantedRender, descriptor, {
|
|
136146
136167
|
tokens: lintTokens,
|
|
136147
136168
|
allowedComponents,
|
|
@@ -136257,7 +136278,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
136257
136278
|
// for ANY of its screens.
|
|
136258
136279
|
descriptorJson: json6,
|
|
136259
136280
|
bundleName,
|
|
136260
|
-
bundleJs: bundleName ?
|
|
136281
|
+
bundleJs: bundleName ? readBundle(bundleName) ?? null : null,
|
|
136261
136282
|
...bundleMapFor(tier5Dir, bundleName ?? void 0)
|
|
136262
136283
|
});
|
|
136263
136284
|
}
|
|
@@ -136363,7 +136384,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
136363
136384
|
if (store.putDoc) {
|
|
136364
136385
|
for (const [name, meta] of Object.entries(bundles)) {
|
|
136365
136386
|
if (name.startsWith("__handlers__")) continue;
|
|
136366
|
-
const js2 =
|
|
136387
|
+
const js2 = readBundle(name);
|
|
136367
136388
|
if (!js2) continue;
|
|
136368
136389
|
try {
|
|
136369
136390
|
const input = bundleInputs.get(name);
|
|
@@ -136430,7 +136451,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
136430
136451
|
if (collect2?.lint) {
|
|
136431
136452
|
for (const name of Object.keys(bundles)) {
|
|
136432
136453
|
if (name.startsWith("__handlers__")) continue;
|
|
136433
|
-
const js2 =
|
|
136454
|
+
const js2 = readBundle(name);
|
|
136434
136455
|
if (!js2) continue;
|
|
136435
136456
|
const input = bundleInputs.get(name);
|
|
136436
136457
|
const drifting = bundles[name]?.servicesHash ? nondeterministicServices(js2, input ? { input } : {}) : [];
|
|
@@ -155758,25 +155779,25 @@ var init_preview_assets_generated = __esm({
|
|
|
155758
155779
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
155759
155780
|
init_preview_assets_format();
|
|
155760
155781
|
PREVIEW_ASSET_MANIFEST = [
|
|
155761
|
-
{ key: "assets/index-
|
|
155762
|
-
{ key: "assets/pdf-
|
|
155763
|
-
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
155764
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
155765
|
-
{ key: "assets/pdfDocument-
|
|
155766
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
155767
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
155768
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
155769
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
155770
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
155771
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
155772
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
155773
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
155774
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
155775
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
155776
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
155777
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
155778
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
155779
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
155782
|
+
{ key: "assets/index-BIlXpj1h.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1257735, sha256: "6d808a71fd48dfe402d9cdace4e2a6ce1a8d686068d1812eb08ef418f2284533" },
|
|
155783
|
+
{ key: "assets/pdf-DKCzctsR.js", contentType: "application/javascript; charset=utf-8", offset: 1257743, length: 488199, sha256: "580e24333dcc9b041e8720577be50a8da5a50800f4d5e948e28edf9c8dd7d9e0" },
|
|
155784
|
+
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1745942, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
|
|
155785
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1746015, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
155786
|
+
{ key: "assets/pdfDocument-DCdoA9nd.js", contentType: "application/javascript; charset=utf-8", offset: 3063049, length: 2858, sha256: "ea99eb8d79920cd5c7ca2c83faa495c5287ff04d1c96bbfe3d034b8925075ad2" },
|
|
155787
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3065907, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
155788
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3070517, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
155789
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3559101, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
155790
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3650025, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
155791
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3741009, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
155792
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3831989, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
155793
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3922861, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
155794
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4013841, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
155795
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4122477, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
155796
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4231561, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
155797
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4340609, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
155798
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4448309, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
155799
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4536417, length: 4947, sha256: "31a68c99003ad579052a0dccccfa5d861146fe209bbc6ea0c264162026d7b35f" },
|
|
155800
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4541364, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
155780
155801
|
];
|
|
155781
155802
|
}
|
|
155782
155803
|
});
|
|
Binary file
|
|
@@ -15,13 +15,13 @@ your page → window.HimalayaWorker → the app's companion worker → native iO
|
|
|
15
15
|
## Before you start: what the app owner must enable
|
|
16
16
|
|
|
17
17
|
Your page can only use capabilities the **app owner** turned on for your site. In a Brandy app
|
|
18
|
-
that is the `webSdk` block of the app's provisioning
|
|
18
|
+
(an app that wraps a website) that is the `webSdk` block of the app's provisioning — its
|
|
19
|
+
`provisioning.json`:
|
|
19
20
|
|
|
20
21
|
```json
|
|
21
22
|
{
|
|
22
23
|
"webSdk": {
|
|
23
|
-
"
|
|
24
|
-
"capabilities": ["health", "haptic"],
|
|
24
|
+
"capabilities": ["health", "haptic", "share"],
|
|
25
25
|
"permissionCopy": {
|
|
26
26
|
"health": "Show your daily steps and save the workouts you finish."
|
|
27
27
|
}
|
|
@@ -33,8 +33,13 @@ that is the `webSdk` block of the app's provisioning file:
|
|
|
33
33
|
[Web page SDK reference](https://apps.wix.com/_api/himi-serve/docs/web-page-sdk-reference.md) for every id and method).
|
|
34
34
|
- `permissionCopy` — the sentence the phone shows when it asks the user for permission. Write it
|
|
35
35
|
for the end user, about what *they* get.
|
|
36
|
-
-
|
|
37
|
-
|
|
36
|
+
- No worker code is needed. Brandy generates the companion worker that answers your page from
|
|
37
|
+
`capabilities`, allowing every method the capability's page lists — except
|
|
38
|
+
`presigned_upload.putFile`, which reads a device file and is allowed only when `files` is enabled
|
|
39
|
+
too. (An owner who wants a
|
|
40
|
+
narrower allowlist can still name their own worker in `bundle`.)
|
|
41
|
+
- Enabling a capability changes the app's native permissions, so the owner ships a **new app
|
|
42
|
+
build** with it before your page can call it. Until then the call times out.
|
|
38
43
|
|
|
39
44
|
When you hand work to the app owner, give them the list as `capability.method` pairs, for example
|
|
40
45
|
`health.availability`, `health.requestPermission`, `health.query`, `haptic.play`. A method that is
|
|
@@ -209,7 +214,10 @@ export function StepsCard() {
|
|
|
209
214
|
if (state === "off") return null; // no health store, or Health not enabled for this site — hide it
|
|
210
215
|
if (state === "denied") return <p>Health access is off. You can turn it on in your phone's Settings.</p>;
|
|
211
216
|
if (state === "failed") return <button onClick={connect}>Couldn't load your steps — try again</button>;
|
|
212
|
-
|
|
217
|
+
if (steps === null) return <button onClick={connect}>Show today's steps</button>;
|
|
218
|
+
// iOS never says a Health read was denied: a denied read returns no samples, like a day with no data.
|
|
219
|
+
if (steps === 0) return <p>No steps yet today. If you turned off Health access, enable it in the Health app.</p>;
|
|
220
|
+
return <p>{steps} steps today</p>;
|
|
213
221
|
}
|
|
214
222
|
```
|
|
215
223
|
|
|
@@ -221,7 +229,9 @@ The same page must keep working in an ordinary browser (and in Base44 / Lovable
|
|
|
221
229
|
- **Ask for permission only from a user action** (a button tap), after explaining the benefit on
|
|
222
230
|
screen. Never prompt on page load.
|
|
223
231
|
- **Handle "no" and "not available".** Every permission can be denied; Health may not exist on the
|
|
224
|
-
device (`availability()` tells you). Show a calm fallback, not an error.
|
|
232
|
+
device (`availability()` tells you). Show a calm fallback, not an error. On iOS a denied Health
|
|
233
|
+
**read** is not reported as `not_authorized`: the read succeeds with no samples, exactly like a
|
|
234
|
+
day with no data. Word an empty result so it also covers "access is off".
|
|
225
235
|
- **Hide features the app doesn't enable.** Probe once with `isEnabled(...)` on a read-only method
|
|
226
236
|
and hide the UI when it is `false`. `true` only means the method is enabled — still read its
|
|
227
237
|
answer (`availability()` can say `{ available: false }`).
|
|
@@ -333,7 +343,7 @@ if (photo) {
|
|
|
333
343
|
|
|
334
344
|
For larger files, or to keep a copy on your server, upload straight from the device with
|
|
335
345
|
`presigned_upload.putFile(url, handle)` and use the uploaded URL. Going the other way, a page
|
|
336
|
-
cannot send large content in: see
|
|
346
|
+
cannot send large content in: see *Keep what you send small* under *Rules that keep a page working*.
|
|
337
347
|
|
|
338
348
|
## Reference
|
|
339
349
|
|
|
@@ -76,7 +76,8 @@ binary. One app-specific worker imports exactly the app’s selected subset.
|
|
|
76
76
|
|
|
77
77
|
## Brandy
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
Name the capabilities; Brandy supplies the companion worker. Health has a hand-written proof
|
|
80
|
+
worker:
|
|
80
81
|
|
|
81
82
|
```json
|
|
82
83
|
{
|
|
@@ -89,12 +90,13 @@ Health has a built-in proof worker, so it needs no custom bundle name:
|
|
|
89
90
|
}
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
Any other set gets a worker generated from the set — it imports only those capabilities' SDKs
|
|
94
|
+
and allowlists every method a page can call on them (the methods each `web-sdk/<id>` page lists;
|
|
95
|
+
`presigned_upload.putFile` only when `files` is in the set too, since it reads the files substrate):
|
|
93
96
|
|
|
94
97
|
```json
|
|
95
98
|
{
|
|
96
99
|
"webSdk": {
|
|
97
|
-
"bundle": "customer-page-capabilities",
|
|
98
100
|
"capabilities": ["camera", "share"],
|
|
99
101
|
"permissionCopy": {
|
|
100
102
|
"camera": "Take a photo to attach it to your request."
|
|
@@ -103,6 +105,10 @@ For another subset, add the companion bundle to the app and name it:
|
|
|
103
105
|
}
|
|
104
106
|
```
|
|
105
107
|
|
|
108
|
+
Preparing the customer build (`npm run prepare:customer`) writes and builds it; for local
|
|
109
|
+
previews, run `npm run web-sdk:companion` first. To expose fewer methods, write your own
|
|
110
|
+
companion and name it in `bundle` — a named bundle is used as is.
|
|
111
|
+
|
|
106
112
|
Brandy accepts capabilities `himi dist` can add to an extensible shell. Capabilities requiring
|
|
107
113
|
app-specific boot wiring remain refused until that shell supplies the wiring. Base44 is accepted
|
|
108
114
|
only when the same Brandy contract contains a Base44 binding.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1312.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": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "himalaya-cli"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "780fb2ce1d71508d01c3075d8f29dc587c79a5f5064c526a60dcb0b0"
|
|
75
75
|
}
|
|
@@ -10085,7 +10085,7 @@ const SCREENS = runtimeSetting({
|
|
|
10085
10085
|
"modifiers": {
|
|
10086
10086
|
"width": 44,
|
|
10087
10087
|
"height": 44,
|
|
10088
|
-
"accessibilityLabel": "
|
|
10088
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
10089
10089
|
}
|
|
10090
10090
|
},
|
|
10091
10091
|
"items": [
|
|
@@ -10365,7 +10365,7 @@ const SCREENS = runtimeSetting({
|
|
|
10365
10365
|
"modifiers": {
|
|
10366
10366
|
"width": 44,
|
|
10367
10367
|
"height": 44,
|
|
10368
|
-
"accessibilityLabel": "
|
|
10368
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
10369
10369
|
}
|
|
10370
10370
|
},
|
|
10371
10371
|
"items": [
|
|
@@ -10655,7 +10655,7 @@ const SCREENS = runtimeSetting({
|
|
|
10655
10655
|
"modifiers": {
|
|
10656
10656
|
"width": 44,
|
|
10657
10657
|
"height": 44,
|
|
10658
|
-
"accessibilityLabel": "
|
|
10658
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
10659
10659
|
}
|
|
10660
10660
|
},
|
|
10661
10661
|
"items": [
|
|
@@ -10935,7 +10935,7 @@ const SCREENS = runtimeSetting({
|
|
|
10935
10935
|
"modifiers": {
|
|
10936
10936
|
"width": 44,
|
|
10937
10937
|
"height": 44,
|
|
10938
|
-
"accessibilityLabel": "
|
|
10938
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
10939
10939
|
}
|
|
10940
10940
|
},
|
|
10941
10941
|
"items": [
|
|
@@ -11540,7 +11540,7 @@ const SCREENS = runtimeSetting({
|
|
|
11540
11540
|
"modifiers": {
|
|
11541
11541
|
"width": 44,
|
|
11542
11542
|
"height": 44,
|
|
11543
|
-
"accessibilityLabel": "
|
|
11543
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
11544
11544
|
}
|
|
11545
11545
|
},
|
|
11546
11546
|
"items": [
|
|
@@ -12652,7 +12652,7 @@ const SCREENS = runtimeSetting({
|
|
|
12652
12652
|
"modifiers": {
|
|
12653
12653
|
"width": 44,
|
|
12654
12654
|
"height": 44,
|
|
12655
|
-
"accessibilityLabel": "
|
|
12655
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
12656
12656
|
}
|
|
12657
12657
|
},
|
|
12658
12658
|
"items": [
|
|
@@ -13008,7 +13008,7 @@ const SCREENS = runtimeSetting({
|
|
|
13008
13008
|
"modifiers": {
|
|
13009
13009
|
"width": 44,
|
|
13010
13010
|
"height": 44,
|
|
13011
|
-
"accessibilityLabel": "
|
|
13011
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
13012
13012
|
}
|
|
13013
13013
|
},
|
|
13014
13014
|
"items": [
|
|
@@ -13327,7 +13327,7 @@ const SCREENS = runtimeSetting({
|
|
|
13327
13327
|
"modifiers": {
|
|
13328
13328
|
"width": 44,
|
|
13329
13329
|
"height": 44,
|
|
13330
|
-
"accessibilityLabel": "
|
|
13330
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
13331
13331
|
}
|
|
13332
13332
|
},
|
|
13333
13333
|
"items": [
|
|
@@ -13683,7 +13683,7 @@ const SCREENS = runtimeSetting({
|
|
|
13683
13683
|
"modifiers": {
|
|
13684
13684
|
"width": 44,
|
|
13685
13685
|
"height": 44,
|
|
13686
|
-
"accessibilityLabel": "
|
|
13686
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
13687
13687
|
}
|
|
13688
13688
|
},
|
|
13689
13689
|
"items": [
|
|
@@ -14343,7 +14343,7 @@ const SCREENS = runtimeSetting({
|
|
|
14343
14343
|
"modifiers": {
|
|
14344
14344
|
"width": 44,
|
|
14345
14345
|
"height": 44,
|
|
14346
|
-
"accessibilityLabel": "
|
|
14346
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
14347
14347
|
}
|
|
14348
14348
|
},
|
|
14349
14349
|
"items": [
|
|
@@ -15560,7 +15560,7 @@ const SCREENS = runtimeSetting({
|
|
|
15560
15560
|
"modifiers": {
|
|
15561
15561
|
"width": 44,
|
|
15562
15562
|
"height": 44,
|
|
15563
|
-
"accessibilityLabel": "
|
|
15563
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
15564
15564
|
}
|
|
15565
15565
|
},
|
|
15566
15566
|
"items": [
|
|
@@ -15901,7 +15901,7 @@ const SCREENS = runtimeSetting({
|
|
|
15901
15901
|
"modifiers": {
|
|
15902
15902
|
"width": 44,
|
|
15903
15903
|
"height": 44,
|
|
15904
|
-
"accessibilityLabel": "
|
|
15904
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
15905
15905
|
}
|
|
15906
15906
|
},
|
|
15907
15907
|
"items": [
|
|
@@ -16172,7 +16172,7 @@ const SCREENS = runtimeSetting({
|
|
|
16172
16172
|
"modifiers": {
|
|
16173
16173
|
"width": 44,
|
|
16174
16174
|
"height": 44,
|
|
16175
|
-
"accessibilityLabel": "
|
|
16175
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
16176
16176
|
}
|
|
16177
16177
|
},
|
|
16178
16178
|
"items": [
|
|
@@ -16513,7 +16513,7 @@ const SCREENS = runtimeSetting({
|
|
|
16513
16513
|
"modifiers": {
|
|
16514
16514
|
"width": 44,
|
|
16515
16515
|
"height": 44,
|
|
16516
|
-
"accessibilityLabel": "
|
|
16516
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
16517
16517
|
}
|
|
16518
16518
|
},
|
|
16519
16519
|
"items": [
|
|
@@ -17139,7 +17139,7 @@ const SCREENS = runtimeSetting({
|
|
|
17139
17139
|
"modifiers": {
|
|
17140
17140
|
"width": 44,
|
|
17141
17141
|
"height": 44,
|
|
17142
|
-
"accessibilityLabel": "
|
|
17142
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
17143
17143
|
}
|
|
17144
17144
|
},
|
|
17145
17145
|
"items": [
|
|
@@ -18353,7 +18353,7 @@ const SCREENS = runtimeSetting({
|
|
|
18353
18353
|
"modifiers": {
|
|
18354
18354
|
"width": 44,
|
|
18355
18355
|
"height": 44,
|
|
18356
|
-
"accessibilityLabel": "
|
|
18356
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
18357
18357
|
}
|
|
18358
18358
|
},
|
|
18359
18359
|
"items": [
|
|
@@ -18707,7 +18707,7 @@ const SCREENS = runtimeSetting({
|
|
|
18707
18707
|
"modifiers": {
|
|
18708
18708
|
"width": 44,
|
|
18709
18709
|
"height": 44,
|
|
18710
|
-
"accessibilityLabel": "
|
|
18710
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
18711
18711
|
}
|
|
18712
18712
|
},
|
|
18713
18713
|
"items": [
|
|
@@ -18981,7 +18981,7 @@ const SCREENS = runtimeSetting({
|
|
|
18981
18981
|
"modifiers": {
|
|
18982
18982
|
"width": 44,
|
|
18983
18983
|
"height": 44,
|
|
18984
|
-
"accessibilityLabel": "
|
|
18984
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
18985
18985
|
}
|
|
18986
18986
|
},
|
|
18987
18987
|
"items": [
|
|
@@ -19335,7 +19335,7 @@ const SCREENS = runtimeSetting({
|
|
|
19335
19335
|
"modifiers": {
|
|
19336
19336
|
"width": 44,
|
|
19337
19337
|
"height": 44,
|
|
19338
|
-
"accessibilityLabel": "
|
|
19338
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
19339
19339
|
}
|
|
19340
19340
|
},
|
|
19341
19341
|
"items": [
|
|
@@ -19934,7 +19934,7 @@ const SCREENS = runtimeSetting({
|
|
|
19934
19934
|
"modifiers": {
|
|
19935
19935
|
"width": 44,
|
|
19936
19936
|
"height": 44,
|
|
19937
|
-
"accessibilityLabel": "
|
|
19937
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
19938
19938
|
}
|
|
19939
19939
|
},
|
|
19940
19940
|
"items": [
|
|
@@ -21849,7 +21849,7 @@ const SCREENS = runtimeSetting({
|
|
|
21849
21849
|
"modifiers": {
|
|
21850
21850
|
"width": 44,
|
|
21851
21851
|
"height": 44,
|
|
21852
|
-
"accessibilityLabel": "
|
|
21852
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
21853
21853
|
}
|
|
21854
21854
|
},
|
|
21855
21855
|
"items": [
|
|
@@ -22196,7 +22196,7 @@ const SCREENS = runtimeSetting({
|
|
|
22196
22196
|
"modifiers": {
|
|
22197
22197
|
"width": 44,
|
|
22198
22198
|
"height": 44,
|
|
22199
|
-
"accessibilityLabel": "
|
|
22199
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
22200
22200
|
}
|
|
22201
22201
|
},
|
|
22202
22202
|
"items": [
|
|
@@ -22486,7 +22486,7 @@ const SCREENS = runtimeSetting({
|
|
|
22486
22486
|
"modifiers": {
|
|
22487
22487
|
"width": 44,
|
|
22488
22488
|
"height": 44,
|
|
22489
|
-
"accessibilityLabel": "
|
|
22489
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
22490
22490
|
}
|
|
22491
22491
|
},
|
|
22492
22492
|
"items": [
|
|
@@ -22833,7 +22833,7 @@ const SCREENS = runtimeSetting({
|
|
|
22833
22833
|
"modifiers": {
|
|
22834
22834
|
"width": 44,
|
|
22835
22835
|
"height": 44,
|
|
22836
|
-
"accessibilityLabel": "
|
|
22836
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
22837
22837
|
}
|
|
22838
22838
|
},
|
|
22839
22839
|
"items": [
|
|
@@ -23474,7 +23474,7 @@ const SCREENS = runtimeSetting({
|
|
|
23474
23474
|
"modifiers": {
|
|
23475
23475
|
"width": 44,
|
|
23476
23476
|
"height": 44,
|
|
23477
|
-
"accessibilityLabel": "
|
|
23477
|
+
"accessibilityLabel": "$item.collectionActionsLabel"
|
|
23478
23478
|
}
|
|
23479
23479
|
},
|
|
23480
23480
|
"items": [
|
|
@@ -58,6 +58,13 @@ export interface CollectionConfig {
|
|
|
58
58
|
/** At or below this many records, with no query/filter narrowing them and no further
|
|
59
59
|
* page, the list/grid toggle, Refine, chips, search and count are noise. */
|
|
60
60
|
export const COLLECTION_CHROME_MIN_ITEMS = 4;
|
|
61
|
+
/** The accessible name of a row's overflow menu: `template` with `{title}` filled, or the
|
|
62
|
+
* generic `fallback` for a record with no title. */
|
|
63
|
+
export function collectionActionsLabel(title: string, template: string, fallback: string): string {
|
|
64
|
+
const t = title.trim();
|
|
65
|
+
return t ? template.replace('{title}', () => t) : fallback;
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
export const COLLECTIONS: Record<string, CollectionConfig> = {
|
|
62
69
|
himiStoreShop: { rows: 'results', title: 'name', subtitle: 'subtitle', image: 'image', view: 'grid', backendQuery: true, countNoun: ['product', 'products'], favoriteToggle: true },
|
|
63
70
|
himiBookingServices: { rows: 'results', title: 'name', subtitle: 'subtitle', image: 'image', filter: 'category', view: 'grid', backendQuery: true, searchPlaceholder: 'Search services', countNoun: ['service', 'services'], primaryVerb: { label: 'Book', screenId: 'himi_time' } },
|
|
@@ -184,6 +191,9 @@ export function projectCollection(source: CollectionRow[], config: CollectionCon
|
|
|
184
191
|
collectionSelectLabel: prefs.selectedIds.includes(collectionId(row)) ? 'Selected' : 'Select',
|
|
185
192
|
// The save toggle names the action it WILL take (the service localizes it).
|
|
186
193
|
collectionSaveLabel: prefs.savedIds.includes(collectionId(row)) ? 'Remove from saved' : 'Save',
|
|
194
|
+
// The row's overflow menu, named for its record: out of context (a rotor, a voice
|
|
195
|
+
// command) a list of identical "Item actions" cannot be told apart.
|
|
196
|
+
collectionActionsLabel: collectionActionsLabel(collectionTitle(row, config), 'Actions for {title}', 'Item actions'),
|
|
187
197
|
collectionSubtitle: scalar(row[config.subtitle ?? '']) || scalar(row.subtitle) || scalar(row.description) || scalar(row.meta),
|
|
188
198
|
collectionImage: scalar(row[config.image ?? '']), collectionNoImage: !scalar(row[config.image ?? '']), collectionHasImage: !!scalar(row[config.image ?? '']),
|
|
189
199
|
collectionSaved: prefs.savedIds.includes(collectionId(row)), collectionNotSaved: !prefs.savedIds.includes(collectionId(row)), collectionSelected: prefs.selectedIds.includes(collectionId(row)),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineService as register, type ServiceDefinition } from '@himalaya/state';
|
|
2
|
-
import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, type CollectionRow } from './collection-contract.js';
|
|
2
|
+
import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, collectionActionsLabel, type CollectionRow } from './collection-contract.js';
|
|
3
3
|
import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
|
|
4
4
|
import { copyParam, stashCopy } from './himi-copy.js';
|
|
5
5
|
import { createCollectionQuery, type CollectionQuerySource, type CollectionQueryState } from './collection-query.js';
|
|
@@ -130,6 +130,8 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
130
130
|
// the save toggle names the action it WILL take for this row. The
|
|
131
131
|
// old static "Save / unsave" made the owner work out the row's state.
|
|
132
132
|
row.collectionSaveLabel = row.collectionSaved ? copyParam('collection.unsave', 'Remove from saved') : copyParam('collection.save', 'Save');
|
|
133
|
+
row.collectionActionsLabel = collectionActionsLabel(String(row.collectionTitle ?? ''),
|
|
134
|
+
copyParam('collection.itemActionsFor', 'Actions for {title}'), copyParam('collection.itemActions', 'Item actions'));
|
|
133
135
|
});
|
|
134
136
|
if (previewId && !rows.some(row => collectionId(row) === previewId)) previewId = '';
|
|
135
137
|
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, { id: 'saved', label: copyParam('collection.saved', 'Saved') },
|