@wix/himalaya-cli 0.1020.0 → 0.1022.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/preview-surfaces.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +3 -1
- package/dist/cli.mjs +336 -114
- package/dist/preview-assets.generated.bin +0 -0
- package/package.json +2 -2
|
@@ -208,6 +208,13 @@ export interface PreviewSurface {
|
|
|
208
208
|
* phone and tablet are always offered.
|
|
209
209
|
*/
|
|
210
210
|
readonly platformKey: string | null;
|
|
211
|
+
/**
|
|
212
|
+
* RFC 0059 / #2927 — the native builds that draw this surface, which is what a null
|
|
213
|
+
* `platformKey` leaves implicit. The web host offers each one's idiom as a preview
|
|
214
|
+
* (`IDIOM_CONTEXTS`: `ios` wears `ios`, `android` wears `material`), and side by side.
|
|
215
|
+
* Absent ⇒ none: the surface previews in its own look only.
|
|
216
|
+
*/
|
|
217
|
+
readonly idiomPlatforms?: readonly ("ios" | "android")[];
|
|
211
218
|
readonly gate: SurfaceGate;
|
|
212
219
|
}
|
|
213
220
|
/**
|
|
@@ -9232,7 +9232,8 @@ var PREVIEW_SURFACES = [
|
|
|
9232
9232
|
// iPhone 14/15 logical points
|
|
9233
9233
|
orientations: ["portrait"],
|
|
9234
9234
|
platformKey: null,
|
|
9235
|
-
// iOS/Android are implicit
|
|
9235
|
+
// iOS/Android are implicit — named explicitly in idiomPlatforms
|
|
9236
|
+
idiomPlatforms: ["ios", "android"],
|
|
9236
9237
|
gate: { kind: "none" }
|
|
9237
9238
|
},
|
|
9238
9239
|
{
|
|
@@ -9247,6 +9248,7 @@ var PREVIEW_SURFACES = [
|
|
|
9247
9248
|
// iPad Pro 11" logical points
|
|
9248
9249
|
orientations: ["portrait", "landscape"],
|
|
9249
9250
|
platformKey: null,
|
|
9251
|
+
idiomPlatforms: ["ios", "android"],
|
|
9250
9252
|
gate: { kind: "none" }
|
|
9251
9253
|
},
|
|
9252
9254
|
{
|
|
@@ -7661,7 +7661,8 @@ var PREVIEW_SURFACES = [
|
|
|
7661
7661
|
// iPhone 14/15 logical points
|
|
7662
7662
|
orientations: ["portrait"],
|
|
7663
7663
|
platformKey: null,
|
|
7664
|
-
// iOS/Android are implicit
|
|
7664
|
+
// iOS/Android are implicit — named explicitly in idiomPlatforms
|
|
7665
|
+
idiomPlatforms: ["ios", "android"],
|
|
7665
7666
|
gate: { kind: "none" }
|
|
7666
7667
|
},
|
|
7667
7668
|
{
|
|
@@ -7676,6 +7677,7 @@ var PREVIEW_SURFACES = [
|
|
|
7676
7677
|
// iPad Pro 11" logical points
|
|
7677
7678
|
orientations: ["portrait", "landscape"],
|
|
7678
7679
|
platformKey: null,
|
|
7680
|
+
idiomPlatforms: ["ios", "android"],
|
|
7679
7681
|
gate: { kind: "none" }
|
|
7680
7682
|
},
|
|
7681
7683
|
{
|
package/dist/cli.mjs
CHANGED
|
@@ -2127,7 +2127,8 @@ var init_preview_surfaces = __esm({
|
|
|
2127
2127
|
// iPhone 14/15 logical points
|
|
2128
2128
|
orientations: ["portrait"],
|
|
2129
2129
|
platformKey: null,
|
|
2130
|
-
// iOS/Android are implicit
|
|
2130
|
+
// iOS/Android are implicit — named explicitly in idiomPlatforms
|
|
2131
|
+
idiomPlatforms: ["ios", "android"],
|
|
2131
2132
|
gate: { kind: "none" }
|
|
2132
2133
|
},
|
|
2133
2134
|
{
|
|
@@ -2142,6 +2143,7 @@ var init_preview_surfaces = __esm({
|
|
|
2142
2143
|
// iPad Pro 11" logical points
|
|
2143
2144
|
orientations: ["portrait", "landscape"],
|
|
2144
2145
|
platformKey: null,
|
|
2146
|
+
idiomPlatforms: ["ios", "android"],
|
|
2145
2147
|
gate: { kind: "none" }
|
|
2146
2148
|
},
|
|
2147
2149
|
{
|
|
@@ -12687,23 +12689,130 @@ function resolveIdiom(tokens, ctx = {}) {
|
|
|
12687
12689
|
const { idiomPolicy: _applied, ...final } = merged;
|
|
12688
12690
|
return final;
|
|
12689
12691
|
}
|
|
12690
|
-
var UNSAFE_KEYS;
|
|
12692
|
+
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
12691
12693
|
var init_idiom = __esm({
|
|
12692
12694
|
"../../core/ts/src/idiom.ts"() {
|
|
12693
12695
|
"use strict";
|
|
12696
|
+
IDIOM_CONTEXTS = {
|
|
12697
|
+
ios: { native: ["ios"] },
|
|
12698
|
+
android: { native: ["material"] },
|
|
12699
|
+
mac: { native: ["desktop", "ios"], surface: "mac" }
|
|
12700
|
+
};
|
|
12694
12701
|
UNSAFE_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
12695
12702
|
}
|
|
12696
12703
|
});
|
|
12697
12704
|
|
|
12705
|
+
// ../../core/web-renderer/src/idiom-controls.ts
|
|
12706
|
+
function pickRole(colors, role) {
|
|
12707
|
+
if (typeof role === "string") return role;
|
|
12708
|
+
return role.find((name) => colors?.[name] != null) ?? role[role.length - 1];
|
|
12709
|
+
}
|
|
12710
|
+
function controlIdiomFor(context) {
|
|
12711
|
+
for (const name of context?.native ?? []) {
|
|
12712
|
+
if (name !== "base" && Object.hasOwn(IDIOM_CONTROLS, name)) return name;
|
|
12713
|
+
}
|
|
12714
|
+
return "base";
|
|
12715
|
+
}
|
|
12716
|
+
function idiomControls(idiom) {
|
|
12717
|
+
return idiom != null && Object.hasOwn(IDIOM_CONTROLS, idiom) ? IDIOM_CONTROLS[idiom] : IDIOM_CONTROLS.base;
|
|
12718
|
+
}
|
|
12719
|
+
var STOCK_ROLES, FILLED_SEGMENT_ROLES, IDIOM_CONTROLS;
|
|
12720
|
+
var init_idiom_controls = __esm({
|
|
12721
|
+
"../../core/web-renderer/src/idiom-controls.ts"() {
|
|
12722
|
+
STOCK_ROLES = { onThumb: null, offTrack: "surfaceTertiary", offThumb: null, outline: null };
|
|
12723
|
+
FILLED_SEGMENT_ROLES = { outline: "border", inactive: "surfaceTertiary" };
|
|
12724
|
+
IDIOM_CONTROLS = {
|
|
12725
|
+
// The web's own look — today's values, unchanged.
|
|
12726
|
+
base: {
|
|
12727
|
+
font: { defaultStack: '"Wix Madefor Text", system-ui', system: null, bundled: null, faithfulOn: "any" },
|
|
12728
|
+
switch: { width: 51, height: 31, thumbOn: 27, thumbOff: 27, outline: 0, roles: STOCK_ROLES, thumbShadow: true },
|
|
12729
|
+
segmented: { height: 50, trackPadding: 3, trackRadius: null, segmentRadius: null, outlined: false, selectedCheck: false, roles: FILLED_SEGMENT_ROLES },
|
|
12730
|
+
sheet: { cornerRadius: 16, grabberWidth: 36, grabberHeight: 5 },
|
|
12731
|
+
navBar: { rootTitle: "inline", pushedTitle: "inline", back: "chevron", inlineTitleSize: 15, largeTitleSize: 15, hideWithStickyChrome: false },
|
|
12732
|
+
press: { button: "none", tappable: "none", highlightOpacity: 1, stateLayerOpacity: 0 }
|
|
12733
|
+
},
|
|
12734
|
+
// iOS: the stock UIKit / SwiftUI controls. The switch is MEASURED against
|
|
12735
|
+
// HimalayaDemoAppSnapshotTests' gallery_inputs golden (51×31, 27pt thumb, 2pt inset).
|
|
12736
|
+
ios: {
|
|
12737
|
+
// SF Pro reaches a page only as the Apple system font (`-apple-system`); it is not
|
|
12738
|
+
// redistributable as a webfont, so elsewhere this frame falls back and says so.
|
|
12739
|
+
font: { defaultStack: '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif', system: '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif', bundled: null, faithfulOn: "apple" },
|
|
12740
|
+
switch: { width: 51, height: 31, thumbOn: 27, thumbOff: 27, outline: 0, roles: STOCK_ROLES, thumbShadow: true },
|
|
12741
|
+
// UISegmentedControl: 32pt tall, a 2pt-inset selected segment inside a filled track.
|
|
12742
|
+
segmented: { height: 32, trackPadding: 2, trackRadius: 9, segmentRadius: 7, outlined: false, selectedCheck: false, roles: FILLED_SEGMENT_ROLES },
|
|
12743
|
+
// UISheetPresentationController: a 36×5 grabber and 10pt top corners (iOS 15–18).
|
|
12744
|
+
sheet: { cornerRadius: 10, grabberWidth: 36, grabberHeight: 5 },
|
|
12745
|
+
// NavigationStack: a large title on the root screen, inline once pushed, and NO bar when the
|
|
12746
|
+
// screen pins sticky chrome (HimalayaScreenHost.swift `RootTitleDisplayMode`,
|
|
12747
|
+
// `HideNavigationBarWhen(hasStickyChrome)`). UINavigationBar: 17pt semibold inline, 34pt
|
|
12748
|
+
// bold large.
|
|
12749
|
+
navBar: { rootTitle: "large", pushedTitle: "inline", back: "chevron", inlineTitleSize: 17, largeTitleSize: 34, hideWithStickyChrome: true },
|
|
12750
|
+
// A Button is `.buttonStyle(.borderless)`, which dims its content while pressed; any other
|
|
12751
|
+
// tappable is `.onTapGesture` (SDUIRenderer.swift `TapGestureIfPresent`), which shows
|
|
12752
|
+
// nothing. The dim is approximate — no golden captures a pressed state.
|
|
12753
|
+
press: { button: "highlight", tappable: "none", highlightOpacity: 0.3, stateLayerOpacity: 0 }
|
|
12754
|
+
},
|
|
12755
|
+
// Android: the stock Material 3 controls. The switch's ON state is MEASURED against the
|
|
12756
|
+
// Paparazzi gallery_inputs golden (52×32 track, 24dp thumb, 4dp inset); its OFF state —
|
|
12757
|
+
// 16dp thumb, 2dp outline — is Compose Material 3's SwitchTokens (no golden shows one).
|
|
12758
|
+
material: {
|
|
12759
|
+
// Roboto is the font catalog's variable face (100–900); the web host bundles that exact file
|
|
12760
|
+
// (index.html @font-face), so the frame is faithful on any OS, offline included.
|
|
12761
|
+
font: {
|
|
12762
|
+
defaultStack: "Roboto, sans-serif",
|
|
12763
|
+
system: "Roboto, sans-serif",
|
|
12764
|
+
bundled: { family: "Roboto", file: "fonts/Roboto-Variable.ttf", sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
12765
|
+
faithfulOn: "any"
|
|
12766
|
+
},
|
|
12767
|
+
switch: {
|
|
12768
|
+
width: 52,
|
|
12769
|
+
height: 32,
|
|
12770
|
+
thumbOn: 24,
|
|
12771
|
+
thumbOff: 16,
|
|
12772
|
+
outline: 2,
|
|
12773
|
+
thumbShadow: false,
|
|
12774
|
+
roles: {
|
|
12775
|
+
onThumb: "textOnAccent",
|
|
12776
|
+
offTrack: ["surfaceElevated", "surfaceSecondary", "surfacePrimary"],
|
|
12777
|
+
offThumb: ["border", "surfaceTertiary", "surfaceSecondary", "surfacePrimary"],
|
|
12778
|
+
outline: ["border", "surfaceTertiary", "surfaceSecondary", "surfacePrimary"]
|
|
12779
|
+
}
|
|
12780
|
+
},
|
|
12781
|
+
// SegmentedButton (SDUIComponents.kt `SingleChoiceSegmentedButtonRow`): 40dp, pill-ended
|
|
12782
|
+
// adjoining outlined buttons, no inset track.
|
|
12783
|
+
segmented: {
|
|
12784
|
+
height: 40,
|
|
12785
|
+
trackPadding: 0,
|
|
12786
|
+
trackRadius: "pill",
|
|
12787
|
+
segmentRadius: "pill",
|
|
12788
|
+
outlined: true,
|
|
12789
|
+
selectedCheck: true,
|
|
12790
|
+
roles: { outline: ["border", "surfaceTertiary", "surfaceSecondary", "surfacePrimary"], inactive: ["surfaceTertiary", "surfaceSecondary", "surfacePrimary"] }
|
|
12791
|
+
},
|
|
12792
|
+
// ModalBottomSheet + BottomSheetDefaults.DragHandle: a 32×4 handle, 28dp top corners.
|
|
12793
|
+
sheet: { cornerRadius: 28, grabberWidth: 32, grabberHeight: 4 },
|
|
12794
|
+
// HimalayaAppShell draws NO title bar — a floating ArrowBack IconButton, the title unused.
|
|
12795
|
+
// The floating control reserves a top band in the content's flow unless the screen is
|
|
12796
|
+
// immersive (ScreenView.kt `reservesBand`), so nothing slides under it.
|
|
12797
|
+
navBar: { rootTitle: "none", pushedTitle: "none", back: "arrow", inlineTitleSize: 0, largeTitleSize: 0, hideWithStickyChrome: false },
|
|
12798
|
+
// M3 Buttons and `Modifier.clickable` (every `onTap`, SDUIRenderer.kt) ripple. The web draws
|
|
12799
|
+
// the M3 pressed state layer (10% of the content colour), not the expanding circle.
|
|
12800
|
+
press: { button: "ripple", tappable: "ripple", highlightOpacity: 1, stateLayerOpacity: 0.1 }
|
|
12801
|
+
}
|
|
12802
|
+
};
|
|
12803
|
+
}
|
|
12804
|
+
});
|
|
12805
|
+
|
|
12698
12806
|
// ../../core/web-renderer/src/tokens.ts
|
|
12699
12807
|
function isSerifFamily(family) {
|
|
12700
12808
|
return !!family && SERIF_FAMILY_RE.test(family);
|
|
12701
12809
|
}
|
|
12702
|
-
function fontStack(family) {
|
|
12703
|
-
|
|
12704
|
-
if (family
|
|
12810
|
+
function fontStack(family, idiom) {
|
|
12811
|
+
const fallback = idiom ? idiomControls(idiom).font.defaultStack : DEFAULT_FONT_STACK;
|
|
12812
|
+
if (!family) return fallback;
|
|
12813
|
+
if (family === SYSTEM_FONT_FAMILY) return (idiom ? idiomControls(idiom).font.system : null) ?? SYSTEM_FONT_STACK;
|
|
12705
12814
|
if (isSerifFamily(family)) return `"${family}", serif`;
|
|
12706
|
-
return `"${family}", ${
|
|
12815
|
+
return `"${family}", ${fallback}`;
|
|
12707
12816
|
}
|
|
12708
12817
|
function clamp(n, lo = 0, hi = 1) {
|
|
12709
12818
|
return Math.max(lo, Math.min(hi, n));
|
|
@@ -13054,6 +13163,7 @@ var REM_ROOT_PX, pxToRem, DEFAULT_FONT_STACK, SYSTEM_FONT_STACK, SERIF_FAMILY_RE
|
|
|
13054
13163
|
var init_tokens2 = __esm({
|
|
13055
13164
|
"../../core/web-renderer/src/tokens.ts"() {
|
|
13056
13165
|
init_idiom();
|
|
13166
|
+
init_idiom_controls();
|
|
13057
13167
|
init_tokens();
|
|
13058
13168
|
REM_ROOT_PX = 16;
|
|
13059
13169
|
pxToRem = (px) => `${px / REM_ROOT_PX}rem`;
|
|
@@ -15753,7 +15863,7 @@ var init_contained_dev_module = __esm({
|
|
|
15753
15863
|
|
|
15754
15864
|
// ../../core/dev-server/src/loader.ts
|
|
15755
15865
|
import { resolve as resolve21, basename as basename8, dirname as dirname17 } from "node:path";
|
|
15756
|
-
import { existsSync as existsSync29, readdirSync as readdirSync16, readFileSync as readFileSync28, mkdirSync as mkdirSync13 } from "node:fs";
|
|
15866
|
+
import { existsSync as existsSync29, readdirSync as readdirSync16, readFileSync as readFileSync28, mkdirSync as mkdirSync13, rmSync as rmSync5 } from "node:fs";
|
|
15757
15867
|
import { pathToFileURL as pathToFileURL5, fileURLToPath as fileURLToPath12 } from "node:url";
|
|
15758
15868
|
function resolveWixWebAuthConfig(app) {
|
|
15759
15869
|
const auth = app?.meta.auth;
|
|
@@ -15788,12 +15898,13 @@ function resolveDevEntry(name) {
|
|
|
15788
15898
|
}
|
|
15789
15899
|
return null;
|
|
15790
15900
|
}
|
|
15791
|
-
async function devModuleUrl(entry, dir) {
|
|
15901
|
+
async function devModuleUrl(entry, dir, fresh = false) {
|
|
15792
15902
|
const hasTypeScriptLoader = process.execArgv.some((arg) => arg.includes("tsx"));
|
|
15793
|
-
|
|
15794
|
-
|
|
15903
|
+
const direct = !isOffRepo() && hasTypeScriptLoader;
|
|
15904
|
+
if (direct && !fresh) return { url: pathToFileURL5(entry).href };
|
|
15905
|
+
const out = resolve21(dir, fresh ? `dist/.himi/dev-${process.pid}-${++freshLoads}.mjs` : "dist/.himi/dev.mjs");
|
|
15795
15906
|
mkdirSync13(dirname17(out), { recursive: true });
|
|
15796
|
-
await buildAppEntry(entry, out, {
|
|
15907
|
+
await buildAppEntry(entry, out, direct ? { confineTo: dir } : {
|
|
15797
15908
|
// Plain Node must resolve the published-style umbrella entry points for
|
|
15798
15909
|
// both standalone and in-repo CLI content. In-repo workspace packages
|
|
15799
15910
|
// intentionally point at `.ts` sources, which are only loadable under tsx.
|
|
@@ -15802,15 +15913,23 @@ async function devModuleUrl(entry, dir) {
|
|
|
15802
15913
|
absWorkingDir: dir,
|
|
15803
15914
|
confineTo: dir
|
|
15804
15915
|
});
|
|
15805
|
-
return pathToFileURL5(out).href;
|
|
15916
|
+
return { url: pathToFileURL5(out).href, ...fresh ? { transient: out } : {} };
|
|
15806
15917
|
}
|
|
15807
|
-
async function importDevModule(name, entry, dir) {
|
|
15808
|
-
const module = devModuleRealm() === "contained" ? await loadContainedDevModule(name, entry, dir) :
|
|
15918
|
+
async function importDevModule(name, entry, dir, fresh = false) {
|
|
15919
|
+
const module = devModuleRealm() === "contained" ? await loadContainedDevModule(name, entry, dir) : await importHostDevModule(entry, dir, fresh);
|
|
15809
15920
|
if (!module || !module.config) {
|
|
15810
15921
|
throw new Error(`${entry} must default-export an AppDevModule (got ${typeof module}).`);
|
|
15811
15922
|
}
|
|
15812
15923
|
return { name, module, meta: deriveAppMeta(name, module, readPlatformsJson(dir)), dir };
|
|
15813
15924
|
}
|
|
15925
|
+
async function importHostDevModule(entry, dir, fresh) {
|
|
15926
|
+
const { url, transient } = await devModuleUrl(entry, dir, fresh);
|
|
15927
|
+
try {
|
|
15928
|
+
return (await import(url)).default;
|
|
15929
|
+
} finally {
|
|
15930
|
+
if (transient) rmSync5(transient, { force: true });
|
|
15931
|
+
}
|
|
15932
|
+
}
|
|
15814
15933
|
function readPlatformsJson(dir) {
|
|
15815
15934
|
try {
|
|
15816
15935
|
const raw = JSON.parse(readFileSync28(resolve21(dir, "platforms.json"), "utf8"));
|
|
@@ -15821,7 +15940,7 @@ function readPlatformsJson(dir) {
|
|
|
15821
15940
|
return {};
|
|
15822
15941
|
}
|
|
15823
15942
|
}
|
|
15824
|
-
async function loadContent(dir) {
|
|
15943
|
+
async function loadContent(dir, opts = {}) {
|
|
15825
15944
|
const absDir = resolve21(dir);
|
|
15826
15945
|
const entry = resolve21(absDir, "dev/index.ts");
|
|
15827
15946
|
if (!existsSync29(entry)) {
|
|
@@ -15838,7 +15957,7 @@ async function loadContent(dir) {
|
|
|
15838
15957
|
}
|
|
15839
15958
|
if (typeof manifest.name === "string" && manifest.name) name = manifest.name;
|
|
15840
15959
|
}
|
|
15841
|
-
return importDevModule(name, entry, absDir);
|
|
15960
|
+
return importDevModule(name, entry, absDir, opts.fresh === true);
|
|
15842
15961
|
}
|
|
15843
15962
|
async function tryLoadApp(name) {
|
|
15844
15963
|
const found = resolveDevEntry(name);
|
|
@@ -15870,7 +15989,7 @@ function listAvailableApps() {
|
|
|
15870
15989
|
}
|
|
15871
15990
|
return out;
|
|
15872
15991
|
}
|
|
15873
|
-
var ROOT2, APP_ROOTS2, VALID_PLATFORM_KEYS2;
|
|
15992
|
+
var ROOT2, APP_ROOTS2, freshLoads, VALID_PLATFORM_KEYS2;
|
|
15874
15993
|
var init_loader = __esm({
|
|
15875
15994
|
"../../core/dev-server/src/loader.ts"() {
|
|
15876
15995
|
init_app_module();
|
|
@@ -15879,6 +15998,7 @@ var init_loader = __esm({
|
|
|
15879
15998
|
init_build_lib();
|
|
15880
15999
|
ROOT2 = resolve21(fileURLToPath12(new URL("../../..", import.meta.url)));
|
|
15881
16000
|
APP_ROOTS2 = ["apps", "test-apps"];
|
|
16001
|
+
freshLoads = 0;
|
|
15882
16002
|
VALID_PLATFORM_KEYS2 = /* @__PURE__ */ new Set([
|
|
15883
16003
|
...PREVIEW_SURFACES.map((s) => s.platformKey).filter((k) => k !== null),
|
|
15884
16004
|
...PREVIEW_EXEMPT_PLATFORM_KEYS
|
|
@@ -17195,7 +17315,17 @@ async function wixVisitorCall(method, path2, body, token, fetchImpl = fetch, for
|
|
|
17195
17315
|
});
|
|
17196
17316
|
return { status: res.status, body: await res.text() };
|
|
17197
17317
|
}
|
|
17198
|
-
function
|
|
17318
|
+
function isChatWebTarget(path2) {
|
|
17319
|
+
if (!path2 || !/^https:\/\//i.test(path2)) return false;
|
|
17320
|
+
try {
|
|
17321
|
+
const url = new URL(path2);
|
|
17322
|
+
return url.host === "manage.wix.com" && url.pathname.startsWith("/_api/chat-web/");
|
|
17323
|
+
} catch {
|
|
17324
|
+
return false;
|
|
17325
|
+
}
|
|
17326
|
+
}
|
|
17327
|
+
function normalizeWixForwardedHeaders(input, path2) {
|
|
17328
|
+
const chatWeb = isChatWebTarget(path2);
|
|
17199
17329
|
let value = input;
|
|
17200
17330
|
if (typeof value === "string") {
|
|
17201
17331
|
try {
|
|
@@ -17205,10 +17335,12 @@ function normalizeWixForwardedHeaders(input) {
|
|
|
17205
17335
|
}
|
|
17206
17336
|
}
|
|
17207
17337
|
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
17208
|
-
const blocked = /* @__PURE__ */ new Set(["authorization", "cookie", "host", "content-length", "content-type", "connection"]);
|
|
17209
17338
|
const out = {};
|
|
17210
17339
|
for (const [name, headerValue] of Object.entries(value)) {
|
|
17211
|
-
|
|
17340
|
+
const lower = name.toLowerCase();
|
|
17341
|
+
const allowed2 = WIX_FORWARDABLE_HEADERS.has(lower) || chatWeb && lower === "chattoken";
|
|
17342
|
+
if (!/^[a-z0-9-]+$/i.test(name) || !allowed2 || typeof headerValue !== "string") continue;
|
|
17343
|
+
if (/[\r\n\0]/.test(headerValue)) continue;
|
|
17212
17344
|
out[name] = headerValue;
|
|
17213
17345
|
}
|
|
17214
17346
|
return out;
|
|
@@ -17247,7 +17379,7 @@ function wixClientIdOf(appConfigJson) {
|
|
|
17247
17379
|
if (typeof clientId !== "string" || !clientId) return { error: "no_client_id" };
|
|
17248
17380
|
return { clientId };
|
|
17249
17381
|
}
|
|
17250
|
-
var WIX_API, ONE_APP_SESSION, OWNER_SCOPED_WIX_HOST, VisitorTokenCache, OWNER_REFRESH_MARGIN_MS, OWNER_RENEW_MIN_AGE_MS, OWNER_MINT_TIMEOUT_MS, OwnerInstanceCache, OWNER_SITES_QUERY_PATH, OWNER_SITES_COUNT_PATH, OwnerSitesCache;
|
|
17382
|
+
var WIX_API, ONE_APP_SESSION, OWNER_SCOPED_WIX_HOST, VisitorTokenCache, WIX_FORWARDABLE_HEADERS, OWNER_REFRESH_MARGIN_MS, OWNER_RENEW_MIN_AGE_MS, OWNER_MINT_TIMEOUT_MS, OwnerInstanceCache, OWNER_SITES_QUERY_PATH, OWNER_SITES_COUNT_PATH, OwnerSitesCache;
|
|
17251
17383
|
var init_wix_bridge = __esm({
|
|
17252
17384
|
"../../core/serve-runtime/src/wix-bridge.ts"() {
|
|
17253
17385
|
init_sha256();
|
|
@@ -17284,6 +17416,22 @@ var init_wix_bridge = __esm({
|
|
|
17284
17416
|
this.cache.delete(clientId);
|
|
17285
17417
|
}
|
|
17286
17418
|
};
|
|
17419
|
+
WIX_FORWARDABLE_HEADERS = /* @__PURE__ */ new Set([
|
|
17420
|
+
"x-wix-language",
|
|
17421
|
+
"x-wix-linguist",
|
|
17422
|
+
"wixlanguage",
|
|
17423
|
+
"accept-language",
|
|
17424
|
+
"x-wix-currency",
|
|
17425
|
+
"x-wix-consistent",
|
|
17426
|
+
"x-wix-client-api-revision",
|
|
17427
|
+
"x-wix-site-revision",
|
|
17428
|
+
"x-wix-bi-gateway",
|
|
17429
|
+
"x-wix-brand",
|
|
17430
|
+
"consent-policy",
|
|
17431
|
+
"commonconfig",
|
|
17432
|
+
"x-wix-client-artifact-id",
|
|
17433
|
+
"wix-site-id"
|
|
17434
|
+
]);
|
|
17287
17435
|
OWNER_REFRESH_MARGIN_MS = 6e4;
|
|
17288
17436
|
OWNER_RENEW_MIN_AGE_MS = 5e3;
|
|
17289
17437
|
OWNER_MINT_TIMEOUT_MS = 8e3;
|
|
@@ -19882,7 +20030,6 @@ function shouldRevealError(args) {
|
|
|
19882
20030
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
19883
20031
|
var init_validation = __esm({
|
|
19884
20032
|
"../../core/ts/src/validation.ts"() {
|
|
19885
|
-
"use strict";
|
|
19886
20033
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
19887
20034
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
19888
20035
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -22426,6 +22573,7 @@ var init_controls = __esm({
|
|
|
22426
22573
|
"use strict";
|
|
22427
22574
|
init_helpers();
|
|
22428
22575
|
init_tokens2();
|
|
22576
|
+
init_idiom_controls();
|
|
22429
22577
|
init_bindings2();
|
|
22430
22578
|
init_icons();
|
|
22431
22579
|
init_formBag();
|
|
@@ -22434,7 +22582,7 @@ var init_controls = __esm({
|
|
|
22434
22582
|
const r = useResolvedScalar(typeof v === "string" ? v : void 0, ctx);
|
|
22435
22583
|
return r != null ? String(r) : void 0;
|
|
22436
22584
|
};
|
|
22437
|
-
FONT = (ctx) => fontStack(ctx.font("body").family);
|
|
22585
|
+
FONT = (ctx) => fontStack(ctx.font("body").family, ctx.idiom);
|
|
22438
22586
|
rowShareFloor = (style, rowStretch, floor) => rowStretch ? { ...style, minWidth: floor } : style;
|
|
22439
22587
|
A11ySwitch = ({ props, ctx, wrap }) => {
|
|
22440
22588
|
const C = ctx.color;
|
|
@@ -22463,11 +22611,18 @@ var init_controls = __esm({
|
|
|
22463
22611
|
bag.register(fieldId, props.validation);
|
|
22464
22612
|
return () => bag.unregister(fieldId);
|
|
22465
22613
|
}, [fieldId, bag, ruleKey]);
|
|
22466
|
-
const
|
|
22467
|
-
const
|
|
22468
|
-
const
|
|
22469
|
-
const
|
|
22470
|
-
const
|
|
22614
|
+
const hasAppearance = props.trackOn != null || props.trackOff != null || props.thumb != null || props.width != null || props.height != null;
|
|
22615
|
+
const shape = idiomControls(hasAppearance ? void 0 : ctx.idiom).switch;
|
|
22616
|
+
const w = typeof props.width === "number" ? props.width : shape.width;
|
|
22617
|
+
const h = typeof props.height === "number" ? props.height : shape.height;
|
|
22618
|
+
const tSize = hasAppearance ? Math.max(0, h - 4) : Math.max(0, on3 ? shape.thumbOn : shape.thumbOff);
|
|
22619
|
+
const roles = shape.roles;
|
|
22620
|
+
const role = (r) => pickRole(ctx.tokens.colors, r);
|
|
22621
|
+
const trackColor = on3 ? C(props.trackOn ?? "accentPrimary", "#116DFF") : C(props.trackOff ?? role(roles.offTrack), "#ddd");
|
|
22622
|
+
const thumbRole = on3 ? roles.onThumb : roles.offThumb;
|
|
22623
|
+
const thumbColor = props.thumb ? C(props.thumb, "#fff") : thumbRole ? C(role(thumbRole), "#fff") : "#fff";
|
|
22624
|
+
const outlineWidth = !on3 && roles.outline ? shape.outline : 0;
|
|
22625
|
+
const thumbInset = (h - tSize) / 2 - outlineWidth;
|
|
22471
22626
|
const act = props.onChange ?? props.action;
|
|
22472
22627
|
const canFire = !props.disabled && Boolean(ctx.onAction) && (inForm || Boolean(act));
|
|
22473
22628
|
const fire = canFire ? () => {
|
|
@@ -22492,8 +22647,8 @@ var init_controls = __esm({
|
|
|
22492
22647
|
"aria-label": props.label != null ? asText2(props.label) : void 0,
|
|
22493
22648
|
disabled: props.disabled === true,
|
|
22494
22649
|
onClick: fire,
|
|
22495
|
-
style: { all: "unset", boxSizing: "border-box", width: w, height: h, borderRadius: 999, background: trackColor, position: "relative", flex: "none", cursor: fire ? "pointer" : "default", display: "inline-block", outlineOffset: 2 },
|
|
22496
|
-
children: /* @__PURE__ */ jsx4("span", { "aria-hidden": true, style: { position: "absolute", top:
|
|
22650
|
+
style: { all: "unset", boxSizing: "border-box", width: w, height: h, borderRadius: 999, background: trackColor, ...outlineWidth > 0 ? { border: `${outlineWidth}px solid ${C(role(roles.outline), "#79747e")}` } : {}, position: "relative", flex: "none", cursor: fire ? "pointer" : "default", display: "inline-block", outlineOffset: 2 },
|
|
22651
|
+
children: /* @__PURE__ */ jsx4("span", { "aria-hidden": true, style: { position: "absolute", top: thumbInset, [on3 ? "right" : "left"]: thumbInset, width: tSize, height: tSize, borderRadius: "50%", background: thumbColor, boxShadow: shape.thumbShadow ? "0 1px 3px rgba(0,0,0,.3)" : "none" } })
|
|
22497
22652
|
}
|
|
22498
22653
|
)
|
|
22499
22654
|
] });
|
|
@@ -22656,6 +22811,8 @@ var init_controls = __esm({
|
|
|
22656
22811
|
};
|
|
22657
22812
|
A11ySegmented = ({ props, ctx, wrap }) => {
|
|
22658
22813
|
const C = ctx.color;
|
|
22814
|
+
const seg = idiomControls(ctx.idiom).segmented;
|
|
22815
|
+
const radius = (r, token, fallback) => r === null ? ctx.radius(token, fallback) : r === "pill" ? 999 : r;
|
|
22659
22816
|
const optionsPath = props.optionsPath ?? props.options_path;
|
|
22660
22817
|
const boundOpts = useBoundValue(ctx, typeof optionsPath === "string" && isBinding(optionsPath) ? optionsPath : "");
|
|
22661
22818
|
const resolvedSel = useResolvedId(props.selectedId, ctx);
|
|
@@ -22675,9 +22832,15 @@ var init_controls = __esm({
|
|
|
22675
22832
|
e.preventDefault();
|
|
22676
22833
|
if (ni !== selIdx) select(ni);
|
|
22677
22834
|
};
|
|
22678
|
-
return /* @__PURE__ */ jsx4("div", { role: "radiogroup", onKeyDown, style: { display: "flex", background: C("surfaceTertiary", "#eee"), borderRadius:
|
|
22835
|
+
return /* @__PURE__ */ jsx4("div", { role: "radiogroup", onKeyDown, style: { display: "flex", background: seg.outlined ? "transparent" : C("surfaceTertiary", "#eee"), borderRadius: radius(seg.trackRadius, "md", 8), padding: seg.trackPadding, width: "100%", boxSizing: "border-box", ...wrap }, children: opts.map((o, i) => {
|
|
22679
22836
|
const on3 = o.id === selId;
|
|
22680
|
-
|
|
22837
|
+
const outerR = radius(seg.segmentRadius, "sm", 6);
|
|
22838
|
+
const outlinedShape = seg.outlined ? {
|
|
22839
|
+
border: `1px solid ${C(pickRole(ctx.tokens.colors, seg.roles.outline), "#d8dee4")}`,
|
|
22840
|
+
marginLeft: i > 0 ? -1 : 0,
|
|
22841
|
+
borderRadius: `${i === 0 ? outerR : 0}px ${i === opts.length - 1 ? outerR : 0}px ${i === opts.length - 1 ? outerR : 0}px ${i === 0 ? outerR : 0}px`
|
|
22842
|
+
} : {};
|
|
22843
|
+
return /* @__PURE__ */ jsxs(
|
|
22681
22844
|
"button",
|
|
22682
22845
|
{
|
|
22683
22846
|
type: "button",
|
|
@@ -22685,8 +22848,11 @@ var init_controls = __esm({
|
|
|
22685
22848
|
"aria-checked": on3,
|
|
22686
22849
|
tabIndex: on3 || selId == null && i === 0 ? 0 : -1,
|
|
22687
22850
|
onClick: () => select(i),
|
|
22688
|
-
style: { all: "unset", flex: 1, minWidth: 44, minHeight:
|
|
22689
|
-
children:
|
|
22851
|
+
style: { all: "unset", flex: 1, minWidth: 44, minHeight: seg.height - 2 * seg.trackPadding, textAlign: "center", padding: "7px 4px", borderRadius: outerR, fontFamily: FONT(ctx), fontWeight: 600, fontSize: 13, cursor: "pointer", boxSizing: "border-box", background: on3 ? C("surfacePrimary", "#fff") : seg.outlined ? C(pickRole(ctx.tokens.colors, seg.roles.inactive), "#eee") : "transparent", color: on3 ? C("textPrimary", "#111") : C("textSecondary", "#777"), boxShadow: on3 && !seg.outlined ? "0 1px 3px rgba(0,0,0,.12)" : "none", ...outlinedShape },
|
|
22852
|
+
children: [
|
|
22853
|
+
on3 && seg.selectedCheck ? /* @__PURE__ */ jsx4("span", { "aria-hidden": "true", children: "\u2713 " }) : null,
|
|
22854
|
+
asText2(o.label ?? o.title ?? o.id) || `Option ${i + 1}`
|
|
22855
|
+
]
|
|
22690
22856
|
},
|
|
22691
22857
|
o.id ?? i
|
|
22692
22858
|
);
|
|
@@ -23307,7 +23473,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
23307
23473
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
23308
23474
|
var init_worker_subtree = __esm({
|
|
23309
23475
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
23310
|
-
"use strict";
|
|
23311
23476
|
init_worker_subtree_safe_types_generated();
|
|
23312
23477
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
23313
23478
|
maxEncodedBytes: 65536,
|
|
@@ -23346,7 +23511,7 @@ function seededWidth(measured, seed2) {
|
|
|
23346
23511
|
return measured || (typeof seed2 === "number" && seed2 > 0 ? seed2 : 0);
|
|
23347
23512
|
}
|
|
23348
23513
|
function makeCtx(tokens, scheme = "light", opts = {}) {
|
|
23349
|
-
const tk = makeTokenResolvers(tokens, scheme);
|
|
23514
|
+
const tk = makeTokenResolvers(tokens, scheme, opts.idiomContext);
|
|
23350
23515
|
const provider = opts.provider ?? null;
|
|
23351
23516
|
return {
|
|
23352
23517
|
...tk,
|
|
@@ -23369,7 +23534,9 @@ function makeCtx(tokens, scheme = "light", opts = {}) {
|
|
|
23369
23534
|
emitTelemetry: opts.emitTelemetry,
|
|
23370
23535
|
assetBaseUrl: opts.assetBaseUrl,
|
|
23371
23536
|
runtimeDegraded: opts.runtimeDegraded,
|
|
23372
|
-
previewSurface: opts.previewSurface
|
|
23537
|
+
previewSurface: opts.previewSurface,
|
|
23538
|
+
idiomContext: opts.idiomContext,
|
|
23539
|
+
idiom: controlIdiomFor(opts.idiomContext)
|
|
23373
23540
|
};
|
|
23374
23541
|
}
|
|
23375
23542
|
function resolveAssetUrl(url, base) {
|
|
@@ -23393,7 +23560,7 @@ function withTheme(ctx, theme) {
|
|
|
23393
23560
|
radius: { ...base.radius ?? {}, ...theme.radius ?? {} },
|
|
23394
23561
|
spacing: { ...base.spacing ?? {}, ...theme.spacing ?? {} }
|
|
23395
23562
|
};
|
|
23396
|
-
const themed = makeCtx(merged, ctx.scheme, { provider: ctx.provider, onAction: ctx.onAction, intents: ctx.intents, empty: ctx.empty, screenId: ctx.screenId, emitTelemetry: ctx.emitTelemetry, previewSurface: ctx.previewSurface });
|
|
23563
|
+
const themed = makeCtx(merged, ctx.scheme, { provider: ctx.provider, onAction: ctx.onAction, intents: ctx.intents, empty: ctx.empty, screenId: ctx.screenId, emitTelemetry: ctx.emitTelemetry, previewSurface: ctx.previewSurface, idiomContext: ctx.idiomContext });
|
|
23397
23564
|
themed.itemScope = ctx.itemScope;
|
|
23398
23565
|
return themed;
|
|
23399
23566
|
}
|
|
@@ -23410,9 +23577,29 @@ function ensurePressStyles() {
|
|
|
23410
23577
|
const el = document.createElement("style");
|
|
23411
23578
|
el.textContent = // WS-N3 — the duration/easing read from per-node CSS vars (set when a
|
|
23412
23579
|
// `pressMotion` token is present) with the original 160ms/standard-ease default.
|
|
23413
|
-
'[data-himalaya-press]{transition:transform var(--hm-press-dur,160ms) var(--hm-press-ease,cubic-bezier(0.2,0,0,1)),filter var(--hm-press-dur,160ms) var(--hm-press-ease,cubic-bezier(0.2,0,0,1))}[data-himalaya-press="scale"]:active,[data-himalaya-press="auto"]:active,[data-himalaya-press="scaleHighlight"]:active{transform:scale(0.96)}[data-himalaya-press="scaleHighlight"]:active,[data-himalaya-press="highlight"]:active{filter:brightness(1.08)}[data-himalaya-press="lift"]:active{transform:translateY(-4px) scale(1.02)}
|
|
23580
|
+
'[data-himalaya-press]{transition:transform var(--hm-press-dur,160ms) var(--hm-press-ease,cubic-bezier(0.2,0,0,1)),filter var(--hm-press-dur,160ms) var(--hm-press-ease,cubic-bezier(0.2,0,0,1))}[data-himalaya-press="scale"]:active,[data-himalaya-press="auto"]:active,[data-himalaya-press="scaleHighlight"]:active{transform:scale(0.96)}[data-himalaya-press="scaleHighlight"]:active,[data-himalaya-press="highlight"]:active{filter:brightness(1.08)}[data-himalaya-press="lift"]:active{transform:translateY(-4px) scale(1.02)}' + idiomPressRules() + // RFC 0051 track D — desktop hover analogs. Guarded by `(hover: hover)` so a
|
|
23581
|
+
// touch device never sees a sticky-hover state; pointer-only affordance for
|
|
23582
|
+
// the real web app. Tap-bearing nodes get a subtle dim (the hover analog of
|
|
23583
|
+
// pressFeedback's dim family); press-styled nodes preview their :active
|
|
23584
|
+
// recipe at reduced amplitude.
|
|
23585
|
+
'@media (hover:hover){[data-himalaya-tap]{transition:filter 120ms ease}[data-himalaya-tap]:hover{filter:brightness(0.97)}[data-himalaya-press="scale"]:hover,[data-himalaya-press="auto"]:hover,[data-himalaya-press="scaleHighlight"]:hover{transform:scale(0.985)}[data-himalaya-press="lift"]:hover{transform:translateY(-2px) scale(1.01)}}';
|
|
23414
23586
|
document.head.appendChild(el);
|
|
23415
23587
|
}
|
|
23588
|
+
function idiomPressRules() {
|
|
23589
|
+
let css = "";
|
|
23590
|
+
for (const [name, row] of Object.entries(IDIOM_CONTROLS)) {
|
|
23591
|
+
const layer = `color-mix(in srgb,currentColor ${Math.round(row.press.stateLayerOpacity * 100)}%,transparent)`;
|
|
23592
|
+
css += `[data-himalaya-idiom-press="${name}-highlight"]:active{opacity:${row.press.highlightOpacity}!important}`;
|
|
23593
|
+
css += `[data-himalaya-idiom-press="${name}-ripple"]:active{background-image:linear-gradient(${layer},${layer})!important}`;
|
|
23594
|
+
}
|
|
23595
|
+
return css;
|
|
23596
|
+
}
|
|
23597
|
+
function idiomPress(ctx, part) {
|
|
23598
|
+
const kind = idiomControls(ctx.idiom).press[part];
|
|
23599
|
+
if (kind === "none") return void 0;
|
|
23600
|
+
ensurePressStyles();
|
|
23601
|
+
return `${ctx.idiom}-${kind}`;
|
|
23602
|
+
}
|
|
23416
23603
|
function ensureFocusStyles() {
|
|
23417
23604
|
if (focusStylesInjected || typeof document === "undefined") return;
|
|
23418
23605
|
focusStylesInjected = true;
|
|
@@ -24683,6 +24870,8 @@ function renderNodeInner(node, ctx) {
|
|
|
24683
24870
|
}
|
|
24684
24871
|
ensurePressStyles();
|
|
24685
24872
|
extra["data-himalaya-tap"] = "1";
|
|
24873
|
+
const idiomPressed = idiomPress(ctx, "tappable");
|
|
24874
|
+
if (idiomPressed) extra["data-himalaya-idiom-press"] = idiomPressed;
|
|
24686
24875
|
}
|
|
24687
24876
|
const dtap = node?.modifiers?.onDoubleTap ?? node?.modifiers?.on_double_tap;
|
|
24688
24877
|
if (dtap && ctx.onAction) {
|
|
@@ -25064,7 +25253,7 @@ function renderInner(node, ctx) {
|
|
|
25064
25253
|
return /* @__PURE__ */ jsx6("div", { style: { fontFamily: bodyFont(ctx), lineHeight: 1.5, overflowWrap: "break-word", color: C(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), ...wrap }, children: runs.map((r, i) => {
|
|
25065
25254
|
const marks = Array.isArray(r.marks) ? r.marks : [];
|
|
25066
25255
|
const f = ctx.font(r.style);
|
|
25067
|
-
return /* @__PURE__ */ jsx6("span", { style: { fontSize: f.remSize, fontWeight: marks.includes("bold") ? 700 : f.weight, fontStyle: marks.includes("italic") ? "italic" : void 0, textDecoration: marks.includes("underline") ? "underline" : void 0, ...f.family ? { fontFamily: fontStack(f.family) } : {}, ...r.color ? { color: C(r.color) } : {}, ...marks.includes("code") ? { fontFamily: "ui-monospace, monospace", background: C("surfaceTertiary", "#eee"), padding: "1px 5px", borderRadius: 4 } : {} }, children: txt(r.text, ctx) }, i);
|
|
25256
|
+
return /* @__PURE__ */ jsx6("span", { style: { fontSize: f.remSize, fontWeight: marks.includes("bold") ? 700 : f.weight, fontStyle: marks.includes("italic") ? "italic" : void 0, textDecoration: marks.includes("underline") ? "underline" : void 0, ...f.family ? { fontFamily: fontStack(f.family, ctx.idiom) } : {}, ...r.color ? { color: C(r.color) } : {}, ...marks.includes("code") ? { fontFamily: "ui-monospace, monospace", background: C("surfaceTertiary", "#eee"), padding: "1px 5px", borderRadius: 4 } : {} }, children: txt(r.text, ctx) }, i);
|
|
25068
25257
|
}) });
|
|
25069
25258
|
}
|
|
25070
25259
|
case "Image":
|
|
@@ -25105,8 +25294,8 @@ function renderInner(node, ctx) {
|
|
|
25105
25294
|
props.leading && /* @__PURE__ */ jsx6("div", { style: { flex: "none", display: "flex" }, children: renderNode(props.leading, ctx) }),
|
|
25106
25295
|
/* @__PURE__ */ jsxs3("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
25107
25296
|
props.overline != null && /* @__PURE__ */ jsx6("span", { style: { fontFamily: bodyFont(ctx), fontSize: 11, fontWeight: 600, letterSpacing: 0.4, textTransform: "uppercase", color: C(props.overlineColor ?? "textSecondary", "#888"), ...ell }, children: txt(props.overline, ctx) }),
|
|
25108
|
-
/* @__PURE__ */ jsx6("span", { style: { fontFamily: fontStack(titleF.family), fontSize: titleF.remSize, fontWeight: titleF.weight, color: C(props.titleColor ?? "textPrimary", "#13171e"), ...ell }, children: txt(props.title, ctx) ?? (ctx.empty ? "" : "") }),
|
|
25109
|
-
props.subtitle != null && /* @__PURE__ */ jsx6("span", { style: { fontFamily: fontStack(subF.family), fontSize: subF.remSize, color: C(props.subtitleColor ?? "textSecondary", "#888"), ...ell }, children: txt(props.subtitle, ctx) })
|
|
25297
|
+
/* @__PURE__ */ jsx6("span", { style: { fontFamily: fontStack(titleF.family, ctx.idiom), fontSize: titleF.remSize, fontWeight: titleF.weight, color: C(props.titleColor ?? "textPrimary", "#13171e"), ...ell }, children: txt(props.title, ctx) ?? (ctx.empty ? "" : "") }),
|
|
25298
|
+
props.subtitle != null && /* @__PURE__ */ jsx6("span", { style: { fontFamily: fontStack(subF.family, ctx.idiom), fontSize: subF.remSize, color: C(props.subtitleColor ?? "textSecondary", "#888"), ...ell }, children: txt(props.subtitle, ctx) })
|
|
25110
25299
|
] }),
|
|
25111
25300
|
props.trailing ? (
|
|
25112
25301
|
// #1010 — the row's `onTap` lives on the outer flex div, and the trailing
|
|
@@ -25172,7 +25361,7 @@ function renderInner(node, ctx) {
|
|
|
25172
25361
|
case "Label": {
|
|
25173
25362
|
const f = ctx.font(props.style ?? "body");
|
|
25174
25363
|
const col = C(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e");
|
|
25175
|
-
return /* @__PURE__ */ jsxs3("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontFamily: fontStack(f.family), fontSize: f.remSize, fontWeight: f.weight, color: col, ...wrap }, children: [
|
|
25364
|
+
return /* @__PURE__ */ jsxs3("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontFamily: fontStack(f.family, ctx.idiom), fontSize: f.remSize, fontWeight: f.weight, color: col, ...wrap }, children: [
|
|
25176
25365
|
props.icon && /* @__PURE__ */ jsx6("span", { style: { display: "inline-grid", placeItems: "center", width: f.size, height: f.size }, children: iconSvg(props.icon, { size: f.size, color: col }) }),
|
|
25177
25366
|
txt(props.text, ctx)
|
|
25178
25367
|
] });
|
|
@@ -25201,7 +25390,7 @@ function renderInner(node, ctx) {
|
|
|
25201
25390
|
ensureMarqueeKeyframes();
|
|
25202
25391
|
const f = ctx.font(props.style ?? "body");
|
|
25203
25392
|
const dur = props.durationMs ?? 8e3;
|
|
25204
|
-
return /* @__PURE__ */ jsx6("div", { style: { width: "100%", overflow: "hidden", whiteSpace: "nowrap", ...wrap }, children: /* @__PURE__ */ jsx6("span", { style: { display: "inline-block", paddingLeft: "100%", fontFamily: fontStack(f.family), fontSize: f.remSize, color: C(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), animation: ctx.empty ? void 0 : `himalaya-marquee ${dur}ms linear infinite` }, children: txt(props.text, ctx) }) });
|
|
25393
|
+
return /* @__PURE__ */ jsx6("div", { style: { width: "100%", overflow: "hidden", whiteSpace: "nowrap", ...wrap }, children: /* @__PURE__ */ jsx6("span", { style: { display: "inline-block", paddingLeft: "100%", fontFamily: fontStack(f.family, ctx.idiom), fontSize: f.remSize, color: C(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), animation: ctx.empty ? void 0 : `himalaya-marquee ${dur}ms linear infinite` }, children: txt(props.text, ctx) }) });
|
|
25205
25394
|
}
|
|
25206
25395
|
case "Timeline":
|
|
25207
25396
|
return /* @__PURE__ */ jsx6(TimelineNode, { props, ctx, wrap });
|
|
@@ -25440,6 +25629,7 @@ var init_renderNode = __esm({
|
|
|
25440
25629
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
25441
25630
|
"use strict";
|
|
25442
25631
|
init_tokens2();
|
|
25632
|
+
init_idiom_controls();
|
|
25443
25633
|
init_modifiers();
|
|
25444
25634
|
init_helpers();
|
|
25445
25635
|
init_bindings2();
|
|
@@ -25570,7 +25760,7 @@ var init_renderNode = __esm({
|
|
|
25570
25760
|
return "center";
|
|
25571
25761
|
}
|
|
25572
25762
|
};
|
|
25573
|
-
bodyFont = (ctx) => fontStack(ctx.font("body").family);
|
|
25763
|
+
bodyFont = (ctx) => fontStack(ctx.font("body").family, ctx.idiom);
|
|
25574
25764
|
kids = (arr, ctx) => Array.isArray(arr) ? arr.map((n, i) => /* @__PURE__ */ jsx6(React5.Fragment, { children: renderNode(n, ctx) }, n?.id ?? i)) : null;
|
|
25575
25765
|
rowKids = (arr, ctx) => Array.isArray(arr) ? arr.map((n, i) => /* @__PURE__ */ jsx6(React5.Fragment, { children: renderNode(n, wantsRowStretch(n) ? { ...ctx, rowStretch: true } : ctx) }, n?.id ?? i)) : null;
|
|
25576
25766
|
staggeredKids = (arr, ctx, staggerMs) => Array.isArray(arr) ? arr.map((n, i) => {
|
|
@@ -27058,7 +27248,7 @@ var init_renderNode = __esm({
|
|
|
27058
27248
|
const tAlign = props.textAlign === "center" ? "center" : props.textAlign === "trailing" ? "right" : props.textAlign === "justify" ? "justify" : props.textAlign === "leading" ? "left" : void 0;
|
|
27059
27249
|
const tDecor = props.decoration === "strikethrough" ? "line-through" : props.decoration === "underline" ? "underline" : void 0;
|
|
27060
27250
|
const ln = typeof props.lineSpacing === "number" ? pxToRem((f.line ?? 1.4) * f.size + props.lineSpacing) : f.line;
|
|
27061
|
-
return /* @__PURE__ */ jsx6("div", { ...countAttrs, style: { fontFamily: fontStack(f.family), fontSize: f.remSize, fontWeight: f.weight, lineHeight: ln, letterSpacing: f.letterSpacing, color: C(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), whiteSpace: "pre-wrap", overflowWrap: "anywhere", wordBreak: "break-word", minWidth: 0, ...tAlign ? { textAlign: tAlign } : {}, ...tDecor ? { textDecoration: tDecor } : {}, ...props.maxLines ? { display: "-webkit-box", WebkitLineClamp: props.maxLines, WebkitBoxOrient: "vertical", overflow: "hidden" } : {}, ...wrap }, children: content == null || content === "" ? collapse ? null : "\xA0" : content });
|
|
27251
|
+
return /* @__PURE__ */ jsx6("div", { ...countAttrs, style: { fontFamily: fontStack(f.family, ctx.idiom), fontSize: f.remSize, fontWeight: f.weight, lineHeight: ln, letterSpacing: f.letterSpacing, color: C(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), whiteSpace: "pre-wrap", overflowWrap: "anywhere", wordBreak: "break-word", minWidth: 0, ...tAlign ? { textAlign: tAlign } : {}, ...tDecor ? { textDecoration: tDecor } : {}, ...props.maxLines ? { display: "-webkit-box", WebkitLineClamp: props.maxLines, WebkitBoxOrient: "vertical", overflow: "hidden" } : {}, ...wrap }, children: content == null || content === "" ? collapse ? null : "\xA0" : content });
|
|
27062
27252
|
});
|
|
27063
27253
|
ImageNode = withExtras("ImageNode", ({ props, ctx, wrap }) => {
|
|
27064
27254
|
const C = ctx.color;
|
|
@@ -27162,6 +27352,7 @@ var init_renderNode = __esm({
|
|
|
27162
27352
|
disabled,
|
|
27163
27353
|
"aria-label": accessibleLabel,
|
|
27164
27354
|
"aria-busy": props.loading === true ? true : void 0,
|
|
27355
|
+
"data-himalaya-idiom-press": idiomPress(ctx, "button"),
|
|
27165
27356
|
onClick,
|
|
27166
27357
|
style: rowShareFloor({
|
|
27167
27358
|
// reset first, so every token-driven value below still wins
|
|
@@ -27204,7 +27395,7 @@ var init_renderNode = __esm({
|
|
|
27204
27395
|
gap: 8,
|
|
27205
27396
|
padding: pad2,
|
|
27206
27397
|
borderRadius: props.iconOnly ? "50%" : pillRadius,
|
|
27207
|
-
fontFamily: fontStack(f.family),
|
|
27398
|
+
fontFamily: fontStack(f.family, ctx.idiom),
|
|
27208
27399
|
fontWeight: f.weight,
|
|
27209
27400
|
fontSize: f.remSize,
|
|
27210
27401
|
background: primary ? accent : "transparent",
|
|
@@ -27271,8 +27462,9 @@ var init_renderNode = __esm({
|
|
|
27271
27462
|
const presented = props.presentedPath != null ? bound : props.presented;
|
|
27272
27463
|
if (gated && presented !== true && presented !== "true") return null;
|
|
27273
27464
|
const grabber = props.showGrabber !== false;
|
|
27274
|
-
|
|
27275
|
-
|
|
27465
|
+
const sheet = idiomControls(ctx.idiom).sheet;
|
|
27466
|
+
return /* @__PURE__ */ jsx6("div", { style: { position: "absolute", inset: 0, background: "rgba(0,0,0,.35)", zIndex: 50, display: "flex", flexDirection: "column", justifyContent: "flex-end", ...wrap }, children: /* @__PURE__ */ jsxs3("div", { role: "dialog", "aria-modal": "true", "aria-label": props.title != null ? sheetTitle : "Sheet", style: { width: "100%", background: C("surfacePrimary", "#fff"), borderRadius: `${sheet.cornerRadius}px ${sheet.cornerRadius}px 0 0`, boxShadow: "0 -4px 24px rgba(0,0,0,.12)", overflow: "hidden" }, children: [
|
|
27467
|
+
grabber && /* @__PURE__ */ jsx6("div", { style: { display: "flex", justifyContent: "center", padding: "8px 0 4px" }, children: /* @__PURE__ */ jsx6("div", { style: { width: sheet.grabberWidth, height: sheet.grabberHeight, borderRadius: 999, background: C("surfaceTertiary", "#d8dce2") } }) }),
|
|
27276
27468
|
/* @__PURE__ */ jsx6("div", { style: { padding: "8px 16px 16px" }, children: props.content ? renderNode(props.content, ctx) : null })
|
|
27277
27469
|
] }) });
|
|
27278
27470
|
});
|
|
@@ -27356,7 +27548,7 @@ var init_renderNode = __esm({
|
|
|
27356
27548
|
const capF = ctx.font("caption");
|
|
27357
27549
|
return /* @__PURE__ */ jsx6("div", { style: { display: "inline-flex", flexDirection: "column", alignItems: "center", gap: 4, ...wrap }, children: /* @__PURE__ */ jsxs3("div", { style: { position: "relative", width: 72, height: 72 }, children: [
|
|
27358
27550
|
/* @__PURE__ */ jsx6("div", { style: { width: 72, height: 72, borderRadius: "50%", background: `conic-gradient(${tint} ${pct * 360}deg, ${track} 0deg)`, WebkitMask: ringMask, mask: ringMask, ...gaugeAnim } }),
|
|
27359
|
-
/* @__PURE__ */ jsx6("div", { style: { position: "absolute", inset: 0, display: "grid", placeItems: "center", fontFamily: fontStack(capF.family), fontSize: capF.remSize, fontWeight: capF.weight, color: C("textPrimary", "#13171e") }, children: txt(props.label, ctx) || `${Math.round(pct * 100)}%` })
|
|
27551
|
+
/* @__PURE__ */ jsx6("div", { style: { position: "absolute", inset: 0, display: "grid", placeItems: "center", fontFamily: fontStack(capF.family, ctx.idiom), fontSize: capF.remSize, fontWeight: capF.weight, color: C("textPrimary", "#13171e") }, children: txt(props.label, ctx) || `${Math.round(pct * 100)}%` })
|
|
27360
27552
|
] }) });
|
|
27361
27553
|
});
|
|
27362
27554
|
RATING_METRICS = {
|
|
@@ -28216,7 +28408,7 @@ var init_renderNode = __esm({
|
|
|
28216
28408
|
/* @__PURE__ */ jsxs3("div", { style: { position: "relative", height: Math.min(props.expandedHeight ?? 120, 160), borderRadius: ctx.radius("md", 10), overflow: "hidden", background: imageUrl ? void 0 : `linear-gradient(135deg, ${C("accentPrimary", "#116DFF")}, ${C("accentSecondary", "#0E5FE3")})` }, children: [
|
|
28217
28409
|
imageUrl && /* @__PURE__ */ jsx6("img", { src: imageUrl, alt: "", style: { width: "100%", height: "100%", objectFit: "cover" } }),
|
|
28218
28410
|
/* @__PURE__ */ jsxs3("div", { style: { position: "absolute", left: 14, bottom: 12, color: "#fff", textShadow: "0 1px 4px rgba(0,0,0,.5)" }, children: [
|
|
28219
|
-
/* @__PURE__ */ jsx6("div", { style: { fontFamily: ctx.font("title1").family ? fontStack(ctx.font("title1").family) : '"Wix Madefor Display", system-ui', fontWeight: 700, fontSize: 20 }, children: txt(props.title, ctx) }),
|
|
28411
|
+
/* @__PURE__ */ jsx6("div", { style: { fontFamily: ctx.font("title1").family || ctx.idiom && ctx.idiom !== "base" ? fontStack(ctx.font("title1").family, ctx.idiom) : '"Wix Madefor Display", system-ui', fontWeight: 700, fontSize: 20 }, children: txt(props.title, ctx) }),
|
|
28220
28412
|
props.subtitle && /* @__PURE__ */ jsx6("div", { style: { fontSize: 13, opacity: 0.9 }, children: txt(props.subtitle, ctx) })
|
|
28221
28413
|
] })
|
|
28222
28414
|
] }),
|
|
@@ -28834,7 +29026,8 @@ function renderDescriptorToHtml(payload, tokens, scheme = "light", provider = nu
|
|
|
28834
29026
|
const ctx = makeCtx(tokens, scheme, {
|
|
28835
29027
|
provider,
|
|
28836
29028
|
...typeof width === "number" && Number.isFinite(width) && width > 0 ? { sizeClass: sizeClassFromWidth(width), containerWidth: width } : {},
|
|
28837
|
-
...rtl ? { isRTL: true } : {}
|
|
29029
|
+
...rtl ? { isRTL: true } : {},
|
|
29030
|
+
...opts?.idiomContext ? { idiomContext: opts.idiomContext } : {}
|
|
28838
29031
|
});
|
|
28839
29032
|
const FOCUS_STYLE_MARKUP = `<style data-himalaya-focus-ring>${FOCUS_RING_CSS}</style>`;
|
|
28840
29033
|
const withFocusRing = (markup) => markup ? FOCUS_STYLE_MARKUP + markup : markup;
|
|
@@ -28925,16 +29118,19 @@ __export(src_exports, {
|
|
|
28925
29118
|
Bound: () => Bound,
|
|
28926
29119
|
BoundList: () => BoundList,
|
|
28927
29120
|
FakeServiceProvider: () => FakeServiceProvider,
|
|
29121
|
+
IDIOM_CONTROLS: () => IDIOM_CONTROLS,
|
|
28928
29122
|
WebAppRegistry: () => WebAppRegistry,
|
|
28929
29123
|
WebRenderer: () => WebRenderer,
|
|
28930
29124
|
WebScreenRegistry: () => WebScreenRegistry,
|
|
28931
29125
|
asText: () => asText2,
|
|
28932
29126
|
avatarCircle: () => avatarCircle,
|
|
29127
|
+
controlIdiomFor: () => controlIdiomFor,
|
|
28933
29128
|
controlText: () => controlText,
|
|
28934
29129
|
fontStack: () => fontStack,
|
|
28935
29130
|
hasIcon: () => hasIcon,
|
|
28936
29131
|
iconGlyph: () => iconGlyph,
|
|
28937
29132
|
iconSvg: () => iconSvg,
|
|
29133
|
+
idiomControls: () => idiomControls,
|
|
28938
29134
|
isBinding: () => isBinding,
|
|
28939
29135
|
isNodeLike: () => isNodeLike,
|
|
28940
29136
|
isSerifFamily: () => isSerifFamily,
|
|
@@ -28952,6 +29148,7 @@ var init_src3 = __esm({
|
|
|
28952
29148
|
init_renderNode();
|
|
28953
29149
|
init_renderToHtml();
|
|
28954
29150
|
init_tokens2();
|
|
29151
|
+
init_idiom_controls();
|
|
28955
29152
|
init_modifiers();
|
|
28956
29153
|
init_bindings2();
|
|
28957
29154
|
init_FakeServiceProvider();
|
|
@@ -29158,7 +29355,7 @@ function composeStickyTree(payload, header, footer) {
|
|
|
29158
29355
|
if (footer) children.push(footer);
|
|
29159
29356
|
return { id: "screen", type: "ScreenChrome", children };
|
|
29160
29357
|
}
|
|
29161
|
-
async function renderDescriptorWeb(descriptor, tokens, scheme, wantPng, services = null, width, isRTL) {
|
|
29358
|
+
async function renderDescriptorWeb(descriptor, tokens, scheme, wantPng, services = null, width, isRTL, idiomContext) {
|
|
29162
29359
|
const desc = descriptor;
|
|
29163
29360
|
const payload = desc.payload;
|
|
29164
29361
|
if (!payload || typeof payload !== "object" || !payload.body) {
|
|
@@ -29193,7 +29390,7 @@ async function renderDescriptorWeb(descriptor, tokens, scheme, wantPng, services
|
|
|
29193
29390
|
provider,
|
|
29194
29391
|
width,
|
|
29195
29392
|
stickyHeader || stickyFooter ? { stickyHeader, stickyFooter } : void 0,
|
|
29196
|
-
isRTL ? { isRTL: true } : void 0
|
|
29393
|
+
isRTL || idiomContext ? { ...isRTL ? { isRTL: true } : {}, ...idiomContext ? { idiomContext } : {} } : void 0
|
|
29197
29394
|
);
|
|
29198
29395
|
} catch (err) {
|
|
29199
29396
|
return {
|
|
@@ -29207,7 +29404,7 @@ async function renderDescriptorWeb(descriptor, tokens, scheme, wantPng, services
|
|
|
29207
29404
|
const nativeOnly = collectNativeOnly(renderTree);
|
|
29208
29405
|
if (nativeOnly.length) result.nativeOnly = nativeOnly;
|
|
29209
29406
|
if (wantPng) {
|
|
29210
|
-
const png = await renderPng(html, scheme, width, isRTL, tokens);
|
|
29407
|
+
const png = await renderPng(html, scheme, width, isRTL, tokens, idiomContext);
|
|
29211
29408
|
if (png) result.pngBase64 = png;
|
|
29212
29409
|
else result.pngUnavailable = true;
|
|
29213
29410
|
}
|
|
@@ -29224,8 +29421,8 @@ async function withRetry2(op, attempts = 2) {
|
|
|
29224
29421
|
}
|
|
29225
29422
|
throw lastErr;
|
|
29226
29423
|
}
|
|
29227
|
-
async function renderPng(html, scheme, width, isRTL, tokens) {
|
|
29228
|
-
const out = await renderPngBatch([{ html, scheme, width, isRTL, tokens }]);
|
|
29424
|
+
async function renderPng(html, scheme, width, isRTL, tokens, idiomContext) {
|
|
29425
|
+
const out = await renderPngBatch([{ html, scheme, width, isRTL, tokens, idiomContext }]);
|
|
29229
29426
|
return out?.[0] ?? null;
|
|
29230
29427
|
}
|
|
29231
29428
|
function setPngFontCss(source) {
|
|
@@ -29236,7 +29433,7 @@ function setPngFontCss(source) {
|
|
|
29236
29433
|
async function pngPageHtml(item) {
|
|
29237
29434
|
let faces = "";
|
|
29238
29435
|
try {
|
|
29239
|
-
faces = await pngFontCss?.(item.tokens ?? null) ?? "";
|
|
29436
|
+
faces = await pngFontCss?.(item.tokens ?? null, item.idiomContext) ?? "";
|
|
29240
29437
|
} catch {
|
|
29241
29438
|
faces = "";
|
|
29242
29439
|
}
|
|
@@ -29434,6 +29631,17 @@ async function pngFontFaceCss(tokens, opts = {}) {
|
|
|
29434
29631
|
});
|
|
29435
29632
|
return rules.join("");
|
|
29436
29633
|
}
|
|
29634
|
+
async function idiomFontFaceCss(idiomContext) {
|
|
29635
|
+
const { controlIdiomFor: controlIdiomFor2, idiomControls: idiomControls2 } = await Promise.resolve().then(() => (init_src3(), src_exports));
|
|
29636
|
+
const bundled = idiomControls2(controlIdiomFor2(idiomContext)).font.bundled;
|
|
29637
|
+
if (!bundled) return "";
|
|
29638
|
+
try {
|
|
29639
|
+
const bytes2 = readFileSync34(new URL(`../../web-host/public/${bundled.file}`, import.meta.url));
|
|
29640
|
+
return `@font-face { font-family: "${bundled.family}"; font-weight: 100 900; font-style: normal; src: url(data:font/ttf;base64,${bytes2.toString("base64")}) format("truetype"); }`;
|
|
29641
|
+
} catch {
|
|
29642
|
+
return "";
|
|
29643
|
+
}
|
|
29644
|
+
}
|
|
29437
29645
|
var encoded, cssString, FORMATS;
|
|
29438
29646
|
var init_render_fonts = __esm({
|
|
29439
29647
|
"../../core/dev-server/src/render-fonts.ts"() {
|
|
@@ -31677,7 +31885,7 @@ var init_config2 = __esm({
|
|
|
31677
31885
|
// ../../core/dev-server/src/index.ts
|
|
31678
31886
|
import { createServer as createServer2 } from "node:http";
|
|
31679
31887
|
import { readFile, stat } from "node:fs/promises";
|
|
31680
|
-
import { readFileSync as readFileSync39, existsSync as existsSync36, watch, mkdirSync as mkdirSync16, rmSync as
|
|
31888
|
+
import { readFileSync as readFileSync39, existsSync as existsSync36, watch, mkdirSync as mkdirSync16, rmSync as rmSync6 } from "node:fs";
|
|
31681
31889
|
import { extname as extname2, resolve as resolve30, normalize as normalize3, sep as sep7 } from "node:path";
|
|
31682
31890
|
import { createHash as createHash15, randomUUID } from "node:crypto";
|
|
31683
31891
|
import { fileURLToPath as fileURLToPath18, pathToFileURL as pathToFileURL6 } from "node:url";
|
|
@@ -32614,7 +32822,7 @@ async function reloadAppModuleNow(state, opts) {
|
|
|
32614
32822
|
return { ok: false, error };
|
|
32615
32823
|
} finally {
|
|
32616
32824
|
try {
|
|
32617
|
-
|
|
32825
|
+
rmSync6(outfile, { force: true });
|
|
32618
32826
|
} catch {
|
|
32619
32827
|
}
|
|
32620
32828
|
}
|
|
@@ -32838,7 +33046,7 @@ async function handleWebWix(req, res, state) {
|
|
|
32838
33046
|
const method = String(b.method ?? "GET").toUpperCase();
|
|
32839
33047
|
const requestedPath = String(b.path ?? "/");
|
|
32840
33048
|
const body = b.body === void 0 ? void 0 : typeof b.body === "string" ? b.body : JSON.stringify(b.body);
|
|
32841
|
-
const forwardedHeaders = normalizeWixForwardedHeaders(b.headers);
|
|
33049
|
+
const forwardedHeaders = normalizeWixForwardedHeaders(b.headers, requestedPath);
|
|
32842
33050
|
const target = new URL(requestedPath, "https://www.wixapis.com");
|
|
32843
33051
|
const query = Object.fromEntries(target.searchParams.entries());
|
|
32844
33052
|
const started = Date.now();
|
|
@@ -32978,15 +33186,25 @@ async function handleDev(req, res, state) {
|
|
|
32978
33186
|
}
|
|
32979
33187
|
const screenId = descriptor.screenId ?? body.screenId ?? "render";
|
|
32980
33188
|
const diagnostics = await runScreenDiagnostics(state, screenId, descriptor);
|
|
32981
|
-
|
|
33189
|
+
let idiomContext;
|
|
33190
|
+
if (body.platform !== void 0) {
|
|
33191
|
+
if (body.platform !== "ios" && body.platform !== "android") {
|
|
33192
|
+
return sendJson(res, 400, { error: "invalid_platform", allowed: ["ios", "android"] });
|
|
33193
|
+
}
|
|
33194
|
+
idiomContext = { ...IDIOM_CONTEXTS[body.platform], surface: "phone" };
|
|
33195
|
+
}
|
|
33196
|
+
const baseTokens = readAppTokens(state);
|
|
33197
|
+
const policy = state.app?.module.config && "idiom" in state.app.module.config ? state.app.module.config.idiom : void 0;
|
|
33198
|
+
const stamped = idiomContext && baseTokens && policy !== void 0 ? { ...baseTokens, idiomPolicy: policy } : baseTokens;
|
|
32982
33199
|
const render = await renderDescriptorWeb(
|
|
32983
33200
|
descriptor,
|
|
32984
|
-
|
|
33201
|
+
stamped && state.app ? withServedFontFaces(stamped, state.app.dir) : stamped,
|
|
32985
33202
|
scheme,
|
|
32986
33203
|
body.png === true,
|
|
32987
33204
|
body.services ?? null,
|
|
32988
33205
|
width,
|
|
32989
|
-
body.rtl === true
|
|
33206
|
+
body.rtl === true,
|
|
33207
|
+
idiomContext
|
|
32990
33208
|
);
|
|
32991
33209
|
const legacy = { screenId, scheme, ...render, diagnostics };
|
|
32992
33210
|
const report2 = foldLegacyReport(legacy, {
|
|
@@ -34444,6 +34662,7 @@ var init_src6 = __esm({
|
|
|
34444
34662
|
init_inject();
|
|
34445
34663
|
init_face_source();
|
|
34446
34664
|
init_himi_report();
|
|
34665
|
+
init_idiom();
|
|
34447
34666
|
init_store2();
|
|
34448
34667
|
init_derive_transport_capability();
|
|
34449
34668
|
init_wix_gateway();
|
|
@@ -34476,7 +34695,7 @@ var init_src6 = __esm({
|
|
|
34476
34695
|
init_kits();
|
|
34477
34696
|
init_widgets();
|
|
34478
34697
|
ROOT6 = resolve30(fileURLToPath18(new URL("../../..", import.meta.url)));
|
|
34479
|
-
setPngFontCss((tokens) => pngFontFaceCss(tokens));
|
|
34698
|
+
setPngFontCss(async (tokens, idiomContext) => await pngFontFaceCss(tokens) + (idiomContext ? await idiomFontFaceCss(idiomContext) : ""));
|
|
34480
34699
|
TIER3_ROOT = resolve30(ROOT6, "core/dev-server/web");
|
|
34481
34700
|
TIER4_ROOT = resolve30(ROOT6, "core/dev-server/tier4-bundles");
|
|
34482
34701
|
tier4Verifier = new TierFourVerifier(TIER4_ROOT);
|
|
@@ -37731,7 +37950,8 @@ async function liveRenderServices(bundleJs, opts) {
|
|
|
37731
37950
|
});
|
|
37732
37951
|
}
|
|
37733
37952
|
async function buildReleaseFromContent(contentDir2, dest, opts = {}) {
|
|
37734
|
-
|
|
37953
|
+
const { freshModule, ...rest } = opts;
|
|
37954
|
+
return buildFromLoaded(await loadContent(contentDir2, { fresh: freshModule === true }), dest, rest);
|
|
37735
37955
|
}
|
|
37736
37956
|
function readTokensForLint(preloaded) {
|
|
37737
37957
|
try {
|
|
@@ -38691,7 +38911,7 @@ __export(progress_exports, {
|
|
|
38691
38911
|
import { spawn as spawn4 } from "node:child_process";
|
|
38692
38912
|
import { createHash as createHash19 } from "node:crypto";
|
|
38693
38913
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
38694
|
-
import { appendFileSync, closeSync, existsSync as existsSync38, lstatSync as lstatSync5, mkdirSync as mkdirSync17, openSync, readFileSync as readFileSync41, readSync, renameSync as renameSync3, rmSync as
|
|
38914
|
+
import { appendFileSync, closeSync, existsSync as existsSync38, lstatSync as lstatSync5, mkdirSync as mkdirSync17, openSync, readFileSync as readFileSync41, readSync, renameSync as renameSync3, rmSync as rmSync7, statSync as statSync7, writeFileSync as writeFileSync13 } from "node:fs";
|
|
38695
38915
|
import { join as join35, relative as relative5, resolve as resolve32, sep as sep8 } from "node:path";
|
|
38696
38916
|
function parseStep(raw) {
|
|
38697
38917
|
const v = raw.trim().toLowerCase();
|
|
@@ -38749,7 +38969,7 @@ function writeFileAtomic(file, content) {
|
|
|
38749
38969
|
writeFileSync13(tmp, content, { flag: "wx" });
|
|
38750
38970
|
renameSync3(tmp, file);
|
|
38751
38971
|
} catch (e) {
|
|
38752
|
-
|
|
38972
|
+
rmSync7(tmp, { force: true });
|
|
38753
38973
|
throw e;
|
|
38754
38974
|
}
|
|
38755
38975
|
}
|
|
@@ -40858,7 +41078,7 @@ __export(template_trim_exports, {
|
|
|
40858
41078
|
routeMatcher: () => routeMatcher,
|
|
40859
41079
|
runTemplateTrim: () => runTemplateTrim
|
|
40860
41080
|
});
|
|
40861
|
-
import { cpSync, existsSync as existsSync41, mkdirSync as mkdirSync19, readdirSync as readdirSync21, readFileSync as readFileSync45, renameSync as renameSync4, rmSync as
|
|
41081
|
+
import { cpSync, existsSync as existsSync41, mkdirSync as mkdirSync19, readdirSync as readdirSync21, readFileSync as readFileSync45, renameSync as renameSync4, rmSync as rmSync8, statSync as statSync10, writeFileSync as writeFileSync15 } from "node:fs";
|
|
40862
41082
|
import { dirname as dirname23, join as join38 } from "node:path";
|
|
40863
41083
|
function routeMatcher(pattern) {
|
|
40864
41084
|
const detail = /^\^([A-Za-z0-9_]+)\(\?:\[_\/\]\(\.\+\)\)\?\$$/.exec(pattern);
|
|
@@ -41621,11 +41841,11 @@ async function runTemplateTrim(req, deps) {
|
|
|
41621
41841
|
for (const name of [...moved].reverse()) renameSync4(join38(backup, "tier5-src", name), join38(dir, "tier5-src", name));
|
|
41622
41842
|
};
|
|
41623
41843
|
const dropBackup = () => {
|
|
41624
|
-
|
|
41844
|
+
rmSync8(backup, { recursive: true, force: true });
|
|
41625
41845
|
for (const d of [dirname23(backup), join38(dir, ".himi")]) {
|
|
41626
41846
|
if (d === join38(dir, ".himi") && hadHimi) break;
|
|
41627
41847
|
try {
|
|
41628
|
-
if (!readdirSync21(d).length)
|
|
41848
|
+
if (!readdirSync21(d).length) rmSync8(d, { recursive: true });
|
|
41629
41849
|
} catch {
|
|
41630
41850
|
}
|
|
41631
41851
|
}
|
|
@@ -42364,7 +42584,7 @@ __export(pack_exports, {
|
|
|
42364
42584
|
});
|
|
42365
42585
|
import { createHash as createHash21 } from "node:crypto";
|
|
42366
42586
|
import { deflateRawSync, inflateRawSync } from "node:zlib";
|
|
42367
|
-
import { existsSync as existsSync42, mkdirSync as mkdirSync20, readFileSync as readFileSync46, readdirSync as readdirSync22, rmSync as
|
|
42587
|
+
import { existsSync as existsSync42, mkdirSync as mkdirSync20, readFileSync as readFileSync46, readdirSync as readdirSync22, rmSync as rmSync9, statSync as statSync11, writeFileSync as writeFileSync16 } from "node:fs";
|
|
42368
42588
|
import { dirname as dirname24, join as join39, resolve as resolve37 } from "node:path";
|
|
42369
42589
|
function writeZip(entries) {
|
|
42370
42590
|
const sorted2 = entries.slice().sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
|
|
@@ -42583,7 +42803,7 @@ function packReleaseToDir(releaseRoot, app, outDir, opts = {}) {
|
|
|
42583
42803
|
const appDir2 = join39(resolve37(releaseRoot), app);
|
|
42584
42804
|
const { all, header, skipped } = buildEntries(appDir2, app, opts);
|
|
42585
42805
|
const dest = resolvePackageDirDest(resolve37(outDir), app, header.releaseId);
|
|
42586
|
-
|
|
42806
|
+
rmSync9(dest, { recursive: true, force: true });
|
|
42587
42807
|
let bytes2 = 0;
|
|
42588
42808
|
for (const entry of all) {
|
|
42589
42809
|
const target = join39(dest, entry.path);
|
|
@@ -42666,7 +42886,7 @@ function unpackTo(buf, dest, appFallback) {
|
|
|
42666
42886
|
if (!isSafeAppId(app)) throw new Error(`package declares an unsafe app id ${JSON.stringify(app)} \u2014 refusing to unpack it`);
|
|
42667
42887
|
const root = resolve37(dest);
|
|
42668
42888
|
const appDir2 = join39(root, app);
|
|
42669
|
-
|
|
42889
|
+
rmSync9(appDir2, { recursive: true, force: true });
|
|
42670
42890
|
for (const [rel, bytes2] of entries) {
|
|
42671
42891
|
const target = join39(appDir2, rel);
|
|
42672
42892
|
mkdirSync20(dirname24(target), { recursive: true });
|
|
@@ -42704,7 +42924,7 @@ __export(app_source_exports, {
|
|
|
42704
42924
|
writeConflicts: () => writeConflicts,
|
|
42705
42925
|
zipAppSource: () => zipAppSource
|
|
42706
42926
|
});
|
|
42707
|
-
import { readdirSync as readdirSync23, lstatSync as lstatSync6, readFileSync as readFileSync47, mkdirSync as mkdirSync21, writeFileSync as writeFileSync17, existsSync as existsSync43, rmSync as
|
|
42927
|
+
import { readdirSync as readdirSync23, lstatSync as lstatSync6, readFileSync as readFileSync47, mkdirSync as mkdirSync21, writeFileSync as writeFileSync17, existsSync as existsSync43, rmSync as rmSync10, rmdirSync, unlinkSync as unlinkSync3 } from "node:fs";
|
|
42708
42928
|
import { join as join40, resolve as resolve38, sep as sep10 } from "node:path";
|
|
42709
42929
|
import { deflateRawSync as deflateRawSync2 } from "node:zlib";
|
|
42710
42930
|
function walkSourceTree(dir, file, skip) {
|
|
@@ -42852,7 +43072,7 @@ function writeConflicts(entries, destDir) {
|
|
|
42852
43072
|
function removeStaleSource(entries, destDir) {
|
|
42853
43073
|
const root = resolve38(destDir);
|
|
42854
43074
|
const removed = staleSourcePaths(entries, root);
|
|
42855
|
-
for (const rel of removed)
|
|
43075
|
+
for (const rel of removed) rmSync10(join40(root, ...rel.split("/")), { force: true });
|
|
42856
43076
|
const needed = /* @__PURE__ */ new Set();
|
|
42857
43077
|
for (const entry of entries) {
|
|
42858
43078
|
if (isDeniedSourcePath(entry.path)) continue;
|
|
@@ -45776,7 +45996,7 @@ __export(native_decode_exports, {
|
|
|
45776
45996
|
runNativeDecode: () => runNativeDecode
|
|
45777
45997
|
});
|
|
45778
45998
|
import { execFileSync as execFileSync5, spawnSync as spawnSync2 } from "node:child_process";
|
|
45779
|
-
import { existsSync as existsSync48, mkdtempSync as mkdtempSync2, readFileSync as readFileSync53, rmSync as
|
|
45999
|
+
import { existsSync as existsSync48, mkdtempSync as mkdtempSync2, readFileSync as readFileSync53, rmSync as rmSync11, writeFileSync as writeFileSync20 } from "node:fs";
|
|
45780
46000
|
import { tmpdir as tmpdir3 } from "node:os";
|
|
45781
46001
|
import { join as join46 } from "node:path";
|
|
45782
46002
|
import { fileURLToPath as fileURLToPath20 } from "node:url";
|
|
@@ -45936,7 +46156,7 @@ function runNativeDecode(options) {
|
|
|
45936
46156
|
const stderr = failure.stderr ? ` \u2014 ${String(failure.stderr).trim().slice(0, 2e3)}` : "";
|
|
45937
46157
|
throw new Error(`iOS decoder oracle failed: ${failure.message}${stderr}`);
|
|
45938
46158
|
} finally {
|
|
45939
|
-
|
|
46159
|
+
rmSync11(descriptorDir, { recursive: true, force: true });
|
|
45940
46160
|
}
|
|
45941
46161
|
}
|
|
45942
46162
|
function runAndroidNativeDecode(options) {
|
|
@@ -45974,7 +46194,7 @@ function runAndroidNativeDecode(options) {
|
|
|
45974
46194
|
const stderr = failure.stderr ? ` \u2014 ${String(failure.stderr).trim().slice(0, 2e3)}` : "";
|
|
45975
46195
|
throw new Error(`Android decoder oracle failed: ${failure.message}${stderr}`);
|
|
45976
46196
|
} finally {
|
|
45977
|
-
|
|
46197
|
+
rmSync11(descriptorDir, { recursive: true, force: true });
|
|
45978
46198
|
}
|
|
45979
46199
|
}
|
|
45980
46200
|
function fieldAt(path2) {
|
|
@@ -48367,19 +48587,21 @@ var init_preview_assets_generated = __esm({
|
|
|
48367
48587
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
48368
48588
|
init_preview_assets_format();
|
|
48369
48589
|
PREVIEW_ASSET_MANIFEST = [
|
|
48370
|
-
{ key: "assets/index-
|
|
48371
|
-
{ key: "fonts/
|
|
48372
|
-
{ key: "fonts/
|
|
48373
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
48374
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
48375
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
48376
|
-
{ key: "fonts/
|
|
48377
|
-
{ key: "fonts/
|
|
48378
|
-
{ key: "fonts/WixMadeforText-
|
|
48379
|
-
{ key: "fonts/WixMadeforText-
|
|
48380
|
-
{ key: "fonts/WixMadeforText-
|
|
48381
|
-
{ key: "
|
|
48382
|
-
{ key: "
|
|
48590
|
+
{ key: "assets/index-FMHX2G25.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1031131, sha256: "0d386640e1979d4c81abbb29ccd0531913f1a759eba2e490160c7d3fac52618d" },
|
|
48591
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1031139, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
48592
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1035749, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
48593
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1524333, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
48594
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1615257, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
48595
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1706241, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
48596
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1797221, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
48597
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1888093, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
48598
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1979073, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
48599
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2087709, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
48600
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2196793, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
48601
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2305841, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
48602
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2413541, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
48603
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 2501649, length: 4947, sha256: "1f91f02ba75063dd7b2cca2584fcb3cc692f7faf905e89c23bf790633fd3d0e9" },
|
|
48604
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2506596, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
|
|
48383
48605
|
];
|
|
48384
48606
|
}
|
|
48385
48607
|
});
|
|
@@ -48395,7 +48617,7 @@ __export(run_exports, {
|
|
|
48395
48617
|
runPackage: () => runPackage,
|
|
48396
48618
|
withoutProdServe: () => withoutProdServe
|
|
48397
48619
|
});
|
|
48398
|
-
import { cpSync as cpSync2, existsSync as existsSync52, mkdirSync as mkdirSync25, mkdtempSync as mkdtempSync3, readFileSync as readFileSync58, rmSync as
|
|
48620
|
+
import { cpSync as cpSync2, existsSync as existsSync52, mkdirSync as mkdirSync25, mkdtempSync as mkdtempSync3, readFileSync as readFileSync58, rmSync as rmSync12, statSync as statSync13 } from "node:fs";
|
|
48399
48621
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
48400
48622
|
import { dirname as dirname27, join as join50 } from "node:path";
|
|
48401
48623
|
import { fileURLToPath as fileURLToPath22 } from "node:url";
|
|
@@ -48431,7 +48653,7 @@ async function resolvePackage(source, workDir) {
|
|
|
48431
48653
|
const target = join50(root2, app2);
|
|
48432
48654
|
if (join50(source) !== target) {
|
|
48433
48655
|
mkdirSync25(root2, { recursive: true });
|
|
48434
|
-
|
|
48656
|
+
rmSync12(target, { recursive: true, force: true });
|
|
48435
48657
|
cpSync2(source, target, { recursive: true });
|
|
48436
48658
|
}
|
|
48437
48659
|
return {
|
|
@@ -48451,7 +48673,7 @@ async function resolvePackage(source, workDir) {
|
|
|
48451
48673
|
const { app, appDir: appDir2 } = unpackTo(bytes2, root);
|
|
48452
48674
|
const opened = openPackageDir(appDir2);
|
|
48453
48675
|
if (!opened.validation.ok) {
|
|
48454
|
-
|
|
48676
|
+
rmSync12(workDir ? appDir2 : root, { recursive: true, force: true });
|
|
48455
48677
|
throw new Error(`package is not valid:
|
|
48456
48678
|
${opened.validation.errors.join("\n ")}`);
|
|
48457
48679
|
}
|
|
@@ -48498,7 +48720,7 @@ async function runPackage(source, opts = {}) {
|
|
|
48498
48720
|
const resolved2 = await resolvePackage(source, opts.workDir);
|
|
48499
48721
|
const assets = opts.assets ?? (opts.spa ? /* @__PURE__ */ new Map() : await loadPreviewAssets());
|
|
48500
48722
|
if (!opts.spa && assets.size === 0) {
|
|
48501
|
-
if (resolved2.temp)
|
|
48723
|
+
if (resolved2.temp) rmSync12(resolved2.temp, { recursive: true, force: true });
|
|
48502
48724
|
throw new Error(NO_SPA_MESSAGE);
|
|
48503
48725
|
}
|
|
48504
48726
|
const plane = makePackageRunHandler({
|
|
@@ -48534,7 +48756,7 @@ async function runPackage(source, opts = {}) {
|
|
|
48534
48756
|
close: () => new Promise((done) => {
|
|
48535
48757
|
server.closeAllConnections?.();
|
|
48536
48758
|
server.close(() => {
|
|
48537
|
-
if (resolved2.temp)
|
|
48759
|
+
if (resolved2.temp) rmSync12(resolved2.temp, { recursive: true, force: true });
|
|
48538
48760
|
done();
|
|
48539
48761
|
});
|
|
48540
48762
|
})
|
|
@@ -48572,7 +48794,7 @@ __export(run_watch_exports, {
|
|
|
48572
48794
|
watchedContentDir: () => watchedContentDir,
|
|
48573
48795
|
writeRunRecord: () => writeRunRecord
|
|
48574
48796
|
});
|
|
48575
|
-
import { closeSync as closeSync2, constants, existsSync as existsSync53, fstatSync, lstatSync as lstatSync8, statSync as statSync14, mkdirSync as mkdirSync26, openSync as openSync2, readFileSync as readFileSync59, realpathSync as realpathSync6, renameSync as renameSync5, rmSync as
|
|
48797
|
+
import { closeSync as closeSync2, constants, existsSync as existsSync53, fstatSync, lstatSync as lstatSync8, statSync as statSync14, mkdirSync as mkdirSync26, openSync as openSync2, readFileSync as readFileSync59, realpathSync as realpathSync6, renameSync as renameSync5, rmSync as rmSync13, writeFileSync as writeFileSync22, watch as fsWatch } from "node:fs";
|
|
48576
48798
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
48577
48799
|
import { extname as extname4, join as join51, resolve as resolve42, sep as sep13 } from "node:path";
|
|
48578
48800
|
function diffReleases(prev, next) {
|
|
@@ -48710,7 +48932,7 @@ function writeRunRecord(dir, record2) {
|
|
|
48710
48932
|
`, { flag: "wx" });
|
|
48711
48933
|
renameSync5(tmp, join51(root, "run.json"));
|
|
48712
48934
|
} catch (e) {
|
|
48713
|
-
|
|
48935
|
+
rmSync13(tmp, { force: true });
|
|
48714
48936
|
throw e;
|
|
48715
48937
|
}
|
|
48716
48938
|
return true;
|
|
@@ -48731,7 +48953,7 @@ function removeRunRecord(dir, owner) {
|
|
|
48731
48953
|
}
|
|
48732
48954
|
if (typeof pid === "number" && pid !== owner) return;
|
|
48733
48955
|
}
|
|
48734
|
-
|
|
48956
|
+
rmSync13(join51(root, "run.json"), { force: true });
|
|
48735
48957
|
}
|
|
48736
48958
|
function boardFile(dir, pathname) {
|
|
48737
48959
|
let rel = null;
|
|
@@ -59799,7 +60021,7 @@ var init_context = __esm({
|
|
|
59799
60021
|
});
|
|
59800
60022
|
|
|
59801
60023
|
// src/cli.ts
|
|
59802
|
-
import { mkdtempSync as mkdtempSync4, readFileSync as readFileSync72, mkdirSync as mkdirSync30, writeFileSync as writeFileSync28, existsSync as existsSync60, rmSync as
|
|
60024
|
+
import { mkdtempSync as mkdtempSync4, readFileSync as readFileSync72, mkdirSync as mkdirSync30, writeFileSync as writeFileSync28, existsSync as existsSync60, rmSync as rmSync14, readdirSync as readdirSync27, statSync as statSync17, lstatSync as lstatSync9, accessSync, constants as constants2, renameSync as renameSync6, cpSync as cpSync3 } from "node:fs";
|
|
59803
60025
|
import { execFile, execFileSync as execFileSync7, spawnSync as spawnSync5, spawn as spawn6 } from "node:child_process";
|
|
59804
60026
|
import { createHash as createHash27, randomUUID as randomUUID5 } from "node:crypto";
|
|
59805
60027
|
import { tmpdir as tmpdir5, homedir as homedir7, hostname } from "node:os";
|
|
@@ -64092,7 +64314,7 @@ function acquireUpdateLock(cachePath, now, hooks = {}) {
|
|
|
64092
64314
|
};
|
|
64093
64315
|
const removeIfMine = (path2) => {
|
|
64094
64316
|
try {
|
|
64095
|
-
if (readLock(path2) === mine)
|
|
64317
|
+
if (readLock(path2) === mine) rmSync14(path2, { force: true });
|
|
64096
64318
|
} catch {
|
|
64097
64319
|
}
|
|
64098
64320
|
};
|
|
@@ -64115,7 +64337,7 @@ function acquireUpdateLock(cachePath, now, hooks = {}) {
|
|
|
64115
64337
|
hooks.underBreakLock?.();
|
|
64116
64338
|
if (current === void 0) return tryCreate(lockPath) ? release : void 0;
|
|
64117
64339
|
if (!isAbandoned(current)) return void 0;
|
|
64118
|
-
|
|
64340
|
+
rmSync14(lockPath, { force: true });
|
|
64119
64341
|
return tryCreate(lockPath) ? release : void 0;
|
|
64120
64342
|
} finally {
|
|
64121
64343
|
removeIfMine(breakPath);
|
|
@@ -64865,13 +65087,13 @@ function materializeForPreview(appDir2, slug, displayName) {
|
|
|
64865
65087
|
if (!entry.isDirectory()) continue;
|
|
64866
65088
|
const pid = Number(entry.name.startsWith(`${slug}-`) ? entry.name.slice(slug.length + 1) : NaN);
|
|
64867
65089
|
if (Number.isInteger(pid) && pid > 0 && pid !== process.pid && !stillRunning(pid)) {
|
|
64868
|
-
|
|
65090
|
+
rmSync14(join57(root, entry.name), { recursive: true, force: true });
|
|
64869
65091
|
}
|
|
64870
65092
|
}
|
|
64871
65093
|
} catch {
|
|
64872
65094
|
}
|
|
64873
65095
|
const dest = join57(root, `${slug}-${process.pid}`);
|
|
64874
|
-
|
|
65096
|
+
rmSync14(dest, { recursive: true, force: true });
|
|
64875
65097
|
mkdirSync30(dest, { recursive: true });
|
|
64876
65098
|
materializeSource(forBuild, displayName, dest, slug);
|
|
64877
65099
|
return dest;
|
|
@@ -65125,7 +65347,7 @@ async function recordedReleaseForContentQuietly(dir, resolution, onDrift) {
|
|
|
65125
65347
|
return null;
|
|
65126
65348
|
} finally {
|
|
65127
65349
|
if (out !== void 0) try {
|
|
65128
|
-
|
|
65350
|
+
rmSync14(out, { recursive: true, force: true });
|
|
65129
65351
|
} catch {
|
|
65130
65352
|
}
|
|
65131
65353
|
}
|
|
@@ -66631,7 +66853,7 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
66631
66853
|
renderDescriptorWeb: renderDescriptorWeb2,
|
|
66632
66854
|
renderPngBatch: renderPngBatch2,
|
|
66633
66855
|
writePng: (path2, base64) => writePngFile(path2, base64),
|
|
66634
|
-
clearDir: (d) =>
|
|
66856
|
+
clearDir: (d) => rmSync14(d, { recursive: true, force: true })
|
|
66635
66857
|
}
|
|
66636
66858
|
});
|
|
66637
66859
|
writtenShots = sp.written;
|
|
@@ -67853,7 +68075,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67853
68075
|
...await navIssues2(dir, strict)
|
|
67854
68076
|
]);
|
|
67855
68077
|
if (hasErrors && !force) {
|
|
67856
|
-
|
|
68078
|
+
rmSync14(built, { recursive: true, force: true });
|
|
67857
68079
|
print({ ...report2, packed: false, hint: "lint found errors \u2014 fix them, or re-run `himi pack --force` to pack anyway" });
|
|
67858
68080
|
return 1;
|
|
67859
68081
|
}
|
|
@@ -67889,7 +68111,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67889
68111
|
io.error(JSON.stringify({ error: e.message }));
|
|
67890
68112
|
return 1;
|
|
67891
68113
|
} finally {
|
|
67892
|
-
|
|
68114
|
+
rmSync14(built, { recursive: true, force: true });
|
|
67893
68115
|
}
|
|
67894
68116
|
}
|
|
67895
68117
|
// ---- himi import — turn a dev .himi back into an editable content package ----
|
|
@@ -68205,7 +68427,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
68205
68427
|
return;
|
|
68206
68428
|
}
|
|
68207
68429
|
const hasWorkers = bres.built.length > 0;
|
|
68208
|
-
const outcome = await buildReleaseFromContent2(dir, next, { ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {} });
|
|
68430
|
+
const outcome = await buildReleaseFromContent2(dir, next, { ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {}, freshModule: true });
|
|
68209
68431
|
const blocker = watchKit.rebuildBlocker(outcome, servedMissing);
|
|
68210
68432
|
if (blocker) {
|
|
68211
68433
|
await failed2(blocker);
|
|
@@ -68221,7 +68443,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
68221
68443
|
} catch {
|
|
68222
68444
|
cpSync3(join57(next, running.app), live2, { recursive: true });
|
|
68223
68445
|
}
|
|
68224
|
-
|
|
68446
|
+
rmSync14(retired, { recursive: true, force: true });
|
|
68225
68447
|
current = fresh;
|
|
68226
68448
|
servedMissing = outcome.missingBundles;
|
|
68227
68449
|
for (const [event, data] of watchKit.reloadEvents(diff)) bus.publish(event, data);
|
|
@@ -68231,7 +68453,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
68231
68453
|
} catch (e) {
|
|
68232
68454
|
await failed2(e.message.split("\n")[0]);
|
|
68233
68455
|
} finally {
|
|
68234
|
-
|
|
68456
|
+
rmSync14(next, { recursive: true, force: true });
|
|
68235
68457
|
}
|
|
68236
68458
|
});
|
|
68237
68459
|
watcher = watchKit.watchContent(dir, () => rebuild?.());
|
|
@@ -68275,8 +68497,8 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
68275
68497
|
io.error(JSON.stringify({ error: e.message }));
|
|
68276
68498
|
return 1;
|
|
68277
68499
|
} finally {
|
|
68278
|
-
if (temp)
|
|
68279
|
-
if (served)
|
|
68500
|
+
if (temp) rmSync14(temp, { recursive: true, force: true });
|
|
68501
|
+
if (served) rmSync14(served, { recursive: true, force: true });
|
|
68280
68502
|
}
|
|
68281
68503
|
}
|
|
68282
68504
|
case "preview": {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1022.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": [
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"artifactId": "himalaya-cli"
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
"falconPackageHash": "
|
|
68
|
+
"falconPackageHash": "5f3c69be98f6d2a53f972e21eba5aff776dfd66f1208d77ae44008c4"
|
|
69
69
|
}
|