@wix/himalaya-cli 0.1294.0 → 0.1296.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
CHANGED
|
@@ -3165,11 +3165,11 @@ function interleave(data, ver) {
|
|
|
3165
3165
|
}
|
|
3166
3166
|
function alignmentPositions(ver) {
|
|
3167
3167
|
if (ver === 1) return [];
|
|
3168
|
-
const
|
|
3168
|
+
const num4 = Math.floor(ver / 7) + 2;
|
|
3169
3169
|
const size = ver * 4 + 17;
|
|
3170
|
-
const step = Math.ceil((ver * 4 + 4) / (
|
|
3170
|
+
const step = Math.ceil((ver * 4 + 4) / (num4 * 2 - 2)) * 2;
|
|
3171
3171
|
const res = [6];
|
|
3172
|
-
for (let pos = size - 7; res.length <
|
|
3172
|
+
for (let pos = size - 7; res.length < num4; pos -= step) res.splice(1, 0, pos);
|
|
3173
3173
|
return res;
|
|
3174
3174
|
}
|
|
3175
3175
|
function bchFormat(data) {
|
|
@@ -21336,6 +21336,98 @@ var init_builtins = __esm({
|
|
|
21336
21336
|
}
|
|
21337
21337
|
});
|
|
21338
21338
|
|
|
21339
|
+
// ../../core/sdk/capability-catalog/src/modules.ts
|
|
21340
|
+
function moduleForSpmProduct(product) {
|
|
21341
|
+
return NATIVE_MODULES.find((m2) => m2.ios?.product === product);
|
|
21342
|
+
}
|
|
21343
|
+
function moduleForGradleProject(project) {
|
|
21344
|
+
return NATIVE_MODULES.find((m2) => m2.android?.project === project);
|
|
21345
|
+
}
|
|
21346
|
+
function capabilitiesOfModule(module) {
|
|
21347
|
+
const ios = [];
|
|
21348
|
+
const android = [];
|
|
21349
|
+
for (const [id, req] of Object.entries(CAPABILITY_NATIVE)) {
|
|
21350
|
+
if (module.ios && req.ios?.spmProducts?.includes(module.ios.product)) ios.push(id);
|
|
21351
|
+
if (module.android && req.android?.gradleDeps?.includes(module.android.project)) android.push(id);
|
|
21352
|
+
}
|
|
21353
|
+
return { ios: ios.sort(), android: android.sort() };
|
|
21354
|
+
}
|
|
21355
|
+
function modulesFor(buildSet2) {
|
|
21356
|
+
const spm = /* @__PURE__ */ new Set();
|
|
21357
|
+
const gradle = /* @__PURE__ */ new Set();
|
|
21358
|
+
for (const raw of buildSet2) {
|
|
21359
|
+
const req = CAPABILITY_NATIVE[catalogKey(raw)];
|
|
21360
|
+
for (const p2 of req?.ios?.spmProducts ?? []) {
|
|
21361
|
+
if (!moduleForSpmProduct(p2)) throw new Error(`capability-catalog: ${raw} links SPM product ${p2}, which NATIVE_MODULES does not define`);
|
|
21362
|
+
spm.add(p2);
|
|
21363
|
+
}
|
|
21364
|
+
for (const g2 of req?.android?.gradleDeps ?? []) {
|
|
21365
|
+
if (!moduleForGradleProject(g2)) throw new Error(`capability-catalog: ${raw} links Gradle project ${g2}, which NATIVE_MODULES does not define`);
|
|
21366
|
+
gradle.add(g2);
|
|
21367
|
+
}
|
|
21368
|
+
}
|
|
21369
|
+
const sorted2 = [...spm].sort();
|
|
21370
|
+
return { spm: sorted2, gradle: [...gradle].sort(), macos: sorted2.filter((p2) => moduleForSpmProduct(p2).ios.macos) };
|
|
21371
|
+
}
|
|
21372
|
+
function linksModule(module, buildSet2) {
|
|
21373
|
+
const set = new Set(buildSet2.map(catalogKey));
|
|
21374
|
+
const caps = capabilitiesOfModule(module);
|
|
21375
|
+
return [...caps.ios, ...caps.android].some((c2) => set.has(c2));
|
|
21376
|
+
}
|
|
21377
|
+
function unlinkedComponentModules(components2, buildSet2, map = COMPONENT_MODULES, modules = NATIVE_MODULES) {
|
|
21378
|
+
const out2 = [];
|
|
21379
|
+
for (const component of [...new Set(components2)].sort()) {
|
|
21380
|
+
const id = map[component];
|
|
21381
|
+
const module = id ? modules.find((m2) => m2.id === id) : void 0;
|
|
21382
|
+
if (!module || linksModule(module, buildSet2)) continue;
|
|
21383
|
+
const caps = capabilitiesOfModule(module);
|
|
21384
|
+
out2.push({ component, module: module.id, capabilities: [.../* @__PURE__ */ new Set([...caps.ios, ...caps.android])].sort() });
|
|
21385
|
+
}
|
|
21386
|
+
return out2;
|
|
21387
|
+
}
|
|
21388
|
+
var NATIVE_MODULES, HAND_WIRED_MODULES, COMPONENT_MODULES;
|
|
21389
|
+
var init_modules = __esm({
|
|
21390
|
+
"../../core/sdk/capability-catalog/src/modules.ts"() {
|
|
21391
|
+
init_native_requirements();
|
|
21392
|
+
NATIVE_MODULES = Object.freeze([
|
|
21393
|
+
{
|
|
21394
|
+
id: "health",
|
|
21395
|
+
// macOS links it too and installs the honest UnavailableHealthBackend (no Health store on a Mac).
|
|
21396
|
+
ios: { product: "HimalayaCoreHealth", path: "core/runtime/ios/HimalayaCoreHealth", macos: true },
|
|
21397
|
+
android: {
|
|
21398
|
+
project: ":core-runtime-health",
|
|
21399
|
+
dir: "core/runtime/android/io/himalaya/health",
|
|
21400
|
+
installer: "io.himalaya.health.HealthConnect"
|
|
21401
|
+
}
|
|
21402
|
+
},
|
|
21403
|
+
{
|
|
21404
|
+
// StoreKit 2 + Apple Pay (iap, wix_cashier) / Play Billing (iap). iOS-only package code: a Mac
|
|
21405
|
+
// has no store module, so the macOS target does not link it and the verbs keep their
|
|
21406
|
+
// platform answer.
|
|
21407
|
+
id: "iap",
|
|
21408
|
+
ios: { product: "HimalayaCoreIAP", path: "core/runtime/ios/HimalayaCoreIAP" },
|
|
21409
|
+
android: {
|
|
21410
|
+
project: ":core-runtime-iap",
|
|
21411
|
+
dir: "core/runtime/android/io/himalaya/iap",
|
|
21412
|
+
installer: "io.himalaya.iap.PlayBilling"
|
|
21413
|
+
}
|
|
21414
|
+
}
|
|
21415
|
+
]);
|
|
21416
|
+
HAND_WIRED_MODULES = Object.freeze({
|
|
21417
|
+
base44: "HimalayaCoreBase44 / :core-runtime-base44 SDK",
|
|
21418
|
+
calls: "HimalayaCoreCalls / :himalaya-core-calls WebRTC engine",
|
|
21419
|
+
godot: "Godot SPM product / :core-runtime-godot engine"
|
|
21420
|
+
});
|
|
21421
|
+
COMPONENT_MODULES = Object.freeze({
|
|
21422
|
+
Video: "media",
|
|
21423
|
+
MediaPlayer: "media",
|
|
21424
|
+
CarBrowse: "media",
|
|
21425
|
+
Lottie: "animation",
|
|
21426
|
+
Rive: "animation"
|
|
21427
|
+
});
|
|
21428
|
+
}
|
|
21429
|
+
});
|
|
21430
|
+
|
|
21339
21431
|
// ../../core/sdk/capability-catalog/src/known.ts
|
|
21340
21432
|
function isKnownCapability(id) {
|
|
21341
21433
|
return KNOWN_CAPABILITY_IDS.includes(catalogKey(id));
|
|
@@ -21389,12 +21481,13 @@ function usageStringCopyFor(permissionCopy) {
|
|
|
21389
21481
|
}
|
|
21390
21482
|
return out2;
|
|
21391
21483
|
}
|
|
21392
|
-
var BRIDGE_CAPABILITY_IDS, KNOWN_CAPABILITY_IDS, CAPABILITY_LITERAL, BRIDGE_MARKERS, NOT_DIST_ADDABLE;
|
|
21484
|
+
var BRIDGE_CAPABILITY_IDS, KNOWN_CAPABILITY_IDS, CAPABILITY_LITERAL, BRIDGE_MARKERS, NEEDS_BOOT_WIRING, NOT_DIST_ADDABLE;
|
|
21393
21485
|
var init_known = __esm({
|
|
21394
21486
|
"../../core/sdk/capability-catalog/src/known.ts"() {
|
|
21395
21487
|
init_builtins();
|
|
21396
21488
|
init_implications();
|
|
21397
21489
|
init_native_requirements();
|
|
21490
|
+
init_modules();
|
|
21398
21491
|
BRIDGE_CAPABILITY_IDS = Object.freeze(["stream", "wix_api"]);
|
|
21399
21492
|
KNOWN_CAPABILITY_IDS = Object.freeze(
|
|
21400
21493
|
[
|
|
@@ -21412,19 +21505,9 @@ var init_known = __esm({
|
|
|
21412
21505
|
["wix_api", /himalaya\.wixApi\b|\bwixApi\.call\b/],
|
|
21413
21506
|
["webview", /himalaya\.webview\b/]
|
|
21414
21507
|
];
|
|
21415
|
-
|
|
21508
|
+
NEEDS_BOOT_WIRING = Object.freeze({
|
|
21416
21509
|
local_database: "registering it without the app's dataSchema writes declared-encrypted entities in plaintext (#1896) \u2014 the shell has to install the schema first",
|
|
21417
21510
|
live_activity: "needs a WidgetKit extension target in the shell's project, which a build cannot add",
|
|
21418
|
-
base44: "needs the opt-in HimalayaCoreBase44 / :core-runtime-base44 SDK linked into the shell",
|
|
21419
|
-
// `health` IS dist-addable: gen-native-config fills the shell's generic himalaya:modules:*
|
|
21420
|
-
// markers with HimalayaCoreHealth / :core-runtime-health when the release declares it (RFC 0044
|
|
21421
|
-
// Phase 2), and the shell's boot installs the store only when those modules are linked
|
|
21422
|
-
// (`#if canImport` / Class.forName).
|
|
21423
|
-
godot: "needs the opt-in Godot SPM product linked into the shell",
|
|
21424
|
-
// Hand-wired like base44 and godot until the RFC 0044 Phase 2 follow-up moves it onto the generic
|
|
21425
|
-
// himalaya:modules:* blocks; a dist build cannot link the WebRTC engine, so it must not bake the
|
|
21426
|
-
// microphone permission over a core whose verbs answer `not_linked`.
|
|
21427
|
-
calls: "needs the opt-in HimalayaCoreCalls / :himalaya-core-calls WebRTC engine linked into the shell",
|
|
21428
21511
|
wix_platform: "needs the shell's boot to configure it with a Wix API client and launch services",
|
|
21429
21512
|
himi_apps: "is a multi-app host surface (Himi Player), not something one app's binary serves",
|
|
21430
21513
|
// Both answer FOR an app id, which the shell's boot configures (`configure(appId:)`) before
|
|
@@ -21434,6 +21517,15 @@ var init_known = __esm({
|
|
|
21434
21517
|
system_intents: "needs the shell to wire a SystemIntentsHost (app identity, deep-link routing and refresh), which no extensible shell does",
|
|
21435
21518
|
release_control: "needs the shell's boot to configure it with the app id whose releases it switches, which a dist build's generic registration does not do"
|
|
21436
21519
|
});
|
|
21520
|
+
NOT_DIST_ADDABLE = Object.freeze({
|
|
21521
|
+
...NEEDS_BOOT_WIRING,
|
|
21522
|
+
...Object.fromEntries(
|
|
21523
|
+
Object.entries(HAND_WIRED_MODULES).map(([id, module]) => [
|
|
21524
|
+
id,
|
|
21525
|
+
`needs the opt-in ${module} linked into the shell, which is still hand-wired (RFC 0044 Phase 2 follow-up), so a dist build cannot link it`
|
|
21526
|
+
])
|
|
21527
|
+
)
|
|
21528
|
+
});
|
|
21437
21529
|
}
|
|
21438
21530
|
});
|
|
21439
21531
|
|
|
@@ -21464,61 +21556,6 @@ var init_binary_core = __esm({
|
|
|
21464
21556
|
}
|
|
21465
21557
|
});
|
|
21466
21558
|
|
|
21467
|
-
// ../../core/sdk/capability-catalog/src/modules.ts
|
|
21468
|
-
function moduleForSpmProduct(product) {
|
|
21469
|
-
return NATIVE_MODULES.find((m2) => m2.ios?.product === product);
|
|
21470
|
-
}
|
|
21471
|
-
function moduleForGradleProject(project) {
|
|
21472
|
-
return NATIVE_MODULES.find((m2) => m2.android?.project === project);
|
|
21473
|
-
}
|
|
21474
|
-
function modulesFor(buildSet2) {
|
|
21475
|
-
const spm = /* @__PURE__ */ new Set();
|
|
21476
|
-
const gradle = /* @__PURE__ */ new Set();
|
|
21477
|
-
for (const raw of buildSet2) {
|
|
21478
|
-
const req = CAPABILITY_NATIVE[catalogKey(raw)];
|
|
21479
|
-
for (const p2 of req?.ios?.spmProducts ?? []) {
|
|
21480
|
-
if (!moduleForSpmProduct(p2)) throw new Error(`capability-catalog: ${raw} links SPM product ${p2}, which NATIVE_MODULES does not define`);
|
|
21481
|
-
spm.add(p2);
|
|
21482
|
-
}
|
|
21483
|
-
for (const g2 of req?.android?.gradleDeps ?? []) {
|
|
21484
|
-
if (!moduleForGradleProject(g2)) throw new Error(`capability-catalog: ${raw} links Gradle project ${g2}, which NATIVE_MODULES does not define`);
|
|
21485
|
-
gradle.add(g2);
|
|
21486
|
-
}
|
|
21487
|
-
}
|
|
21488
|
-
const sorted2 = [...spm].sort();
|
|
21489
|
-
return { spm: sorted2, gradle: [...gradle].sort(), macos: sorted2.filter((p2) => moduleForSpmProduct(p2).ios.macos) };
|
|
21490
|
-
}
|
|
21491
|
-
var NATIVE_MODULES;
|
|
21492
|
-
var init_modules = __esm({
|
|
21493
|
-
"../../core/sdk/capability-catalog/src/modules.ts"() {
|
|
21494
|
-
init_native_requirements();
|
|
21495
|
-
NATIVE_MODULES = Object.freeze([
|
|
21496
|
-
{
|
|
21497
|
-
id: "health",
|
|
21498
|
-
// macOS links it too and installs the honest UnavailableHealthBackend (no Health store on a Mac).
|
|
21499
|
-
ios: { product: "HimalayaCoreHealth", path: "core/runtime/ios/HimalayaCoreHealth", macos: true },
|
|
21500
|
-
android: {
|
|
21501
|
-
project: ":core-runtime-health",
|
|
21502
|
-
dir: "core/runtime/android/io/himalaya/health",
|
|
21503
|
-
installer: "io.himalaya.health.HealthConnect"
|
|
21504
|
-
}
|
|
21505
|
-
},
|
|
21506
|
-
{
|
|
21507
|
-
// StoreKit 2 + Apple Pay (iap, wix_cashier) / Play Billing (iap). iOS-only package code: a Mac
|
|
21508
|
-
// has no store module, so the macOS target does not link it and the verbs keep their
|
|
21509
|
-
// platform answer.
|
|
21510
|
-
id: "iap",
|
|
21511
|
-
ios: { product: "HimalayaCoreIAP", path: "core/runtime/ios/HimalayaCoreIAP" },
|
|
21512
|
-
android: {
|
|
21513
|
-
project: ":core-runtime-iap",
|
|
21514
|
-
dir: "core/runtime/android/io/himalaya/iap",
|
|
21515
|
-
installer: "io.himalaya.iap.PlayBilling"
|
|
21516
|
-
}
|
|
21517
|
-
}
|
|
21518
|
-
]);
|
|
21519
|
-
}
|
|
21520
|
-
});
|
|
21521
|
-
|
|
21522
21559
|
// ../../core/sdk/capability-catalog/src/index.ts
|
|
21523
21560
|
var init_src2 = __esm({
|
|
21524
21561
|
"../../core/sdk/capability-catalog/src/index.ts"() {
|
|
@@ -21583,7 +21620,7 @@ function parseIconConfig(configTs) {
|
|
|
21583
21620
|
if (!block) return {};
|
|
21584
21621
|
const body = block[1];
|
|
21585
21622
|
const str10 = (k2) => new RegExp(`\\b${k2}\\s*:\\s*["']([^"']+)["']`).exec(body)?.[1];
|
|
21586
|
-
const
|
|
21623
|
+
const num4 = (k2) => {
|
|
21587
21624
|
const m2 = new RegExp(`\\b${k2}\\s*:\\s*(-?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*(?=[,}\\n]|$)`).exec(body);
|
|
21588
21625
|
if (!m2) return void 0;
|
|
21589
21626
|
const n2 = Number(m2[1]);
|
|
@@ -21597,7 +21634,7 @@ function parseIconConfig(configTs) {
|
|
|
21597
21634
|
const glyph = str10("glyph");
|
|
21598
21635
|
const accentColor = str10("accentColor");
|
|
21599
21636
|
const backgroundColor = str10("backgroundColor");
|
|
21600
|
-
const glyphScale =
|
|
21637
|
+
const glyphScale = num4("glyphScale");
|
|
21601
21638
|
for (const [key2, parsed] of [
|
|
21602
21639
|
["source", source],
|
|
21603
21640
|
["glyph", glyph],
|
|
@@ -27034,7 +27071,7 @@ function didYouMean(id) {
|
|
|
27034
27071
|
const best = KNOWN_CAPABILITY_IDS.map((k2) => [k2, editDistance2(id, k2)]).sort((x2, y2) => x2[1] - y2[1])[0];
|
|
27035
27072
|
return best && best[1] <= 2 ? ` Did you mean "${best[0]}"?` : "";
|
|
27036
27073
|
}
|
|
27037
|
-
function capabilityIssues(usage, shell, strict, lastDist) {
|
|
27074
|
+
function capabilityIssues(usage, shell, strict, lastDist, componentModules) {
|
|
27038
27075
|
if (!usage) return [];
|
|
27039
27076
|
const warn3 = strict ? "error" : "warning";
|
|
27040
27077
|
const issues = [];
|
|
@@ -27097,6 +27134,25 @@ function capabilityIssues(usage, shell, strict, lastDist) {
|
|
|
27097
27134
|
message: `"${id}" is declared by ${shown2} but not in config.ts capabilities \u2014 the app-level list is what a binary is built with, so a binary built from it would not serve "${id}". Add it: capabilities: [..., "${id}"].`
|
|
27098
27135
|
});
|
|
27099
27136
|
}
|
|
27137
|
+
const buildIds = [...usage.app, ...usage.envelope ?? []];
|
|
27138
|
+
const unlinkedByComponent = /* @__PURE__ */ new Map();
|
|
27139
|
+
for (const s2 of usage.screens) {
|
|
27140
|
+
for (const u2 of unlinkedComponentModules(s2.components ?? [], buildIds, componentModules)) {
|
|
27141
|
+
const prev = unlinkedByComponent.get(u2.component) ?? { module: u2.module, capabilities: u2.capabilities, screens: [] };
|
|
27142
|
+
prev.screens.push(s2.screenId);
|
|
27143
|
+
unlinkedByComponent.set(u2.component, prev);
|
|
27144
|
+
}
|
|
27145
|
+
}
|
|
27146
|
+
for (const [component, u2] of [...unlinkedByComponent].sort(([a2], [b2]) => a2.localeCompare(b2))) {
|
|
27147
|
+
const shown2 = u2.screens.slice(0, 3).join(", ") + (u2.screens.length > 3 ? ` (+${u2.screens.length - 3} more)` : "");
|
|
27148
|
+
issues.push({
|
|
27149
|
+
screen: u2.screens.length === 1 ? u2.screens[0] : null,
|
|
27150
|
+
pass: "capabilities",
|
|
27151
|
+
severity: "error",
|
|
27152
|
+
capability: u2.capabilities.join(","),
|
|
27153
|
+
message: `${shown2} ${u2.screens.length === 1 ? "uses" : "use"} the ${component} component, which needs the native ${u2.module} module, but config.ts declares none of ${u2.capabilities.map((c2) => `"${c2}"`).join(", ")} \u2014 the binary is built without it and cannot render ${component}. Add one to capabilities (or capabilityEnvelope).`
|
|
27154
|
+
});
|
|
27155
|
+
}
|
|
27100
27156
|
if (shell) {
|
|
27101
27157
|
const s2 = SHELL_CAPABILITIES[shell];
|
|
27102
27158
|
if (!s2) {
|
|
@@ -35209,6 +35265,150 @@ var init_icons = __esm({
|
|
|
35209
35265
|
}
|
|
35210
35266
|
});
|
|
35211
35267
|
|
|
35268
|
+
// ../../core/ts/src/picker-field.ts
|
|
35269
|
+
function hasVisual(o2) {
|
|
35270
|
+
return pickerLeading(o2) !== "none";
|
|
35271
|
+
}
|
|
35272
|
+
function pickerPresentation(props, options = []) {
|
|
35273
|
+
const p2 = props?.presentation;
|
|
35274
|
+
if (p2 === "menu" || p2 === "wheel" || p2 === "sheet") return p2;
|
|
35275
|
+
const field = props?.field;
|
|
35276
|
+
if (field != null && typeof field === "object") return "menu";
|
|
35277
|
+
return options.some(hasVisual) ? "menu" : "platform";
|
|
35278
|
+
}
|
|
35279
|
+
function pickerLeading(o2) {
|
|
35280
|
+
if (!o2) return "none";
|
|
35281
|
+
if (nonBlank(o2.swatch)) return "swatch";
|
|
35282
|
+
if (nonBlank(o2.imageUrl)) return "image";
|
|
35283
|
+
if (nonBlank(o2.icon)) return "icon";
|
|
35284
|
+
return "none";
|
|
35285
|
+
}
|
|
35286
|
+
function pickerOptionPickable(o2) {
|
|
35287
|
+
return !!o2 && o2.disabled !== true;
|
|
35288
|
+
}
|
|
35289
|
+
function pickerWheelOptions(options) {
|
|
35290
|
+
return options.filter((o2) => pickerOptionPickable(o2));
|
|
35291
|
+
}
|
|
35292
|
+
function resolvePickerField(field, tokens2 = {}) {
|
|
35293
|
+
const f2 = field ?? {};
|
|
35294
|
+
const has = (name) => tokens2.color?.(name) !== void 0;
|
|
35295
|
+
const borderColor = nonBlank(f2.borderColor) ? f2.borderColor : has("pickerFieldBorder") ? "pickerFieldBorder" : "border";
|
|
35296
|
+
const placeholderColor = nonBlank(f2.placeholderColor) ? f2.placeholderColor : has("pickerFieldPlaceholder") ? "pickerFieldPlaceholder" : "textSecondary";
|
|
35297
|
+
const borderWidth = num(f2.borderWidth) ?? num(tokens2.spacing?.("pickerFieldBorderWidth")) ?? PICKER_FIELD_DEFAULTS.borderWidth;
|
|
35298
|
+
const cornerRadius = num(f2.cornerRadius) ?? num(tokens2.radius?.("pickerField")) ?? num(tokens2.radius?.("md")) ?? PICKER_FIELD_DEFAULTS.cornerRadius;
|
|
35299
|
+
const minHeight = num(f2.minHeight) ?? num(tokens2.spacing?.("pickerFieldMinHeight")) ?? PICKER_FIELD_DEFAULTS.minHeight;
|
|
35300
|
+
const padding = num(f2.padding) ?? num(tokens2.spacing?.("pickerFieldPadding")) ?? PICKER_FIELD_DEFAULTS.padding;
|
|
35301
|
+
const chevronRaw = nonBlank(f2.chevronIcon) ? f2.chevronIcon.trim() : PICKER_FIELD_DEFAULTS.chevronIcon;
|
|
35302
|
+
return {
|
|
35303
|
+
borderColor,
|
|
35304
|
+
borderWidth: nonNeg(borderWidth),
|
|
35305
|
+
cornerRadius: nonNeg(cornerRadius),
|
|
35306
|
+
minHeight: nonNeg(minHeight),
|
|
35307
|
+
padding: nonNeg(padding),
|
|
35308
|
+
chevronIcon: chevronRaw === "none" ? null : chevronRaw,
|
|
35309
|
+
placeholderColor
|
|
35310
|
+
};
|
|
35311
|
+
}
|
|
35312
|
+
var nonBlank, PICKER_FIELD_DEFAULTS, num, nonNeg;
|
|
35313
|
+
var init_picker_field = __esm({
|
|
35314
|
+
"../../core/ts/src/picker-field.ts"() {
|
|
35315
|
+
"use strict";
|
|
35316
|
+
nonBlank = (v2) => typeof v2 === "string" && v2.trim().length > 0;
|
|
35317
|
+
PICKER_FIELD_DEFAULTS = {
|
|
35318
|
+
borderWidth: 1,
|
|
35319
|
+
cornerRadius: 8,
|
|
35320
|
+
minHeight: 44,
|
|
35321
|
+
padding: 12,
|
|
35322
|
+
chevronIcon: "chevron_down"
|
|
35323
|
+
};
|
|
35324
|
+
num = (v2) => typeof v2 === "number" && Number.isFinite(v2) ? v2 : void 0;
|
|
35325
|
+
nonNeg = (v2) => v2 < 0 ? 0 : v2;
|
|
35326
|
+
}
|
|
35327
|
+
});
|
|
35328
|
+
|
|
35329
|
+
// ../../core/web-renderer/src/pickerField.tsx
|
|
35330
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
35331
|
+
function pickerFieldLook(field, ctx) {
|
|
35332
|
+
const t2 = ctx.tokens ?? {};
|
|
35333
|
+
return resolvePickerField(field && typeof field === "object" ? field : null, {
|
|
35334
|
+
color: (n2) => t2.colors?.[n2],
|
|
35335
|
+
spacing: (n2) => t2.spacing?.[n2],
|
|
35336
|
+
radius: (n2) => t2.radius?.[n2]
|
|
35337
|
+
});
|
|
35338
|
+
}
|
|
35339
|
+
function PickerLeadingVisual({ option, ctx, size = 20 }) {
|
|
35340
|
+
const iconName = useResolvedScalar(option?.icon, ctx);
|
|
35341
|
+
switch (pickerLeading({ ...option, icon: iconName })) {
|
|
35342
|
+
case "swatch":
|
|
35343
|
+
return /* @__PURE__ */ jsx4(
|
|
35344
|
+
"span",
|
|
35345
|
+
{
|
|
35346
|
+
"aria-hidden": true,
|
|
35347
|
+
"data-picker-swatch": "",
|
|
35348
|
+
style: { flex: "none", width: size, height: size, borderRadius: "50%", background: ctx.color(option.swatch, "#cccccc"), boxShadow: "inset 0 0 0 1px rgba(0,0,0,.12)" }
|
|
35349
|
+
}
|
|
35350
|
+
);
|
|
35351
|
+
case "image":
|
|
35352
|
+
return /* @__PURE__ */ jsx4(
|
|
35353
|
+
"img",
|
|
35354
|
+
{
|
|
35355
|
+
"aria-hidden": true,
|
|
35356
|
+
alt: "",
|
|
35357
|
+
"data-picker-image": "",
|
|
35358
|
+
src: String(option.imageUrl),
|
|
35359
|
+
width: size,
|
|
35360
|
+
height: size,
|
|
35361
|
+
loading: "lazy",
|
|
35362
|
+
decoding: "async",
|
|
35363
|
+
style: { flex: "none", width: size, height: size, borderRadius: 4, objectFit: "cover" }
|
|
35364
|
+
}
|
|
35365
|
+
);
|
|
35366
|
+
case "icon":
|
|
35367
|
+
return /* @__PURE__ */ jsx4("span", { "aria-hidden": true, "data-picker-icon": "", style: { flex: "none", display: "inline-grid", placeItems: "center", width: size, height: size }, children: iconSvg(typeof iconName === "string" ? iconName : "", { size: size - 2, color: ctx.color("textSecondary", "#636b78") }) });
|
|
35368
|
+
default:
|
|
35369
|
+
return null;
|
|
35370
|
+
}
|
|
35371
|
+
}
|
|
35372
|
+
function PickerFieldBox({ look, ctx, option, text: text8, isPlaceholder, font, style }) {
|
|
35373
|
+
const C2 = ctx.color;
|
|
35374
|
+
return /* @__PURE__ */ jsxs(
|
|
35375
|
+
"div",
|
|
35376
|
+
{
|
|
35377
|
+
"aria-hidden": true,
|
|
35378
|
+
"data-picker-field": "",
|
|
35379
|
+
style: {
|
|
35380
|
+
display: "flex",
|
|
35381
|
+
alignItems: "center",
|
|
35382
|
+
gap: 8,
|
|
35383
|
+
width: "100%",
|
|
35384
|
+
boxSizing: "border-box",
|
|
35385
|
+
minHeight: look.minHeight,
|
|
35386
|
+
padding: `0 ${look.padding}px`,
|
|
35387
|
+
border: `${look.borderWidth}px solid ${C2(look.borderColor, "#e3e3e3")}`,
|
|
35388
|
+
borderRadius: look.cornerRadius,
|
|
35389
|
+
background: C2("surfacePrimary", "#fff"),
|
|
35390
|
+
fontFamily: font,
|
|
35391
|
+
fontSize: pxToRem(15),
|
|
35392
|
+
...style
|
|
35393
|
+
},
|
|
35394
|
+
children: [
|
|
35395
|
+
!isPlaceholder && /* @__PURE__ */ jsx4(PickerLeadingVisual, { option, ctx }),
|
|
35396
|
+
/* @__PURE__ */ jsx4("span", { style: { flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: isPlaceholder ? C2(look.placeholderColor, "#888") : C2("textPrimary", "#111") }, children: text8 }),
|
|
35397
|
+
look.chevronIcon && /* @__PURE__ */ jsx4("span", { "data-picker-chevron": "", style: { flex: "none", display: "inline-grid", placeItems: "center" }, children: iconSvg(look.chevronIcon, { size: 16, color: C2("textSecondary", "#636b78") }) })
|
|
35398
|
+
]
|
|
35399
|
+
}
|
|
35400
|
+
);
|
|
35401
|
+
}
|
|
35402
|
+
var init_pickerField = __esm({
|
|
35403
|
+
"../../core/web-renderer/src/pickerField.tsx"() {
|
|
35404
|
+
"use strict";
|
|
35405
|
+
init_tokens2();
|
|
35406
|
+
init_icons();
|
|
35407
|
+
init_bindings2();
|
|
35408
|
+
init_picker_field();
|
|
35409
|
+
}
|
|
35410
|
+
});
|
|
35411
|
+
|
|
35212
35412
|
// ../../core/web-renderer/src/symbolEffects.ts
|
|
35213
35413
|
import React3 from "react";
|
|
35214
35414
|
function useSymbolEffect(effect, reduceMotion) {
|
|
@@ -35904,7 +36104,7 @@ var init_host_toolbar = __esm({
|
|
|
35904
36104
|
|
|
35905
36105
|
// ../../core/web-renderer/src/richContentEditor.tsx
|
|
35906
36106
|
import React4 from "react";
|
|
35907
|
-
import { jsx as
|
|
36107
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
35908
36108
|
function effectiveTools(tools, uploadService) {
|
|
35909
36109
|
return ricosEffectiveTools(tools, typeof uploadService === "string" && uploadService !== "");
|
|
35910
36110
|
}
|
|
@@ -36073,14 +36273,14 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36073
36273
|
if (!live3) {
|
|
36074
36274
|
const { paddingTop: _t2, paddingBottom: _b, paddingLeft: _l2, paddingRight: _r2, ...rootNoSides } = root;
|
|
36075
36275
|
const own4 = { ...rootNoSides, border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 8, padding: 12, boxSizing: "border-box" };
|
|
36076
|
-
return /* @__PURE__ */
|
|
36276
|
+
return /* @__PURE__ */ jsx5("div", { ...dom, style: addIntrinsicPadding(own4, wrap) ?? own4, children: /* @__PURE__ */ jsx5("span", { style: { color: C2("textSecondary", "#636B78") }, children: placeholder2 || "Rich text editor" }) });
|
|
36077
36277
|
}
|
|
36078
36278
|
if (status === "unavailable") {
|
|
36079
|
-
return /* @__PURE__ */
|
|
36279
|
+
return /* @__PURE__ */ jsx5("div", { ...dom, style: root, children: /* @__PURE__ */ jsx5("div", { "data-component-id": `${id}/fallback`, children: props.fallback ? renderChild(props.fallback) : /* @__PURE__ */ jsx5("p", { style: { margin: 0, color: C2("textSecondary", "#636B78") }, children: "Editor unavailable" }) }) });
|
|
36080
36280
|
}
|
|
36081
36281
|
const ready = status === "ready";
|
|
36082
|
-
return /* @__PURE__ */
|
|
36083
|
-
/* @__PURE__ */
|
|
36282
|
+
return /* @__PURE__ */ jsxs2("div", { ...dom, style: root, children: [
|
|
36283
|
+
/* @__PURE__ */ jsx5(
|
|
36084
36284
|
"div",
|
|
36085
36285
|
{
|
|
36086
36286
|
role: "toolbar",
|
|
@@ -36090,7 +36290,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36090
36290
|
children: tools.map((tool) => {
|
|
36091
36291
|
const isOn = ricosToolPressed(tool, toolbar);
|
|
36092
36292
|
const disabled = ricosToolDisabled(tool, toolbar, ready);
|
|
36093
|
-
return /* @__PURE__ */
|
|
36293
|
+
return /* @__PURE__ */ jsx5(
|
|
36094
36294
|
"button",
|
|
36095
36295
|
{
|
|
36096
36296
|
type: "button",
|
|
@@ -36118,8 +36318,8 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36118
36318
|
})
|
|
36119
36319
|
}
|
|
36120
36320
|
),
|
|
36121
|
-
link && /* @__PURE__ */
|
|
36122
|
-
/* @__PURE__ */
|
|
36321
|
+
link && /* @__PURE__ */ jsxs2("div", { "data-component-id": `${id}/link_sheet`, role: "dialog", "aria-label": "Insert link", style: { display: "flex", flexDirection: "column", gap: 8, padding: 12, borderBottom: `1px solid ${C2("border", "#E3E3E3")}` }, children: [
|
|
36322
|
+
/* @__PURE__ */ jsx5(
|
|
36123
36323
|
"input",
|
|
36124
36324
|
{
|
|
36125
36325
|
"data-component-id": `${id}/link_url`,
|
|
@@ -36130,7 +36330,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36130
36330
|
onChange: (e2) => setLink({ ...link, url: e2.currentTarget.value, error: "" })
|
|
36131
36331
|
}
|
|
36132
36332
|
),
|
|
36133
|
-
/* @__PURE__ */
|
|
36333
|
+
/* @__PURE__ */ jsx5(
|
|
36134
36334
|
"input",
|
|
36135
36335
|
{
|
|
36136
36336
|
"data-component-id": `${id}/link_text`,
|
|
@@ -36140,13 +36340,13 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36140
36340
|
onChange: (e2) => setLink({ ...link, text: e2.currentTarget.value })
|
|
36141
36341
|
}
|
|
36142
36342
|
),
|
|
36143
|
-
link.error && /* @__PURE__ */
|
|
36144
|
-
/* @__PURE__ */
|
|
36145
|
-
/* @__PURE__ */
|
|
36146
|
-
/* @__PURE__ */
|
|
36343
|
+
link.error && /* @__PURE__ */ jsx5("div", { role: "alert", style: { color: C2("danger", "#E62214"), fontSize: pxToRem(13) }, children: link.error }),
|
|
36344
|
+
/* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 8 }, children: [
|
|
36345
|
+
/* @__PURE__ */ jsx5("button", { type: "button", "data-component-id": `${id}/link_apply`, onClick: applyLink, children: "Apply" }),
|
|
36346
|
+
/* @__PURE__ */ jsx5("button", { type: "button", "data-component-id": `${id}/link_cancel`, onClick: () => setLink(null), children: "Cancel" })
|
|
36147
36347
|
] })
|
|
36148
36348
|
] }),
|
|
36149
|
-
src && /* @__PURE__ */
|
|
36349
|
+
src && /* @__PURE__ */ jsx5(
|
|
36150
36350
|
"iframe",
|
|
36151
36351
|
{
|
|
36152
36352
|
ref: iframeRef,
|
|
@@ -36157,7 +36357,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36157
36357
|
style: { flex: "1 1 auto", width: "100%", border: 0, minHeight: fill ? 0 : minHeight, background: "transparent" }
|
|
36158
36358
|
}
|
|
36159
36359
|
),
|
|
36160
|
-
tools.includes("image") && /* @__PURE__ */
|
|
36360
|
+
tools.includes("image") && /* @__PURE__ */ jsx5(
|
|
36161
36361
|
"input",
|
|
36162
36362
|
{
|
|
36163
36363
|
ref: fileRef,
|
|
@@ -36170,8 +36370,8 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36170
36370
|
onChange: onPickFile
|
|
36171
36371
|
}
|
|
36172
36372
|
),
|
|
36173
|
-
uploadError && /* @__PURE__ */
|
|
36174
|
-
status === "loading" && /* @__PURE__ */
|
|
36373
|
+
uploadError && /* @__PURE__ */ jsx5("div", { role: "status", "data-component-id": `${id}/upload_error`, style: { padding: "6px 8px", color: C2("danger", "#E62214"), fontSize: pxToRem(13) }, children: "Couldn't add the image. Try again." }),
|
|
36374
|
+
status === "loading" && /* @__PURE__ */ jsx5(
|
|
36175
36375
|
"div",
|
|
36176
36376
|
{
|
|
36177
36377
|
"data-component-id": `${id}/loading`,
|
|
@@ -36417,7 +36617,7 @@ var init_pdfSource = __esm({
|
|
|
36417
36617
|
|
|
36418
36618
|
// ../../core/web-renderer/src/a11y/controls.tsx
|
|
36419
36619
|
import React5 from "react";
|
|
36420
|
-
import { jsx as
|
|
36620
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
36421
36621
|
function labelText(label2, ctx) {
|
|
36422
36622
|
if (typeof label2 === "string" && isBinding(label2)) {
|
|
36423
36623
|
const v2 = resolveScalarStatic(label2, ctx);
|
|
@@ -36507,9 +36707,9 @@ var init_controls = __esm({
|
|
|
36507
36707
|
}
|
|
36508
36708
|
} : void 0;
|
|
36509
36709
|
const rowStretch = ctx.rowStretch === true;
|
|
36510
|
-
return /* @__PURE__ */
|
|
36511
|
-
props.label != null && /* @__PURE__ */
|
|
36512
|
-
/* @__PURE__ */
|
|
36710
|
+
return /* @__PURE__ */ jsxs3("div", { style: rowShareFloor({ display: "flex", alignItems: "center", justifyContent: "space-between", width: rowStretch ? "auto" : "100%", flex: rowStretch ? "1 1 0" : void 0, ...wrap }, rowStretch, "min-content"), children: [
|
|
36711
|
+
props.label != null && /* @__PURE__ */ jsx6("span", { style: { fontFamily: FONT(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#111") }, children: labelText(props.label, ctx) }),
|
|
36712
|
+
/* @__PURE__ */ jsx6(
|
|
36513
36713
|
"button",
|
|
36514
36714
|
{
|
|
36515
36715
|
type: "button",
|
|
@@ -36519,7 +36719,7 @@ var init_controls = __esm({
|
|
|
36519
36719
|
disabled: props.disabled === true,
|
|
36520
36720
|
onClick: fire,
|
|
36521
36721
|
style: { all: "unset", boxSizing: "border-box", width: w2, height: h2, borderRadius: 999, background: trackColor, ...outlineWidth > 0 ? { border: `${outlineWidth}px solid ${C2(role(roles.outline), "#79747e")}` } : {}, position: "relative", flex: "none", cursor: fire ? "pointer" : "default", display: "inline-block", outlineOffset: 2 },
|
|
36522
|
-
children: /* @__PURE__ */
|
|
36722
|
+
children: /* @__PURE__ */ jsx6("span", { "aria-hidden": true, style: { position: "absolute", top: thumbInset, [on4 ? "right" : "left"]: thumbInset, width: tSize, height: tSize, borderRadius: "50%", background: thumbColor, boxShadow: shape.thumbShadow ? "0 1px 3px rgba(0,0,0,.3)" : "none" } })
|
|
36523
36723
|
}
|
|
36524
36724
|
)
|
|
36525
36725
|
] });
|
|
@@ -36585,9 +36785,9 @@ var init_controls = __esm({
|
|
|
36585
36785
|
}
|
|
36586
36786
|
};
|
|
36587
36787
|
const groupName = labelText(props.label, ctx) || void 0;
|
|
36588
|
-
return /* @__PURE__ */
|
|
36589
|
-
/* @__PURE__ */
|
|
36590
|
-
[lo2, hi2].map((p2, i2) => /* @__PURE__ */
|
|
36788
|
+
return /* @__PURE__ */ jsx6("div", { ...{ [A11Y_PART]: "root" }, role: "group", "aria-label": groupName, style: { width: "100%", padding: "12px 9px", boxSizing: "border-box", opacity: props.disabled ? 0.5 : 1, ...wrap }, children: /* @__PURE__ */ jsxs3("div", { style: { position: "relative", height: 4, borderRadius: 999, background: C2("surfaceTertiary", "#e3e6ea") }, children: [
|
|
36789
|
+
/* @__PURE__ */ jsx6("div", { style: { position: "absolute", left: `${clampPct(lo2) * 100}%`, right: `${(1 - clampPct(hi2)) * 100}%`, top: 0, bottom: 0, borderRadius: 999, background: tint } }),
|
|
36790
|
+
[lo2, hi2].map((p2, i2) => /* @__PURE__ */ jsx6(
|
|
36591
36791
|
"span",
|
|
36592
36792
|
{
|
|
36593
36793
|
...i2 === 0 ? { [A11Y_PART]: "focus" } : {},
|
|
@@ -36657,7 +36857,7 @@ var init_controls = __esm({
|
|
|
36657
36857
|
dragging.current = false;
|
|
36658
36858
|
commit(valueAt(e2) ?? val);
|
|
36659
36859
|
};
|
|
36660
|
-
return /* @__PURE__ */
|
|
36860
|
+
return /* @__PURE__ */ jsx6("div", { ...{ [A11Y_PART]: "root" }, style: { width: "100%", padding: "12px 9px", boxSizing: "border-box", opacity: props.disabled ? 0.5 : 1, ...wrap }, children: /* @__PURE__ */ jsx6(
|
|
36661
36861
|
"div",
|
|
36662
36862
|
{
|
|
36663
36863
|
...{ [A11Y_PART]: "node" },
|
|
@@ -36674,9 +36874,9 @@ var init_controls = __esm({
|
|
|
36674
36874
|
onPointerMove,
|
|
36675
36875
|
onPointerUp,
|
|
36676
36876
|
style: { position: "relative", height: 18, display: "flex", alignItems: "center", outlineOffset: 4, cursor: props.disabled ? "default" : "pointer", touchAction: "pan-y" },
|
|
36677
|
-
children: /* @__PURE__ */
|
|
36678
|
-
/* @__PURE__ */
|
|
36679
|
-
/* @__PURE__ */
|
|
36877
|
+
children: /* @__PURE__ */ jsxs3("div", { style: { position: "relative", height: 4, width: "100%", borderRadius: 999, background: C2("surfaceTertiary", "#e3e6ea") }, children: [
|
|
36878
|
+
/* @__PURE__ */ jsx6("div", { style: { position: "absolute", left: 0, width: `${pct * 100}%`, top: 0, bottom: 0, borderRadius: 999, background: tint } }),
|
|
36879
|
+
/* @__PURE__ */ jsx6("span", { "aria-hidden": true, style: { position: "absolute", left: `${pct * 100}%`, top: "50%", width: 18, height: 18, borderRadius: "50%", background: "#fff", border: `2px solid ${tint}`, transform: "translate(-50%, -50%)", boxShadow: "0 1px 3px rgba(0,0,0,.25)" } })
|
|
36680
36880
|
] })
|
|
36681
36881
|
}
|
|
36682
36882
|
) });
|
|
@@ -36696,8 +36896,8 @@ var init_controls = __esm({
|
|
|
36696
36896
|
} : void 0;
|
|
36697
36897
|
const indeterminate = !isRadio && props.indeterminate === true && !on4;
|
|
36698
36898
|
const marked = on4 || indeterminate;
|
|
36699
|
-
const box = isRadio ? /* @__PURE__ */
|
|
36700
|
-
return /* @__PURE__ */
|
|
36899
|
+
const box = isRadio ? /* @__PURE__ */ jsx6("span", { "aria-hidden": true, style: { width: 20, height: 20, borderRadius: "50%", border: `2px solid ${on4 ? accent : C2("border", "#c5cdd6")}`, display: "grid", placeItems: "center", flex: "none" }, children: on4 && /* @__PURE__ */ jsx6("span", { style: { width: 10, height: 10, borderRadius: "50%", background: accent } }) }) : /* @__PURE__ */ jsx6("span", { "aria-hidden": true, style: { width: 20, height: 20, borderRadius: 5, border: `2px solid ${marked ? accent : C2("border", "#c5cdd6")}`, background: marked ? accent : "transparent", display: "grid", placeItems: "center", color: "#fff", fontSize: 13, fontWeight: 800, flex: "none" }, children: indeterminate ? "\u2013" : on4 ? "\u2713" : "" });
|
|
36900
|
+
return /* @__PURE__ */ jsxs3(
|
|
36701
36901
|
"button",
|
|
36702
36902
|
{
|
|
36703
36903
|
type: "button",
|
|
@@ -36709,7 +36909,7 @@ var init_controls = __esm({
|
|
|
36709
36909
|
style: { all: "unset", display: "inline-flex", alignItems: "center", gap: 10, cursor: fire ? "pointer" : "default", opacity: props.disabled ? 0.5 : 1, outlineOffset: 2, ...wrap },
|
|
36710
36910
|
children: [
|
|
36711
36911
|
box,
|
|
36712
|
-
props.label != null && /* @__PURE__ */
|
|
36912
|
+
props.label != null && /* @__PURE__ */ jsx6("span", { style: { fontFamily: FONT(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#13171e") }, children: labelText(props.label, ctx) })
|
|
36713
36913
|
]
|
|
36714
36914
|
}
|
|
36715
36915
|
);
|
|
@@ -36794,9 +36994,9 @@ var init_controls = __esm({
|
|
|
36794
36994
|
const accent = C2("accentPrimary", "#116DFF");
|
|
36795
36995
|
const activeTint = activeName ? C2(activeName, accent) : accent;
|
|
36796
36996
|
const activeLabel = activeName ? C2(activeName, accentTextColor(ctx)) : accentTextColor(ctx);
|
|
36797
|
-
const strip3 = /* @__PURE__ */
|
|
36997
|
+
const strip3 = /* @__PURE__ */ jsx6("div", { role: "tablist", onKeyDown, style: { display: "flex", gap: 18, borderBottom: `1px solid ${C2("border", "#ddd")}`, width: "100%", ...pages ? {} : wrap }, children: tabs.map((t2, i2) => {
|
|
36798
36998
|
const on4 = i2 === selIdx;
|
|
36799
|
-
return /* @__PURE__ */
|
|
36999
|
+
return /* @__PURE__ */ jsxs3(
|
|
36800
37000
|
"button",
|
|
36801
37001
|
{
|
|
36802
37002
|
type: "button",
|
|
@@ -36807,16 +37007,16 @@ var init_controls = __esm({
|
|
|
36807
37007
|
style: { all: "unset", display: "flex", gap: 6, alignItems: "center", minWidth: 44, minHeight: 44, padding: "10px 0", fontFamily: FONT(ctx), fontWeight: 600, fontSize: pxToRem(14), cursor: "pointer", color: on4 ? activeLabel : C2("textSecondary", "#777"), borderBottom: on4 ? `2px solid ${activeTint}` : "2px solid transparent", marginBottom: -1 },
|
|
36808
37008
|
children: [
|
|
36809
37009
|
asText2(t2.label),
|
|
36810
|
-
t2.badge && /* @__PURE__ */
|
|
37010
|
+
t2.badge && /* @__PURE__ */ jsx6("span", { "aria-hidden": true, style: { fontSize: pxToRem(10), fontWeight: 700, background: C2("surfaceTertiary", "#eee"), color: C2("textSecondary", "#666"), padding: "1px 6px", borderRadius: 999 }, children: t2.badge })
|
|
36811
37011
|
]
|
|
36812
37012
|
},
|
|
36813
37013
|
t2.id ?? i2
|
|
36814
37014
|
);
|
|
36815
37015
|
}) });
|
|
36816
37016
|
if (!pages) return strip3;
|
|
36817
|
-
return /* @__PURE__ */
|
|
37017
|
+
return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", width: "100%", ...wrap }, children: [
|
|
36818
37018
|
strip3,
|
|
36819
|
-
/* @__PURE__ */
|
|
37019
|
+
/* @__PURE__ */ jsx6(
|
|
36820
37020
|
"div",
|
|
36821
37021
|
{
|
|
36822
37022
|
ref: pagerRef,
|
|
@@ -36828,7 +37028,7 @@ var init_controls = __esm({
|
|
|
36828
37028
|
return (
|
|
36829
37029
|
// An off-screen page is `inert`, not just `aria-hidden`: its controls must leave the
|
|
36830
37030
|
// tab order too, or Tab focuses a hidden control (axe `aria-hidden-focus`).
|
|
36831
|
-
/* @__PURE__ */
|
|
37031
|
+
/* @__PURE__ */ jsx6("div", { role: "tabpanel", "aria-hidden": i2 !== selIdx, ...i2 !== selIdx ? { inert: "" } : {}, style: { flex: "0 0 100%", minWidth: 0, scrollSnapAlign: "start", scrollSnapStop: "always", boxSizing: "border-box" }, children: content ? renderChild(content) : null }, t2.id ?? i2)
|
|
36832
37032
|
);
|
|
36833
37033
|
})
|
|
36834
37034
|
}
|
|
@@ -36858,7 +37058,7 @@ var init_controls = __esm({
|
|
|
36858
37058
|
e2.preventDefault();
|
|
36859
37059
|
if (ni2 !== selIdx) select(ni2);
|
|
36860
37060
|
};
|
|
36861
|
-
return /* @__PURE__ */
|
|
37061
|
+
return /* @__PURE__ */ jsx6("div", { role: "radiogroup", onKeyDown, style: { display: "flex", background: seg.outlined ? "transparent" : C2("surfaceTertiary", "#eee"), borderRadius: radius(seg.trackRadius, "md", 8), padding: seg.trackPadding, width: "100%", boxSizing: "border-box", ...wrap }, children: opts.map((o2, i2) => {
|
|
36862
37062
|
const on4 = o2.id === selId;
|
|
36863
37063
|
const outerR = radius(seg.segmentRadius, "sm", 6);
|
|
36864
37064
|
const outlinedShape = seg.outlined ? {
|
|
@@ -36866,7 +37066,7 @@ var init_controls = __esm({
|
|
|
36866
37066
|
marginLeft: i2 > 0 ? -1 : 0,
|
|
36867
37067
|
borderRadius: `${i2 === 0 ? outerR : 0}px ${i2 === opts.length - 1 ? outerR : 0}px ${i2 === opts.length - 1 ? outerR : 0}px ${i2 === 0 ? outerR : 0}px`
|
|
36868
37068
|
} : {};
|
|
36869
|
-
return /* @__PURE__ */
|
|
37069
|
+
return /* @__PURE__ */ jsxs3(
|
|
36870
37070
|
"button",
|
|
36871
37071
|
{
|
|
36872
37072
|
type: "button",
|
|
@@ -36876,7 +37076,7 @@ var init_controls = __esm({
|
|
|
36876
37076
|
onClick: () => select(i2),
|
|
36877
37077
|
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: pxToRem(13), cursor: "pointer", boxSizing: "border-box", background: on4 ? C2("surfacePrimary", "#fff") : seg.outlined ? C2(pickRole(ctx.tokens.colors, seg.roles.inactive), "#eee") : "transparent", color: on4 ? C2("textPrimary", "#111") : C2("textSecondary", "#777"), boxShadow: on4 && !seg.outlined ? "0 1px 3px rgba(0,0,0,.12)" : "none", ...outlinedShape },
|
|
36878
37078
|
children: [
|
|
36879
|
-
on4 && seg.selectedCheck ? /* @__PURE__ */
|
|
37079
|
+
on4 && seg.selectedCheck ? /* @__PURE__ */ jsx6("span", { "aria-hidden": "true", children: "\u2713 " }) : null,
|
|
36880
37080
|
asText2(o2.label ?? o2.title ?? o2.id) || `Option ${i2 + 1}`
|
|
36881
37081
|
]
|
|
36882
37082
|
},
|
|
@@ -36893,8 +37093,8 @@ var init_controls = __esm({
|
|
|
36893
37093
|
const open = expanded === true;
|
|
36894
37094
|
const fire = ctx.onAction && props.onToggle ? () => ctx.onAction(resolveRowAction(props.onToggle, ctx)) : void 0;
|
|
36895
37095
|
const regionId = React5.useMemo(() => `himi-disclosure-${++disclosureSeq}`, []);
|
|
36896
|
-
return /* @__PURE__ */
|
|
36897
|
-
/* @__PURE__ */
|
|
37096
|
+
return /* @__PURE__ */ jsxs3("div", { style: { width: "100%", ...wrap }, children: [
|
|
37097
|
+
/* @__PURE__ */ jsxs3(
|
|
36898
37098
|
"button",
|
|
36899
37099
|
{
|
|
36900
37100
|
type: "button",
|
|
@@ -36903,15 +37103,15 @@ var init_controls = __esm({
|
|
|
36903
37103
|
onClick: fire,
|
|
36904
37104
|
style: { all: "unset", display: "flex", alignItems: "center", gap: 8, padding: "13px 2px", width: "100%", boxSizing: "border-box", cursor: fire ? "pointer" : "default" },
|
|
36905
37105
|
children: [
|
|
36906
|
-
/* @__PURE__ */
|
|
36907
|
-
/* @__PURE__ */
|
|
36908
|
-
/* @__PURE__ */
|
|
36909
|
-
subtitle != null && /* @__PURE__ */
|
|
37106
|
+
/* @__PURE__ */ jsx6("span", { "aria-hidden": true, style: { display: "inline-flex", alignItems: "center", transition: "transform .15s", transform: open ? "rotate(90deg)" : "none", color: C2("textSecondary", "#888") }, children: iconSvg("chevron_right", { size: 16 }) }),
|
|
37107
|
+
/* @__PURE__ */ jsxs3("span", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: [
|
|
37108
|
+
/* @__PURE__ */ jsx6("span", { style: { fontFamily: FONT(ctx), fontSize: pxToRem(15), fontWeight: 600, color: C2("textPrimary", "#13171e") }, children: asText2(title) ?? "" }),
|
|
37109
|
+
subtitle != null && /* @__PURE__ */ jsx6("span", { style: { fontFamily: FONT(ctx), fontSize: pxToRem(13), color: C2("textSecondary", "#888") }, children: asText2(subtitle) })
|
|
36910
37110
|
] })
|
|
36911
37111
|
]
|
|
36912
37112
|
}
|
|
36913
37113
|
),
|
|
36914
|
-
/* @__PURE__ */
|
|
37114
|
+
/* @__PURE__ */ jsx6("div", { id: regionId, role: "region", hidden: !open, style: open ? { padding: "2px 2px 8px 24px" } : void 0, children: open && (Array.isArray(props.content) ? props.content.map((c2, i2) => /* @__PURE__ */ jsx6(React5.Fragment, { children: renderChild(c2) }, c2?.id ?? i2)) : renderChild(props.content)) })
|
|
36915
37115
|
] });
|
|
36916
37116
|
};
|
|
36917
37117
|
}
|
|
@@ -37060,7 +37260,7 @@ var init_sheet = __esm({
|
|
|
37060
37260
|
|
|
37061
37261
|
// ../../core/web-renderer/src/listGestures.tsx
|
|
37062
37262
|
import { useRef, useState as useState2 } from "react";
|
|
37063
|
-
import { Fragment as Fragment2, jsx as
|
|
37263
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
37064
37264
|
var PULL_THRESHOLD, SWIPE_OPEN, PullToRefreshList, SwipeRow, DISMISS_THRESHOLD, SwipeDismissWrap;
|
|
37065
37265
|
var init_listGestures = __esm({
|
|
37066
37266
|
"../../core/web-renderer/src/listGestures.tsx"() {
|
|
@@ -37092,7 +37292,7 @@ var init_listGestures = __esm({
|
|
|
37092
37292
|
setPull(0);
|
|
37093
37293
|
startY.current = null;
|
|
37094
37294
|
};
|
|
37095
|
-
return /* @__PURE__ */
|
|
37295
|
+
return /* @__PURE__ */ jsxs4(
|
|
37096
37296
|
"div",
|
|
37097
37297
|
{
|
|
37098
37298
|
"data-himalaya-pull-host": true,
|
|
@@ -37101,7 +37301,7 @@ var init_listGestures = __esm({
|
|
|
37101
37301
|
onTouchEnd,
|
|
37102
37302
|
style: { position: "relative", overflowY: "auto", ...style },
|
|
37103
37303
|
children: [
|
|
37104
|
-
/* @__PURE__ */
|
|
37304
|
+
/* @__PURE__ */ jsx7(
|
|
37105
37305
|
"button",
|
|
37106
37306
|
{
|
|
37107
37307
|
type: "button",
|
|
@@ -37127,7 +37327,7 @@ var init_listGestures = __esm({
|
|
|
37127
37327
|
opacity: busy || pull > 0 ? 1 : 0,
|
|
37128
37328
|
transition: startY.current == null && !busy ? "height .2s, opacity .2s" : void 0
|
|
37129
37329
|
},
|
|
37130
|
-
children: /* @__PURE__ */
|
|
37330
|
+
children: /* @__PURE__ */ jsxs4(
|
|
37131
37331
|
"svg",
|
|
37132
37332
|
{
|
|
37133
37333
|
"aria-hidden": "true",
|
|
@@ -37137,14 +37337,14 @@ var init_listGestures = __esm({
|
|
|
37137
37337
|
viewBox: "0 0 16 16",
|
|
37138
37338
|
style: { display: "inline-block", transform: busy ? "rotate(360deg)" : `rotate(${pull * 4}deg)`, transition: busy ? "transform .7s linear" : void 0 },
|
|
37139
37339
|
children: [
|
|
37140
|
-
/* @__PURE__ */
|
|
37141
|
-
/* @__PURE__ */
|
|
37340
|
+
/* @__PURE__ */ jsx7("path", { d: "M13 8a5 5 0 1 1-1.46-3.54", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round" }),
|
|
37341
|
+
/* @__PURE__ */ jsx7("path", { d: "M13 2.5v3h-3", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
37142
37342
|
]
|
|
37143
37343
|
}
|
|
37144
37344
|
)
|
|
37145
37345
|
}
|
|
37146
37346
|
),
|
|
37147
|
-
/* @__PURE__ */
|
|
37347
|
+
/* @__PURE__ */ jsx7("div", { style: { background: surface, color: fg }, children })
|
|
37148
37348
|
]
|
|
37149
37349
|
}
|
|
37150
37350
|
);
|
|
@@ -37153,7 +37353,7 @@ var init_listGestures = __esm({
|
|
|
37153
37353
|
const [offset, setOffset] = useState2(0);
|
|
37154
37354
|
const startX = useRef(null);
|
|
37155
37355
|
const base = useRef(0);
|
|
37156
|
-
if (!trailing.length && !leading.length) return /* @__PURE__ */
|
|
37356
|
+
if (!trailing.length && !leading.length) return /* @__PURE__ */ jsx7(Fragment2, { children });
|
|
37157
37357
|
const fireAndClose = (a2) => {
|
|
37158
37358
|
onAction(a2);
|
|
37159
37359
|
setOffset(0);
|
|
@@ -37178,7 +37378,7 @@ var init_listGestures = __esm({
|
|
|
37178
37378
|
} else setOffset(Math.abs(offset) >= SWIPE_OPEN * 0.5 ? Math.sign(offset) * SWIPE_OPEN : 0);
|
|
37179
37379
|
startX.current = null;
|
|
37180
37380
|
};
|
|
37181
|
-
const actionBtn = (a2, i2, edge, hidden) => /* @__PURE__ */
|
|
37381
|
+
const actionBtn = (a2, i2, edge, hidden) => /* @__PURE__ */ jsx7(
|
|
37182
37382
|
"button",
|
|
37183
37383
|
{
|
|
37184
37384
|
type: "button",
|
|
@@ -37201,10 +37401,10 @@ var init_listGestures = __esm({
|
|
|
37201
37401
|
},
|
|
37202
37402
|
`${edge}-${i2}`
|
|
37203
37403
|
);
|
|
37204
|
-
return /* @__PURE__ */
|
|
37205
|
-
leading.length > 0 && /* @__PURE__ */
|
|
37206
|
-
trailing.length > 0 && /* @__PURE__ */
|
|
37207
|
-
/* @__PURE__ */
|
|
37404
|
+
return /* @__PURE__ */ jsxs4("div", { style: { position: "relative", overflow: "hidden" }, children: [
|
|
37405
|
+
leading.length > 0 && /* @__PURE__ */ jsx7("div", { "aria-hidden": offset <= 0, style: { position: "absolute", inset: 0, display: "flex", justifyContent: "flex-start" }, children: leading.map((a2, i2) => actionBtn(a2, i2, "leading", offset <= 0)) }),
|
|
37406
|
+
trailing.length > 0 && /* @__PURE__ */ jsx7("div", { "aria-hidden": offset >= 0, style: { position: "absolute", inset: 0, display: "flex", justifyContent: "flex-end" }, children: trailing.map((a2, i2) => actionBtn(a2, i2, "trailing", offset >= 0)) }),
|
|
37407
|
+
/* @__PURE__ */ jsx7(
|
|
37208
37408
|
"div",
|
|
37209
37409
|
{
|
|
37210
37410
|
onPointerDown,
|
|
@@ -37244,7 +37444,7 @@ var init_listGestures = __esm({
|
|
|
37244
37444
|
start.current = null;
|
|
37245
37445
|
};
|
|
37246
37446
|
const transform2 = axis === "x" ? `translateX(${off}px)` : `translateY(${off}px)`;
|
|
37247
|
-
return /* @__PURE__ */
|
|
37447
|
+
return /* @__PURE__ */ jsx7(
|
|
37248
37448
|
"div",
|
|
37249
37449
|
{
|
|
37250
37450
|
"data-himalaya-swipe-dismiss": true,
|
|
@@ -37903,7 +38103,7 @@ var init_rich_text_field = __esm({
|
|
|
37903
38103
|
|
|
37904
38104
|
// ../../core/web-renderer/src/richContent.tsx
|
|
37905
38105
|
import React7 from "react";
|
|
37906
|
-
import { Fragment as Fragment3, jsx as
|
|
38106
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
37907
38107
|
function richContentFollow(ctx, onLink) {
|
|
37908
38108
|
return (url) => {
|
|
37909
38109
|
if (!ctx.onAction) return;
|
|
@@ -37932,15 +38132,15 @@ function textStyle(ctx, token, color) {
|
|
|
37932
38132
|
}
|
|
37933
38133
|
function Spans({ spans, env }) {
|
|
37934
38134
|
const accent = accentTextColor(env.ctx);
|
|
37935
|
-
return /* @__PURE__ */
|
|
38135
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children: spans.map((s2, i2) => {
|
|
37936
38136
|
const style = {
|
|
37937
38137
|
fontWeight: s2.bold ? 700 : void 0,
|
|
37938
38138
|
fontStyle: s2.italic ? "italic" : void 0,
|
|
37939
38139
|
textDecoration: s2.underline || s2.link ? "underline" : void 0
|
|
37940
38140
|
};
|
|
37941
|
-
if (!s2.link) return /* @__PURE__ */
|
|
38141
|
+
if (!s2.link) return /* @__PURE__ */ jsx8("span", { style, children: s2.text }, i2);
|
|
37942
38142
|
const href = s2.link;
|
|
37943
|
-
return /* @__PURE__ */
|
|
38143
|
+
return /* @__PURE__ */ jsx8("a", { href, style: { ...style, color: accent }, onClick: (e2) => {
|
|
37944
38144
|
e2.preventDefault();
|
|
37945
38145
|
e2.stopPropagation();
|
|
37946
38146
|
env.follow(href);
|
|
@@ -37951,7 +38151,7 @@ function LinkButton({ label: label2, url, env, testId }) {
|
|
|
37951
38151
|
const { ctx } = env;
|
|
37952
38152
|
const fg = accentTextColor(ctx);
|
|
37953
38153
|
const f2 = ctx.font("bodyEmphasis");
|
|
37954
|
-
return /* @__PURE__ */
|
|
38154
|
+
return /* @__PURE__ */ jsx8(
|
|
37955
38155
|
"button",
|
|
37956
38156
|
{
|
|
37957
38157
|
type: "button",
|
|
@@ -37991,7 +38191,7 @@ function LinkButton({ label: label2, url, env, testId }) {
|
|
|
37991
38191
|
}
|
|
37992
38192
|
function NamedImage({ node, alt, env }) {
|
|
37993
38193
|
const img = env.render(node, env.ctx);
|
|
37994
|
-
return alt ? /* @__PURE__ */
|
|
38194
|
+
return alt ? /* @__PURE__ */ jsx8("div", { role: "img", "aria-label": alt, style: { width: "100%" }, children: img }) : /* @__PURE__ */ jsx8(Fragment3, { children: img });
|
|
37995
38195
|
}
|
|
37996
38196
|
function Block({ b: b2, env, depth }) {
|
|
37997
38197
|
const { ctx } = env;
|
|
@@ -38000,34 +38200,34 @@ function Block({ b: b2, env, depth }) {
|
|
|
38000
38200
|
const border = ctx.color("border", "#e5e5e5");
|
|
38001
38201
|
switch (b2.kind) {
|
|
38002
38202
|
case "paragraph":
|
|
38003
|
-
return /* @__PURE__ */
|
|
38203
|
+
return /* @__PURE__ */ jsx8("p", { ...tid(env, b2.id, b2.kind), style: {
|
|
38004
38204
|
...textStyle(ctx, "body", text8),
|
|
38005
38205
|
textAlign: b2.align,
|
|
38006
38206
|
paddingInlineStart: b2.indent ? Math.min(b2.indent, 8) * 16 : void 0,
|
|
38007
38207
|
minHeight: b2.spans.length ? void 0 : "1.5em"
|
|
38008
|
-
}, children: /* @__PURE__ */
|
|
38208
|
+
}, children: /* @__PURE__ */ jsx8(Spans, { spans: b2.spans, env }) });
|
|
38009
38209
|
case "heading":
|
|
38010
38210
|
return React7.createElement(
|
|
38011
38211
|
`h${b2.level}`,
|
|
38012
38212
|
{ ...tid(env, b2.id, b2.kind), style: textStyle(ctx, RICH_CONTENT_HEADING_TOKENS[b2.level - 1], text8) },
|
|
38013
|
-
/* @__PURE__ */
|
|
38213
|
+
/* @__PURE__ */ jsx8(Spans, { spans: b2.spans, env })
|
|
38014
38214
|
);
|
|
38015
38215
|
case "list": {
|
|
38016
38216
|
const Tag = b2.ordered ? "ol" : "ul";
|
|
38017
|
-
return /* @__PURE__ */
|
|
38217
|
+
return /* @__PURE__ */ jsx8(
|
|
38018
38218
|
Tag,
|
|
38019
38219
|
{
|
|
38020
38220
|
...tid(env, b2.id, b2.kind),
|
|
38021
38221
|
start: b2.ordered ? b2.start : void 0,
|
|
38022
38222
|
style: { ...textStyle(ctx, "body", text8), paddingInlineStart: 24, listStyleType: b2.ordered ? "decimal" : depth % 2 ? "circle" : "disc" },
|
|
38023
|
-
children: b2.items.map((item, i2) => /* @__PURE__ */
|
|
38223
|
+
children: b2.items.map((item, i2) => /* @__PURE__ */ jsx8("li", { "data-component-id": `${env.componentId}/${item.id}`, id: `${env.componentId}/${item.id}`, style: { marginBottom: 6 }, children: /* @__PURE__ */ jsx8("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: item.blocks.map((child, j2) => /* @__PURE__ */ jsx8(Block, { b: child, env, depth: depth + 1 }, `${j2}:${child.id}`)) }) }, `${i2}:${item.id}`))
|
|
38024
38224
|
}
|
|
38025
38225
|
);
|
|
38026
38226
|
}
|
|
38027
38227
|
case "quote":
|
|
38028
|
-
return /* @__PURE__ */
|
|
38228
|
+
return /* @__PURE__ */ jsx8("blockquote", { ...tid(env, b2.id, b2.kind), style: { margin: 0, paddingInlineStart: 12, borderInlineStart: `3px solid ${border}`, display: "flex", flexDirection: "column", gap: 8 }, children: b2.blocks.map((child, j2) => /* @__PURE__ */ jsx8(Block, { b: child, env, depth }, `${j2}:${child.id}`)) });
|
|
38029
38229
|
case "code":
|
|
38030
|
-
return /* @__PURE__ */
|
|
38230
|
+
return /* @__PURE__ */ jsx8("pre", { ...tid(env, b2.id, b2.kind), style: {
|
|
38031
38231
|
margin: 0,
|
|
38032
38232
|
whiteSpace: "pre-wrap",
|
|
38033
38233
|
overflowWrap: "anywhere",
|
|
@@ -38037,29 +38237,29 @@ function Block({ b: b2, env, depth }) {
|
|
|
38037
38237
|
background: ctx.color("surfaceSecondary", "#f5f5f7"),
|
|
38038
38238
|
padding: 10,
|
|
38039
38239
|
borderRadius: 6
|
|
38040
|
-
}, children: /* @__PURE__ */
|
|
38240
|
+
}, children: /* @__PURE__ */ jsx8("code", { children: b2.text }) });
|
|
38041
38241
|
case "divider":
|
|
38042
|
-
return /* @__PURE__ */
|
|
38242
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children: env.render(richContentDividerNode(env.componentId, b2), env.ctx) });
|
|
38043
38243
|
case "image":
|
|
38044
|
-
return /* @__PURE__ */
|
|
38045
|
-
/* @__PURE__ */
|
|
38046
|
-
b2.caption ? /* @__PURE__ */
|
|
38244
|
+
return /* @__PURE__ */ jsxs5("figure", { ...tid(env, b2.id, b2.kind), style: { margin: 0, display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
38245
|
+
/* @__PURE__ */ jsx8(NamedImage, { node: richContentImageNode(env.componentId, b2), alt: b2.alt, env }),
|
|
38246
|
+
b2.caption ? /* @__PURE__ */ jsx8("figcaption", { style: textStyle(ctx, "caption", secondary), children: b2.caption }) : null
|
|
38047
38247
|
] });
|
|
38048
38248
|
case "gallery":
|
|
38049
|
-
return /* @__PURE__ */
|
|
38249
|
+
return /* @__PURE__ */ jsx8("div", { ...tid(env, b2.id, b2.kind), style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8 }, children: b2.images.map((image, i2) => /* @__PURE__ */ jsx8(NamedImage, { node: richContentGalleryImageNode(env.componentId, b2.id, i2, image), alt: image.alt, env }, i2)) });
|
|
38050
38250
|
case "video":
|
|
38051
|
-
return /* @__PURE__ */
|
|
38251
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children: env.render(richContentVideoNode(env.componentId, b2), env.ctx) });
|
|
38052
38252
|
case "button":
|
|
38053
|
-
return /* @__PURE__ */
|
|
38253
|
+
return /* @__PURE__ */ jsx8(LinkButton, { label: b2.label, url: b2.url, env, testId: `${env.componentId}/${b2.id}` });
|
|
38054
38254
|
case "table":
|
|
38055
|
-
return /* @__PURE__ */
|
|
38255
|
+
return /* @__PURE__ */ jsx8("table", { ...tid(env, b2.id, b2.kind), style: { width: "100%", borderCollapse: "collapse", ...textStyle(ctx, "body", text8) }, children: /* @__PURE__ */ jsx8("tbody", { children: b2.rows.map((row, r2) => /* @__PURE__ */ jsx8("tr", { children: row.map((cell2, c2) => /* @__PURE__ */ jsx8("td", { style: { border: `1px solid ${border}`, padding: 6, whiteSpace: "pre-wrap", verticalAlign: "top" }, children: cell2 }, c2)) }, r2)) }) });
|
|
38056
38256
|
case "card": {
|
|
38057
38257
|
const title = richContentCardTitle(b2);
|
|
38058
|
-
return /* @__PURE__ */
|
|
38059
|
-
/* @__PURE__ */
|
|
38060
|
-
b2.url ? /* @__PURE__ */
|
|
38061
|
-
/* @__PURE__ */
|
|
38062
|
-
/* @__PURE__ */
|
|
38258
|
+
return /* @__PURE__ */ jsxs5("div", { ...tid(env, b2.id, b2.kind), role: "group", "aria-label": title, style: { border: `1px solid ${border}`, borderRadius: 8, padding: 12, display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
38259
|
+
/* @__PURE__ */ jsx8("div", { style: textStyle(ctx, "bodyEmphasis", text8), children: title }),
|
|
38260
|
+
b2.url ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
38261
|
+
/* @__PURE__ */ jsx8("div", { style: textStyle(ctx, "caption", secondary), children: richContentHost(b2.url) }),
|
|
38262
|
+
/* @__PURE__ */ jsx8(LinkButton, { label: RICH_CONTENT_OPEN_LABEL, url: b2.url, env, testId: `${env.componentId}/${b2.id}/open` })
|
|
38063
38263
|
] }) : null
|
|
38064
38264
|
] });
|
|
38065
38265
|
}
|
|
@@ -38067,7 +38267,7 @@ function Block({ b: b2, env, depth }) {
|
|
|
38067
38267
|
}
|
|
38068
38268
|
function RichContentBlocks({ blocks, componentId, onLink, ctx, render }) {
|
|
38069
38269
|
const env = { ctx, componentId, follow: richContentFollow(ctx, onLink), render };
|
|
38070
|
-
return /* @__PURE__ */
|
|
38270
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children: blocks.map((b2, i2) => /* @__PURE__ */ jsx8(Block, { b: b2, env, depth: 0 }, `${i2}:${b2.id}`)) });
|
|
38071
38271
|
}
|
|
38072
38272
|
var tid;
|
|
38073
38273
|
var init_richContent = __esm({
|
|
@@ -118691,7 +118891,7 @@ __export(pdfDocument_exports, {
|
|
|
118691
118891
|
destroyPdfDocumentLoad: () => destroyPdfDocumentLoad
|
|
118692
118892
|
});
|
|
118693
118893
|
import React8 from "react";
|
|
118694
|
-
import { jsx as
|
|
118894
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
118695
118895
|
async function loadPdfDocument(src, ownerDocument) {
|
|
118696
118896
|
const [pdfjs, pdfWorkerAsset] = await Promise.all([
|
|
118697
118897
|
Promise.resolve().then(() => (init_pdf(), pdf_exports)),
|
|
@@ -118757,11 +118957,11 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
|
|
|
118757
118957
|
overflow: "auto"
|
|
118758
118958
|
};
|
|
118759
118959
|
if (failed2) {
|
|
118760
|
-
return /* @__PURE__ */
|
|
118960
|
+
return /* @__PURE__ */ jsx9("object", { "data-himalaya-pdf": "native-fallback", "data-himalaya-pdf-zoom": zoomPercent ?? 100, data: nativeSrc, type: "application/pdf", "aria-label": title, style: frame });
|
|
118761
118961
|
}
|
|
118762
|
-
return /* @__PURE__ */
|
|
118763
|
-
/* @__PURE__ */
|
|
118764
|
-
pages ? /* @__PURE__ */
|
|
118962
|
+
return /* @__PURE__ */ jsxs6("div", { "data-himalaya-pdf": "canvas-document", "data-himalaya-pdf-src": src, "data-himalaya-pdf-zoom": zoomPercent ?? 100, role: "group", "aria-label": title, "aria-busy": pages === 0, style: frame, children: [
|
|
118963
|
+
/* @__PURE__ */ jsx9("div", { ref: containerRef, "data-himalaya-pdf-pages": "true" }),
|
|
118964
|
+
pages ? /* @__PURE__ */ jsxs6("span", { "data-himalaya-pdf-page-count": "true", style: { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0,0,0,0)", whiteSpace: "nowrap", border: 0 }, children: [
|
|
118765
118965
|
pages,
|
|
118766
118966
|
" pages"
|
|
118767
118967
|
] }) : null
|
|
@@ -118777,7 +118977,7 @@ var init_pdfDocument = __esm({
|
|
|
118777
118977
|
|
|
118778
118978
|
// ../../core/web-renderer/src/renderNode.tsx
|
|
118779
118979
|
import React9 from "react";
|
|
118780
|
-
import { Fragment as Fragment4, jsx as
|
|
118980
|
+
import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
118781
118981
|
function boundTokenName(path2, fallback, ctx) {
|
|
118782
118982
|
if (typeof path2 === "string" && path2) {
|
|
118783
118983
|
const r2 = resolveScalarStatic(path2, ctx);
|
|
@@ -119183,14 +119383,14 @@ function vectorAnimSvg(name, color, size, animated) {
|
|
|
119183
119383
|
const common = { width: size, height: size, viewBox: "0 0 24 24" };
|
|
119184
119384
|
if (name === "success") {
|
|
119185
119385
|
const st3 = animated ? { strokeDasharray: 30, animation: "himalaya-vectoranim-success .6s ease forwards" } : {};
|
|
119186
|
-
return /* @__PURE__ */
|
|
119386
|
+
return /* @__PURE__ */ jsx10("svg", { ...common, fill: "none", stroke: color, strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx10("path", { d: "M4 12.5l5 5L20 6", style: st3 }) });
|
|
119187
119387
|
}
|
|
119188
119388
|
if (name === "loader") {
|
|
119189
119389
|
const st3 = animated ? { transformOrigin: "center", animation: "himalaya-vectoranim-loader 1s linear infinite" } : {};
|
|
119190
|
-
return /* @__PURE__ */
|
|
119390
|
+
return /* @__PURE__ */ jsx10("svg", { ...common, fill: "none", stroke: color, strokeWidth: 3, strokeLinecap: "round", style: st3, children: /* @__PURE__ */ jsx10("circle", { cx: 12, cy: 12, r: 9, strokeDasharray: "42 22" }) });
|
|
119191
119391
|
}
|
|
119192
119392
|
const st2 = animated ? { transformOrigin: "center", animation: "himalaya-vectoranim-pulse 1.2s ease-in-out infinite" } : {};
|
|
119193
|
-
return /* @__PURE__ */
|
|
119393
|
+
return /* @__PURE__ */ jsx10("svg", { ...common, children: /* @__PURE__ */ jsx10("circle", { cx: 12, cy: 12, r: 7, fill: color, style: st2 }) });
|
|
119194
119394
|
}
|
|
119195
119395
|
function nearestScroller(el2) {
|
|
119196
119396
|
const doc = document.documentElement;
|
|
@@ -119496,7 +119696,7 @@ function autoGrowBox(contentHeight, lineHeight, verticalPadding, maxLines) {
|
|
|
119496
119696
|
return { height: Math.max(floor2, Math.min(contentHeight, cap)), scrolls: contentHeight > cap };
|
|
119497
119697
|
}
|
|
119498
119698
|
function wrapModalMenu(modal, label2, placement, ref, menu) {
|
|
119499
|
-
return modal ? /* @__PURE__ */
|
|
119699
|
+
return modal ? /* @__PURE__ */ jsx10("div", { ref, role: "dialog", "aria-modal": "true", "aria-label": label2, style: placement, children: menu }) : menu;
|
|
119500
119700
|
}
|
|
119501
119701
|
function bindMediaSlot(value, sessionId) {
|
|
119502
119702
|
if (typeof value === "string") {
|
|
@@ -119730,7 +119930,7 @@ function TapActivator({ label: label2, state, tabIndex = 0, role = "button", hin
|
|
|
119730
119930
|
activatorNameObservers.delete(el2);
|
|
119731
119931
|
};
|
|
119732
119932
|
}, [label2]);
|
|
119733
|
-
const activator = /* @__PURE__ */
|
|
119933
|
+
const activator = /* @__PURE__ */ jsx10(
|
|
119734
119934
|
"span",
|
|
119735
119935
|
{
|
|
119736
119936
|
ref,
|
|
@@ -119751,15 +119951,15 @@ function TapActivator({ label: label2, state, tabIndex = 0, role = "button", hin
|
|
|
119751
119951
|
}
|
|
119752
119952
|
}
|
|
119753
119953
|
);
|
|
119754
|
-
return hint ? /* @__PURE__ */
|
|
119954
|
+
return hint ? /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
119755
119955
|
activator,
|
|
119756
|
-
/* @__PURE__ */
|
|
119956
|
+
/* @__PURE__ */ jsx10("span", { id: hintId, hidden: true, "data-hm-a11y-hint": "", children: hint })
|
|
119757
119957
|
] }) : activator;
|
|
119758
119958
|
}
|
|
119759
119959
|
function withExtras(name, render) {
|
|
119760
119960
|
const Wrapped = ({ props, ctx, wrap, nodeId, gap, ...pass }) => {
|
|
119761
119961
|
const el2 = render({ props, ctx, wrap, nodeId, gap });
|
|
119762
|
-
if (!React9.isValidElement(el2)) return /* @__PURE__ */
|
|
119962
|
+
if (!React9.isValidElement(el2)) return /* @__PURE__ */ jsx10(Fragment4, { children: el2 });
|
|
119763
119963
|
const additive = addIntrinsicPadding(el2.props.style, wrap ?? {});
|
|
119764
119964
|
const inferredDecorative = el2.props[INFERRED_DECORATIVE] === true;
|
|
119765
119965
|
const selfRenderedLeaf = el2.props[SELF_RENDERED_LEAF] === true;
|
|
@@ -119778,7 +119978,7 @@ function withExtras(name, render) {
|
|
|
119778
119978
|
}, hasA11yParts ? editA11yParts(kids3, a11yPartEdit({}, false, () => {
|
|
119779
119979
|
})) : kids3);
|
|
119780
119980
|
}
|
|
119781
|
-
return additive ? React9.cloneElement(el2, { style: additive }) : /* @__PURE__ */
|
|
119981
|
+
return additive ? React9.cloneElement(el2, { style: additive }) : /* @__PURE__ */ jsx10(Fragment4, { children: el2 });
|
|
119782
119982
|
}
|
|
119783
119983
|
const prev = el2.props;
|
|
119784
119984
|
const next = { ...pass };
|
|
@@ -120061,8 +120261,8 @@ function regionArgs(centerLat, centerLng, z4, w2, h2) {
|
|
|
120061
120261
|
function decodeCamera(v2) {
|
|
120062
120262
|
if (!v2 || typeof v2 !== "object" || Array.isArray(v2)) return null;
|
|
120063
120263
|
const o2 = v2;
|
|
120064
|
-
const
|
|
120065
|
-
const out2 = { latitude:
|
|
120264
|
+
const num4 = (k2) => typeof o2[k2] === "number" && Number.isFinite(o2[k2]) ? o2[k2] : void 0;
|
|
120265
|
+
const out2 = { latitude: num4("latitude"), longitude: num4("longitude"), zoom: num4("zoom") };
|
|
120066
120266
|
return out2.latitude === void 0 && out2.longitude === void 0 && out2.zoom === void 0 ? null : out2;
|
|
120067
120267
|
}
|
|
120068
120268
|
function resolveCamera(command, fallbackLatitude, fallbackLongitude, fallbackZoom) {
|
|
@@ -120359,7 +120559,7 @@ function actionClick(ctx, action) {
|
|
|
120359
120559
|
function actionTextButton(ctx, action, label2, color, extra) {
|
|
120360
120560
|
if (action == null) return null;
|
|
120361
120561
|
const onClick = actionClick(ctx, action);
|
|
120362
|
-
return /* @__PURE__ */
|
|
120562
|
+
return /* @__PURE__ */ jsx10(
|
|
120363
120563
|
"button",
|
|
120364
120564
|
{
|
|
120365
120565
|
type: "button",
|
|
@@ -120574,7 +120774,7 @@ function renderNodeInner(node, ctx) {
|
|
|
120574
120774
|
const key2 = `${node.body?.package ?? "himalaya"}.${type}`;
|
|
120575
120775
|
const verdict = isComponentAllowed(ctx.previewSurface, key2);
|
|
120576
120776
|
if (!verdict.allowed) {
|
|
120577
|
-
return /* @__PURE__ */
|
|
120777
|
+
return /* @__PURE__ */ jsx10(UnsupportedOnSurface, { type: key2, reason: verdict.reason ?? "unsupported", surface: ctx.previewSurface.id, ctx });
|
|
120578
120778
|
}
|
|
120579
120779
|
}
|
|
120580
120780
|
const hp = node?.modifiers?.hiddenPath ?? node?.modifiers?.hidden_path;
|
|
@@ -120589,7 +120789,7 @@ function renderNodeInner(node, ctx) {
|
|
|
120589
120789
|
} else if (hp.startsWith("$service:")) {
|
|
120590
120790
|
if (ctx.provider) {
|
|
120591
120791
|
const bare = { ...node, modifiers: { ...node.modifiers, hiddenPath: void 0, hidden_path: void 0 } };
|
|
120592
|
-
return /* @__PURE__ */
|
|
120792
|
+
return /* @__PURE__ */ jsx10(HiddenGate, { ctx, binding: hp, children: renderNode(bare, ctx) });
|
|
120593
120793
|
}
|
|
120594
120794
|
if (ctx.runtimeDegraded) return null;
|
|
120595
120795
|
}
|
|
@@ -120668,7 +120868,7 @@ function renderNodeInner(node, ctx) {
|
|
|
120668
120868
|
delete extra["data-himalaya-initial-focus"];
|
|
120669
120869
|
if (extra.tabIndex === -1) delete extra.tabIndex;
|
|
120670
120870
|
}
|
|
120671
|
-
tapActivator = /* @__PURE__ */
|
|
120871
|
+
tapActivator = /* @__PURE__ */ jsx10(
|
|
120672
120872
|
TapActivator,
|
|
120673
120873
|
{
|
|
120674
120874
|
label: typeof authored2 === "string" ? authored2 : void 0,
|
|
@@ -120772,11 +120972,11 @@ function renderNodeInner(node, ctx) {
|
|
|
120772
120972
|
}
|
|
120773
120973
|
let out2 = tapActivator ? React9.cloneElement(el2, extra, tapActivator, el2.props.children) : Object.keys(extra).length ? React9.cloneElement(el2, extra) : el2;
|
|
120774
120974
|
if (a11yHint && !tapActivator) {
|
|
120775
|
-
out2 = /* @__PURE__ */
|
|
120975
|
+
out2 = /* @__PURE__ */ jsx10(A11yHintDescription, { hint: a11yHint, idBase: componentId, children: out2 });
|
|
120776
120976
|
}
|
|
120777
120977
|
const sd = node?.modifiers?.swipeDismiss ?? node?.modifiers?.swipe_dismiss;
|
|
120778
120978
|
if (sd?.action && ctx.onAction) {
|
|
120779
|
-
return /* @__PURE__ */
|
|
120979
|
+
return /* @__PURE__ */ jsx10(SwipeDismissWrap, { action: sd.action, direction: sd.direction, onAction: ctx.onAction, children: out2 });
|
|
120780
120980
|
}
|
|
120781
120981
|
return out2;
|
|
120782
120982
|
}
|
|
@@ -120798,7 +120998,7 @@ function boundPaddingInsets(modifiers, ctx) {
|
|
|
120798
120998
|
function renderNode(node, ctx) {
|
|
120799
120999
|
ensureFocusStyles();
|
|
120800
121000
|
const bindings = directServiceBindings(node);
|
|
120801
|
-
return bindings.length > 0 && ctx.provider ? /* @__PURE__ */
|
|
121001
|
+
return bindings.length > 0 && ctx.provider ? /* @__PURE__ */ jsx10(ReactiveDirectScalars, { node, ctx, bindings }) : renderNodeInner(node, ctx);
|
|
120802
121002
|
}
|
|
120803
121003
|
function renderInner(node, ctx) {
|
|
120804
121004
|
if (!node || typeof node !== "object") return null;
|
|
@@ -120872,13 +121072,13 @@ function renderInner(node, ctx) {
|
|
|
120872
121072
|
const inner = renderNode({ ...node, modifiers: { ...modifiers, transition: void 0, revealOnScroll: void 0 } }, itemCtx);
|
|
120873
121073
|
const style = { opacity: 0, ...rowItem };
|
|
120874
121074
|
if (spec.distance != null) style["--hm-d"] = `${spec.distance}px`;
|
|
120875
|
-
return /* @__PURE__ */
|
|
121075
|
+
return /* @__PURE__ */ jsx10("div", { "data-himalaya-reveal": spec.animation, style, children: inner });
|
|
120876
121076
|
}
|
|
120877
121077
|
}
|
|
120878
121078
|
if (typeof modifiers?.parallax === "number" && modifiers.parallax !== 0 && !ctx.reduceMotion()) {
|
|
120879
121079
|
ensureParallaxRuntime();
|
|
120880
121080
|
const inner = renderNode({ ...node, modifiers: { ...modifiers, parallax: void 0 } }, itemCtx);
|
|
120881
|
-
return /* @__PURE__ */
|
|
121081
|
+
return /* @__PURE__ */ jsx10("div", { "data-himalaya-parallax": String(modifiers.parallax), style: rowItemHold ? rowItem : void 0, children: inner });
|
|
120882
121082
|
}
|
|
120883
121083
|
if (modifiers?.scrollProgress) {
|
|
120884
121084
|
ensureScrollProgressRuntime();
|
|
@@ -120893,14 +121093,14 @@ function renderInner(node, ctx) {
|
|
|
120893
121093
|
barStyle.top = 0;
|
|
120894
121094
|
barStyle.zIndex = 1;
|
|
120895
121095
|
}
|
|
120896
|
-
return /* @__PURE__ */
|
|
121096
|
+
return /* @__PURE__ */ jsx10("div", { "data-himalaya-scroll-progress": true, style: barStyle, children: inner });
|
|
120897
121097
|
}
|
|
120898
121098
|
if (typeof modifiers?.vectorAnim === "string" && modifiers.vectorAnim) {
|
|
120899
121099
|
ensureVectorAnimStyles();
|
|
120900
121100
|
const name = modifiers.vectorAnim;
|
|
120901
121101
|
const col = C2(resolveScalarStatic(modifiers.color, ctx) ?? "accentPrimary", "#116DFF");
|
|
120902
121102
|
const inner = renderNode({ ...node, modifiers: { ...modifiers, vectorAnim: void 0 } }, itemCtx);
|
|
120903
|
-
return /* @__PURE__ */
|
|
121103
|
+
return /* @__PURE__ */ jsxs7("div", { "data-himalaya-vectoranim": name, style: { position: "relative", display: "inline-flex", alignItems: "center", justifyContent: "center", ...rowItem }, children: [
|
|
120904
121104
|
inner,
|
|
120905
121105
|
vectorAnimSvg(name, col, 36, !ctx.reduceMotion())
|
|
120906
121106
|
] });
|
|
@@ -120908,9 +121108,9 @@ function renderInner(node, ctx) {
|
|
|
120908
121108
|
if (modifiers?.confetti && !ctx.reduceMotion()) {
|
|
120909
121109
|
ensureConfettiRuntime();
|
|
120910
121110
|
const inner = renderNode({ ...node, modifiers: { ...modifiers, confetti: void 0 } }, itemCtx);
|
|
120911
|
-
return /* @__PURE__ */
|
|
121111
|
+
return /* @__PURE__ */ jsxs7("div", { style: { position: "relative", ...rowItem }, children: [
|
|
120912
121112
|
inner,
|
|
120913
|
-
/* @__PURE__ */
|
|
121113
|
+
/* @__PURE__ */ jsx10("div", { "data-himalaya-confetti": true, style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: "hidden" } })
|
|
120914
121114
|
] });
|
|
120915
121115
|
}
|
|
120916
121116
|
const gapScale = ctx.densityScale(modifiers?.density ?? ctx.kit?.density);
|
|
@@ -120918,20 +121118,20 @@ function renderInner(node, ctx) {
|
|
|
120918
121118
|
switch (type) {
|
|
120919
121119
|
// ───────────── layout ─────────────
|
|
120920
121120
|
case "VStack":
|
|
120921
|
-
return /* @__PURE__ */
|
|
121121
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "column", gap: gap(props.spacing), alignItems: alignItems(props.alignment), alignSelf: "stretch", ...wrap }, children: kids2(swipeTabsAdoption(props.children), ctx) });
|
|
120922
121122
|
case "HStack": {
|
|
120923
121123
|
const rowFills = Array.isArray(props.children) && props.children.some((c2) => {
|
|
120924
121124
|
const n2 = normalize(c2);
|
|
120925
121125
|
return n2.type === "Spacer" || wantsRowStretch(c2) || Number(n2.modifiers?.weight ?? 0) > 0;
|
|
120926
121126
|
});
|
|
120927
|
-
return /* @__PURE__ */
|
|
121127
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "row", gap: gap(props.spacing), alignItems: hAlignItems(props.alignment), ...rowFills ? { alignSelf: "stretch" } : {}, ...wrap }, children: rowKids(props.children, ctx) });
|
|
120928
121128
|
}
|
|
120929
121129
|
case "ZStack": {
|
|
120930
121130
|
const hasW = modifiers?.width != null || modifiers?.fillMaxWidth === true;
|
|
120931
121131
|
const hasH = modifiers?.height != null;
|
|
120932
121132
|
const justifyItems = zJustifyItems(props.alignment);
|
|
120933
121133
|
const fillsWidth = !hasW && !hListItem;
|
|
120934
|
-
return /* @__PURE__ */
|
|
121134
|
+
return /* @__PURE__ */ jsx10("div", { style: { position: "relative", display: "grid", justifyItems, alignItems: "center", ...fillsWidth ? { width: "100%" } : {}, ...hasH ? {} : { minHeight: 40 }, ...wrap }, children: (props.children ?? []).map((c2, i2) => /* @__PURE__ */ jsx10("div", { style: { gridArea: "1 / 1", display: "grid", justifyItems, alignItems: "center", width: "100%" }, children: renderNode(c2, ctx) }, c2?.id ?? i2)) });
|
|
120935
121135
|
}
|
|
120936
121136
|
case "LazyList": {
|
|
120937
121137
|
const itemsPath = props.itemsPath ?? props.items_path;
|
|
@@ -120963,7 +121163,7 @@ function renderInner(node, ctx) {
|
|
|
120963
121163
|
const boundRefresh = props.onPullToRefresh ?? props.on_pull_to_refresh;
|
|
120964
121164
|
const boundPagination = props.pagination;
|
|
120965
121165
|
const boundStagger = ctx.reduceMotion() ? 0 : Number(props.staggerMs ?? props.stagger_ms ?? 0);
|
|
120966
|
-
const boundBody = /* @__PURE__ */
|
|
121166
|
+
const boundBody = /* @__PURE__ */ jsx10(
|
|
120967
121167
|
BoundList,
|
|
120968
121168
|
{
|
|
120969
121169
|
ctx,
|
|
@@ -120980,7 +121180,7 @@ function renderInner(node, ctx) {
|
|
|
120980
121180
|
const leading = resolveSwipeActions(boundSwipe.leading, ic);
|
|
120981
121181
|
const trailing = resolveSwipeActions(boundSwipe.trailing, ic);
|
|
120982
121182
|
if (leading.length || trailing.length) {
|
|
120983
|
-
return /* @__PURE__ */
|
|
121183
|
+
return /* @__PURE__ */ jsx10(
|
|
120984
121184
|
SwipeRow,
|
|
120985
121185
|
{
|
|
120986
121186
|
leading,
|
|
@@ -120999,12 +121199,12 @@ function renderInner(node, ctx) {
|
|
|
120999
121199
|
}
|
|
121000
121200
|
}
|
|
121001
121201
|
);
|
|
121002
|
-
const withSentinel = /* @__PURE__ */
|
|
121202
|
+
const withSentinel = /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
121003
121203
|
boundBody,
|
|
121004
|
-
boundPagination ? /* @__PURE__ */
|
|
121204
|
+
boundPagination ? /* @__PURE__ */ jsx10(LoadMoreSentinel, { ctx, pagination: boundPagination }) : null
|
|
121005
121205
|
] });
|
|
121006
121206
|
if (boundRefresh && ctx.onAction && !props.horizontal) {
|
|
121007
|
-
return /* @__PURE__ */
|
|
121207
|
+
return /* @__PURE__ */ jsx10(
|
|
121008
121208
|
PullToRefreshList,
|
|
121009
121209
|
{
|
|
121010
121210
|
onRefresh: () => ctx.onAction(resolveItemDeep2(boundRefresh, ctx)),
|
|
@@ -121017,7 +121217,7 @@ function renderInner(node, ctx) {
|
|
|
121017
121217
|
}
|
|
121018
121218
|
);
|
|
121019
121219
|
}
|
|
121020
|
-
return /* @__PURE__ */
|
|
121220
|
+
return /* @__PURE__ */ jsx10("div", { style: listStyle, ...hListAttr, children: withSentinel });
|
|
121021
121221
|
}
|
|
121022
121222
|
if (!itemsPath && items.length) {
|
|
121023
121223
|
const staggerMs = ctx.reduceMotion() ? 0 : Number(props.staggerMs ?? props.stagger_ms ?? 0);
|
|
@@ -121026,14 +121226,14 @@ function renderInner(node, ctx) {
|
|
|
121026
121226
|
const animateItems = !ctx.reduceMotion() && (props.animateItems ?? props.animate_items) === true && !props.horizontal;
|
|
121027
121227
|
if (animateItems) ensureListAnimateRuntime();
|
|
121028
121228
|
const stickyHeader = props.stickyHeader ?? props.sticky_header;
|
|
121029
|
-
const stickyEl = stickyHeader && !props.horizontal ? /* @__PURE__ */
|
|
121229
|
+
const stickyEl = stickyHeader && !props.horizontal ? /* @__PURE__ */ jsx10("div", { style: { position: "sticky", top: 0, zIndex: 2, background: C2("surfacePrimary", "#fff") }, children: renderNode(stickyHeader, ctx) }) : null;
|
|
121030
121230
|
const rendered = staggerMs > 0 ? staggeredKids(items, asItem(ctx), staggerMs) : kids2(items, asItem(ctx));
|
|
121031
121231
|
let body = rendered;
|
|
121032
121232
|
if (swipe && ctx.onAction && !props.horizontal) {
|
|
121033
121233
|
const leading = swipe.leading ?? [];
|
|
121034
121234
|
const trailing = swipe.trailing ?? [];
|
|
121035
121235
|
const arr = React9.Children.toArray(rendered);
|
|
121036
|
-
body = arr.map((child, i2) => /* @__PURE__ */
|
|
121236
|
+
body = arr.map((child, i2) => /* @__PURE__ */ jsx10(
|
|
121037
121237
|
SwipeRow,
|
|
121038
121238
|
{
|
|
121039
121239
|
leading,
|
|
@@ -121049,7 +121249,7 @@ function renderInner(node, ctx) {
|
|
|
121049
121249
|
));
|
|
121050
121250
|
}
|
|
121051
121251
|
if (refresh && ctx.onAction && !props.horizontal) {
|
|
121052
|
-
return /* @__PURE__ */
|
|
121252
|
+
return /* @__PURE__ */ jsxs7(
|
|
121053
121253
|
PullToRefreshList,
|
|
121054
121254
|
{
|
|
121055
121255
|
onRefresh: () => ctx.onAction(resolveItemDeep2(refresh, ctx)),
|
|
@@ -121065,21 +121265,21 @@ function renderInner(node, ctx) {
|
|
|
121065
121265
|
}
|
|
121066
121266
|
);
|
|
121067
121267
|
}
|
|
121068
|
-
return /* @__PURE__ */
|
|
121268
|
+
return /* @__PURE__ */ jsxs7("div", { style: listStyle, ...hListAttr, ...animateItems ? { "data-himalaya-animate-items": "1" } : {}, children: [
|
|
121069
121269
|
stickyEl,
|
|
121070
121270
|
body
|
|
121071
121271
|
] });
|
|
121072
121272
|
}
|
|
121073
|
-
return /* @__PURE__ */
|
|
121074
|
-
!ctx.runtimeDegraded && /* @__PURE__ */
|
|
121273
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", flexDirection: "column", gap: 6, ...wrap }, children: [
|
|
121274
|
+
!ctx.runtimeDegraded && /* @__PURE__ */ jsxs7("div", { style: { fontSize: pxToRem(10), color: C2("textSecondary", "#9aa2ad"), fontStyle: "italic" }, children: [
|
|
121075
121275
|
"dynamic list",
|
|
121076
121276
|
itemsPath ? ` \xB7 ${itemsPath.replace(/^\$service:/, "")}` : ""
|
|
121077
121277
|
] }),
|
|
121078
|
-
[0, 1, 2].map((i2) => /* @__PURE__ */
|
|
121278
|
+
[0, 1, 2].map((i2) => /* @__PURE__ */ jsx10("div", { style: { height: 28, borderRadius: 6, background: C2("surfaceTertiary", "#f0f0f3") } }, i2))
|
|
121079
121279
|
] });
|
|
121080
121280
|
}
|
|
121081
121281
|
case "Grid":
|
|
121082
|
-
return /* @__PURE__ */
|
|
121282
|
+
return /* @__PURE__ */ jsx10(GridNode, { props, ctx, wrap, gap });
|
|
121083
121283
|
case "Card": {
|
|
121084
121284
|
const m2 = modifiers;
|
|
121085
121285
|
const ownSurface = !!(m2?.backgroundGradient ?? m2?.background_gradient ?? m2?.material) || m2?.animatedGradient === true || m2?.meshGradient === true;
|
|
@@ -121089,15 +121289,15 @@ function renderInner(node, ctx) {
|
|
|
121089
121289
|
const wrapShadow = wrap.boxShadow;
|
|
121090
121290
|
const explicit = m2?.shadow != null || m2?.boxShadow != null || m2?.box_shadow != null;
|
|
121091
121291
|
const elevationShadow = !elevation ? wrapShadow : explicit ? elevationBoxShadow({ border: elevation.border, shadow: wrapShadow }) : [elevationBoxShadow(elevation), wrapShadow].filter(Boolean).join(", ") || void 0;
|
|
121092
|
-
return /* @__PURE__ */
|
|
121292
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "column", gap: props.spacing == null ? 8 : ctx.sp(props.spacing), padding: props.padding == null ? 12 : ctx.sp(props.padding), background: elevation?.tint ? mixColor(fill, elevation.tint.color, elevation.tint.alpha) : fill, borderRadius: ctx.radius(props.cornerRadius ?? "md", 10), overflow: "hidden", alignSelf: "stretch", ...props.alignment ? { alignItems: props.alignment === "center" ? "center" : props.alignment === "trailing" ? "flex-end" : "flex-start" } : {}, ...wrap, ...elevationShadow ? { boxShadow: elevationShadow } : {} }, children: kids2(props.children, ctx) });
|
|
121093
121293
|
}
|
|
121094
121294
|
case "SplitView":
|
|
121095
|
-
return /* @__PURE__ */
|
|
121295
|
+
return /* @__PURE__ */ jsx10(SplitViewNode, { props, ctx, wrap });
|
|
121096
121296
|
case "Divider":
|
|
121097
121297
|
if (ctx.rowDivider) {
|
|
121098
|
-
return /* @__PURE__ */
|
|
121298
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: 1, alignSelf: "stretch", flexShrink: 0, margin: "4px 0", background: C2("border", "#e6edf3"), ...wrap } });
|
|
121099
121299
|
}
|
|
121100
|
-
return /* @__PURE__ */
|
|
121300
|
+
return /* @__PURE__ */ jsx10("div", { style: { height: 1, alignSelf: "stretch", width: "100%", background: C2("border", "#e6edf3"), ...wrap } });
|
|
121101
121301
|
case "Spacer": {
|
|
121102
121302
|
if (props.collapseWhenEmpty === true) {
|
|
121103
121303
|
const raw = props.value;
|
|
@@ -121105,33 +121305,33 @@ function renderInner(node, ctx) {
|
|
|
121105
121305
|
const s2 = resolved2 == null ? "" : String(resolved2);
|
|
121106
121306
|
if (!s2 || s2 === "\u2014") return null;
|
|
121107
121307
|
}
|
|
121108
|
-
return /* @__PURE__ */
|
|
121308
|
+
return /* @__PURE__ */ jsx10("div", { style: { flex: 1 } });
|
|
121109
121309
|
}
|
|
121110
121310
|
case "EmptyState":
|
|
121111
|
-
return /* @__PURE__ */
|
|
121311
|
+
return /* @__PURE__ */ jsx10(EmptyStateNode, { props, ctx, wrap, nodeId: node.id });
|
|
121112
121312
|
// ───────────── atoms ─────────────
|
|
121113
121313
|
case "Text":
|
|
121114
|
-
return /* @__PURE__ */
|
|
121314
|
+
return /* @__PURE__ */ jsx10(TextNode, { props, ctx, wrap });
|
|
121115
121315
|
case "RichText": {
|
|
121116
121316
|
const runs = Array.isArray(props.runs) ? props.runs : [];
|
|
121117
|
-
return /* @__PURE__ */
|
|
121317
|
+
return /* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), lineHeight: 1.5, overflowWrap: "break-word", color: C2(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), ...wrap }, children: runs.map((r2, i2) => {
|
|
121118
121318
|
const marks = Array.isArray(r2.marks) ? r2.marks : [];
|
|
121119
121319
|
const f2 = ctx.font(r2.style);
|
|
121120
|
-
return /* @__PURE__ */
|
|
121320
|
+
return /* @__PURE__ */ jsx10("span", { style: { fontSize: f2.remSize, fontWeight: marks.includes("bold") ? 700 : f2.weight, fontStyle: marks.includes("italic") ? "italic" : void 0, textDecoration: marks.includes("underline") || marks.includes("link") ? "underline" : void 0, ...f2.family ? { fontFamily: fontStack(f2.family, ctx.idiom) } : {}, ...r2.color ? { color: C2(r2.color) } : marks.includes("link") ? { color: accentTextColor(ctx) } : {}, ...marks.includes("code") ? { fontFamily: "ui-monospace, monospace", background: C2("surfaceTertiary", "#eee"), padding: "1px 5px", borderRadius: 4 } : {} }, children: txt(r2.text, ctx) }, i2);
|
|
121121
121321
|
}) });
|
|
121122
121322
|
}
|
|
121123
121323
|
case "Image":
|
|
121124
|
-
return /* @__PURE__ */
|
|
121324
|
+
return /* @__PURE__ */ jsx10(ImageNode, { props, ctx, wrap });
|
|
121125
121325
|
case "Icon":
|
|
121126
|
-
return /* @__PURE__ */
|
|
121326
|
+
return /* @__PURE__ */ jsx10(IconNode, { props, ctx, wrap });
|
|
121127
121327
|
case "Button":
|
|
121128
|
-
return /* @__PURE__ */
|
|
121328
|
+
return /* @__PURE__ */ jsx10(ButtonNode, { props, ctx, wrap });
|
|
121129
121329
|
case "MediaField":
|
|
121130
|
-
return /* @__PURE__ */
|
|
121330
|
+
return /* @__PURE__ */ jsx10(MediaFieldNode, { props, ctx, wrap });
|
|
121131
121331
|
case "TextField":
|
|
121132
|
-
return /* @__PURE__ */
|
|
121332
|
+
return /* @__PURE__ */ jsx10(EditableField, { props, ctx, wrap, multiline: false });
|
|
121133
121333
|
case "RichTextField":
|
|
121134
|
-
return /* @__PURE__ */
|
|
121334
|
+
return /* @__PURE__ */ jsx10(
|
|
121135
121335
|
EditableField,
|
|
121136
121336
|
{
|
|
121137
121337
|
props: { ...props, __formFieldId: props.id },
|
|
@@ -121146,11 +121346,11 @@ function renderInner(node, ctx) {
|
|
|
121146
121346
|
}
|
|
121147
121347
|
);
|
|
121148
121348
|
case "Toggle":
|
|
121149
|
-
return /* @__PURE__ */
|
|
121349
|
+
return /* @__PURE__ */ jsx10(ToggleNode, { props, ctx, wrap });
|
|
121150
121350
|
case "Stepper":
|
|
121151
|
-
return /* @__PURE__ */
|
|
121351
|
+
return /* @__PURE__ */ jsx10(InteractiveStepper, { props, ctx, wrap });
|
|
121152
121352
|
case "Avatar":
|
|
121153
|
-
return /* @__PURE__ */
|
|
121353
|
+
return /* @__PURE__ */ jsx10(AvatarNode, { props, ctx, wrap });
|
|
121154
121354
|
case "Badge": {
|
|
121155
121355
|
const _bt = boundTokenName(props.tokenPath, props.token, ctx);
|
|
121156
121356
|
const c2 = _bt ? C2(_bt, "#116DFF") : sevColor(ctx, props.style ?? "info");
|
|
@@ -121162,16 +121362,16 @@ function renderInner(node, ctx) {
|
|
|
121162
121362
|
const badgeLabel = m2?.accessibilityLabel ?? m2?.accessibility_label;
|
|
121163
121363
|
const badgeRole = roleDeclared ? void 0 : liveCount ? "status" : typeof badgeLabel === "string" && badgeLabel.trim() !== "" ? "img" : void 0;
|
|
121164
121364
|
const fg = _bt ? c2 : sevTextColor(ctx, props.style ?? "info");
|
|
121165
|
-
return /* @__PURE__ */
|
|
121365
|
+
return /* @__PURE__ */ jsx10("span", { role: badgeRole, style: { display: "inline-flex", alignItems: "center", alignSelf: "flex-start", width: "fit-content", padding: "3px 9px", borderRadius: 999, fontSize: pxToRem(12), fontWeight: 700, fontFamily: bodyFont(ctx), background: `color-mix(in srgb, ${c2} 16%, ${C2("surfacePrimary", "#fff")})`, color: fg, ...wrap }, children: ctx.empty ? "" : txt(props.text, ctx) || "Badge" });
|
|
121166
121366
|
}
|
|
121167
121367
|
case "Tag": {
|
|
121168
121368
|
const tagToken = boundTokenName(props.tokenPath, props.token, ctx);
|
|
121169
121369
|
const c2 = C2(tagToken ?? "accentPrimary", "#116DFF");
|
|
121170
121370
|
const tagFg = tagToken ? c2 : accentTextColor(ctx);
|
|
121171
|
-
return /* @__PURE__ */
|
|
121371
|
+
return /* @__PURE__ */ jsx10("span", { style: { display: "inline-flex", alignItems: "center", alignSelf: "flex-start", width: "fit-content", padding: "5px 11px", borderRadius: 999, fontSize: pxToRem(13), fontWeight: 600, fontFamily: bodyFont(ctx), background: `color-mix(in srgb, ${c2} 14%, ${C2("surfacePrimary", "#fff")})`, border: `1px solid color-mix(in srgb, ${c2} 30%, transparent)`, color: tagFg, ...wrap }, children: ctx.empty ? "" : txt(props.text, ctx) || "Tag" });
|
|
121172
121372
|
}
|
|
121173
121373
|
case "ProgressBar":
|
|
121174
|
-
return /* @__PURE__ */
|
|
121374
|
+
return /* @__PURE__ */ jsx10(ProgressBarNode, { props, ctx, wrap });
|
|
121175
121375
|
// ───────────── controls & cells (RFC 0028) ─────────────
|
|
121176
121376
|
case "ListItem": {
|
|
121177
121377
|
const titleF = ctx.font(props.titleStyle ?? "body");
|
|
@@ -121198,20 +121398,20 @@ function renderInner(node, ctx) {
|
|
|
121198
121398
|
e2.currentTarget.click();
|
|
121199
121399
|
}
|
|
121200
121400
|
} : void 0;
|
|
121201
|
-
const leadingEl = props.leading && /* @__PURE__ */
|
|
121202
|
-
const textEl = /* @__PURE__ */
|
|
121203
|
-
props.overline != null && /* @__PURE__ */
|
|
121204
|
-
/* @__PURE__ */
|
|
121205
|
-
props.subtitle != null && /* @__PURE__ */
|
|
121401
|
+
const leadingEl = props.leading && /* @__PURE__ */ jsx10("div", { style: { flex: "none", display: "flex" }, children: renderNode(props.leading, ctx) });
|
|
121402
|
+
const textEl = /* @__PURE__ */ jsxs7("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
121403
|
+
props.overline != null && /* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(11), fontWeight: 600, letterSpacing: 0.4, textTransform: "uppercase", color: C2(props.overlineColor ?? "textSecondary", "#888"), ...ell }, children: txt(props.overline, ctx) }),
|
|
121404
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: fontStack(titleF.family, ctx.idiom), fontSize: titleF.remSize, fontWeight: titleF.weight, color: C2(props.titleColor ?? "textPrimary", "#13171e"), ...ell }, children: txt(props.title, ctx) ?? (ctx.empty ? "" : "") }),
|
|
121405
|
+
props.subtitle != null && /* @__PURE__ */ jsx10("span", { style: { fontFamily: fontStack(subF.family, ctx.idiom), fontSize: subF.remSize, color: C2(props.subtitleColor ?? "textSecondary", "#888"), ...ell }, children: txt(props.subtitle, ctx) })
|
|
121206
121406
|
] });
|
|
121207
|
-
return /* @__PURE__ */
|
|
121208
|
-
splitButton ? /* @__PURE__ */
|
|
121209
|
-
leadingInteractive && /* @__PURE__ */
|
|
121210
|
-
/* @__PURE__ */
|
|
121407
|
+
return /* @__PURE__ */ jsxs7("div", { onClick, ...splitButton ? void 0 : buttonA11y, style: { display: "flex", alignItems: "center", gap: 12, width: "100%", padding: "10px 4px", boxSizing: "border-box", cursor: onClick ? "pointer" : void 0, ...wrap }, children: [
|
|
121408
|
+
splitButton ? /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
121409
|
+
leadingInteractive && /* @__PURE__ */ jsx10("div", { onClick: (e2) => e2.stopPropagation(), style: { flex: "none", display: "flex" }, children: leadingEl }),
|
|
121410
|
+
/* @__PURE__ */ jsxs7("div", { ...buttonA11y, style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
121211
121411
|
!leadingInteractive && leadingEl,
|
|
121212
121412
|
textEl
|
|
121213
121413
|
] })
|
|
121214
|
-
] }) : /* @__PURE__ */
|
|
121414
|
+
] }) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
121215
121415
|
leadingEl,
|
|
121216
121416
|
textEl
|
|
121217
121417
|
] }),
|
|
@@ -121223,113 +121423,113 @@ function renderInner(node, ctx) {
|
|
|
121223
121423
|
// makes the trailing slot fire ONLY its own action — and, because the
|
|
121224
121424
|
// Menu popup renders inside this slot, menu-item clicks don't double-fire
|
|
121225
121425
|
// the row either. Mirrors the Button node, which stops for the same reason.
|
|
121226
|
-
/* @__PURE__ */
|
|
121227
|
-
) : accessoryGlyph && /* @__PURE__ */
|
|
121426
|
+
/* @__PURE__ */ jsx10("div", { onClick: (e2) => e2.stopPropagation(), style: { flex: "none", display: "flex", alignItems: "center" }, children: renderNode(props.trailing, ctx) })
|
|
121427
|
+
) : accessoryGlyph && /* @__PURE__ */ jsx10("span", { "aria-hidden": props.accessory === "chevron" ? true : void 0, style: { flex: "none", color: C2("textTertiary", "#c0c4cc"), fontSize: pxToRem(20), lineHeight: 1 }, children: accessoryGlyph })
|
|
121228
121428
|
] });
|
|
121229
121429
|
}
|
|
121230
121430
|
case "Slider":
|
|
121231
|
-
return /* @__PURE__ */
|
|
121431
|
+
return /* @__PURE__ */ jsx10(SliderNode, { props, ctx, wrap });
|
|
121232
121432
|
case "SelectionControl":
|
|
121233
|
-
return /* @__PURE__ */
|
|
121433
|
+
return /* @__PURE__ */ jsx10(SelectionControlNode, { props, ctx, wrap });
|
|
121234
121434
|
case "ActivityIndicator":
|
|
121235
|
-
return /* @__PURE__ */
|
|
121435
|
+
return /* @__PURE__ */ jsx10(ActivityIndicatorNode, { props, ctx, wrap });
|
|
121236
121436
|
// ───────────── overlays & menus (RFC 0029) ─────────────
|
|
121237
121437
|
case "BottomSheet":
|
|
121238
|
-
return /* @__PURE__ */
|
|
121438
|
+
return /* @__PURE__ */ jsx10(BottomSheetNode, { props, ctx, wrap });
|
|
121239
121439
|
case "Menu":
|
|
121240
|
-
return /* @__PURE__ */
|
|
121440
|
+
return /* @__PURE__ */ jsx10(MenuNode, { props, ctx, wrap });
|
|
121241
121441
|
case "Tooltip": {
|
|
121242
121442
|
const rich = props.title != null && props.title !== "";
|
|
121243
|
-
return /* @__PURE__ */
|
|
121244
|
-
/* @__PURE__ */
|
|
121245
|
-
rich && /* @__PURE__ */
|
|
121443
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "inline-flex", flexDirection: "column", alignItems: "flex-start", gap: 6, ...wrap }, children: [
|
|
121444
|
+
/* @__PURE__ */ jsxs7("div", { role: "tooltip", style: { maxWidth: 240, width: "fit-content", background: C2("textPrimary", "#13171e"), color: C2("textOnAccent", "#fff"), borderRadius: 8, padding: rich ? "10px 12px" : "6px 10px", fontFamily: bodyFont(ctx), fontSize: pxToRem(13), lineHeight: 1.35 }, children: [
|
|
121445
|
+
rich && /* @__PURE__ */ jsx10("div", { style: { fontWeight: 700, marginBottom: 3 }, children: txt(props.title, ctx) }),
|
|
121246
121446
|
txt(props.text, ctx)
|
|
121247
121447
|
] }),
|
|
121248
121448
|
props.anchor ? renderNode(props.anchor, ctx) : null
|
|
121249
121449
|
] });
|
|
121250
121450
|
}
|
|
121251
121451
|
case "Popover":
|
|
121252
|
-
return /* @__PURE__ */
|
|
121452
|
+
return /* @__PURE__ */ jsx10(PopoverNode, { props, ctx, wrap });
|
|
121253
121453
|
// ───────────── chips & selection (RFC 0030) ─────────────
|
|
121254
121454
|
case "Chip":
|
|
121255
|
-
return /* @__PURE__ */
|
|
121455
|
+
return /* @__PURE__ */ jsx10(ChipNode, { props, ctx, wrap });
|
|
121256
121456
|
case "ChipsInput":
|
|
121257
|
-
return /* @__PURE__ */
|
|
121457
|
+
return /* @__PURE__ */ jsx10(ChipsInputNode, { props, ctx, wrap });
|
|
121258
121458
|
// ───────────── structure & disclosure (RFC 0031) ─────────────
|
|
121259
121459
|
case "Section": {
|
|
121260
121460
|
const inset = props.inset === true;
|
|
121261
|
-
return /* @__PURE__ */
|
|
121262
|
-
props.header != null && /* @__PURE__ */
|
|
121263
|
-
/* @__PURE__ */
|
|
121264
|
-
props.footer != null && /* @__PURE__ */
|
|
121461
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", flexDirection: "column", width: "100%", boxSizing: "border-box", ...wrap }, children: [
|
|
121462
|
+
props.header != null && /* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(12), fontWeight: 600, letterSpacing: 0.4, textTransform: "uppercase", color: C2("textSecondary", "#888"), padding: inset ? "0 4px 6px" : "6px 16px" }, children: txt(props.header, ctx) }),
|
|
121463
|
+
/* @__PURE__ */ jsx10("div", { style: inset ? { background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e8eaed")}`, borderRadius: 12, overflow: "hidden", padding: "2px 14px", boxSizing: "border-box" } : void 0, children: kids2(props.children, ctx) }),
|
|
121464
|
+
props.footer != null && /* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(12), color: C2("textSecondary", "#888"), padding: inset ? "6px 4px 0" : "6px 16px" }, children: txt(props.footer, ctx) })
|
|
121265
121465
|
] });
|
|
121266
121466
|
}
|
|
121267
121467
|
case "DisclosureGroup":
|
|
121268
|
-
return /* @__PURE__ */
|
|
121468
|
+
return /* @__PURE__ */ jsx10(DisclosureGroupNode, { props, ctx, wrap });
|
|
121269
121469
|
case "LabeledContent": {
|
|
121270
|
-
return /* @__PURE__ */
|
|
121271
|
-
/* @__PURE__ */
|
|
121272
|
-
props.content ? /* @__PURE__ */
|
|
121470
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12, width: "100%", padding: "8px 2px", boxSizing: "border-box", ...wrap }, children: [
|
|
121471
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#13171e") }, children: txt(props.label, ctx) ?? "" }),
|
|
121472
|
+
props.content ? /* @__PURE__ */ jsx10("div", { style: { flex: "none" }, children: renderNode(props.content, ctx) }) : /* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textSecondary", "#636b78"), textAlign: "right" }, children: txt(props.value, ctx) })
|
|
121273
121473
|
] });
|
|
121274
121474
|
}
|
|
121275
121475
|
case "Label": {
|
|
121276
121476
|
const f2 = ctx.font(props.style ?? "body");
|
|
121277
121477
|
const col = C2(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e");
|
|
121278
|
-
return /* @__PURE__ */
|
|
121279
|
-
props.icon && /* @__PURE__ */
|
|
121478
|
+
return /* @__PURE__ */ jsxs7("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontFamily: fontStack(f2.family, ctx.idiom), fontSize: f2.remSize, fontWeight: f2.weight, color: col, ...wrap }, children: [
|
|
121479
|
+
props.icon && /* @__PURE__ */ jsx10("span", { style: { display: "inline-grid", placeItems: "center", width: f2.size, height: f2.size }, children: iconSvg(props.icon, { size: f2.size, color: col }) }),
|
|
121280
121480
|
txt(props.text, ctx)
|
|
121281
121481
|
] });
|
|
121282
121482
|
}
|
|
121283
121483
|
case "Table":
|
|
121284
|
-
return /* @__PURE__ */
|
|
121484
|
+
return /* @__PURE__ */ jsx10(TableNode, { props, ctx, wrap });
|
|
121285
121485
|
// ───────────── display & data-viz (RFC 0032) ─────────────
|
|
121286
121486
|
case "Gauge":
|
|
121287
|
-
return /* @__PURE__ */
|
|
121487
|
+
return /* @__PURE__ */ jsx10(GaugeNode, { props, ctx, wrap });
|
|
121288
121488
|
case "Rating":
|
|
121289
|
-
return /* @__PURE__ */
|
|
121489
|
+
return /* @__PURE__ */ jsx10(RatingNode, { props, ctx, wrap });
|
|
121290
121490
|
case "Chart":
|
|
121291
|
-
return /* @__PURE__ */
|
|
121491
|
+
return /* @__PURE__ */ jsx10(ChartNode, { props, ctx, wrap });
|
|
121292
121492
|
// RFC 0057 — analytics data-viz.
|
|
121293
121493
|
case "DonutChart":
|
|
121294
|
-
return /* @__PURE__ */
|
|
121494
|
+
return /* @__PURE__ */ jsx10(DonutChartNode, { props, ctx, wrap });
|
|
121295
121495
|
case "Legend":
|
|
121296
|
-
return /* @__PURE__ */
|
|
121496
|
+
return /* @__PURE__ */ jsx10(LegendNode, { props, ctx, wrap });
|
|
121297
121497
|
case "DataTable":
|
|
121298
|
-
return /* @__PURE__ */
|
|
121498
|
+
return /* @__PURE__ */ jsx10(DataTableNode, { props, ctx, wrap });
|
|
121299
121499
|
// RFC 0063 — Wix Ricos rich content (never a WebView; binding + fallback inside).
|
|
121300
121500
|
case "RichContent":
|
|
121301
|
-
return /* @__PURE__ */
|
|
121501
|
+
return /* @__PURE__ */ jsx10(RichContentNode, { props, ctx, wrap, nodeId: resolvedComponentId(node.id, ctx) ?? "" });
|
|
121302
121502
|
// Recorded-audio bubble (messenger design G4). Presentational: playback is
|
|
121303
121503
|
// driven by the worker through `media_playback`, not by this node.
|
|
121304
121504
|
case "VoiceNote":
|
|
121305
|
-
return /* @__PURE__ */
|
|
121505
|
+
return /* @__PURE__ */ jsx10(VoiceNoteNode, { props, ctx, wrap });
|
|
121306
121506
|
case "Marquee": {
|
|
121307
121507
|
ensureMarqueeKeyframes();
|
|
121308
121508
|
const f2 = ctx.font(props.style ?? "body");
|
|
121309
121509
|
const dur = props.durationMs ?? 8e3;
|
|
121310
|
-
return /* @__PURE__ */
|
|
121510
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: "100%", overflow: "hidden", whiteSpace: "nowrap", ...wrap }, children: /* @__PURE__ */ jsx10("span", { style: { display: "inline-block", paddingLeft: "100%", fontFamily: fontStack(f2.family, ctx.idiom), fontSize: f2.remSize, color: C2(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), animation: ctx.empty ? void 0 : `himalaya-marquee ${dur}ms linear infinite` }, children: txt(props.text, ctx) }) });
|
|
121311
121511
|
}
|
|
121312
121512
|
case "Timeline":
|
|
121313
|
-
return /* @__PURE__ */
|
|
121513
|
+
return /* @__PURE__ */ jsx10(TimelineNode, { props, ctx, wrap });
|
|
121314
121514
|
case "MonthCalendar":
|
|
121315
|
-
return /* @__PURE__ */
|
|
121515
|
+
return /* @__PURE__ */ jsx10(MonthCalendarNode, { props, ctx, wrap });
|
|
121316
121516
|
case "TimeGrid":
|
|
121317
|
-
return /* @__PURE__ */
|
|
121517
|
+
return /* @__PURE__ */ jsx10(TimeGridNode, { props, ctx, wrap });
|
|
121318
121518
|
case "Agenda":
|
|
121319
|
-
return /* @__PURE__ */
|
|
121519
|
+
return /* @__PURE__ */ jsx10(AgendaNode, { props, ctx, wrap });
|
|
121320
121520
|
case "PageControl": {
|
|
121321
121521
|
const count2 = props.count ?? 0;
|
|
121322
121522
|
const cur = props.currentIndex ?? 0;
|
|
121323
121523
|
const accent = C2("accentPrimary", "#116DFF");
|
|
121324
|
-
return /* @__PURE__ */
|
|
121524
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "inline-flex", alignItems: "center", gap: 8, ...wrap }, children: Array.from({ length: count2 }).map((_2, i2) => /* @__PURE__ */ jsx10("span", { style: { width: i2 === cur ? 22 : 9, height: 9, borderRadius: 999, background: i2 === cur ? accent : C2("textTertiary", "#aab2bd"), transition: "width .2s" } }, i2)) });
|
|
121325
121525
|
}
|
|
121326
121526
|
// ───────────── pickers & inputs (RFC 0033) ─────────────
|
|
121327
121527
|
case "WheelPicker":
|
|
121328
|
-
return /* @__PURE__ */
|
|
121528
|
+
return /* @__PURE__ */ jsx10(WheelPickerNode, { props, ctx, wrap });
|
|
121329
121529
|
case "ColorPicker":
|
|
121330
|
-
return /* @__PURE__ */
|
|
121530
|
+
return /* @__PURE__ */ jsx10(ColorPickerNode, { props, ctx, wrap });
|
|
121331
121531
|
case "OtpInput":
|
|
121332
|
-
return /* @__PURE__ */
|
|
121532
|
+
return /* @__PURE__ */ jsx10(OtpInputNode, { props, ctx, wrap });
|
|
121333
121533
|
// ───────────── cross-cutting & media (RFC 0035) ─────────────
|
|
121334
121534
|
case "Fab": {
|
|
121335
121535
|
const bg = C2(props.tint ?? "accentPrimary", "#116DFF");
|
|
@@ -121339,34 +121539,34 @@ function renderInner(node, ctx) {
|
|
|
121339
121539
|
const extended = props.label != null && props.label !== "";
|
|
121340
121540
|
const actionable = Boolean(props.action);
|
|
121341
121541
|
const style = { display: "inline-flex", alignItems: "center", justifyContent: "center", gap: extended ? 10 : 0, alignSelf: "flex-start", height: dim, width: extended ? "fit-content" : dim, padding: extended ? "0 20px" : 0, borderRadius: extended ? dim / 2 : "50%", background: bg, color: fg, boxShadow: "0 4px 12px rgba(0,0,0,.22)", cursor: actionable ? "pointer" : "default", ...wrap };
|
|
121342
|
-
const content = /* @__PURE__ */
|
|
121343
|
-
props.icon && /* @__PURE__ */
|
|
121344
|
-
extended && /* @__PURE__ */
|
|
121542
|
+
const content = /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
121543
|
+
props.icon && /* @__PURE__ */ jsx10("span", { style: { display: "inline-grid", placeItems: "center", width: isz, height: isz }, children: iconSvg(props.icon, { size: isz, color: fg }) }),
|
|
121544
|
+
extended && /* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(15) }, children: txt(props.label, ctx) })
|
|
121345
121545
|
] });
|
|
121346
|
-
if (!actionable) return /* @__PURE__ */
|
|
121347
|
-
return /* @__PURE__ */
|
|
121546
|
+
if (!actionable) return /* @__PURE__ */ jsx10("div", { style, children: content });
|
|
121547
|
+
return /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": extended ? void 0 : props.icon || "Action", onClick: ctx.onAction ? (e2) => {
|
|
121348
121548
|
e2.stopPropagation();
|
|
121349
121549
|
ctx.onAction(resolveItemDeep2(props.action, ctx));
|
|
121350
121550
|
} : void 0, style: { ...style, appearance: "none", border: 0, font: "inherit" }, children: content });
|
|
121351
121551
|
}
|
|
121352
121552
|
case "Map":
|
|
121353
|
-
return /* @__PURE__ */
|
|
121553
|
+
return /* @__PURE__ */ jsx10(MapNode, { props, ctx, wrap });
|
|
121354
121554
|
case "Video":
|
|
121355
|
-
return /* @__PURE__ */
|
|
121555
|
+
return /* @__PURE__ */ jsx10(VideoNode, { props, ctx, wrap });
|
|
121356
121556
|
// Inline PDF document — see PdfViewNode: `url` must resolve through the
|
|
121357
121557
|
// binding seam, so this delegates rather than reading props.url directly.
|
|
121358
121558
|
case "PdfView":
|
|
121359
|
-
return /* @__PURE__ */
|
|
121559
|
+
return /* @__PURE__ */ jsx10(PdfViewNode, { props, ctx, wrap });
|
|
121360
121560
|
case "MediaPlayer":
|
|
121361
|
-
return /* @__PURE__ */
|
|
121561
|
+
return /* @__PURE__ */ jsx10(MediaPlayerView, { nodeId: node.id, props, ctx, wrap });
|
|
121362
121562
|
// Motion grammar (Batch 4 / Phase-2) — Lottie and Rive; see LottieNode / RiveNode.
|
|
121363
121563
|
case "Lottie":
|
|
121364
|
-
return /* @__PURE__ */
|
|
121564
|
+
return /* @__PURE__ */ jsx10(LottieNode, { props, ctx, wrap });
|
|
121365
121565
|
case "Rive":
|
|
121366
|
-
return /* @__PURE__ */
|
|
121566
|
+
return /* @__PURE__ */ jsx10(RiveNode, { props, ctx, wrap });
|
|
121367
121567
|
// ───────────── forms ─────────────
|
|
121368
121568
|
case "Form":
|
|
121369
|
-
return /* @__PURE__ */
|
|
121569
|
+
return /* @__PURE__ */ jsx10(FormView, { props, ctx, wrap });
|
|
121370
121570
|
case "FormField": {
|
|
121371
121571
|
const fieldRule = effectiveFieldRule({
|
|
121372
121572
|
wrapper: props.validation,
|
|
@@ -121413,82 +121613,82 @@ function renderInner(node, ctx) {
|
|
|
121413
121613
|
inner.modifiers = { ...inner.modifiers ?? {}, accessibilityHint: props.helpText };
|
|
121414
121614
|
}
|
|
121415
121615
|
const showOwnError = !isTextKind && props.errorMessage;
|
|
121416
|
-
return /* @__PURE__ */
|
|
121417
|
-
(fieldLabel || props.required) && /* @__PURE__ */
|
|
121418
|
-
fieldLabel ? /* @__PURE__ */
|
|
121419
|
-
props.required && /* @__PURE__ */
|
|
121616
|
+
return /* @__PURE__ */ jsxs7("div", { style: { width: "100%", ...wrap }, children: [
|
|
121617
|
+
(fieldLabel || props.required) && /* @__PURE__ */ jsxs7("div", { style: { fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(13), color: C2("textPrimary", "#111"), marginBottom: 6 }, children: [
|
|
121618
|
+
fieldLabel ? /* @__PURE__ */ jsx10("span", { id: labelId, children: fieldLabel }) : null,
|
|
121619
|
+
props.required && /* @__PURE__ */ jsx10("span", { "aria-hidden": labelledBy ? "true" : void 0, style: { color: C2("danger", "#e62214") }, children: " *" })
|
|
121420
121620
|
] }),
|
|
121421
121621
|
renderNode(inner, ctx),
|
|
121422
|
-
props.helpText && /* @__PURE__ */
|
|
121423
|
-
showOwnError && /* @__PURE__ */
|
|
121622
|
+
props.helpText && /* @__PURE__ */ jsx10("div", { style: { fontSize: pxToRem(12), color: C2("textSecondary", "#888"), marginTop: 4 }, children: txt(props.helpText, ctx) }),
|
|
121623
|
+
showOwnError && /* @__PURE__ */ jsx10("div", { role: "alert", style: { fontSize: pxToRem(12), color: C2("danger", "#E62214"), marginTop: 4 }, children: txt(props.errorMessage, ctx) })
|
|
121424
121624
|
] });
|
|
121425
121625
|
};
|
|
121426
|
-
return ownKey ? renderField(ownKey) : /* @__PURE__ */
|
|
121626
|
+
return ownKey ? renderField(ownKey) : /* @__PURE__ */ jsx10(FormFieldLabelIdScope, { render: renderField, fieldKey: typeof props.id === "string" && props.id ? props.id : void 0 });
|
|
121427
121627
|
}
|
|
121428
121628
|
case "FieldError":
|
|
121429
|
-
return /* @__PURE__ */
|
|
121629
|
+
return /* @__PURE__ */ jsx10(FieldErrorNode, { props, ctx, wrap });
|
|
121430
121630
|
case "Picker":
|
|
121431
|
-
return /* @__PURE__ */
|
|
121631
|
+
return /* @__PURE__ */ jsx10(InteractivePicker, { props, ctx, wrap });
|
|
121432
121632
|
case "DatePicker":
|
|
121433
|
-
return /* @__PURE__ */
|
|
121633
|
+
return /* @__PURE__ */ jsx10(InteractiveDatePicker, { props, ctx, wrap });
|
|
121434
121634
|
// ───────────── state envelopes ─────────────
|
|
121435
121635
|
case "StatefulSection": {
|
|
121436
121636
|
const branch = isNodeLike(props.data) ? "data" : isNodeLike(props.loading) ? "loading" : isNodeLike(props.error) ? "error" : null;
|
|
121437
121637
|
const cfg = !branch ? props.state === "error" ? props.error ?? props.empty : props.empty ?? props.error : null;
|
|
121438
|
-
return /* @__PURE__ */
|
|
121439
|
-
cfg.title && /* @__PURE__ */
|
|
121440
|
-
(cfg.subtitle ?? cfg.message) && /* @__PURE__ */
|
|
121638
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "column", gap: 6, width: "100%", ...wrap }, children: branch ? renderNode(props[branch], ctx) : cfg && typeof cfg === "object" ? /* @__PURE__ */ jsxs7("div", { style: { textAlign: "center", padding: "24px 12px", color: C2("textSecondary", "#9aa2ad") }, children: [
|
|
121639
|
+
cfg.title && /* @__PURE__ */ jsx10("div", { style: { fontSize: pxToRem(15), fontWeight: 600, color: C2("textPrimary", "#111") }, children: asText2(cfg.title) }),
|
|
121640
|
+
(cfg.subtitle ?? cfg.message) && /* @__PURE__ */ jsx10("div", { style: { fontSize: pxToRem(13), marginTop: 4 }, children: asText2(cfg.subtitle ?? cfg.message) }),
|
|
121441
121641
|
actionTextButton(ctx, cfg.retry ?? cfg.action, asText2(cfg.retryLabel) || asText2(cfg.actionLabel) || (cfg.retry != null ? "Retry" : "Take action"), accentTextColor(ctx), { margin: "12px auto 0", textAlign: "center" })
|
|
121442
121642
|
] }) : null });
|
|
121443
121643
|
}
|
|
121444
121644
|
case "FragmentSlot":
|
|
121445
|
-
return /* @__PURE__ */
|
|
121645
|
+
return /* @__PURE__ */ jsx10(FragmentSlotNode, { props, ctx, wrap, nodeId: node.id });
|
|
121446
121646
|
case "WorkerSubtree":
|
|
121447
|
-
return /* @__PURE__ */
|
|
121647
|
+
return /* @__PURE__ */ jsx10(WorkerSubtreeNode, { props, ctx, wrap, nodeId: node.id });
|
|
121448
121648
|
case "RichContentEditor":
|
|
121449
|
-
return /* @__PURE__ */
|
|
121649
|
+
return /* @__PURE__ */ jsx10(RichContentEditorNode, { props, ctx, wrap, nodeId: node.id });
|
|
121450
121650
|
case "Skeleton": {
|
|
121451
121651
|
const count2 = typeof props.count === "number" ? props.count : 1;
|
|
121452
|
-
if (count2 <= 1) return /* @__PURE__ */
|
|
121453
|
-
return /* @__PURE__ */
|
|
121652
|
+
if (count2 <= 1) return /* @__PURE__ */ jsx10("div", { style: { width: props.width ?? "100%", height: props.height ?? 14, borderRadius: props.cornerRadius ?? 6, background: C2("surfaceTertiary", "#f0f0f3"), flex: "none", ...wrap } });
|
|
121653
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "column", gap: 10, width: "100%", ...wrap }, children: Array.from({ length: count2 }).map((_2, i2) => /* @__PURE__ */ jsx10("div", { style: { height: props.height ?? 22, width: `${100 - i2 * 8}%`, borderRadius: props.cornerRadius ?? 8, background: C2("surfaceTertiary", "#f0f0f3") } }, i2)) });
|
|
121454
121654
|
}
|
|
121455
121655
|
// ───────────── search & filter ─────────────
|
|
121456
121656
|
case "SearchField":
|
|
121457
|
-
return /* @__PURE__ */
|
|
121657
|
+
return /* @__PURE__ */ jsx10(InteractiveSearchField, { props, ctx, wrap });
|
|
121458
121658
|
case "FilterChips":
|
|
121459
|
-
return /* @__PURE__ */
|
|
121659
|
+
return /* @__PURE__ */ jsx10(FilterChipsNode, { props, ctx, wrap });
|
|
121460
121660
|
// ───────────── navigation ─────────────
|
|
121461
121661
|
case "Tabs":
|
|
121462
|
-
return /* @__PURE__ */
|
|
121662
|
+
return /* @__PURE__ */ jsx10(TabsNode, { props, ctx, wrap });
|
|
121463
121663
|
case "SegmentedControl":
|
|
121464
|
-
return /* @__PURE__ */
|
|
121664
|
+
return /* @__PURE__ */ jsx10(SegmentedControlNode, { props, ctx, wrap });
|
|
121465
121665
|
case "Carousel":
|
|
121466
121666
|
case "Pager": {
|
|
121467
121667
|
const items = (type === "Carousel" ? props.items : props.pages) ?? [];
|
|
121468
121668
|
const carItemsPath = props.itemsPath ?? props.items_path;
|
|
121469
121669
|
if (carItemsPath && items[0] && ctx.provider) {
|
|
121470
|
-
return /* @__PURE__ */
|
|
121670
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: "100%", ...wrap }, children: /* @__PURE__ */ jsx10("div", { style: { display: "flex", overflowX: "auto", gap: 12, width: "100%" }, children: /* @__PURE__ */ jsx10(BoundList, { ctx, itemsPath: carItemsPath, template: items[0], renderRow: (t2, ic) => /* @__PURE__ */ jsx10("div", { style: { flex: "0 0 auto" }, children: renderNode(t2, ic) }) }) }) });
|
|
121471
121671
|
}
|
|
121472
|
-
if (type === "Carousel") return /* @__PURE__ */
|
|
121473
|
-
return /* @__PURE__ */
|
|
121672
|
+
if (type === "Carousel") return /* @__PURE__ */ jsx10(CarouselNode, { props, ctx, wrap });
|
|
121673
|
+
return /* @__PURE__ */ jsx10(PagingNode, { props: { ...props, __pager: true }, ctx, wrap });
|
|
121474
121674
|
}
|
|
121475
121675
|
case "StepIndicator": {
|
|
121476
121676
|
const steps = Array.isArray(props.steps) ? props.steps : [];
|
|
121477
121677
|
const cur = props.currentIndex ?? 0;
|
|
121478
|
-
return /* @__PURE__ */
|
|
121678
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", alignItems: "center", gap: 8, width: "100%", justifyContent: "center", ...wrap }, children: steps.map((_2, i2) => /* @__PURE__ */ jsx10("span", { style: { height: 9, width: i2 === cur ? 22 : 9, borderRadius: 999, background: i2 <= cur ? C2("accentPrimary", "#116DFF") : C2("border", "#ccc") } }, i2)) });
|
|
121479
121679
|
}
|
|
121480
121680
|
case "CollapsingHeader":
|
|
121481
|
-
return /* @__PURE__ */
|
|
121681
|
+
return /* @__PURE__ */ jsx10(CollapsingHeaderNode, { props, ctx, wrap });
|
|
121482
121682
|
case "AvatarStrip":
|
|
121483
|
-
return /* @__PURE__ */
|
|
121683
|
+
return /* @__PURE__ */ jsx10(AvatarStripNode, { props, ctx, wrap });
|
|
121484
121684
|
// ───────────── feedback ─────────────
|
|
121485
121685
|
case "Banner":
|
|
121486
|
-
return /* @__PURE__ */
|
|
121686
|
+
return /* @__PURE__ */ jsx10(BannerNode, { props, ctx, wrap });
|
|
121487
121687
|
case "Snackbar": {
|
|
121488
121688
|
const dot = sevColor(ctx, props.severity ?? "info");
|
|
121489
|
-
return /* @__PURE__ */
|
|
121490
|
-
/* @__PURE__ */
|
|
121491
|
-
/* @__PURE__ */
|
|
121689
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 10, background: "#1c1f26", color: "#fff", borderRadius: ctx.radius("md", 10), padding: "12px 14px", width: "100%", boxSizing: "border-box", fontFamily: bodyFont(ctx), fontWeight: 500, fontSize: pxToRem(14), ...wrap }, children: [
|
|
121690
|
+
/* @__PURE__ */ jsx10("span", { style: { width: 18, height: 18, borderRadius: "50%", background: dot, display: "grid", placeItems: "center", fontSize: 11, flex: "none" }, children: "\u2713" }),
|
|
121691
|
+
/* @__PURE__ */ jsx10("span", { style: { flex: 1, minWidth: 0 }, children: txt(props.message, ctx) }),
|
|
121492
121692
|
actionTextButton(ctx, props.action, asBoundText(props.actionLabel, ctx) || "Take action", "#fff", { flex: "none", textDecoration: "underline" })
|
|
121493
121693
|
] });
|
|
121494
121694
|
}
|
|
@@ -121501,25 +121701,25 @@ function renderInner(node, ctx) {
|
|
|
121501
121701
|
// it. A presented alert is `presentation: "alert"` on a navigating Action, which the web host
|
|
121502
121702
|
// draws as its own modal dialog.
|
|
121503
121703
|
case "AlertDialog":
|
|
121504
|
-
return /* @__PURE__ */
|
|
121505
|
-
/* @__PURE__ */
|
|
121506
|
-
/* @__PURE__ */
|
|
121507
|
-
/* @__PURE__ */
|
|
121508
|
-
props.cancelAction != null && /* @__PURE__ */
|
|
121509
|
-
props.confirmAction != null && /* @__PURE__ */
|
|
121704
|
+
return /* @__PURE__ */ jsxs7("div", { role: "alertdialog", "aria-label": props.title != null ? asBoundText(props.title, ctx) : "Alert", style: { background: C2("surfacePrimary", "#fff"), borderRadius: ctx.radius("lg", 14), padding: 18, width: "100%", boxSizing: "border-box", border: `1px solid ${C2("border", "#e3e3e3")}`, boxShadow: "0 12px 30px -12px rgba(0,0,0,.4)", ...wrap }, children: [
|
|
121705
|
+
/* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontWeight: 700, fontSize: pxToRem(17), color: C2("textPrimary", "#111") }, children: txt(props.title, ctx) }),
|
|
121706
|
+
/* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(14), lineHeight: 1.45, color: C2("textSecondary", "#666"), margin: "6px 0 16px" }, children: txt(props.message, ctx) }),
|
|
121707
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 10 }, children: [
|
|
121708
|
+
props.cancelAction != null && /* @__PURE__ */ jsx10("button", { type: "button", onClick: actionClick(ctx, props.cancelAction), style: { flex: 1, textAlign: "center", padding: 11, borderRadius: ctx.radius("md", 8), appearance: "none", WebkitAppearance: "none", border: "none", fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(15), background: C2("surfaceTertiary", "#eee"), color: C2("textPrimary", "#111"), cursor: ctx.onAction ? "pointer" : "default" }, children: asBoundText(props.cancelLabel, ctx) || "Cancel" }),
|
|
121709
|
+
props.confirmAction != null && /* @__PURE__ */ jsx10("button", { type: "button", onClick: actionClick(ctx, props.confirmAction), style: { flex: 1, textAlign: "center", padding: 11, borderRadius: ctx.radius("md", 8), appearance: "none", WebkitAppearance: "none", border: "none", fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(15), background: props.destructive ? C2("danger", "#E62214") : C2("accentPrimary", "#116DFF"), color: "#fff", cursor: ctx.onAction ? "pointer" : "default" }, children: asBoundText(props.confirmLabel, ctx) || (props.destructive ? "Delete" : "Confirm") })
|
|
121510
121710
|
] })
|
|
121511
121711
|
] });
|
|
121512
121712
|
// ───────────── embeddable WebView ─────────────
|
|
121513
121713
|
case "WebView":
|
|
121514
|
-
return /* @__PURE__ */
|
|
121714
|
+
return /* @__PURE__ */ jsx10(WebViewNode, { props, ctx, wrap });
|
|
121515
121715
|
// ───────────── app intents + unknown ─────────────
|
|
121516
121716
|
default: {
|
|
121517
121717
|
const intent = pkg ? ctx.intents?.[`${pkg}.${type}`] : void 0;
|
|
121518
|
-
if (intent) return /* @__PURE__ */
|
|
121718
|
+
if (intent) return /* @__PURE__ */ jsx10("div", { style: { alignSelf: "stretch", ...wrap }, children: intent(props, ctx) });
|
|
121519
121719
|
const childKeys = Object.entries(props).filter(([, v2]) => isNodeLike(v2) || Array.isArray(v2) && v2.some(isNodeLike));
|
|
121520
|
-
return /* @__PURE__ */
|
|
121521
|
-
/* @__PURE__ */
|
|
121522
|
-
childKeys.map(([k2, v2]) => /* @__PURE__ */
|
|
121720
|
+
return /* @__PURE__ */ jsxs7("div", { "data-unknown-type": type, style: { display: "flex", flexDirection: "column", gap: 6, padding: 6, border: `1px dashed ${C2("border", "#c5cdd6")}`, borderRadius: 6, ...wrap }, children: [
|
|
121721
|
+
/* @__PURE__ */ jsx10("div", { style: { alignSelf: "flex-start", fontSize: pxToRem(9), fontWeight: 700, letterSpacing: 0.4, padding: "1px 6px", borderRadius: 999, background: C2("surfaceTertiary", "#f0f0f3"), color: C2("textSecondary", "#9aa2ad"), fontFamily: "ui-monospace, monospace" }, children: type }),
|
|
121722
|
+
childKeys.map(([k2, v2]) => /* @__PURE__ */ jsx10(React9.Fragment, { children: Array.isArray(v2) ? kids2(v2.filter(isNodeLike), ctx) : renderNode(v2, ctx) }, k2))
|
|
121523
121723
|
] });
|
|
121524
121724
|
}
|
|
121525
121725
|
}
|
|
@@ -121543,6 +121743,8 @@ var init_renderNode = __esm({
|
|
|
121543
121743
|
init_env();
|
|
121544
121744
|
init_actionParams();
|
|
121545
121745
|
init_icons();
|
|
121746
|
+
init_picker_field();
|
|
121747
|
+
init_pickerField();
|
|
121546
121748
|
init_symbolEffects();
|
|
121547
121749
|
init_webviewFrame();
|
|
121548
121750
|
init_richContentEditor();
|
|
@@ -121576,7 +121778,7 @@ var init_renderNode = __esm({
|
|
|
121576
121778
|
ro2.observe(el2);
|
|
121577
121779
|
return () => ro2.disconnect();
|
|
121578
121780
|
}, [base, medium, expanded, initialCols, seedWidth]);
|
|
121579
|
-
return /* @__PURE__ */
|
|
121781
|
+
return /* @__PURE__ */ jsx10(
|
|
121580
121782
|
"div",
|
|
121581
121783
|
{
|
|
121582
121784
|
ref,
|
|
@@ -121605,7 +121807,7 @@ var init_renderNode = __esm({
|
|
|
121605
121807
|
ro2.observe(el2);
|
|
121606
121808
|
return () => ro2.disconnect();
|
|
121607
121809
|
}, [initialWide, seedWidth]);
|
|
121608
|
-
return /* @__PURE__ */
|
|
121810
|
+
return /* @__PURE__ */ jsxs7(
|
|
121609
121811
|
"div",
|
|
121610
121812
|
{
|
|
121611
121813
|
ref,
|
|
@@ -121613,8 +121815,8 @@ var init_renderNode = __esm({
|
|
|
121613
121815
|
"data-layout": wide ? "row" : "column",
|
|
121614
121816
|
style: { display: "flex", flexDirection: wide ? "row" : "column", gap: SPLIT_COLUMN_GAP, width: "100%", alignItems: "stretch", ...extra },
|
|
121615
121817
|
children: [
|
|
121616
|
-
/* @__PURE__ */
|
|
121617
|
-
/* @__PURE__ */
|
|
121818
|
+
/* @__PURE__ */ jsx10("div", { "data-testid": "split-primary", style: wide ? { flex: `0 0 ${primaryMaxWidth}px`, maxWidth: primaryMaxWidth, minWidth: 0 } : { width: "100%" }, children: primary }),
|
|
121819
|
+
/* @__PURE__ */ jsx10("div", { "data-testid": "split-detail", style: { flex: "1 1 0%", minWidth: 0 }, children: detail })
|
|
121618
121820
|
]
|
|
121619
121821
|
}
|
|
121620
121822
|
);
|
|
@@ -121623,7 +121825,7 @@ var init_renderNode = __esm({
|
|
|
121623
121825
|
appearKeyframesInjected = false;
|
|
121624
121826
|
pressStylesInjected = false;
|
|
121625
121827
|
REVEAL_ON_FOCUS_ATTR = "data-hm-reveal-on-focus";
|
|
121626
|
-
FOCUS_RING_CSS = `:where(button,a,[href],input,select,textarea,[role="button"],[tabindex]):focus-visible{outline:2px solid var(--himi-accent,#116DFF);outline-offset:2px;border-radius:4px}[data-himalaya-tap-group]:has(>[data-himalaya-tap-activator]:focus-visible){outline:2px solid var(--himi-accent,#116DFF);outline-offset:2px}[${REVEAL_ON_FOCUS_ATTR}]:focus{width:auto!important;height:auto!important;margin:0!important;padding:2px 6px!important;clip:auto!important;clip-path:none!important;overflow:visible!important;top:2px;inset-inline-end:2px;z-index:2;border-radius:4px;outline:2px solid var(--himi-accent,#116DFF);outline-offset:1px}:has(>[${REVEAL_ON_FOCUS_ATTR}]:focus){overflow:visible!important;z-index:3}`;
|
|
121828
|
+
FOCUS_RING_CSS = `:where(button,a,[href],input,select,textarea,[role="button"],[tabindex]):focus-visible{outline:2px solid var(--himi-accent,#116DFF);outline-offset:2px;border-radius:4px}[data-hm-picker-focus]:has(> select:focus-visible) [data-picker-field]{outline:2px solid var(--himi-accent,#116DFF);outline-offset:2px;border-radius:4px}[data-himalaya-tap-group]:has(>[data-himalaya-tap-activator]:focus-visible){outline:2px solid var(--himi-accent,#116DFF);outline-offset:2px}[${REVEAL_ON_FOCUS_ATTR}]:focus{width:auto!important;height:auto!important;margin:0!important;padding:2px 6px!important;clip:auto!important;clip-path:none!important;overflow:visible!important;top:2px;inset-inline-end:2px;z-index:2;border-radius:4px;outline:2px solid var(--himi-accent,#116DFF);outline-offset:1px}:has(>[${REVEAL_ON_FOCUS_ATTR}]:focus){overflow:visible!important;z-index:3}`;
|
|
121627
121829
|
focusStylesInjected = false;
|
|
121628
121830
|
HLIST_CHILD_CSS = "[data-himalaya-hlist]>*{flex:0 0 auto}";
|
|
121629
121831
|
hListStylesInjected = false;
|
|
@@ -121675,12 +121877,12 @@ var init_renderNode = __esm({
|
|
|
121675
121877
|
}
|
|
121676
121878
|
};
|
|
121677
121879
|
bodyFont = (ctx) => fontStack(ctx.font("body").family, ctx.idiom);
|
|
121678
|
-
kids2 = (arr, ctx) => Array.isArray(arr) ? arr.map((n2, i2) => /* @__PURE__ */
|
|
121880
|
+
kids2 = (arr, ctx) => Array.isArray(arr) ? arr.map((n2, i2) => /* @__PURE__ */ jsx10(React9.Fragment, { children: renderNode(n2, ctx) }, n2?.id ?? i2)) : null;
|
|
121679
121881
|
rowKidCtx = (n2, ctx) => wantsRowStretch(n2) ? { ...ctx, rowStretch: true } : normalize(n2).type === "Divider" ? { ...ctx, rowDivider: true } : ctx;
|
|
121680
|
-
rowKids = (arr, ctx) => Array.isArray(arr) ? arr.map((n2, i2) => /* @__PURE__ */
|
|
121882
|
+
rowKids = (arr, ctx) => Array.isArray(arr) ? arr.map((n2, i2) => /* @__PURE__ */ jsx10(React9.Fragment, { children: renderNode(n2, rowKidCtx(n2, ctx)) }, n2?.id ?? i2)) : null;
|
|
121681
121883
|
staggeredKids = (arr, ctx, staggerMs) => Array.isArray(arr) ? arr.map((n2, i2) => {
|
|
121682
121884
|
const el2 = renderNode(n2, ctx);
|
|
121683
|
-
if (!React9.isValidElement(el2)) return /* @__PURE__ */
|
|
121885
|
+
if (!React9.isValidElement(el2)) return /* @__PURE__ */ jsx10(React9.Fragment, { children: el2 }, n2?.id ?? i2);
|
|
121684
121886
|
const prev = el2.props.style ?? {};
|
|
121685
121887
|
return React9.cloneElement(el2, { key: n2?.id ?? i2, style: { ...prev, animationDelay: `${i2 * staggerMs}ms` } });
|
|
121686
121888
|
}) : null;
|
|
@@ -121713,7 +121915,7 @@ var init_renderNode = __esm({
|
|
|
121713
121915
|
for (const [k2, v2] of Object.entries(params)) {
|
|
121714
121916
|
if (typeof v2 === "string" && v2.startsWith("$item")) resolved2[k2] = resolveScalarStatic(v2, ctx);
|
|
121715
121917
|
}
|
|
121716
|
-
return /* @__PURE__ */
|
|
121918
|
+
return /* @__PURE__ */ jsx10(Fragment4, { children: formatInterpolated(pattern, params, resolved2, ctx) });
|
|
121717
121919
|
};
|
|
121718
121920
|
txt = (v2, ctx) => {
|
|
121719
121921
|
if (!isBinding(v2)) return asText2(v2);
|
|
@@ -121724,7 +121926,7 @@ var init_renderNode = __esm({
|
|
|
121724
121926
|
if (resolved2 != null) return asTextL10n(resolved2, ctx);
|
|
121725
121927
|
return ctx.itemScope ? null : bindingPlaceholder(v2, ctx);
|
|
121726
121928
|
}
|
|
121727
|
-
if (ctx.provider) return /* @__PURE__ */
|
|
121929
|
+
if (ctx.provider) return /* @__PURE__ */ jsx10(Bound, { ctx, binding: v2, render: (val) => asTextL10n(val, ctx) });
|
|
121728
121930
|
return bindingPlaceholder(v2, ctx);
|
|
121729
121931
|
};
|
|
121730
121932
|
selectFragmentCase = (props, discriminator) => {
|
|
@@ -121774,9 +121976,9 @@ var init_renderNode = __esm({
|
|
|
121774
121976
|
// padding adds OUTSIDE the 100% width, so the slot renders wider than its parent
|
|
121775
121977
|
// and the right edge clips (branded-lite's home is a FragmentSlot → 32px cut in
|
|
121776
121978
|
// the phone preview). Included before ...extra so a modifier can still override.
|
|
121777
|
-
/* @__PURE__ */
|
|
121778
|
-
selected?.content ? /* @__PURE__ */
|
|
121779
|
-
/* @__PURE__ */
|
|
121979
|
+
/* @__PURE__ */ jsxs7("div", { "data-fragment-slot": slotId ?? "", "data-fragment-case": selectedId, style: { width: "100%", boxSizing: "border-box", ...extra }, children: [
|
|
121980
|
+
selected?.content ? /* @__PURE__ */ jsx10(React9.Fragment, { children: renderNode(selected.content, ctx) }, selectedId) : null,
|
|
121981
|
+
/* @__PURE__ */ jsx10("span", { "aria-live": "polite", style: { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", border: 0 }, children: announcement })
|
|
121780
121982
|
] })
|
|
121781
121983
|
);
|
|
121782
121984
|
};
|
|
@@ -121787,7 +121989,7 @@ var init_renderNode = __esm({
|
|
|
121787
121989
|
const discriminator = isService ? bound : isEnvExpr(casePath) ? evalEnvExpr(casePath, ctxEnv(ctx)) : resolveScalarStatic(casePath, ctx);
|
|
121788
121990
|
return fragmentSlotContent({ props, ctx, discriminator, slotId: nodeId, extra: wrap });
|
|
121789
121991
|
});
|
|
121790
|
-
RichContentEditorNode = withExtras("RichContentEditorNode", ({ props, ctx, wrap, nodeId }) => /* @__PURE__ */
|
|
121992
|
+
RichContentEditorNode = withExtras("RichContentEditorNode", ({ props, ctx, wrap, nodeId }) => /* @__PURE__ */ jsx10(RichContentEditorView, { props, ctx, wrap, nodeId, renderChild: (n2) => renderNode(n2, ctx) }));
|
|
121791
121993
|
MediaFieldNode = withExtras("MediaFieldNode", ({ props, ctx, wrap }) => {
|
|
121792
121994
|
const C2 = ctx.color;
|
|
121793
121995
|
const servicePathStr = mediaFieldServicePath(props.valuePath);
|
|
@@ -121832,7 +122034,7 @@ var init_renderNode = __esm({
|
|
|
121832
122034
|
};
|
|
121833
122035
|
const f2 = ctx.font("bodyEmphasis");
|
|
121834
122036
|
const radius = 12;
|
|
121835
|
-
return /* @__PURE__ */
|
|
122037
|
+
return /* @__PURE__ */ jsxs7(
|
|
121836
122038
|
"div",
|
|
121837
122039
|
{
|
|
121838
122040
|
role: "button",
|
|
@@ -121849,13 +122051,13 @@ var init_renderNode = __esm({
|
|
|
121849
122051
|
},
|
|
121850
122052
|
style: { position: "relative", display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: 160, borderRadius: radius, overflow: "hidden", background: C2("surfaceSecondary", "#F2F3F5"), cursor: "pointer", boxSizing: "border-box", ...wrap },
|
|
121851
122053
|
children: [
|
|
121852
|
-
/* @__PURE__ */
|
|
121853
|
-
imageUrl ? /* @__PURE__ */
|
|
122054
|
+
/* @__PURE__ */ jsx10("input", { ref: fileRef, type: "file", accept: "image/*", tabIndex: -1, "aria-hidden": "true", onChange: onPick, onClick: (e2) => e2.stopPropagation(), style: { display: "none" } }),
|
|
122055
|
+
imageUrl ? /* @__PURE__ */ jsx10("img", { src: resolveAssetUrl(imageUrl, ctx.assetBaseUrl), alt: "", "aria-hidden": "true", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover", display: "block" } }) : /* @__PURE__ */ jsxs7("div", { "aria-hidden": "true", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8, color: accentTextColor(ctx) }, children: [
|
|
121854
122056
|
iconSvg("camera", { size: 28, color: accentTextColor(ctx) }),
|
|
121855
|
-
/* @__PURE__ */
|
|
122057
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: fontStack(f2.family, ctx.idiom), fontWeight: f2.weight, fontSize: f2.remSize }, children: name })
|
|
121856
122058
|
] }),
|
|
121857
|
-
uploading ? /* @__PURE__ */
|
|
121858
|
-
failed2 && !uploading ? /* @__PURE__ */
|
|
122059
|
+
uploading ? /* @__PURE__ */ jsx10("div", { "aria-hidden": "true", "data-media-uploading": "true", style: { position: "absolute", inset: 0, background: "rgba(0,0,0,0.35)" } }) : null,
|
|
122060
|
+
failed2 && !uploading ? /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", "data-media-upload-error": "true", style: { position: "absolute", left: 8, right: 8, bottom: 8, textAlign: "center", fontSize: pxToRem(13), color: C2("danger", "#E62214") }, children: MEDIA_FIELD_UPLOAD_FAILED }) : null
|
|
121859
122061
|
]
|
|
121860
122062
|
}
|
|
121861
122063
|
);
|
|
@@ -121899,7 +122101,7 @@ var init_renderNode = __esm({
|
|
|
121899
122101
|
const component = validation.ok ? validation.component : fallback;
|
|
121900
122102
|
const reason = validation.ok ? "accepted" : validation.reason;
|
|
121901
122103
|
const maxHeight = Number.isInteger(policy?.maxHeight) && policy.maxHeight > 0 ? Math.min(policy.maxHeight, WORKER_SUBTREE_CEILINGS.maxHeight) : WORKER_SUBTREE_CEILINGS.maxHeight;
|
|
121902
|
-
return /* @__PURE__ */
|
|
122104
|
+
return /* @__PURE__ */ jsx10("div", { "data-worker-subtree": slotId ?? "", "data-worker-subtree-status": reason, style: { width: "100%", maxHeight, overflow: "hidden", ...extra }, children: component ? renderNode(component, ctx) : null });
|
|
121903
122105
|
});
|
|
121904
122106
|
RichContentNode = withExtras("RichContentNode", ({ props, ctx, wrap, nodeId }) => {
|
|
121905
122107
|
const componentId = nodeId ?? "";
|
|
@@ -121918,12 +122120,12 @@ var init_renderNode = __esm({
|
|
|
121918
122120
|
ctx.emitTelemetry?.("rich_content_rejected", { componentId, reason }, ctx.screenId);
|
|
121919
122121
|
}, [ctx, componentId, reason, raw]);
|
|
121920
122122
|
const style = { width: "100%", display: "flex", flexDirection: "column", gap: 12, ...wrap };
|
|
121921
|
-
if (result === null) return /* @__PURE__ */
|
|
122123
|
+
if (result === null) return /* @__PURE__ */ jsx10("div", { "data-rich-content-status": "pending", style });
|
|
121922
122124
|
if ("rejected" in result) {
|
|
121923
122125
|
const fallback = props.fallback;
|
|
121924
|
-
return /* @__PURE__ */
|
|
122126
|
+
return /* @__PURE__ */ jsx10("div", { "data-rich-content-status": result.rejected, style, children: fallback ? renderNode(fallback, ctx) : null });
|
|
121925
122127
|
}
|
|
121926
|
-
return /* @__PURE__ */
|
|
122128
|
+
return /* @__PURE__ */ jsx10("div", { "data-rich-content-status": "ok", style, children: /* @__PURE__ */ jsx10(RichContentBlocks, { blocks: result.blocks, componentId, onLink: props.onLink ?? props.on_link, ctx, render: renderNode }) });
|
|
121927
122129
|
});
|
|
121928
122130
|
resolveItemDeep2 = (v2, ctx) => {
|
|
121929
122131
|
if (typeof v2 === "string") return isBinding(v2) && v2.startsWith("$item") ? resolveScalarStatic(v2, ctx) : v2;
|
|
@@ -122020,11 +122222,11 @@ var init_renderNode = __esm({
|
|
|
122020
122222
|
return () => unsubs.forEach((unsubscribe) => unsubscribe());
|
|
122021
122223
|
}, [ctx.provider, bindingKey]);
|
|
122022
122224
|
const rendered = renderNodeInner(node, ctx);
|
|
122023
|
-
return /* @__PURE__ */
|
|
122225
|
+
return /* @__PURE__ */ jsx10(Fragment4, { children: style ? withRootStyle(rendered, style) : rendered });
|
|
122024
122226
|
};
|
|
122025
122227
|
HiddenGate = ({ ctx, binding: binding2, children }) => {
|
|
122026
122228
|
const v2 = useBoundValue(ctx, binding2);
|
|
122027
|
-
return hiddenBool(v2) ? null : /* @__PURE__ */
|
|
122229
|
+
return hiddenBool(v2) ? null : /* @__PURE__ */ jsx10(Fragment4, { children });
|
|
122028
122230
|
};
|
|
122029
122231
|
KEYBOARD_INPUT_MODES = { email: "email", phone: "tel", number: "numeric", decimal: "decimal", url: "url" };
|
|
122030
122232
|
AUTOCAPITALIZE_VALUES = /* @__PURE__ */ new Set(["none", "words", "sentences", "characters"]);
|
|
@@ -122252,24 +122454,24 @@ var init_renderNode = __esm({
|
|
|
122252
122454
|
submit();
|
|
122253
122455
|
};
|
|
122254
122456
|
const inputBase = { flex: 1, minWidth: 0, minHeight: multilineBox ? 44 : void 0, alignSelf: "stretch", border: "none", outline: "none", background: "transparent", padding: multilineBox ? 0 : "11px 0", margin: 0, width: "100%", boxSizing: "border-box", fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#13171e"), resize: "none" };
|
|
122255
|
-
const accIcon = (name) => /* @__PURE__ */
|
|
122457
|
+
const accIcon = (name) => /* @__PURE__ */ jsx10("span", { style: { display: "inline-grid", placeItems: "center", width: 18, height: 18, flex: "none" }, children: iconSvg(name, { size: 17, color: muted }) });
|
|
122256
122458
|
const box = borderless ? { display: "flex", alignItems: "center", gap: 8, width: "100%", boxSizing: "border-box", ...wrap } : { display: "flex", alignItems: "center", gap: 8, width: "100%", background: C2("surfacePrimary", "#fff"), border: `1px solid ${errored ? C2("danger", "#E62214") : C2("border", "#e3e3e3")}`, borderRadius: ctx.radius("md", 8), padding: multilineBox ? "11px 14px" : "0 14px", boxSizing: "border-box", minHeight: multilineBox ? 48 : 44, ...wrap };
|
|
122257
122459
|
const composedBox = addIntrinsicPadding(box, wrap) ?? box;
|
|
122258
|
-
return /* @__PURE__ */
|
|
122259
|
-
fieldLabel ? /* @__PURE__ */
|
|
122260
|
-
/* @__PURE__ */
|
|
122460
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" }, children: [
|
|
122461
|
+
fieldLabel ? /* @__PURE__ */ jsx10("label", { htmlFor: fieldDomId, style: { fontSize: 12, color: C2("textSecondary", "#636b78") }, children: fieldLabel }) : null,
|
|
122462
|
+
/* @__PURE__ */ jsxs7("div", { style: composedBox, children: [
|
|
122261
122463
|
props.leadingIcon && accIcon(props.leadingIcon),
|
|
122262
|
-
prefixText && /* @__PURE__ */
|
|
122263
|
-
multilineBox ? /* @__PURE__ */
|
|
122264
|
-
suffixText && /* @__PURE__ */
|
|
122265
|
-
props.clearButton && local && /* @__PURE__ */
|
|
122464
|
+
prefixText && /* @__PURE__ */ jsx10("span", { style: { color: muted, flex: "none" }, children: prefixText }),
|
|
122465
|
+
multilineBox ? /* @__PURE__ */ jsx10("textarea", { "data-component-id": componentId, id: fieldDomId, "data-component-type": componentType, ...a11yFwd, ref: inputRef, value: local, onChange: onInput, onKeyDown, onFocus: onFieldFocus, onBlur: onFieldBlur, placeholder: placeholder2, rows: 2, "aria-label": ariaLabelProp ?? placeholderName, "aria-labelledby": labelledBy, "aria-required": required3, "aria-invalid": errored || void 0, "aria-describedby": [errorId, describedByProp].filter(Boolean).join(" ") || void 0, inputMode, autoCapitalize, maxLength, autoCorrect: suggestOff ? "off" : suggestOn ? "on" : void 0, spellCheck: suggestOff ? false : suggestOn ? true : void 0, autoComplete: suggestOff ? "off" : void 0, style: inputBase }) : /* @__PURE__ */ jsx10("input", { "data-component-id": componentId, id: htmlId, "data-component-type": componentType, ...a11yFwd, ref: inputRef, type: secure ? "password" : "text", value: local, onChange: onInput, onKeyDown, onFocus: onFieldFocus, onBlur: onFieldBlur, placeholder: placeholder2, "aria-label": ariaLabelProp ?? placeholderName, "aria-labelledby": labelledBy, "aria-required": required3, "aria-invalid": errored || void 0, "aria-describedby": [errorId, describedByProp].filter(Boolean).join(" ") || void 0, inputMode, autoCapitalize, maxLength, autoCorrect: suggestOff ? "off" : suggestOn ? "on" : void 0, spellCheck: suggestOff ? false : suggestOn ? true : void 0, autoComplete: suggestOff ? "off" : void 0, enterKeyHint, style: inputBase }),
|
|
122466
|
+
suffixText && /* @__PURE__ */ jsx10("span", { style: { color: muted, flex: "none" }, children: suffixText }),
|
|
122467
|
+
props.clearButton && local && /* @__PURE__ */ jsx10("span", { onClick: () => {
|
|
122266
122468
|
setLocal("");
|
|
122267
122469
|
setEdited(true);
|
|
122268
122470
|
emit("");
|
|
122269
122471
|
}, style: { display: "inline-grid", placeItems: "center", width: 18, height: 18, borderRadius: "50%", background: C2("surfaceTertiary", "#e3e6ea"), color: muted, fontSize: 12, flex: "none", cursor: "pointer" }, children: "\xD7" }),
|
|
122270
122472
|
props.trailingIcon && accIcon(props.trailingIcon)
|
|
122271
122473
|
] }),
|
|
122272
|
-
revealed ? /* @__PURE__ */
|
|
122474
|
+
revealed ? /* @__PURE__ */ jsx10("span", { id: errorId, role: "alert", style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(12), color: C2("danger", "#E62214"), paddingLeft: 2 }, children: message }) : (props.helperText ?? cfg.helperText) != null ? /* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(12), color: errored ? C2("danger", "#E62214") : muted, paddingLeft: 2 }, children: txt(props.helperText ?? cfg.helperText, ctx) }) : null
|
|
122273
122475
|
] });
|
|
122274
122476
|
};
|
|
122275
122477
|
MenuNode = withExtras("MenuNode", ({ props, ctx, wrap }) => {
|
|
@@ -122298,7 +122500,9 @@ var init_renderNode = __esm({
|
|
|
122298
122500
|
}, [open]);
|
|
122299
122501
|
const modal = isOverlayModal("Menu", props.modal);
|
|
122300
122502
|
const anchorLabel = props.anchor?.modifiers?.accessibilityLabel || "More actions";
|
|
122301
|
-
const
|
|
122503
|
+
const flexGrow = typeof wrap?.flex === "string" ? parseFloat(wrap.flex) : typeof wrap?.flex === "number" ? wrap.flex : Number(wrap?.flexGrow ?? 0);
|
|
122504
|
+
const fill = wrap?.width === "100%" || Number.isFinite(flexGrow) && flexGrow > 0;
|
|
122505
|
+
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 };
|
|
122302
122506
|
const anchorRef = React9.useRef(null);
|
|
122303
122507
|
const menuRef = React9.useRef(null);
|
|
122304
122508
|
const dialogRef = React9.useRef(null);
|
|
@@ -122330,8 +122534,8 @@ var init_renderNode = __esm({
|
|
|
122330
122534
|
e2.preventDefault();
|
|
122331
122535
|
items2[next].focus();
|
|
122332
122536
|
};
|
|
122333
|
-
return /* @__PURE__ */
|
|
122334
|
-
/* @__PURE__ */
|
|
122537
|
+
return /* @__PURE__ */ jsxs7("span", { ref: hostRef, "data-menu-fill": fill ? "" : void 0, style: { position: "relative", display: fill ? "flex" : "inline-flex", ...wrap }, children: [
|
|
122538
|
+
/* @__PURE__ */ jsx10(
|
|
122335
122539
|
"span",
|
|
122336
122540
|
{
|
|
122337
122541
|
ref: anchorRef,
|
|
@@ -122351,11 +122555,11 @@ var init_renderNode = __esm({
|
|
|
122351
122555
|
setOpen((v2) => !v2);
|
|
122352
122556
|
}
|
|
122353
122557
|
},
|
|
122354
|
-
style: { display: "inline-flex", alignItems: "center", justifyContent: "center", minWidth: 44, minHeight: 44, cursor: "pointer" },
|
|
122355
|
-
children: props.anchor ? renderNode(props.anchor, ctx) : iconSvg("more", { size: 20, color: C2("textSecondary", "#636b78") })
|
|
122558
|
+
style: { display: fill ? "flex" : "inline-flex", alignItems: "center", justifyContent: fill ? "stretch" : "center", ...fill ? { flex: "1 1 auto", width: "100%" } : {}, minWidth: 44, minHeight: 44, cursor: "pointer" },
|
|
122559
|
+
children: props.anchor ? fill ? /* @__PURE__ */ jsx10("span", { style: { display: "block", flex: "1 1 auto", minWidth: 0 }, children: renderNode(props.anchor, ctx) }) : renderNode(props.anchor, ctx) : iconSvg("more", { size: 20, color: C2("textSecondary", "#636b78") })
|
|
122356
122560
|
}
|
|
122357
122561
|
),
|
|
122358
|
-
open && wrapModalMenu(modal, anchorLabel, popupPlacement, dialogRef, /* @__PURE__ */
|
|
122562
|
+
open && wrapModalMenu(modal, anchorLabel, popupPlacement, dialogRef, /* @__PURE__ */ jsx10(
|
|
122359
122563
|
"div",
|
|
122360
122564
|
{
|
|
122361
122565
|
ref: menuRef,
|
|
@@ -122363,7 +122567,7 @@ var init_renderNode = __esm({
|
|
|
122363
122567
|
tabIndex: modal ? -1 : void 0,
|
|
122364
122568
|
onKeyDown: trapTab,
|
|
122365
122569
|
style: { ...modal ? {} : popupPlacement, display: "flex", flexDirection: "column", minWidth: 180, background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 12, boxShadow: "0 6px 20px rgba(0,0,0,.12)", overflow: "hidden", padding: 4 },
|
|
122366
|
-
children: items.map((it2, i2) => /* @__PURE__ */
|
|
122570
|
+
children: items.map((it2, i2) => /* @__PURE__ */ jsxs7(
|
|
122367
122571
|
"div",
|
|
122368
122572
|
{
|
|
122369
122573
|
role: "menuitem",
|
|
@@ -122384,8 +122588,8 @@ var init_renderNode = __esm({
|
|
|
122384
122588
|
} : void 0,
|
|
122385
122589
|
style: { display: "flex", alignItems: "center", gap: 10, padding: "9px 10px", borderRadius: 8, cursor: it2?.disabled ? "default" : "pointer", opacity: it2?.disabled ? 0.4 : 1, color: it2?.destructive ? C2("danger", "#E62214") : C2("textPrimary", "#13171e"), fontFamily: bodyFont(ctx), fontSize: pxToRem(15) },
|
|
122386
122590
|
children: [
|
|
122387
|
-
it2?.icon && /* @__PURE__ */
|
|
122388
|
-
/* @__PURE__ */
|
|
122591
|
+
it2?.icon && /* @__PURE__ */ jsx10("span", { style: { display: "inline-grid", placeItems: "center", width: 20, height: 20 }, children: iconSvg(it2.icon, { size: 18, color: it2?.destructive ? C2("danger", "#E62214") : C2("textSecondary", "#636b78") }) }),
|
|
122592
|
+
/* @__PURE__ */ jsx10("span", { children: asText2(it2?.label) || "Item" })
|
|
122389
122593
|
]
|
|
122390
122594
|
},
|
|
122391
122595
|
it2?.id ?? i2
|
|
@@ -122414,7 +122618,7 @@ var init_renderNode = __esm({
|
|
|
122414
122618
|
return () => io2.disconnect();
|
|
122415
122619
|
}, [cursor]);
|
|
122416
122620
|
if (!cursor) return null;
|
|
122417
|
-
return /* @__PURE__ */
|
|
122621
|
+
return /* @__PURE__ */ jsx10("div", { ref, style: { height: 1 }, "aria-hidden": "true", "data-testid": "load-more-sentinel" });
|
|
122418
122622
|
};
|
|
122419
122623
|
FieldErrorNode = withExtras("FieldErrorNode", ({ props, ctx, wrap }) => {
|
|
122420
122624
|
const literalErrorText = useBoundString(props.text ?? props.message, ctx);
|
|
@@ -122425,8 +122629,8 @@ var init_renderNode = __esm({
|
|
|
122425
122629
|
if (props.visible === false) return null;
|
|
122426
122630
|
if (isBoundText && !text8) return null;
|
|
122427
122631
|
const c2 = (props.severity ?? "error") === "warning" ? C2("warning", "#E89F00") : C2("danger", "#E62214");
|
|
122428
|
-
return /* @__PURE__ */
|
|
122429
|
-
/* @__PURE__ */
|
|
122632
|
+
return /* @__PURE__ */ jsxs7("div", { role: "alert", style: { display: "flex", gap: 6, alignItems: "center", color: c2, fontSize: pxToRem(13), fontFamily: bodyFont(ctx), ...wrap }, children: [
|
|
122633
|
+
/* @__PURE__ */ jsx10("span", { "aria-hidden": "true", children: "\u26A0" }),
|
|
122430
122634
|
text8
|
|
122431
122635
|
] });
|
|
122432
122636
|
});
|
|
@@ -122458,7 +122662,7 @@ var init_renderNode = __esm({
|
|
|
122458
122662
|
if (node.body) return { ...node, body: { ...node.body, props: { ...node.body.props ?? {}, disabled: true } } };
|
|
122459
122663
|
return { ...node, props: { ...node.props ?? {}, disabled: true } };
|
|
122460
122664
|
}, [props.submitButton, valid]);
|
|
122461
|
-
return /* @__PURE__ */
|
|
122665
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "column", gap: 14, width: "100%", ...wrap }, children: /* @__PURE__ */ jsxs7(FormValuesContext.Provider, { value: bag, children: [
|
|
122462
122666
|
kids2(props.fields, ctx),
|
|
122463
122667
|
submitNode && renderNode(submitNode, submitCtx)
|
|
122464
122668
|
] }) });
|
|
@@ -122810,7 +123014,7 @@ var init_renderNode = __esm({
|
|
|
122810
123014
|
const chrome = props.controls ?? "builtIn";
|
|
122811
123015
|
const poster = String(item?.artworkUrl ?? props.posterUrl ?? "");
|
|
122812
123016
|
const mediaTracks = Array.isArray(item?.textTracks) ? item.textTracks.filter((track) => typeof track?.url === "string" && ["subtitles", "captions", "chapters"].includes(String(track.kind ?? "subtitles"))) : [];
|
|
122813
|
-
const renderMediaTracks = () => mediaTracks.map((track, trackIndex) => /* @__PURE__ */
|
|
123017
|
+
const renderMediaTracks = () => mediaTracks.map((track, trackIndex) => /* @__PURE__ */ jsx10(
|
|
122814
123018
|
"track",
|
|
122815
123019
|
{
|
|
122816
123020
|
kind: String(track.kind ?? "subtitles"),
|
|
@@ -122825,16 +123029,16 @@ var init_renderNode = __esm({
|
|
|
122825
123029
|
const safe = Number.isFinite(seconds) ? Math.max(0, seconds) : 0;
|
|
122826
123030
|
return `${Math.floor(safe / 60)}:${String(Math.floor(safe % 60)).padStart(2, "0")}`;
|
|
122827
123031
|
};
|
|
122828
|
-
const builtInControls = /* @__PURE__ */
|
|
122829
|
-
items.length > 1 && /* @__PURE__ */
|
|
122830
|
-
/* @__PURE__ */
|
|
122831
|
-
/* @__PURE__ */
|
|
122832
|
-
/* @__PURE__ */
|
|
122833
|
-
/* @__PURE__ */
|
|
122834
|
-
/* @__PURE__ */
|
|
123032
|
+
const builtInControls = /* @__PURE__ */ jsxs7("div", { "data-media-controls": "builtIn", style: { display: "grid", gridTemplateColumns: "auto auto 1fr auto auto", gap: 10, alignItems: "center", width: "100%", padding: "10px 12px", boxSizing: "border-box", color: foreground, background: "linear-gradient(transparent,rgba(0,0,0,.82))" }, children: [
|
|
123033
|
+
items.length > 1 && /* @__PURE__ */ jsx10("button", { "aria-label": "Previous", onClick: () => select(index - 1), style: { color: "inherit", background: "transparent", border: 0, fontSize: pxToRem(18) }, children: "\u25C0\u25C0" }),
|
|
123034
|
+
/* @__PURE__ */ jsx10("button", { "aria-label": status === "playing" ? "Pause" : "Play", onClick: () => status === "playing" ? pause() : void play(), style: { width: 38, height: 38, borderRadius: "50%", color: background, background: foreground, border: 0, fontSize: 18 }, children: status === "playing" ? "\u275A\u275A" : "\u25B6" }),
|
|
123035
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 }, children: [
|
|
123036
|
+
/* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(11), whiteSpace: "nowrap" }, children: time(position) }),
|
|
123037
|
+
/* @__PURE__ */ jsx10("input", { "aria-label": "Media position", type: "range", min: 0, max: Math.max(duration2, 1), step: 0.1, value: Math.min(position, Math.max(duration2, 1)), onChange: (event) => seek(Number(event.currentTarget.value)), style: { width: "100%", accentColor: accent } }),
|
|
123038
|
+
/* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(11), whiteSpace: "nowrap" }, children: time(duration2) })
|
|
122835
123039
|
] }),
|
|
122836
|
-
items.length > 1 && /* @__PURE__ */
|
|
122837
|
-
props.fullscreen !== "disabled" && /* @__PURE__ */
|
|
123040
|
+
items.length > 1 && /* @__PURE__ */ jsx10("button", { "aria-label": "Next", onClick: () => select(index + 1), style: { color: "inherit", background: "transparent", border: 0, fontSize: pxToRem(18) }, children: "\u25B6\u25B6" }),
|
|
123041
|
+
props.fullscreen !== "disabled" && /* @__PURE__ */ jsx10("button", { "aria-label": "Fullscreen", onClick: () => void toggleFullscreen(), style: { color: "inherit", background: "transparent", border: 0, fontSize: pxToRem(18) }, children: "\u26F6" })
|
|
122838
123042
|
] });
|
|
122839
123043
|
const customControls = chrome === "custom" ? slot("controls") : null;
|
|
122840
123044
|
const showBuiltIn = chrome === "builtIn";
|
|
@@ -122888,34 +123092,34 @@ var init_renderNode = __esm({
|
|
|
122888
123092
|
emit(props.onError, { state: "error", status: "error", error: message, code: "source_error" });
|
|
122889
123093
|
}
|
|
122890
123094
|
};
|
|
122891
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
122892
|
-
return /* @__PURE__ */
|
|
123095
|
+
if (items.length === 0) return /* @__PURE__ */ jsx10("div", { "data-media-player": sessionId, style: { minHeight: props.height ?? 120, display: "grid", placeItems: "center", ...wrap }, children: slot("empty") ?? "No media" });
|
|
123096
|
+
return /* @__PURE__ */ jsxs7("div", { ref: hostRef, "data-media-player": sessionId, "data-media-provider": provider, "data-media-status": status, "data-media-fullscreen": fullscreen ? "true" : "false", style: { position: hidden ? "fixed" : "relative", width: hidden ? 1 : "100%", height: hidden ? 1 : props.height, aspectRatio: hidden || props.height ? void 0 : String(ar2), overflow: "hidden", borderRadius: fullscreen ? 0 : ctx.radius("md", 8), background, color: foreground, display: hidden ? "block" : "flex", flexDirection: "column", isolation: "isolate", ...wrap }, children: [
|
|
122893
123097
|
slot("audioBackground"),
|
|
122894
|
-
isUnsupportedProvider ? /* @__PURE__ */
|
|
122895
|
-
/* @__PURE__ */
|
|
122896
|
-
/* @__PURE__ */
|
|
123098
|
+
isUnsupportedProvider ? /* @__PURE__ */ jsxs7("div", { role: "status", style: { flex: 1, minHeight: 0, display: "grid", placeItems: "center", gap: 8, padding: 24, textAlign: "center", background: "#17191f", color: foreground }, children: [
|
|
123099
|
+
/* @__PURE__ */ jsx10("div", { style: { fontWeight: 700 }, children: "Provider playback unavailable" }),
|
|
123100
|
+
/* @__PURE__ */ jsxs7("div", { style: { opacity: 0.75, fontSize: pxToRem(13) }, children: [
|
|
122897
123101
|
"This course uses an unsupported provider adapter: ",
|
|
122898
123102
|
provider,
|
|
122899
123103
|
"."
|
|
122900
123104
|
] })
|
|
122901
|
-
] }) : isYouTube ? /* @__PURE__ */
|
|
122902
|
-
poster && /* @__PURE__ */
|
|
122903
|
-
chrome === "custom" && /* @__PURE__ */
|
|
122904
|
-
!hidden && chrome !== "custom" && /* @__PURE__ */
|
|
122905
|
-
/* @__PURE__ */
|
|
122906
|
-
/* @__PURE__ */
|
|
123105
|
+
] }) : isYouTube ? /* @__PURE__ */ jsx10("iframe", { title: String(item?.title ?? "YouTube video"), src: `https://www.youtube-nocookie.com/embed/${encodeURIComponent(youtubeId(item))}?playsinline=1&autoplay=${props.autoplay === "never" ? 0 : 1}&mute=${props.muted === true ? 1 : 0}&controls=${chrome === "none" ? 0 : 1}`, allow: "autoplay; encrypted-media; picture-in-picture; fullscreen", allowFullScreen: true, style: { border: 0, width: "100%", flex: 1, minHeight: 0 } }, mediaKey2) : isAudio ? /* @__PURE__ */ jsxs7("div", { style: { position: "relative", flex: 1, minHeight: 0, display: "grid", gridTemplateColumns: props.presentation === "compact" || props.presentation === "mini" ? "72px 1fr" : "1fr", alignItems: "center", gap: 16, padding: hidden ? 0 : 16, boxSizing: "border-box" }, children: [
|
|
123106
|
+
poster && /* @__PURE__ */ jsx10("img", { src: poster, alt: "", style: chrome === "custom" ? { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover", opacity: 0.62 } : { width: props.presentation === "compact" || props.presentation === "mini" ? 72 : "min(55%, 260px)", aspectRatio: "1", objectFit: "cover", borderRadius: ctx.radius("md", 8), justifySelf: "center" } }),
|
|
123107
|
+
chrome === "custom" && /* @__PURE__ */ jsx10("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(transparent,rgba(0,0,0,.75))" } }),
|
|
123108
|
+
!hidden && chrome !== "custom" && /* @__PURE__ */ jsxs7("div", { style: { textAlign: props.presentation === "compact" || props.presentation === "mini" ? "left" : "center", minWidth: 0 }, children: [
|
|
123109
|
+
/* @__PURE__ */ jsx10("div", { style: { fontWeight: 700, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: String(item?.title ?? "Untitled") }),
|
|
123110
|
+
/* @__PURE__ */ jsx10("div", { style: { opacity: 0.7, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: String(item?.artist ?? item?.album ?? "") })
|
|
122907
123111
|
] }),
|
|
122908
|
-
/* @__PURE__ */
|
|
123112
|
+
/* @__PURE__ */ jsx10("audio", { ref: (el2) => {
|
|
122909
123113
|
mediaRef.current = el2;
|
|
122910
123114
|
}, ...commonMedia, children: renderMediaTracks() }, mediaKey2)
|
|
122911
|
-
] }) : /* @__PURE__ */
|
|
123115
|
+
] }) : /* @__PURE__ */ jsx10("video", { ref: (el2) => {
|
|
122912
123116
|
mediaRef.current = el2;
|
|
122913
123117
|
}, poster: poster || void 0, ...commonMedia, style: { width: "100%", flex: 1, minHeight: 0, display: "block", objectFit: props.contentMode === "fill" ? "cover" : "contain", background: "#000" }, children: renderMediaTracks() }, mediaKey2),
|
|
122914
123118
|
status === "idle" && slot("poster"),
|
|
122915
123119
|
slot("overlay"),
|
|
122916
123120
|
status === "loading" && slot("loading"),
|
|
122917
|
-
(status === "error" || status === "blocked") && (slot("error") ?? /* @__PURE__ */
|
|
122918
|
-
minimal && !isYouTube && /* @__PURE__ */
|
|
123121
|
+
(status === "error" || status === "blocked") && (slot("error") ?? /* @__PURE__ */ jsx10("button", { onClick: () => void play(), style: { position: "absolute", inset: 0, margin: "auto", width: "fit-content", height: "fit-content", padding: "10px 16px", borderRadius: 999, border: 0 }, children: "Tap to play" })),
|
|
123122
|
+
minimal && !isYouTube && /* @__PURE__ */ jsx10("button", { "aria-label": status === "playing" ? "Pause" : "Play", onClick: () => status === "playing" ? pause() : void play(), style: { position: "absolute", inset: 0, margin: "auto", width: 54, height: 54, borderRadius: "50%", border: 0, background: foreground, color: background, fontSize: 24 }, children: status === "playing" ? "\u275A\u275A" : "\u25B6" }),
|
|
122919
123123
|
!hidden && !isYouTube && !isUnsupportedProvider && (showBuiltIn ? builtInControls : customControls),
|
|
122920
123124
|
fullscreen && slot("fullscreenOverlay")
|
|
122921
123125
|
] });
|
|
@@ -122929,7 +123133,7 @@ var init_renderNode = __esm({
|
|
|
122929
123133
|
const ar2 = typeof props.aspectRatio === "number" && props.aspectRatio > 0 ? props.aspectRatio : 16 / 9;
|
|
122930
123134
|
const srcStr = typeof url === "string" && !isBinding(url) ? url : void 0;
|
|
122931
123135
|
const posterStr = typeof poster === "string" && !isBinding(poster) ? poster : void 0;
|
|
122932
|
-
return /* @__PURE__ */
|
|
123136
|
+
return /* @__PURE__ */ jsx10(
|
|
122933
123137
|
"video",
|
|
122934
123138
|
{
|
|
122935
123139
|
src: srcStr,
|
|
@@ -122984,7 +123188,7 @@ var init_renderNode = __esm({
|
|
|
122984
123188
|
...wrap
|
|
122985
123189
|
};
|
|
122986
123190
|
if (loading) {
|
|
122987
|
-
return /* @__PURE__ */
|
|
123191
|
+
return /* @__PURE__ */ jsx10(
|
|
122988
123192
|
"div",
|
|
122989
123193
|
{
|
|
122990
123194
|
"data-himalaya-pdf": "loading",
|
|
@@ -122996,7 +123200,7 @@ var init_renderNode = __esm({
|
|
|
122996
123200
|
);
|
|
122997
123201
|
}
|
|
122998
123202
|
if (!src) {
|
|
122999
|
-
return /* @__PURE__ */
|
|
123203
|
+
return /* @__PURE__ */ jsx10(
|
|
123000
123204
|
"div",
|
|
123001
123205
|
{
|
|
123002
123206
|
"data-himalaya-pdf": "placeholder",
|
|
@@ -123013,7 +123217,7 @@ var init_renderNode = __esm({
|
|
|
123013
123217
|
const nativeFragment = startPage ? fragmentWithPage(originalFragment, startPage) : originalFragment;
|
|
123014
123218
|
const nativeSrc = src.split("#", 1)[0] + nativeFragment;
|
|
123015
123219
|
if (typeof window === "undefined") {
|
|
123016
|
-
return /* @__PURE__ */
|
|
123220
|
+
return /* @__PURE__ */ jsx10(
|
|
123017
123221
|
"object",
|
|
123018
123222
|
{
|
|
123019
123223
|
"data-himalaya-pdf": "static-fallback",
|
|
@@ -123024,7 +123228,7 @@ var init_renderNode = __esm({
|
|
|
123024
123228
|
}
|
|
123025
123229
|
);
|
|
123026
123230
|
}
|
|
123027
|
-
return /* @__PURE__ */
|
|
123231
|
+
return /* @__PURE__ */ jsx10(React9.Suspense, { fallback: /* @__PURE__ */ jsx10("div", { "data-himalaya-pdf": "loading", role: "img", "aria-label": "loading document", "aria-busy": "true", style: { ...frame, background: "#f4f4f4" } }), children: /* @__PURE__ */ jsx10(PdfDocumentCanvas, { src, nativeSrc, title: typeof props.title === "string" && props.title ? props.title : "PDF document", height: ph, startPage, zoomPercent, style: frame }) });
|
|
123028
123232
|
});
|
|
123029
123233
|
WebViewNode = withExtras("WebViewNode", ({ props, ctx, wrap }) => {
|
|
123030
123234
|
const boundUrl = useResolvedScalar(props.url != null && isBinding(props.url) ? props.url : void 0, ctx);
|
|
@@ -123055,11 +123259,11 @@ var init_renderNode = __esm({
|
|
|
123055
123259
|
const showLoading = !loaded && (config.loadingText != null || config.showProgressBar) && (htmlStr != null || urlFrame != null);
|
|
123056
123260
|
const rawBand = config.coverBandColor ?? props.coverBandColor;
|
|
123057
123261
|
const bandColor = typeof rawBand === "string" && rawBand.length > 0 ? rawBand : void 0;
|
|
123058
|
-
return /* @__PURE__ */
|
|
123059
|
-
bandColor ? /* @__PURE__ */
|
|
123060
|
-
htmlStr ? /* @__PURE__ */
|
|
123061
|
-
showLoading ? /* @__PURE__ */
|
|
123062
|
-
config.showProgressBar ? /* @__PURE__ */
|
|
123262
|
+
return /* @__PURE__ */ jsxs7("div", { style: { width: "100%", position: "relative", ...bandColor ? { background: bandColor, borderRadius: ctx.radius("md", 8), overflow: "hidden" } : {}, ...wrap }, children: [
|
|
123263
|
+
bandColor ? /* @__PURE__ */ jsx10("div", { "data-testid": "webview-cover-band", style: { height: 8, background: bandColor } }) : null,
|
|
123264
|
+
htmlStr ? /* @__PURE__ */ jsx10("iframe", { ...frameProps, srcDoc: htmlStr, sandbox: "allow-scripts" }) : urlFrame ? /* @__PURE__ */ jsx10("iframe", { ...frameProps, src: urlFrame.src, sandbox: urlFrame.sandbox }) : /* @__PURE__ */ jsx10("div", { style: { ...frameStyle, display: "grid", placeItems: "center", color: "#999", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(11), border: "1px dashed #ccc" }, children: urlStr ? "WebView (url not allowed)" : "WebView (no url)" }),
|
|
123265
|
+
showLoading ? /* @__PURE__ */ jsxs7("div", { "data-testid": "webview-loading", role: "status", "aria-live": "polite", "aria-label": config.loadingText ? void 0 : "Loading", style: { position: "absolute", left: 0, right: 0, top: bandColor ? 8 : 0, bottom: 0, display: "grid", placeItems: "center", pointerEvents: "none", fontFamily: bodyFont(ctx), fontSize: pxToRem(13), color: ctx.color("textSecondary", "#666") }, children: [
|
|
123266
|
+
config.showProgressBar ? /* @__PURE__ */ jsx10("div", { "aria-hidden": "true", style: { position: "absolute", left: 0, top: 0, height: 3, width: "40%", background: ctx.color("accentPrimary", "#116DFF") } }) : null,
|
|
123063
123267
|
config.loadingText ?? null
|
|
123064
123268
|
] }) : null
|
|
123065
123269
|
] });
|
|
@@ -123088,31 +123292,87 @@ var init_renderNode = __esm({
|
|
|
123088
123292
|
React9.useEffect(() => {
|
|
123089
123293
|
if (pickerBag && pickerFieldId) pickerBag.set(pickerFieldId, sel);
|
|
123090
123294
|
}, [sel, pickerFieldId, pickerBag]);
|
|
123091
|
-
|
|
123092
|
-
|
|
123093
|
-
return /* @__PURE__ */ jsx9("div", { style: { display: "flex", background: C2("surfaceTertiary", "#eee"), borderRadius: ctx.radius("md", 8), padding: 3, width: "100%", boxSizing: "border-box", ...wrap }, children: opts.map((o2, i2) => {
|
|
123094
|
-
const on4 = o2.id === staticSel;
|
|
123095
|
-
return /* @__PURE__ */ jsx9("span", { style: { flex: 1, textAlign: "center", padding: "8px 4px", borderRadius: ctx.radius("sm", 6), fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(14), background: on4 ? C2("surfacePrimary", "#fff") : "transparent", color: on4 ? C2("textPrimary", "#111") : C2("textSecondary", "#777"), boxShadow: on4 ? "0 1px 3px rgba(0,0,0,.12)" : "none" }, children: asText2(o2.label ?? o2.title ?? o2.id) }, o2.id ?? i2);
|
|
123096
|
-
}) });
|
|
123097
|
-
}
|
|
123098
|
-
const emit = (id) => {
|
|
123295
|
+
const emitPick = (id) => {
|
|
123296
|
+
if (!pickerOptionPickable(opts.find((option) => String(option?.id) === id))) return;
|
|
123099
123297
|
setSel(id);
|
|
123100
123298
|
if (onChange && ctx.onAction) {
|
|
123101
123299
|
ctx.onAction({ ...onChange, params: { ...onChange.params ?? {}, selectedId: id }, args: { ...onChange.args ?? {}, selectedId: id } });
|
|
123102
123300
|
}
|
|
123103
123301
|
};
|
|
123104
|
-
const
|
|
123105
|
-
|
|
123302
|
+
const mode = pickerPresentation(props, opts);
|
|
123303
|
+
const labelOf = (o2) => asTextL10n(o2?.label ?? o2?.title ?? o2?.id, ctx);
|
|
123304
|
+
const pickerA11yProps = formFieldA11y(props);
|
|
123305
|
+
const pickerName = pickerA11yProps["aria-labelledby"] ? void 0 : String(placeholderText || "Select");
|
|
123306
|
+
if (mode === "menu" || mode === "sheet") {
|
|
123307
|
+
const look = pickerFieldLook(props.field, ctx);
|
|
123308
|
+
const shownSel = ctx.onAction ? sel : ctx.empty ? null : selectedId;
|
|
123309
|
+
const picked = opts.find((o2) => o2 != null && String(o2.id) === String(shownSel ?? ""));
|
|
123310
|
+
const text8 = picked ? labelOf(picked) : String(placeholderText || "Select");
|
|
123311
|
+
const box = /* @__PURE__ */ jsx10(PickerFieldBox, { look, ctx, option: picked, text: text8, isPlaceholder: !picked, font: bodyFont(ctx) });
|
|
123312
|
+
if (!ctx.onAction) return /* @__PURE__ */ jsx10("div", { style: { width: "100%", ...wrap }, children: box });
|
|
123313
|
+
return /* @__PURE__ */ jsxs7("div", { ...{ [A11Y_PART]: "root" }, "data-hm-picker-focus": "", style: { position: "relative", width: "100%", ...wrap }, children: [
|
|
123314
|
+
box,
|
|
123315
|
+
/* @__PURE__ */ jsxs7(
|
|
123316
|
+
"select",
|
|
123317
|
+
{
|
|
123318
|
+
...{ [A11Y_PART]: "node" },
|
|
123319
|
+
tabIndex: 0,
|
|
123320
|
+
value: picked ? String(picked.id) : "",
|
|
123321
|
+
onChange: (e2) => {
|
|
123322
|
+
const id = e2.currentTarget.value;
|
|
123323
|
+
const o2 = opts.find((x2) => String(x2?.id) === id);
|
|
123324
|
+
if (pickerOptionPickable(o2)) emitPick(id);
|
|
123325
|
+
},
|
|
123326
|
+
"aria-label": pickerName,
|
|
123327
|
+
...pickerA11yProps,
|
|
123328
|
+
style: { position: "absolute", inset: 0, width: "100%", height: "100%", opacity: 0, cursor: "pointer", margin: 0, border: 0, fontSize: pxToRem(15) },
|
|
123329
|
+
children: [
|
|
123330
|
+
!picked && /* @__PURE__ */ jsx10("option", { value: "", disabled: true, children: text8 }),
|
|
123331
|
+
opts.map((o2, i2) => /* @__PURE__ */ jsx10("option", { value: o2?.id, disabled: !pickerOptionPickable(o2), children: labelOf(o2) }, o2?.id ?? i2))
|
|
123332
|
+
]
|
|
123333
|
+
}
|
|
123334
|
+
)
|
|
123335
|
+
] });
|
|
123336
|
+
}
|
|
123337
|
+
if (mode === "wheel") {
|
|
123338
|
+
const wheelOpts = pickerWheelOptions(opts);
|
|
123339
|
+
const shownSel = ctx.onAction ? sel : ctx.empty ? "" : String(selectedId ?? "");
|
|
123340
|
+
const wheelSelection = wheelOpts.some((o2) => String(o2.id) === shownSel) ? shownSel : "";
|
|
123341
|
+
return /* @__PURE__ */ jsxs7(
|
|
123342
|
+
"select",
|
|
123343
|
+
{
|
|
123344
|
+
size: Math.max(2, Math.min(5, wheelOpts.length)),
|
|
123345
|
+
value: wheelSelection,
|
|
123346
|
+
disabled: !ctx.onAction,
|
|
123347
|
+
onChange: (e2) => emitPick(e2.currentTarget.value),
|
|
123348
|
+
"aria-label": pickerName,
|
|
123349
|
+
...pickerA11yProps,
|
|
123350
|
+
style: { width: "100%", background: C2("surfaceSecondary", "#f5f7fa"), border: "none", borderRadius: 12, padding: 6, boxSizing: "border-box", fontFamily: bodyFont(ctx), fontSize: pxToRem(16), color: C2("textPrimary", "#111"), textAlign: "center", ...wrap },
|
|
123351
|
+
children: [
|
|
123352
|
+
wheelSelection === "" && /* @__PURE__ */ jsx10("option", { value: "", disabled: true, children: String(placeholderText || "Select") }),
|
|
123353
|
+
wheelOpts.map((o2, i2) => /* @__PURE__ */ jsx10("option", { value: o2?.id, style: { padding: "6px 0" }, children: labelOf(o2) }, o2?.id ?? i2))
|
|
123354
|
+
]
|
|
123355
|
+
}
|
|
123356
|
+
);
|
|
123357
|
+
}
|
|
123358
|
+
if (!ctx.onAction) {
|
|
123359
|
+
const staticSel = ctx.empty ? null : selectedId;
|
|
123360
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", background: C2("surfaceTertiary", "#eee"), borderRadius: ctx.radius("md", 8), padding: 3, width: "100%", boxSizing: "border-box", ...wrap }, children: opts.map((o2, i2) => {
|
|
123361
|
+
const on4 = o2.id === staticSel;
|
|
123362
|
+
return /* @__PURE__ */ jsx10("span", { style: { flex: 1, textAlign: "center", padding: "8px 4px", borderRadius: ctx.radius("sm", 6), fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(14), background: on4 ? C2("surfacePrimary", "#fff") : "transparent", color: on4 ? C2("textPrimary", "#111") : C2("textSecondary", "#777"), boxShadow: on4 ? "0 1px 3px rgba(0,0,0,.12)" : "none" }, children: labelOf(o2) }, o2.id ?? i2);
|
|
123363
|
+
}) });
|
|
123364
|
+
}
|
|
123365
|
+
return /* @__PURE__ */ jsxs7(
|
|
123106
123366
|
"select",
|
|
123107
123367
|
{
|
|
123108
123368
|
value: sel,
|
|
123109
|
-
onChange: (e2) =>
|
|
123110
|
-
"aria-label":
|
|
123111
|
-
...
|
|
123369
|
+
onChange: (e2) => emitPick(e2.currentTarget.value),
|
|
123370
|
+
"aria-label": pickerName,
|
|
123371
|
+
...pickerA11yProps,
|
|
123112
123372
|
style: { width: "100%", background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: ctx.radius("md", 8), padding: "11px 14px", boxSizing: "border-box", fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#111"), ...wrap },
|
|
123113
123373
|
children: [
|
|
123114
|
-
props.placeholder && /* @__PURE__ */
|
|
123115
|
-
opts.map((o2, i2) => /* @__PURE__ */
|
|
123374
|
+
props.placeholder && /* @__PURE__ */ jsx10("option", { value: "", disabled: true, children: placeholderText }),
|
|
123375
|
+
opts.map((o2, i2) => /* @__PURE__ */ jsx10("option", { value: o2.id, disabled: !pickerOptionPickable(o2), children: labelOf(o2) }, o2.id ?? i2))
|
|
123116
123376
|
]
|
|
123117
123377
|
}
|
|
123118
123378
|
);
|
|
@@ -123171,9 +123431,9 @@ var init_renderNode = __esm({
|
|
|
123171
123431
|
const d2 = new Date(props.valueUnix * 1e3);
|
|
123172
123432
|
label2 = timeMode ? d2.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : dateTimeMode ? d2.toLocaleString(void 0, { year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }) : d2.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
123173
123433
|
}
|
|
123174
|
-
return /* @__PURE__ */
|
|
123175
|
-
/* @__PURE__ */
|
|
123176
|
-
/* @__PURE__ */
|
|
123434
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%", background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: ctx.radius("md", 8), padding: "12px 14px", boxSizing: "border-box", fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#111"), ...wrap }, children: [
|
|
123435
|
+
/* @__PURE__ */ jsx10("span", { children: label2 }),
|
|
123436
|
+
/* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(18) }, children: "\u{1F4C5}" })
|
|
123177
123437
|
] });
|
|
123178
123438
|
}
|
|
123179
123439
|
const onChange = props.onChange;
|
|
@@ -123196,7 +123456,7 @@ var init_renderNode = __esm({
|
|
|
123196
123456
|
if (!onChange || !ctx.onAction) return;
|
|
123197
123457
|
ctx.onAction({ ...onChange, params: { ...onChange.params ?? {}, value }, args: { ...onChange.args ?? {}, value } });
|
|
123198
123458
|
};
|
|
123199
|
-
return /* @__PURE__ */
|
|
123459
|
+
return /* @__PURE__ */ jsx10(
|
|
123200
123460
|
"input",
|
|
123201
123461
|
{
|
|
123202
123462
|
type: timeMode ? "time" : dateTimeMode ? "datetime-local" : "date",
|
|
@@ -123214,13 +123474,13 @@ var init_renderNode = __esm({
|
|
|
123214
123474
|
const placeholderText = useBoundString(props.placeholder, ctx);
|
|
123215
123475
|
const C2 = ctx.color;
|
|
123216
123476
|
const muted = C2("textSecondary", "#888");
|
|
123217
|
-
const icon = /* @__PURE__ */
|
|
123218
|
-
/* @__PURE__ */
|
|
123219
|
-
/* @__PURE__ */
|
|
123477
|
+
const icon = /* @__PURE__ */ jsxs7("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", style: { opacity: 0.6, flex: "none" }, children: [
|
|
123478
|
+
/* @__PURE__ */ jsx10("circle", { cx: "11", cy: "11", r: "7" }),
|
|
123479
|
+
/* @__PURE__ */ jsx10("path", { d: "m21 21-4.3-4.3" })
|
|
123220
123480
|
] });
|
|
123221
123481
|
const box = { display: "flex", alignItems: "center", gap: 8, width: "100%", boxSizing: "border-box", background: C2("surfaceTertiary", "#eee"), borderRadius: ctx.radius("md", 10), padding: "0 14px", minHeight: 44, color: muted, fontFamily: bodyFont(ctx), fontSize: pxToRem(15), ...wrap };
|
|
123222
123482
|
if (!ctx.onAction) {
|
|
123223
|
-
return /* @__PURE__ */
|
|
123483
|
+
return /* @__PURE__ */ jsxs7("div", { style: box, children: [
|
|
123224
123484
|
icon,
|
|
123225
123485
|
placeholderText || "Search\u2026"
|
|
123226
123486
|
] });
|
|
@@ -123246,9 +123506,9 @@ var init_renderNode = __esm({
|
|
|
123246
123506
|
if (timer.current) clearTimeout(timer.current);
|
|
123247
123507
|
timer.current = setTimeout(() => dispatch(onChange, v2), debounceMs);
|
|
123248
123508
|
};
|
|
123249
|
-
return /* @__PURE__ */
|
|
123509
|
+
return /* @__PURE__ */ jsxs7("div", { style: box, children: [
|
|
123250
123510
|
icon,
|
|
123251
|
-
/* @__PURE__ */
|
|
123511
|
+
/* @__PURE__ */ jsx10(
|
|
123252
123512
|
"input",
|
|
123253
123513
|
{
|
|
123254
123514
|
value: local,
|
|
@@ -123264,7 +123524,7 @@ var init_renderNode = __esm({
|
|
|
123264
123524
|
style: { flex: 1, minWidth: 0, alignSelf: "stretch", border: "none", outline: "none", background: "transparent", padding: "11px 0", margin: 0, width: "100%", boxSizing: "border-box", fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#13171e") }
|
|
123265
123525
|
}
|
|
123266
123526
|
),
|
|
123267
|
-
local && /* @__PURE__ */
|
|
123527
|
+
local && /* @__PURE__ */ jsx10("span", { onClick: () => onInput(""), style: { display: "inline-grid", placeItems: "center", width: 18, height: 18, borderRadius: "50%", background: C2("surfaceTertiary", "#e3e6ea"), color: muted, fontSize: 12, flex: "none", cursor: "pointer" }, children: "\xD7" })
|
|
123268
123528
|
] });
|
|
123269
123529
|
});
|
|
123270
123530
|
InteractiveStepper = withExtras("InteractiveStepper", ({ props, ctx, wrap }) => {
|
|
@@ -123356,24 +123616,24 @@ var init_renderNode = __esm({
|
|
|
123356
123616
|
};
|
|
123357
123617
|
const root = { [A11Y_PART]: "root" };
|
|
123358
123618
|
if (ctx.empty) {
|
|
123359
|
-
return /* @__PURE__ */
|
|
123360
|
-
/* @__PURE__ */
|
|
123361
|
-
/* @__PURE__ */
|
|
123362
|
-
/* @__PURE__ */
|
|
123619
|
+
return /* @__PURE__ */ jsxs7("div", { ...root, style: box, children: [
|
|
123620
|
+
/* @__PURE__ */ jsx10("span", { style: btn("min"), children: "\u2212" }),
|
|
123621
|
+
/* @__PURE__ */ jsx10("b", { ...valueA11y, style: { fontSize: pxToRem(16), minWidth: 24, textAlign: "center", color: C2("textPrimary", "#111") }, children: "\u2014" }),
|
|
123622
|
+
/* @__PURE__ */ jsx10("span", { style: btn("max"), children: "+" })
|
|
123363
123623
|
] });
|
|
123364
123624
|
}
|
|
123365
123625
|
if (!ctx.onAction) {
|
|
123366
|
-
return /* @__PURE__ */
|
|
123367
|
-
/* @__PURE__ */
|
|
123368
|
-
/* @__PURE__ */
|
|
123369
|
-
/* @__PURE__ */
|
|
123626
|
+
return /* @__PURE__ */ jsxs7("div", { ...root, style: box, children: [
|
|
123627
|
+
/* @__PURE__ */ jsx10("span", { style: btn("min"), children: "\u2212" }),
|
|
123628
|
+
/* @__PURE__ */ jsx10("b", { ...valueA11y, "aria-valuenow": value, "aria-readonly": "true", style: { fontSize: pxToRem(16), minWidth: 24, textAlign: "center", color: C2("textPrimary", "#111") }, children: value }),
|
|
123629
|
+
/* @__PURE__ */ jsx10("span", { style: btn("max"), children: "+" })
|
|
123370
123630
|
] });
|
|
123371
123631
|
}
|
|
123372
|
-
return /* @__PURE__ */
|
|
123373
|
-
/* @__PURE__ */
|
|
123374
|
-
/* @__PURE__ */
|
|
123375
|
-
/* @__PURE__ */
|
|
123376
|
-
/* @__PURE__ */
|
|
123632
|
+
return /* @__PURE__ */ jsxs7("div", { ...root, style: box, children: [
|
|
123633
|
+
/* @__PURE__ */ jsx10("button", { type: "button", tabIndex: -1, "aria-label": "Decrease", disabled: disabled("min"), onClick: () => press(-step), style: { ...btn("min"), font: "inherit" }, children: "\u2212" }),
|
|
123634
|
+
/* @__PURE__ */ jsx10("b", { ...valueA11y, "aria-valuenow": value, tabIndex: 0, onKeyDown: onValueKeyDown, style: { fontSize: pxToRem(16), minWidth: 24, textAlign: "center", color: C2("textPrimary", "#111"), fontVariantNumeric: "tabular-nums" }, children: value }),
|
|
123635
|
+
/* @__PURE__ */ jsx10("button", { type: "button", tabIndex: -1, "aria-label": "Increase", disabled: disabled("max"), onClick: () => press(step), style: { ...btn("max"), font: "inherit" }, children: "+" }),
|
|
123636
|
+
/* @__PURE__ */ jsx10("span", { "aria-live": "polite", style: { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", border: 0 }, children: pressed.text + (pressed.count % 2 ? "\xA0" : "") })
|
|
123377
123637
|
] });
|
|
123378
123638
|
});
|
|
123379
123639
|
SYNTHETIC_TAP_ROLE = "data-hm-synthetic-role";
|
|
@@ -123462,7 +123722,7 @@ var init_renderNode = __esm({
|
|
|
123462
123722
|
const prev = el2.props.style ?? {};
|
|
123463
123723
|
return React9.cloneElement(el2, { style: { ...prev, animationDelay: `${i2 * gridStagger}ms` } });
|
|
123464
123724
|
};
|
|
123465
|
-
const inner = itemsPath && items[0] && ctx.provider ? /* @__PURE__ */
|
|
123725
|
+
const inner = itemsPath && items[0] && ctx.provider ? /* @__PURE__ */ jsx10(
|
|
123466
123726
|
BoundList,
|
|
123467
123727
|
{
|
|
123468
123728
|
ctx,
|
|
@@ -123546,7 +123806,7 @@ var init_renderNode = __esm({
|
|
|
123546
123806
|
}, [text8, reduce, total]);
|
|
123547
123807
|
const fade = reduce ? void 0 : `opacity ${REVEAL_FADE_MS}ms ease-out`;
|
|
123548
123808
|
if (markdownHtml != null) {
|
|
123549
|
-
return /* @__PURE__ */
|
|
123809
|
+
return /* @__PURE__ */ jsx10(
|
|
123550
123810
|
"span",
|
|
123551
123811
|
{
|
|
123552
123812
|
"data-himalaya-reveal": `${Math.min(shown2, total)}/${total}`,
|
|
@@ -123555,10 +123815,10 @@ var init_renderNode = __esm({
|
|
|
123555
123815
|
);
|
|
123556
123816
|
}
|
|
123557
123817
|
let w2 = 0;
|
|
123558
|
-
return /* @__PURE__ */
|
|
123818
|
+
return /* @__PURE__ */ jsx10("span", { "data-himalaya-reveal": `${Math.min(shown2, total)}/${total}`, children: tokens2.map((t2, i2) => {
|
|
123559
123819
|
if (/^\s+$/.test(t2)) return t2;
|
|
123560
123820
|
const visible = w2++ < shown2;
|
|
123561
|
-
return /* @__PURE__ */
|
|
123821
|
+
return /* @__PURE__ */ jsx10("span", { style: { opacity: visible ? 1 : 0, transition: fade }, children: t2 }, i2);
|
|
123562
123822
|
}) });
|
|
123563
123823
|
};
|
|
123564
123824
|
TextNode = withExtras("TextNode", ({ props, ctx, wrap }) => {
|
|
@@ -123611,13 +123871,13 @@ var init_renderNode = __esm({
|
|
|
123611
123871
|
return v2 == null ? null : String(v2);
|
|
123612
123872
|
})();
|
|
123613
123873
|
const revealMarkdown = props.markdown === true && revealSource != null ? mdSource ?? revealSource : null;
|
|
123614
|
-
const content = countContent != null ? countContent : revealSource != null && revealSource !== "" ? /* @__PURE__ */
|
|
123874
|
+
const content = countContent != null ? countContent : revealSource != null && revealSource !== "" ? /* @__PURE__ */ jsx10(RevealText, { text: revealSource, reduce: ctx.reduceMotion(), markdownHtml: revealMarkdown != null ? mdInline(revealMarkdown, accentTextColor(ctx)).__html : void 0 }) : icuPattern != null ? /* @__PURE__ */ jsx10(InterpolatedTextView, { pattern: icuPattern, params: props.template?.params ?? {}, ctx }) : mdSource != null ? /* @__PURE__ */ jsx10("span", { dangerouslySetInnerHTML: mdInline(mdSource, accentTextColor(ctx)) }) : txt(props.text, ctx);
|
|
123615
123875
|
const authoredDirection = props.textDirection === "auto" || props.textDirection === "ltr" || props.textDirection === "rtl";
|
|
123616
123876
|
const dir = authoredDirection ? props.textDirection : "auto";
|
|
123617
123877
|
const tAlign = props.textAlign === "center" ? "center" : props.textAlign === "trailing" ? authoredDirection ? "end" : "right" : props.textAlign === "justify" ? "justify" : props.textAlign === "leading" ? authoredDirection ? "start" : "left" : void 0;
|
|
123618
123878
|
const tDecor = props.decoration === "strikethrough" ? "line-through" : props.decoration === "underline" ? "underline" : void 0;
|
|
123619
123879
|
const ln2 = typeof props.lineSpacing === "number" ? pxToRem((f2.line ?? 1.4) * f2.size + props.lineSpacing) : f2.line;
|
|
123620
|
-
return /* @__PURE__ */
|
|
123880
|
+
return /* @__PURE__ */ jsx10("div", { ...countAttrs, dir, style: { fontFamily: fontStack(f2.family, ctx.idiom), fontSize: f2.remSize, fontWeight: f2.weight, ...props.monospacedDigits === true ? { fontVariantNumeric: "tabular-nums" } : {}, lineHeight: ln2, letterSpacing: f2.letterSpacing, color: C2(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e"), whiteSpace: props.maxLines === 1 ? "nowrap" : "pre-wrap", overflowWrap: "anywhere", wordBreak: "break-word", minWidth: 0, ...tAlign ? { textAlign: tAlign } : {}, ...tDecor ? { textDecoration: tDecor } : {}, ...props.maxLines === 1 ? { overflow: "hidden", textOverflow: "ellipsis" } : props.maxLines ? { display: "-webkit-box", WebkitLineClamp: props.maxLines, WebkitBoxOrient: "vertical", overflow: "hidden" } : {}, ...wrap }, children: content == null || content === "" ? collapse ? null : "\xA0" : content });
|
|
123621
123881
|
});
|
|
123622
123882
|
ImageNode = withExtras("ImageNode", ({ props, ctx, wrap }) => {
|
|
123623
123883
|
const C2 = ctx.color;
|
|
@@ -123648,9 +123908,9 @@ var init_renderNode = __esm({
|
|
|
123648
123908
|
const tplTint = props.tint != null && renderingMode !== "original" ? C2(props.tint, "#000") : null;
|
|
123649
123909
|
if (tplTint != null) {
|
|
123650
123910
|
const mSize = objectFit === "cover" ? "cover" : "contain";
|
|
123651
|
-
return /* @__PURE__ */
|
|
123911
|
+
return /* @__PURE__ */ jsx10("div", { role: "img", "aria-label": asText2(boundAlt), style: { width: w2, height: boxHeight, aspectRatio: ar2, borderRadius: r2, display: "block", flex: "none", background: tplTint, WebkitMaskImage: `url("${src}")`, maskImage: `url("${src}")`, WebkitMaskSize: mSize, maskSize: mSize, WebkitMaskRepeat: "no-repeat", maskRepeat: "no-repeat", WebkitMaskPosition: "center", maskPosition: "center", ...wrap } });
|
|
123652
123912
|
}
|
|
123653
|
-
return /* @__PURE__ */
|
|
123913
|
+
return /* @__PURE__ */ jsx10("img", { src, alt: asText2(boundAlt), style: { width: w2, height: boxHeight, aspectRatio: ar2, objectFit, borderRadius: r2, display: "block", flex: "none", background: ph, ...wrap } });
|
|
123654
123914
|
}
|
|
123655
123915
|
if (imgInitials && typeof imgInitials === "string") {
|
|
123656
123916
|
const alt = asText2(boundAlt).trim();
|
|
@@ -123659,15 +123919,15 @@ var init_renderNode = __esm({
|
|
|
123659
123919
|
}
|
|
123660
123920
|
if (props.icon != null && props.url == null && props.asset == null && imgInitials == null) {
|
|
123661
123921
|
const side2 = typeof w2 === "number" ? w2 : 40;
|
|
123662
|
-
return /* @__PURE__ */
|
|
123922
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: side2, height: side2, borderRadius: "50%", background: ph ?? C2("surfaceTertiary", "#e6e6e6"), display: "grid", placeItems: "center", flex: "none", ...wrap }, children: iconSvg(props.icon, { size: Math.max(14, Math.round(side2 * 0.5)), color: accentTextColor(ctx) }) });
|
|
123663
123923
|
}
|
|
123664
|
-
return /* @__PURE__ */
|
|
123924
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: w2, height: boxHeight, aspectRatio: ar2, borderRadius: r2, background: ph ?? (hasSource ? `linear-gradient(135deg, ${C2("surfaceTertiary", "#e6e6e6")}, ${C2("surfaceSecondary", "#f2f2f2")})` : "transparent"), color: C2("textSecondary", "#999"), display: "flex", alignItems: "center", justifyContent: "center", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(11), flex: "none", ...wrap }, children: banner || !hasSource ? "" : "\u2022" });
|
|
123665
123925
|
});
|
|
123666
123926
|
ANIMATION_LEAF = { "aria-hidden": "true", [INFERRED_DECORATIVE]: true, [SELF_RENDERED_LEAF]: true, [ROLE_WHEN_NAMED]: "img" };
|
|
123667
123927
|
LottieNode = withExtras("LottieNode", ({ props, ctx, wrap }) => {
|
|
123668
123928
|
ensureLottieRuntime();
|
|
123669
123929
|
const lh = typeof props.height === "number" && props.height > 0 ? props.height : 160;
|
|
123670
|
-
return /* @__PURE__ */
|
|
123930
|
+
return /* @__PURE__ */ jsx10(
|
|
123671
123931
|
"div",
|
|
123672
123932
|
{
|
|
123673
123933
|
"data-himalaya-lottie": props.source ? String(props.source) : "",
|
|
@@ -123683,7 +123943,7 @@ var init_renderNode = __esm({
|
|
|
123683
123943
|
RiveNode = withExtras("RiveNode", ({ props, ctx, wrap }) => {
|
|
123684
123944
|
ensureRiveRuntime();
|
|
123685
123945
|
const rh = typeof props.height === "number" && props.height > 0 ? props.height : 160;
|
|
123686
|
-
return /* @__PURE__ */
|
|
123946
|
+
return /* @__PURE__ */ jsx10(
|
|
123687
123947
|
"canvas",
|
|
123688
123948
|
{
|
|
123689
123949
|
"data-himalaya-rive": props.source ? String(props.source) : "",
|
|
@@ -123705,9 +123965,9 @@ var init_renderNode = __esm({
|
|
|
123705
123965
|
const size = props.size ?? 48;
|
|
123706
123966
|
const a11y = { [ROLE_WHEN_NAMED]: "img", [SELF_RENDERED_LEAF]: true };
|
|
123707
123967
|
if (typeof imageUrl === "string" && imageUrl) {
|
|
123708
|
-
return /* @__PURE__ */
|
|
123968
|
+
return /* @__PURE__ */ jsx10("img", { ...a11y, src: resolveAssetUrl(imageUrl, ctx.assetBaseUrl), alt: "", style: { width: size, height: size, borderRadius: "50%", objectFit: "cover", flex: "none", ...wrap } });
|
|
123709
123969
|
}
|
|
123710
|
-
return /* @__PURE__ */
|
|
123970
|
+
return /* @__PURE__ */ jsx10("div", { ...a11y, style: { width: size, height: size, borderRadius: "50%", background: C2("accentPrimary", "#116DFF"), color: C2("textOnAccent", "#fff"), display: "grid", placeItems: "center", fontWeight: 600, fontSize: size * 0.4, fontFamily: bodyFont(ctx), flex: "none", ...wrap }, children: (asText2(initials) || "?").slice(0, 2).toUpperCase() });
|
|
123711
123971
|
});
|
|
123712
123972
|
IconNode = withExtras("IconNode", ({ props, ctx, wrap }) => {
|
|
123713
123973
|
const C2 = ctx.color;
|
|
@@ -123720,7 +123980,7 @@ var init_renderNode = __esm({
|
|
|
123720
123980
|
const a11y = described ? { role: "img", "aria-label": String(contentDescription), [SELF_RENDERED_LEAF]: true } : { "aria-hidden": "true", [INFERRED_DECORATIVE]: true, [SELF_RENDERED_LEAF]: true, [ROLE_WHEN_NAMED]: "img" };
|
|
123721
123981
|
const glyph = iconSvg(iconName, { size, color: C2(resolveScalarStatic(props.tint, ctx) ?? "textPrimary", "#636b78") });
|
|
123722
123982
|
const animatedGlyph = Object.keys(effectStyle).length ? React9.cloneElement(glyph, { style: { ...glyph.props.style, ...effectStyle } }) : glyph;
|
|
123723
|
-
return /* @__PURE__ */
|
|
123983
|
+
return /* @__PURE__ */ jsx10("span", { ...a11y, style: { display: "inline-grid", placeItems: "center", width: size + 6, height: size + 6, lineHeight: 1, flex: "none", ...wrap }, children: animatedGlyph });
|
|
123724
123984
|
});
|
|
123725
123985
|
EMPTY_STATE_SPACING = {
|
|
123726
123986
|
padding: ["lg", 16],
|
|
@@ -123745,11 +124005,11 @@ var init_renderNode = __esm({
|
|
|
123745
124005
|
const label2 = props.actionLabel;
|
|
123746
124006
|
const hasAction = props.action != null && typeof label2 === "string" && label2.trim().length > 0;
|
|
123747
124007
|
const padding = spacingToken(ctx, EMPTY_STATE_SPACING.padding);
|
|
123748
|
-
return /* @__PURE__ */
|
|
123749
|
-
hasIcon2 && /* @__PURE__ */
|
|
123750
|
-
/* @__PURE__ */
|
|
123751
|
-
hasSubtitle && /* @__PURE__ */
|
|
123752
|
-
hasAction && /* @__PURE__ */
|
|
124008
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", textAlign: "center", width: "100%", padding, boxSizing: "border-box", ...wrap }, children: [
|
|
124009
|
+
hasIcon2 && /* @__PURE__ */ jsx10("div", { "data-empty-state-part": "icon", "aria-hidden": "true", style: { width: 46, height: 46, borderRadius: 13, background: C2("surfaceTertiary", "#eee"), display: "grid", placeItems: "center", color: C2("textSecondary", "#9aa2ad"), flexShrink: 0 }, children: iconSvg(props.icon, { size: 24 }) }),
|
|
124010
|
+
/* @__PURE__ */ jsx10("div", { "data-empty-state-part": "title", style: { ...fontCss(titleFont), color: C2("textPrimary", "#111"), marginTop: hasIcon2 ? spacingToken(ctx, EMPTY_STATE_SPACING.iconGap) : 0, overflowWrap: "anywhere" }, children: txt(props.title, ctx) }),
|
|
124011
|
+
hasSubtitle && /* @__PURE__ */ jsx10("div", { "data-empty-state-part": "subtitle", style: { ...fontCss(subtitleFont), color: C2("textSecondary", "#888"), marginTop: spacingToken(ctx, EMPTY_STATE_SPACING.subtitleGap), overflowWrap: "anywhere" }, children: isBinding(props.subtitle) ? subtitleText : txt(props.subtitle, ctx) }),
|
|
124012
|
+
hasAction && /* @__PURE__ */ jsx10("div", { "data-empty-state-part": "action", style: { marginTop: spacingToken(ctx, EMPTY_STATE_SPACING.actionGap), display: "flex", justifyContent: "center" }, children: renderNode({
|
|
123753
124013
|
id: `${nodeId ?? "empty_state"}.action`,
|
|
123754
124014
|
body: {
|
|
123755
124015
|
package: "himalaya",
|
|
@@ -123802,13 +124062,13 @@ var init_renderNode = __esm({
|
|
|
123802
124062
|
const glyph = bt2.icon ?? (props.size === "sm" ? 14 : props.size === "lg" ? 18 : 16);
|
|
123803
124063
|
const visibleMin = props.iconOnly ? 44 : props.minHeight ?? bt2.height ?? 44;
|
|
123804
124064
|
const slop = props.iconOnly ? 0 : buttonHitSlop(Math.max(visibleMin, 2 * vPad + Math.max(f2.size * (f2.line ?? 1.25), glyph)));
|
|
123805
|
-
const ic = (name) => /* @__PURE__ */
|
|
124065
|
+
const ic = (name) => /* @__PURE__ */ jsx10("span", { style: { display: "inline-grid", placeItems: "center", width: glyph, height: glyph }, children: iconSvg(name, { size: glyph, color: fg }) });
|
|
123806
124066
|
const iconLabel = typeof resolvedLeadingIcon === "string" && resolvedLeadingIcon ? resolvedLeadingIcon.replace(/[_-]+/g, " ").replace(/\b\w/g, (c2) => c2.toUpperCase()) : "";
|
|
123807
124067
|
const hasTitle = typeof resolvedTitle === "string" && resolvedTitle.length > 0 || typeof resolvedTitle === "number";
|
|
123808
124068
|
const accessibleLabel = hasTitle ? String(resolvedTitle) : asText2(txt(props.title, ctx)) || (props.iconOnly ? iconLabel : "") || "Button";
|
|
123809
124069
|
if (props.loading) ensureSpinKeyframes();
|
|
123810
124070
|
const rowStretch = ctx.rowStretch === true && !props.iconOnly;
|
|
123811
|
-
return /* @__PURE__ */
|
|
124071
|
+
return /* @__PURE__ */ jsxs7(
|
|
123812
124072
|
"button",
|
|
123813
124073
|
{
|
|
123814
124074
|
type: "button",
|
|
@@ -123879,7 +124139,7 @@ var init_renderNode = __esm({
|
|
|
123879
124139
|
...wrap
|
|
123880
124140
|
}, rowStretch, "fit-content"),
|
|
123881
124141
|
children: [
|
|
123882
|
-
props.loading && /* @__PURE__ */
|
|
124142
|
+
props.loading && /* @__PURE__ */ jsx10("span", { style: { width: glyph, height: glyph, borderRadius: "50%", border: `2px solid ${rgba(fg, primary ? 0.4 : 0.35)}`, borderTopColor: fg, animation: ctx.empty ? void 0 : "himalaya-spin .7s linear infinite" } }),
|
|
123883
124143
|
!props.loading && resolvedLeadingIcon && ic(String(resolvedLeadingIcon)),
|
|
123884
124144
|
!props.iconOnly && (resolvedTitle != null && resolvedTitle !== "" ? String(resolvedTitle) : txt(props.title, ctx) || "Button"),
|
|
123885
124145
|
!props.loading && !props.iconOnly && resolvedTrailingIcon && ic(String(resolvedTrailingIcon))
|
|
@@ -123892,10 +124152,10 @@ var init_renderNode = __esm({
|
|
|
123892
124152
|
const bound = useResolvedScalar(props.valuePath, ctx);
|
|
123893
124153
|
const val = props.valuePath != null ? typeof bound === "string" ? bound : typeof bound === "number" ? String(bound) : "" : typeof props.value === "string" ? props.value : "";
|
|
123894
124154
|
const len = Math.max(0, props.length ?? 6);
|
|
123895
|
-
return /* @__PURE__ */
|
|
124155
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", gap: 8, width: "100%", maxWidth: len * 40 + Math.max(0, len - 1) * 8, ...wrap }, children: Array.from({ length: len }).map((_2, i2) => {
|
|
123896
124156
|
const ch2 = val[i2];
|
|
123897
124157
|
const active = i2 === val.length;
|
|
123898
|
-
return /* @__PURE__ */
|
|
124158
|
+
return /* @__PURE__ */ jsx10("span", { style: { width: 40, minWidth: 0, flex: "1 1 40px", height: 48, display: "grid", placeItems: "center", borderRadius: 10, fontFamily: bodyFont(ctx), fontSize: 20, fontWeight: 600, color: C2("textPrimary", "#13171e"), background: ch2 ? C2("surfaceSecondary", "#f5f7fa") : C2("surfacePrimary", "#fff"), border: `2px solid ${active ? C2("accentPrimary", "#116DFF") : "#b8c0cb"}` }, children: ch2 ? props.secure ? "\u2022" : ch2 : "" }, i2);
|
|
123899
124159
|
}) });
|
|
123900
124160
|
});
|
|
123901
124161
|
ProgressBarNode = withExtras("ProgressBarNode", ({ props, ctx, wrap }) => {
|
|
@@ -123919,7 +124179,7 @@ var init_renderNode = __esm({
|
|
|
123919
124179
|
...numP !== void 0 && Number.isFinite(numP) && p2 != null ? { "aria-valuenow": Math.round(p2 * 100) } : {},
|
|
123920
124180
|
[SELF_RENDERED_LEAF]: true
|
|
123921
124181
|
};
|
|
123922
|
-
return /* @__PURE__ */
|
|
124182
|
+
return /* @__PURE__ */ jsx10("div", { ...a11y, style: { width: "100%", height: 6, borderRadius: 999, background: C2(boundTokenName(props.trackColorPath, props.trackColor, ctx) ?? "surfaceTertiary", "#eee"), overflow: "hidden", ...wrap }, children: /* @__PURE__ */ jsx10("div", { style: { width: `${Math.round((p2 ?? 0.4) * 100)}%`, height: "100%", borderRadius: 999, background: C2(boundTokenName(props.tintPath, props.tint, ctx) ?? "accentPrimary", "#116DFF"), opacity: p2 == null ? 0.45 : 1, ...animatedFill ? { transition: ctx.motionTransition(ctx.kit?.motion) } : {} } }) });
|
|
123923
124183
|
});
|
|
123924
124184
|
ACTIVITY_DEFAULT_NAME = "Loading";
|
|
123925
124185
|
ActivityIndicatorNode = withExtras("ActivityIndicatorNode", ({ props, ctx, wrap }) => {
|
|
@@ -123936,10 +124196,10 @@ var init_renderNode = __esm({
|
|
|
123936
124196
|
const pct = Math.max(0, Math.min(1, aiNum));
|
|
123937
124197
|
const ringMask = `radial-gradient(farthest-side, transparent calc(100% - ${thick}px), #000 calc(100% - ${thick}px))`;
|
|
123938
124198
|
const a11y = { "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(pct * 100) };
|
|
123939
|
-
return /* @__PURE__ */
|
|
124199
|
+
return /* @__PURE__ */ jsx10("div", { role: "progressbar", "aria-label": ACTIVITY_DEFAULT_NAME, ...a11y, style: { width: size, height: size, borderRadius: "50%", flex: "none", background: `conic-gradient(${tint} ${pct * 360}deg, ${track} 0deg)`, WebkitMask: ringMask, mask: ringMask, ...wrap } });
|
|
123940
124200
|
}
|
|
123941
124201
|
ensureSpinKeyframes();
|
|
123942
|
-
return /* @__PURE__ */
|
|
124202
|
+
return /* @__PURE__ */ jsx10("div", { role: "status", "aria-busy": "true", "aria-label": ACTIVITY_DEFAULT_NAME, style: { width: size, height: size, borderRadius: "50%", border: `${thick}px solid ${track}`, borderTopColor: tint, boxSizing: "border-box", flex: "none", animation: ctx.empty ? void 0 : "himalaya-spin 0.8s linear infinite", ...wrap } });
|
|
123943
124203
|
});
|
|
123944
124204
|
NATIVELY_TABBABLE = 'a[href], area[href], button, input:not([type="hidden"]), select, textarea, iframe, object, embed, audio[controls], video[controls], summary, [contenteditable]:not([contenteditable="false"]), [tabindex]';
|
|
123945
124205
|
BottomSheetNode = withExtras("BottomSheetNode", ({ props, ctx, wrap }) => {
|
|
@@ -124010,9 +124270,9 @@ var init_renderNode = __esm({
|
|
|
124010
124270
|
// Rounded on the side that faces the screen — logical corners, so RTL flips them too.
|
|
124011
124271
|
...edge === "leading" ? { borderStartEndRadius: r2, borderEndEndRadius: r2 } : { borderStartStartRadius: r2, borderEndStartRadius: r2 }
|
|
124012
124272
|
} : { width: "100%", borderRadius: `${r2} ${r2} 0 0`, boxShadow: "0 -4px 24px rgba(0,0,0,.12)", ...sized };
|
|
124013
|
-
const handleBar = /* @__PURE__ */
|
|
124273
|
+
const handleBar = /* @__PURE__ */ jsx10("div", { style: { width: sheet.grabberWidth, height: sheet.grabberHeight, borderRadius: 999, background: C2("surfaceTertiary", "#d8dce2") } });
|
|
124014
124274
|
const handleBox = { display: "flex", justifyContent: "center", padding: "8px 0 4px", flexShrink: 0 };
|
|
124015
|
-
return /* @__PURE__ */
|
|
124275
|
+
return /* @__PURE__ */ jsx10(
|
|
124016
124276
|
"div",
|
|
124017
124277
|
{
|
|
124018
124278
|
"data-sheet-scrim": "",
|
|
@@ -124024,8 +124284,8 @@ var init_renderNode = __esm({
|
|
|
124024
124284
|
if (e2.target === e2.currentTarget) dismiss();
|
|
124025
124285
|
} : void 0,
|
|
124026
124286
|
style: { position: "absolute", inset: 0, background: "rgba(0,0,0,.35)", zIndex: 50, display: "flex", ...side2 ? { flexDirection: "row", justifyContent: edge === "leading" ? "flex-start" : "flex-end" } : { flexDirection: "column", justifyContent: "flex-end" }, ...wrap },
|
|
124027
|
-
children: /* @__PURE__ */
|
|
124028
|
-
grabber && (detents.length > 1 ? /* @__PURE__ */
|
|
124287
|
+
children: /* @__PURE__ */ jsxs7("div", { ref: dialogRef, role: "dialog", "data-sheet-edge": edge, "aria-modal": modal ? "true" : void 0, tabIndex: modal ? -1 : void 0, onKeyDown: modal ? trapTab : void 0, "aria-label": props.title != null ? sheetTitle : "Sheet", style: { background: C2("surfacePrimary", "#fff"), overflow: "hidden", ...shape }, children: [
|
|
124288
|
+
grabber && (detents.length > 1 ? /* @__PURE__ */ jsx10(
|
|
124029
124289
|
"button",
|
|
124030
124290
|
{
|
|
124031
124291
|
type: "button",
|
|
@@ -124054,8 +124314,8 @@ var init_renderNode = __esm({
|
|
|
124054
124314
|
style: { ...handleBox, width: "100%", border: "none", background: "transparent", cursor: "ns-resize", touchAction: "none" },
|
|
124055
124315
|
children: handleBar
|
|
124056
124316
|
}
|
|
124057
|
-
) : /* @__PURE__ */
|
|
124058
|
-
/* @__PURE__ */
|
|
124317
|
+
) : /* @__PURE__ */ jsx10("div", { style: handleBox, children: handleBar })),
|
|
124318
|
+
/* @__PURE__ */ jsx10("div", { style: { padding: side2 ? "16px" : "8px 16px 16px", ...side2 || detents.length ? { flex: 1, minHeight: 0, overflowY: "auto" } : {} }, children: props.content ? renderNode(props.content, ctx) : null })
|
|
124059
124319
|
] })
|
|
124060
124320
|
}
|
|
124061
124321
|
);
|
|
@@ -124111,9 +124371,9 @@ var init_renderNode = __esm({
|
|
|
124111
124371
|
};
|
|
124112
124372
|
}, [gated, shown2]);
|
|
124113
124373
|
const floating = gated ? { position: "absolute", left: 0, zIndex: 40, ...props.edge === "top" ? { bottom: "100%", marginBottom: 6 } : { top: "100%", marginTop: 6 } } : {};
|
|
124114
|
-
return /* @__PURE__ */
|
|
124115
|
-
props.anchor ? gated ? /* @__PURE__ */
|
|
124116
|
-
shown2 && /* @__PURE__ */
|
|
124374
|
+
return /* @__PURE__ */ jsxs7("div", { style: { ...gated ? { position: "relative" } : {}, display: "inline-flex", flexDirection: "column", alignItems: "flex-start", gap: 6, ...wrap }, children: [
|
|
124375
|
+
props.anchor ? gated ? /* @__PURE__ */ jsx10("span", { ref: anchorRef, style: { display: "contents" }, children: renderNode(props.anchor, ctx) }) : renderNode(props.anchor, ctx) : null,
|
|
124376
|
+
shown2 && /* @__PURE__ */ jsx10("div", { ref: dialogRef, role: "dialog", ...gated ? { [PRESENTED_OVERLAY_ATTR]: "" } : {}, "aria-modal": modal ? "true" : void 0, tabIndex: modal ? -1 : void 0, onKeyDown: modal ? trapTab : void 0, "aria-label": props.title != null ? asBoundText(props.title, ctx) : "Popover", style: { minWidth: 160, maxWidth: 280, background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 12, boxShadow: "0 6px 20px rgba(0,0,0,.14)", padding: 12, ...floating }, children: props.content ? renderNode(props.content, ctx) : null })
|
|
124117
124377
|
] });
|
|
124118
124378
|
});
|
|
124119
124379
|
ChipsInputNode = withExtras("ChipsInputNode", ({ props, ctx, wrap }) => {
|
|
@@ -124123,16 +124383,16 @@ var init_renderNode = __esm({
|
|
|
124123
124383
|
const bound = useResolvedScalar(props.valuesPath, ctx);
|
|
124124
124384
|
const raw = props.valuesPath != null ? bound : props.values;
|
|
124125
124385
|
const values = Array.isArray(raw) ? raw : [];
|
|
124126
|
-
return /* @__PURE__ */
|
|
124127
|
-
values.map((v2, i2) => /* @__PURE__ */
|
|
124386
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 6, width: "100%", minHeight: 44, padding: "8px 10px", boxSizing: "border-box", background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: ctx.radius("md", 8), opacity: props.disabled ? 0.5 : 1, ...wrap }, children: [
|
|
124387
|
+
values.map((v2, i2) => /* @__PURE__ */ jsxs7("span", { style: { display: "inline-flex", alignItems: "center", gap: 5, padding: "4px 9px", borderRadius: 999, fontFamily: bodyFont(ctx), fontSize: pxToRem(13), background: C2("surfaceTertiary", "#eef0f3"), color: C2("textPrimary", "#13171e") }, children: [
|
|
124128
124388
|
asText2(v2),
|
|
124129
|
-
props.onRemove && /* @__PURE__ */
|
|
124389
|
+
props.onRemove && /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": `Remove ${asText2(v2)}`, disabled: !!props.disabled || !ctx.onAction, onClick: () => {
|
|
124130
124390
|
if (props.disabled || !ctx.onAction) return;
|
|
124131
124391
|
const action = resolveItemDeep2(props.onRemove, ctx);
|
|
124132
124392
|
ctx.onAction({ ...action, args: { ...action.args, value: v2, index: i2 } });
|
|
124133
124393
|
}, style: { minWidth: 44, minHeight: 44, border: 0, background: "transparent", color: "inherit", opacity: 0.6, cursor: props.disabled ? "default" : "pointer", fontSize: pxToRem(13) }, children: "\xD7" })
|
|
124134
124394
|
] }, i2)),
|
|
124135
|
-
props.onAdd ? /* @__PURE__ */
|
|
124395
|
+
props.onAdd ? /* @__PURE__ */ jsx10("input", { "aria-label": placeholderText || "Add a chip", placeholder: placeholderText || "Add\u2026", value: draft, disabled: !!props.disabled || !ctx.onAction, onChange: (event) => setDraft(event.currentTarget.value), onKeyDown: (event) => {
|
|
124136
124396
|
if (event.key !== "Enter" || event.nativeEvent.isComposing || props.disabled || !ctx.onAction) return;
|
|
124137
124397
|
event.preventDefault();
|
|
124138
124398
|
const value = draft.trim();
|
|
@@ -124140,7 +124400,7 @@ var init_renderNode = __esm({
|
|
|
124140
124400
|
const action = resolveItemDeep2(props.onAdd, ctx);
|
|
124141
124401
|
ctx.onAction({ ...action, args: { ...action.args, value } });
|
|
124142
124402
|
setDraft("");
|
|
124143
|
-
}, style: { minWidth: 80, minHeight: 44, flex: "1 1 100px", border: 0, background: "transparent", color: C2("textPrimary", "#13171e"), outlineOffset: 3, fontFamily: bodyFont(ctx), fontSize: pxToRem(14) } }) : /* @__PURE__ */
|
|
124403
|
+
}, style: { minWidth: 80, minHeight: 44, flex: "1 1 100px", border: 0, background: "transparent", color: C2("textPrimary", "#13171e"), outlineOffset: 3, fontFamily: bodyFont(ctx), fontSize: pxToRem(14) } }) : /* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(14), color: C2("textSecondary", "#888") }, children: values.length ? "" : placeholderText || "Add\u2026" })
|
|
124144
124404
|
] });
|
|
124145
124405
|
});
|
|
124146
124406
|
ChipNode = withExtras("ChipNode", ({ props, ctx, wrap }) => {
|
|
@@ -124152,27 +124412,27 @@ var init_renderNode = __esm({
|
|
|
124152
124412
|
const onClick = ctx.onAction && props.onTap && !props.disabled ? () => ctx.onAction(resolveItemDeep2(props.onTap, ctx)) : void 0;
|
|
124153
124413
|
const fg = selected ? C2("textOnAccent", "#fff") : C2("textPrimary", "#13171e");
|
|
124154
124414
|
const style = { position: "relative", alignSelf: "flex-start", width: "fit-content", display: "inline-flex", alignItems: "center", gap: 6, padding: "6px 12px", borderRadius: 999, fontFamily: bodyFont(ctx), fontSize: pxToRem(14), cursor: onClick ? "pointer" : "default", opacity: props.disabled ? 0.5 : 1, color: fg, background: selected ? accent : C2("surfaceSecondary", "#f2f3f5"), border: `1px solid ${selected ? accent : C2("border", "#d8dce2")}`, boxShadow: props.elevated ? "0 1px 4px rgba(0,0,0,.14)" : "none", ...wrap };
|
|
124155
|
-
const hitArea = /* @__PURE__ */
|
|
124156
|
-
const content = /* @__PURE__ */
|
|
124157
|
-
props.leadingAvatarUrl && !isBinding(props.leadingAvatarUrl) && /* @__PURE__ */
|
|
124158
|
-
props.leadingIcon && /* @__PURE__ */
|
|
124159
|
-
/* @__PURE__ */
|
|
124415
|
+
const hitArea = /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", style: { position: "absolute", left: 0, top: "50%", width: "100%", minWidth: 44, height: 44, transform: "translateY(-50%)" } });
|
|
124416
|
+
const content = /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
124417
|
+
props.leadingAvatarUrl && !isBinding(props.leadingAvatarUrl) && /* @__PURE__ */ jsx10("img", { src: String(props.leadingAvatarUrl), alt: "", style: { width: 20, height: 20, borderRadius: "50%", objectFit: "cover", margin: "-2px 0 -2px -4px" } }),
|
|
124418
|
+
props.leadingIcon && /* @__PURE__ */ jsx10("span", { style: { display: "inline-grid", placeItems: "center", width: 16, height: 16 }, children: iconSvg(props.leadingIcon, { size: 15, color: fg }) }),
|
|
124419
|
+
/* @__PURE__ */ jsx10("span", { children: txt(props.label, ctx) })
|
|
124160
124420
|
] });
|
|
124161
124421
|
const pressed = props.selectedPath != null || props.selected != null ? selected : void 0;
|
|
124162
|
-
if (!props.removable) return props.onTap ? /* @__PURE__ */
|
|
124422
|
+
if (!props.removable) return props.onTap ? /* @__PURE__ */ jsxs7("button", { type: "button", disabled: !!props.disabled || !ctx.onAction, "aria-pressed": pressed, onClick, style, children: [
|
|
124163
124423
|
content,
|
|
124164
124424
|
hitArea
|
|
124165
|
-
] }) : /* @__PURE__ */
|
|
124425
|
+
] }) : /* @__PURE__ */ jsx10("span", { style, children: content });
|
|
124166
124426
|
const remove = ctx.onAction && props.onRemove && !props.disabled ? (event) => {
|
|
124167
124427
|
event.stopPropagation();
|
|
124168
124428
|
ctx.onAction(resolveItemDeep2(props.onRemove, ctx));
|
|
124169
124429
|
} : void 0;
|
|
124170
|
-
return /* @__PURE__ */
|
|
124171
|
-
props.onTap ? /* @__PURE__ */
|
|
124430
|
+
return /* @__PURE__ */ jsxs7("span", { ...{ [A11Y_PART]: "root" }, style, children: [
|
|
124431
|
+
props.onTap ? /* @__PURE__ */ jsxs7("button", { ...{ [A11Y_PART]: "node" }, type: "button", disabled: !!props.disabled || !ctx.onAction, "aria-pressed": pressed, onClick, style: { all: "unset", position: "relative", display: "inline-flex", alignItems: "center", gap: 6, cursor: onClick ? "pointer" : "default" }, children: [
|
|
124172
124432
|
content,
|
|
124173
124433
|
hitArea
|
|
124174
124434
|
] }) : content,
|
|
124175
|
-
/* @__PURE__ */
|
|
124435
|
+
/* @__PURE__ */ jsxs7("button", { type: "button", "aria-label": `Remove ${txt(props.label, ctx) || "chip"}`, disabled: !remove, onClick: remove, style: { position: "relative", display: "inline-grid", placeItems: "center", width: 16, height: 16, padding: 0, border: 0, background: "transparent", color: "inherit", fontSize: 13, opacity: 0.7, cursor: remove ? "pointer" : "default" }, children: [
|
|
124176
124436
|
"\xD7",
|
|
124177
124437
|
hitArea
|
|
124178
124438
|
] })
|
|
@@ -124185,11 +124445,11 @@ var init_renderNode = __esm({
|
|
|
124185
124445
|
const rawRows = props.rowsPath != null ? bound : props.rows;
|
|
124186
124446
|
const rows = Array.isArray(rawRows) ? rawRows : [];
|
|
124187
124447
|
const cellStyle = (head) => ({ padding: "8px 12px", fontFamily: bodyFont(ctx), fontSize: pxToRem(14), textAlign: "left", borderBottom: `1px solid ${C2("border", "#eceef1")}`, color: head ? C2("textSecondary", "#636b78") : C2("textPrimary", "#13171e"), fontWeight: head ? 600 : 400, whiteSpace: "nowrap" });
|
|
124188
|
-
return /* @__PURE__ */
|
|
124189
|
-
cols.length > 0 && /* @__PURE__ */
|
|
124190
|
-
/* @__PURE__ */
|
|
124448
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: "100%", boxSizing: "border-box", overflowX: "auto", border: `1px solid ${C2("border", "#e8eaed")}`, borderRadius: 10, ...wrap }, children: /* @__PURE__ */ jsxs7("table", { style: { width: "100%", borderCollapse: "collapse" }, children: [
|
|
124449
|
+
cols.length > 0 && /* @__PURE__ */ jsx10("thead", { children: /* @__PURE__ */ jsx10("tr", { children: cols.map((c2, i2) => /* @__PURE__ */ jsx10("th", { style: cellStyle(true), children: asText2(c2) }, i2)) }) }),
|
|
124450
|
+
/* @__PURE__ */ jsx10("tbody", { children: rows.map((r2, ri2) => {
|
|
124191
124451
|
const cells = Array.isArray(r2?.cells) ? r2.cells : Array.isArray(r2) ? r2 : [];
|
|
124192
|
-
return /* @__PURE__ */
|
|
124452
|
+
return /* @__PURE__ */ jsx10("tr", { children: cells.map((cell2, ci2) => /* @__PURE__ */ jsx10("td", { style: cellStyle(false), children: asText2(cell2) }, ci2)) }, ri2);
|
|
124193
124453
|
}) })
|
|
124194
124454
|
] }) });
|
|
124195
124455
|
});
|
|
@@ -124200,7 +124460,7 @@ var init_renderNode = __esm({
|
|
|
124200
124460
|
const rt2 = ctx.color(ring?.tint ?? "accentPrimary", "#116DFF");
|
|
124201
124461
|
const d2 = size - index * step, off = (size - d2) / 2;
|
|
124202
124462
|
const mask = `radial-gradient(farthest-side, transparent calc(100% - ${thick}px), #000 calc(100% - ${thick}px))`;
|
|
124203
|
-
return /* @__PURE__ */
|
|
124463
|
+
return /* @__PURE__ */ jsx10("div", { "aria-hidden": "true", style: { position: "absolute", top: off, left: off, width: d2, height: d2, borderRadius: "50%", background: `conic-gradient(${rt2} ${rp * 360}deg, ${track} 0deg)`, WebkitMask: mask, mask } });
|
|
124204
124464
|
};
|
|
124205
124465
|
GaugeNode = withExtras("GaugeNode", ({ props, ctx, wrap }) => {
|
|
124206
124466
|
const C2 = ctx.color;
|
|
@@ -124220,19 +124480,19 @@ var init_renderNode = __esm({
|
|
|
124220
124480
|
const a11y = labelName || hasValue && max > min ? { role: "progressbar", ...named, ...range, [SELF_RENDERED_LEAF]: true } : { "aria-hidden": "true", [INFERRED_DECORATIVE]: true, [ROLE_WHEN_NAMED]: "progressbar", [PENDING_RANGE]: range, [SELF_RENDERED_LEAF]: true };
|
|
124221
124481
|
if (Array.isArray(props.rings) && props.rings.length) {
|
|
124222
124482
|
const size = 96, thick = 9, step = 22;
|
|
124223
|
-
return /* @__PURE__ */
|
|
124483
|
+
return /* @__PURE__ */ jsx10("div", { role: "group", ...named, ...{ [SELF_RENDERED_LEAF]: true }, style: { position: "relative", width: size, height: size, ...wrap }, children: props.rings.map((r2, i2) => /* @__PURE__ */ jsx10(GaugeRing, { ring: r2, ctx, index: i2, size, step, thick, track }, i2)) });
|
|
124224
124484
|
}
|
|
124225
124485
|
if (props.kind === "linear") {
|
|
124226
|
-
return /* @__PURE__ */
|
|
124227
|
-
props.label != null && /* @__PURE__ */
|
|
124228
|
-
/* @__PURE__ */
|
|
124486
|
+
return /* @__PURE__ */ jsxs7("div", { ...a11y, style: { width: "100%", ...wrap }, children: [
|
|
124487
|
+
props.label != null && /* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(13), color: C2("textSecondary", "#636b78"), marginBottom: 4 }, children: txt(props.label, ctx) }),
|
|
124488
|
+
/* @__PURE__ */ jsx10("div", { style: { width: "100%", height: 8, borderRadius: 999, background: track, overflow: "hidden" }, children: /* @__PURE__ */ jsx10("div", { style: { width: `${pct * 100}%`, height: "100%", background: tint, ...gaugeAnim } }) })
|
|
124229
124489
|
] });
|
|
124230
124490
|
}
|
|
124231
124491
|
const ringMask = "radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 8px))";
|
|
124232
124492
|
const capF = ctx.font("caption");
|
|
124233
|
-
return /* @__PURE__ */
|
|
124234
|
-
/* @__PURE__ */
|
|
124235
|
-
/* @__PURE__ */
|
|
124493
|
+
return /* @__PURE__ */ jsx10("div", { ...a11y, style: { display: "inline-flex", flexDirection: "column", alignItems: "center", gap: 4, ...wrap }, children: /* @__PURE__ */ jsxs7("div", { style: { position: "relative", width: 72, height: 72 }, children: [
|
|
124494
|
+
/* @__PURE__ */ jsx10("div", { style: { width: 72, height: 72, borderRadius: "50%", background: `conic-gradient(${tint} ${pct * 360}deg, ${track} 0deg)`, WebkitMask: ringMask, mask: ringMask, ...gaugeAnim } }),
|
|
124495
|
+
/* @__PURE__ */ jsx10("div", { style: { position: "absolute", inset: 0, display: "grid", placeItems: "center", fontFamily: fontStack(capF.family, ctx.idiom), fontSize: capF.remSize, fontWeight: capF.weight, color: C2("textPrimary", "#13171e") }, children: txt(props.label, ctx) || `${Math.round(pct * 100)}%` })
|
|
124236
124496
|
] }) });
|
|
124237
124497
|
});
|
|
124238
124498
|
RATING_METRICS = {
|
|
@@ -124253,9 +124513,9 @@ var init_renderNode = __esm({
|
|
|
124253
124513
|
const filledCount = Math.round(val);
|
|
124254
124514
|
const onClickStar = (i2) => ctx.onAction && props.interactive && props.onChange ? () => ctx.onAction({ ...props.onChange, params: { ...props.onChange?.params ?? {}, value: String(i2 + 1) }, args: { ...props.onChange?.args ?? {}, value: i2 + 1 } }) : void 0;
|
|
124255
124515
|
const cv = Number.isFinite(val) ? Math.max(0, Math.min(max, val)) : 0, summary2 = `${Number.isInteger(cv) ? cv : cv.toFixed(1)} of ${max}`;
|
|
124256
|
-
return /* @__PURE__ */
|
|
124516
|
+
return /* @__PURE__ */ jsx10("span", { style: { display: "inline-flex", alignItems: "center", gap: m2.gap, ...wrap }, role: props.interactive ? "group" : "img", "aria-label": `Rating, ${summary2}`, "data-a11y-value": summary2, children: Array.from({ length: max }).map((_2, i2) => {
|
|
124257
124517
|
const filled = i2 < filledCount;
|
|
124258
|
-
return onClickStar(i2) ? /* @__PURE__ */
|
|
124518
|
+
return onClickStar(i2) ? /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": `Rate ${i2 + 1} ${i2 === 0 ? "star" : "stars"}`, "aria-pressed": i2 + 1 === Math.round(cv), onClick: onClickStar(i2), style: { display: "inline-grid", placeItems: "center", width: m2.cell, height: m2.cell, padding: 0, border: 0, background: "transparent", cursor: "pointer", opacity: filled ? 1 : 0.28 }, children: iconSvg(filled ? `${base}_fill` : base, { size: m2.glyph, color: col }) }, i2) : /* @__PURE__ */ jsx10("span", { style: { display: "inline-grid", placeItems: "center", width: m2.cell, height: m2.cell, opacity: filled ? 1 : 0.28 }, children: iconSvg(filled ? `${base}_fill` : base, { size: m2.glyph, color: col }) }, i2);
|
|
124259
124519
|
}) });
|
|
124260
124520
|
});
|
|
124261
124521
|
AvatarStripNode = withExtras("AvatarStripNode", ({ props, ctx, wrap }) => {
|
|
@@ -124273,8 +124533,8 @@ var init_renderNode = __esm({
|
|
|
124273
124533
|
const count2 = shown2.length + overflow;
|
|
124274
124534
|
const countText = count2 > 0 ? `${count2} ${count2 === 1 ? "person" : "people"}` : "";
|
|
124275
124535
|
const groupName = [caption, countText].filter(Boolean).join(", ");
|
|
124276
|
-
return /* @__PURE__ */
|
|
124277
|
-
/* @__PURE__ */
|
|
124536
|
+
return /* @__PURE__ */ jsxs7("div", { role: "group", "aria-label": groupName || void 0, "data-a11y-value": countText || void 0, ...{ [SELF_RENDERED_LEAF]: true, [A11Y_PART]: "root" }, style: { width: "100%", ...wrap }, children: [
|
|
124537
|
+
/* @__PURE__ */ jsxs7("div", { role: "list", style: { display: "flex" }, children: [
|
|
124278
124538
|
shown2.map((a2, i2) => {
|
|
124279
124539
|
const ring = props.ringGradient ? ctx.gradient(props.ringGradient) : void 0;
|
|
124280
124540
|
const wrapStyle = ring ? { marginLeft: i2 === 0 ? 0 : -(size - shift), background: ring, padding: 2.5, borderRadius: "50%" } : { marginLeft: i2 === 0 ? 0 : -(size - shift), border: `2px solid ${C2("surfacePrimary", "#fff")}`, borderRadius: "50%" };
|
|
@@ -124285,18 +124545,18 @@ var init_renderNode = __esm({
|
|
|
124285
124545
|
initials,
|
|
124286
124546
|
{ style: { ...initials.props.style, position: "relative", overflow: "hidden" } },
|
|
124287
124547
|
initials.props.children,
|
|
124288
|
-
/* @__PURE__ */
|
|
124548
|
+
/* @__PURE__ */ jsx10("img", { src: photo, alt: "", onError: (e2) => {
|
|
124289
124549
|
e2.currentTarget.style.display = "none";
|
|
124290
124550
|
}, style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover" } })
|
|
124291
124551
|
) : initials;
|
|
124292
|
-
return who ? /* @__PURE__ */
|
|
124552
|
+
return who ? /* @__PURE__ */ jsx10("div", { role: "listitem", style: wrapStyle, children: React9.cloneElement(circle, { role: "img", "aria-label": who }) }, i2) : /* @__PURE__ */ jsx10("div", { "aria-hidden": "true", style: wrapStyle, children: circle }, i2);
|
|
124293
124553
|
}),
|
|
124294
|
-
overflow > 0 && /* @__PURE__ */
|
|
124554
|
+
overflow > 0 && /* @__PURE__ */ jsx10("div", { role: "listitem", style: { marginLeft: -(size - shift), width: size, height: size, borderRadius: "50%", border: `2px solid ${C2("surfacePrimary", "#fff")}`, background: C2("surfaceTertiary", "#e6e6e6"), color: C2("textPrimary", "#111"), display: "grid", placeItems: "center", fontSize: size * 0.32, fontWeight: 700, fontFamily: bodyFont(ctx) }, children: /* @__PURE__ */ jsxs7("span", { role: "img", "aria-label": `${overflow} more`, children: [
|
|
124295
124555
|
"+",
|
|
124296
124556
|
overflow
|
|
124297
124557
|
] }) })
|
|
124298
124558
|
] }),
|
|
124299
|
-
props.caption && /* @__PURE__ */
|
|
124559
|
+
props.caption && /* @__PURE__ */ jsx10("div", { ...{ [A11Y_PART]: "derived-name" }, style: { fontSize: pxToRem(13), color: C2("textSecondary", "#888"), marginTop: 8 }, children: txt(props.caption, ctx) })
|
|
124300
124560
|
] });
|
|
124301
124561
|
});
|
|
124302
124562
|
CHART_STROKE_CYCLE = ["solid", "dashed", "dotted"];
|
|
@@ -124341,7 +124601,7 @@ var init_renderNode = __esm({
|
|
|
124341
124601
|
stroke: "solid"
|
|
124342
124602
|
}];
|
|
124343
124603
|
const drawable = series.filter((sr2) => sr2.values.length > 0);
|
|
124344
|
-
if (drawable.length === 0) return /* @__PURE__ */
|
|
124604
|
+
if (drawable.length === 0) return /* @__PURE__ */ jsx10("div", { style: { width: "100%", height, ...wrap } });
|
|
124345
124605
|
const W2 = 100;
|
|
124346
124606
|
const H2 = 100;
|
|
124347
124607
|
const all = drawable.flatMap((sr2) => sr2.values);
|
|
@@ -124352,14 +124612,14 @@ var init_renderNode = __esm({
|
|
|
124352
124612
|
const xAt = (i2, n2) => n2 === 1 ? W2 / 2 : i2 / (n2 - 1) * W2;
|
|
124353
124613
|
const bars = drawable.filter((sr2) => sr2.kind === "bar");
|
|
124354
124614
|
const barGeom = chartBarLayout(bars.map((sr2) => sr2.values.length), W2);
|
|
124355
|
-
return /* @__PURE__ */
|
|
124615
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: "100%", height, ...wrap }, role: "presentation", children: /* @__PURE__ */ jsx10("svg", { width: "100%", height: "100%", viewBox: `0 0 ${W2} ${H2}`, preserveAspectRatio: "none", role: "presentation", children: drawable.map((sr2, si2) => {
|
|
124356
124616
|
const n2 = sr2.values.length;
|
|
124357
124617
|
if (sr2.kind === "bar") {
|
|
124358
124618
|
const lane = Math.max(bars.indexOf(sr2), 0);
|
|
124359
124619
|
const w2 = Math.max(barGeom.width, 0.5);
|
|
124360
|
-
return /* @__PURE__ */
|
|
124620
|
+
return /* @__PURE__ */ jsx10("g", { "data-series": sr2.label || si2, children: sr2.values.map((v2, i2) => {
|
|
124361
124621
|
const top = yAt(v2);
|
|
124362
|
-
return /* @__PURE__ */
|
|
124622
|
+
return /* @__PURE__ */ jsx10(
|
|
124363
124623
|
"rect",
|
|
124364
124624
|
{
|
|
124365
124625
|
x: barGeom.lefts[lane]?.[i2] ?? 0,
|
|
@@ -124374,8 +124634,8 @@ var init_renderNode = __esm({
|
|
|
124374
124634
|
}
|
|
124375
124635
|
const pts = sr2.values.map((v2, i2) => `${xAt(i2, n2)},${yAt(v2)}`).join(" ");
|
|
124376
124636
|
const dash = chartDashArray(sr2.stroke);
|
|
124377
|
-
return /* @__PURE__ */
|
|
124378
|
-
sr2.kind === "area" && /* @__PURE__ */
|
|
124637
|
+
return /* @__PURE__ */ jsxs7("g", { "data-series": sr2.label || si2, children: [
|
|
124638
|
+
sr2.kind === "area" && /* @__PURE__ */ jsx10(
|
|
124379
124639
|
"polygon",
|
|
124380
124640
|
{
|
|
124381
124641
|
points: `${xAt(0, n2)},${H2} ${pts} ${xAt(n2 - 1, n2)},${H2}`,
|
|
@@ -124383,7 +124643,7 @@ var init_renderNode = __esm({
|
|
|
124383
124643
|
opacity: 0.18
|
|
124384
124644
|
}
|
|
124385
124645
|
),
|
|
124386
|
-
/* @__PURE__ */
|
|
124646
|
+
/* @__PURE__ */ jsx10(
|
|
124387
124647
|
"polyline",
|
|
124388
124648
|
{
|
|
124389
124649
|
points: pts,
|
|
@@ -124411,13 +124671,13 @@ var init_renderNode = __esm({
|
|
|
124411
124671
|
const R2 = 50 - thickness / 2;
|
|
124412
124672
|
const CIRC = 2 * Math.PI * R2;
|
|
124413
124673
|
let offset = 0;
|
|
124414
|
-
return /* @__PURE__ */
|
|
124415
|
-
/* @__PURE__ */
|
|
124416
|
-
/* @__PURE__ */
|
|
124674
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: size, maxWidth: "100%", ...wrap }, children: /* @__PURE__ */ jsxs7("div", { style: { position: "relative", width: "100%", aspectRatio: "1 / 1", maxWidth: "100%" }, children: [
|
|
124675
|
+
/* @__PURE__ */ jsxs7("svg", { width: "100%", height: "100%", viewBox: "0 0 100 100", role: "presentation", children: [
|
|
124676
|
+
/* @__PURE__ */ jsx10("circle", { cx: 50, cy: 50, r: R2, fill: "none", stroke: C2("surfaceSecondary", "#eee"), strokeWidth: thickness || 100 }),
|
|
124417
124677
|
total > 0 && slices.map((sl2, i2) => {
|
|
124418
124678
|
const frac = sl2.value / total;
|
|
124419
124679
|
const dash = `${frac * CIRC} ${CIRC}`;
|
|
124420
|
-
const el2 = /* @__PURE__ */
|
|
124680
|
+
const el2 = /* @__PURE__ */ jsx10(
|
|
124421
124681
|
"circle",
|
|
124422
124682
|
{
|
|
124423
124683
|
cx: 50,
|
|
@@ -124438,7 +124698,7 @@ var init_renderNode = __esm({
|
|
|
124438
124698
|
return el2;
|
|
124439
124699
|
})
|
|
124440
124700
|
] }),
|
|
124441
|
-
(props.centerTitle || props.centerSubtitle) && /* @__PURE__ */
|
|
124701
|
+
(props.centerTitle || props.centerSubtitle) && /* @__PURE__ */ jsxs7("div", { style: {
|
|
124442
124702
|
position: "absolute",
|
|
124443
124703
|
inset: 0,
|
|
124444
124704
|
display: "flex",
|
|
@@ -124448,15 +124708,15 @@ var init_renderNode = __esm({
|
|
|
124448
124708
|
gap: 2,
|
|
124449
124709
|
pointerEvents: "none"
|
|
124450
124710
|
}, children: [
|
|
124451
|
-
props.centerTitle && /* @__PURE__ */
|
|
124452
|
-
props.centerSubtitle && /* @__PURE__ */
|
|
124711
|
+
props.centerTitle && /* @__PURE__ */ jsx10("div", { style: { fontSize: pxToRem(20), fontWeight: 600, color: C2("textPrimary", "#111") }, children: txt(props.centerTitle, ctx) }),
|
|
124712
|
+
props.centerSubtitle && /* @__PURE__ */ jsx10("div", { style: { fontSize: pxToRem(12), color: C2("textSecondary", "#888") }, children: txt(props.centerSubtitle, ctx) })
|
|
124453
124713
|
] })
|
|
124454
124714
|
] }) });
|
|
124455
124715
|
});
|
|
124456
124716
|
LegendMarker = ({ marker, color }) => {
|
|
124457
|
-
if (marker === "square") return /* @__PURE__ */
|
|
124717
|
+
if (marker === "square") return /* @__PURE__ */ jsx10("span", { style: { width: 10, height: 10, background: color, flex: "0 0 auto" } });
|
|
124458
124718
|
if (marker === "line" || marker === "dashed") {
|
|
124459
|
-
return /* @__PURE__ */
|
|
124719
|
+
return /* @__PURE__ */ jsx10("svg", { width: 16, height: 10, viewBox: "0 0 16 10", style: { flex: "0 0 auto" }, role: "presentation", children: /* @__PURE__ */ jsx10(
|
|
124460
124720
|
"line",
|
|
124461
124721
|
{
|
|
124462
124722
|
x1: 0,
|
|
@@ -124470,15 +124730,15 @@ var init_renderNode = __esm({
|
|
|
124470
124730
|
}
|
|
124471
124731
|
) });
|
|
124472
124732
|
}
|
|
124473
|
-
return /* @__PURE__ */
|
|
124733
|
+
return /* @__PURE__ */ jsx10("span", { style: { width: 10, height: 10, borderRadius: 5, background: color, flex: "0 0 auto" } });
|
|
124474
124734
|
};
|
|
124475
124735
|
LegendNode = withExtras("LegendNode", ({ props, ctx, wrap }) => {
|
|
124476
124736
|
const C2 = ctx.color;
|
|
124477
124737
|
const bound = useResolvedScalar(props.itemsPath, ctx);
|
|
124478
124738
|
const items = legendItems(props.itemsPath != null ? bound : props.items);
|
|
124479
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
124739
|
+
if (items.length === 0) return /* @__PURE__ */ jsx10("div", { style: { ...wrap } });
|
|
124480
124740
|
const vertical = props.orientation === "vertical";
|
|
124481
|
-
return /* @__PURE__ */
|
|
124741
|
+
return /* @__PURE__ */ jsx10("ul", { style: {
|
|
124482
124742
|
display: "flex",
|
|
124483
124743
|
flexDirection: vertical ? "column" : "row",
|
|
124484
124744
|
flexWrap: vertical ? "nowrap" : "wrap",
|
|
@@ -124487,10 +124747,10 @@ var init_renderNode = __esm({
|
|
|
124487
124747
|
padding: 0,
|
|
124488
124748
|
listStyle: "none",
|
|
124489
124749
|
...wrap
|
|
124490
|
-
}, children: items.map((it2, i2) => /* @__PURE__ */
|
|
124491
|
-
/* @__PURE__ */
|
|
124492
|
-
/* @__PURE__ */
|
|
124493
|
-
it2.value && /* @__PURE__ */
|
|
124750
|
+
}, children: items.map((it2, i2) => /* @__PURE__ */ jsxs7("li", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
|
|
124751
|
+
/* @__PURE__ */ jsx10(LegendMarker, { marker: it2.marker, color: it2.color ? C2(it2.color, "#116DFF") : C2("accentPrimary", "#116DFF") }),
|
|
124752
|
+
/* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(13), color: C2("textSecondary", "#888"), minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: txt(it2.label, ctx) }),
|
|
124753
|
+
it2.value && /* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(13), fontWeight: 600, color: C2("textPrimary", "#111") }, children: txt(it2.value, ctx) })
|
|
124494
124754
|
] }, i2)) });
|
|
124495
124755
|
});
|
|
124496
124756
|
cellAlign = (align) => align === "center" ? "center" : align === "trailing" ? "right" : "left";
|
|
@@ -124503,28 +124763,28 @@ var init_renderNode = __esm({
|
|
|
124503
124763
|
const max = Number(props.maxRows);
|
|
124504
124764
|
const rows = Number.isFinite(max) && max > 0 ? rawRows.slice(0, max) : rawRows;
|
|
124505
124765
|
const totalsRow = props.totalsPath != null ? boundTotals : props.totals;
|
|
124506
|
-
if (columns.length === 0) return /* @__PURE__ */
|
|
124766
|
+
if (columns.length === 0) return /* @__PURE__ */ jsx10("div", { style: { ...wrap } });
|
|
124507
124767
|
const totalWeight = columns.reduce((a2, c2) => a2 + c2.weight, 0) || 1;
|
|
124508
124768
|
const th = { fontSize: pxToRem(12), fontWeight: 600, color: C2("textSecondary", "#888"), padding: "8px 10px", borderBottom: `1px solid ${C2("border", "#e5e5e5")}` };
|
|
124509
124769
|
const td = { fontSize: pxToRem(14), color: C2("textPrimary", "#111"), padding: "8px 10px" };
|
|
124510
124770
|
return (
|
|
124511
124771
|
// Tables are the one shape allowed to exceed the content width, in their own
|
|
124512
124772
|
// scroller — the page body must not scroll horizontally because of one.
|
|
124513
|
-
/* @__PURE__ */
|
|
124514
|
-
!props.hideHeader && /* @__PURE__ */
|
|
124515
|
-
/* @__PURE__ */
|
|
124773
|
+
/* @__PURE__ */ jsx10("div", { style: { width: "100%", overflowX: "auto", ...wrap }, children: /* @__PURE__ */ jsxs7("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: [
|
|
124774
|
+
!props.hideHeader && /* @__PURE__ */ jsx10("thead", { children: /* @__PURE__ */ jsx10("tr", { children: columns.map((c2, i2) => /* @__PURE__ */ jsx10("th", { scope: "col", style: { ...th, textAlign: cellAlign(c2.align), width: `${c2.weight / totalWeight * 100}%` }, children: txt(c2.title, ctx) }, i2)) }) }),
|
|
124775
|
+
/* @__PURE__ */ jsx10("tbody", { children: rows.map((r2, ri2) => {
|
|
124516
124776
|
const cells = dataTableCells(r2, columns);
|
|
124517
124777
|
const id = r2 && typeof r2 === "object" && !Array.isArray(r2) ? r2.id : void 0;
|
|
124518
|
-
return /* @__PURE__ */
|
|
124778
|
+
return /* @__PURE__ */ jsx10(
|
|
124519
124779
|
"tr",
|
|
124520
124780
|
{
|
|
124521
124781
|
style: props.zebra && ri2 % 2 === 1 ? { background: C2("surfaceSecondary", "#fafafa") } : void 0,
|
|
124522
|
-
children: cells.map((cell2, ci2) => /* @__PURE__ */
|
|
124782
|
+
children: cells.map((cell2, ci2) => /* @__PURE__ */ jsx10("td", { style: { ...td, textAlign: cellAlign(columns[ci2].align) }, children: txt(cell2, ctx) }, ci2))
|
|
124523
124783
|
},
|
|
124524
124784
|
typeof id === "string" && id ? id : ri2
|
|
124525
124785
|
);
|
|
124526
124786
|
}) }),
|
|
124527
|
-
totalsRow != null && /* @__PURE__ */
|
|
124787
|
+
totalsRow != null && /* @__PURE__ */ jsx10("tfoot", { children: /* @__PURE__ */ jsx10("tr", { children: dataTableCells(totalsRow, columns).map((cell2, ci2) => /* @__PURE__ */ jsx10("td", { style: { ...td, fontWeight: 600, borderTop: `1px solid ${C2("border", "#e5e5e5")}`, textAlign: cellAlign(columns[ci2].align) }, children: txt(cell2, ctx) }, ci2)) }) })
|
|
124528
124788
|
] }) })
|
|
124529
124789
|
);
|
|
124530
124790
|
});
|
|
@@ -124540,17 +124800,17 @@ var init_renderNode = __esm({
|
|
|
124540
124800
|
const boundState = useResolvedScalar(props.statePath, ctx);
|
|
124541
124801
|
const boundDelivery = useResolvedScalar(props.deliveryPath, ctx);
|
|
124542
124802
|
const boundRate = useResolvedScalar(props.ratePath, ctx);
|
|
124543
|
-
const
|
|
124803
|
+
const num4 = (bound, literal, dflt) => {
|
|
124544
124804
|
const v2 = bound !== void 0 && bound !== null ? bound : literal;
|
|
124545
124805
|
const n2 = typeof v2 === "number" ? v2 : typeof v2 === "string" ? Number(v2) : NaN;
|
|
124546
124806
|
return Number.isFinite(n2) ? n2 : dflt;
|
|
124547
124807
|
};
|
|
124548
124808
|
const rawWave = props.waveformPath != null ? boundWave : props.waveform;
|
|
124549
124809
|
const samples = Array.isArray(rawWave) ? rawWave.map(Number).filter((n2) => Number.isFinite(n2)) : [];
|
|
124550
|
-
const durationMs = Math.max(0,
|
|
124810
|
+
const durationMs = Math.max(0, num4(props.durationMsPath != null ? boundDuration : void 0, props.durationMs, 0));
|
|
124551
124811
|
const state = voiceNoteState(props.statePath != null ? boundState : props.state);
|
|
124552
124812
|
const delivery = voiceNoteDelivery(props.deliveryPath != null ? boundDelivery : props.delivery);
|
|
124553
|
-
const rate =
|
|
124813
|
+
const rate = num4(props.ratePath != null ? boundRate : void 0, props.rate, 1);
|
|
124554
124814
|
const isFailed = delivery === "failed";
|
|
124555
124815
|
const isUploading = delivery === "uploading";
|
|
124556
124816
|
const isPlayable = !isFailed && !isUploading;
|
|
@@ -124558,7 +124818,7 @@ var init_renderNode = __esm({
|
|
|
124558
124818
|
const isLoading = state === "loading";
|
|
124559
124819
|
const [scrub, setScrub] = React9.useState(null);
|
|
124560
124820
|
const [seeked, setSeeked] = React9.useState(null);
|
|
124561
|
-
const positionMs = Math.max(0,
|
|
124821
|
+
const positionMs = Math.max(0, num4(props.positionMsPath != null ? boundPosition : void 0, props.positionMs, 0));
|
|
124562
124822
|
React9.useEffect(() => {
|
|
124563
124823
|
setSeeked(null);
|
|
124564
124824
|
}, [positionMs]);
|
|
@@ -124607,8 +124867,8 @@ var init_renderNode = __esm({
|
|
|
124607
124867
|
}, [rate]);
|
|
124608
124868
|
const effectiveRate = pickedRate ?? rate;
|
|
124609
124869
|
const rateText = `${Math.round(effectiveRate * 100) / 100}\xD7`;
|
|
124610
|
-
return /* @__PURE__ */
|
|
124611
|
-
/* @__PURE__ */
|
|
124870
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 10, width: "100%", padding: "6px 0", boxSizing: "border-box", ...wrap }, children: [
|
|
124871
|
+
/* @__PURE__ */ jsx10(
|
|
124612
124872
|
"button",
|
|
124613
124873
|
{
|
|
124614
124874
|
type: "button",
|
|
@@ -124626,7 +124886,7 @@ var init_renderNode = __esm({
|
|
|
124626
124886
|
placeItems: "center",
|
|
124627
124887
|
cursor: isUploading ? "default" : "pointer"
|
|
124628
124888
|
},
|
|
124629
|
-
children: /* @__PURE__ */
|
|
124889
|
+
children: /* @__PURE__ */ jsx10(
|
|
124630
124890
|
"span",
|
|
124631
124891
|
{
|
|
124632
124892
|
style: {
|
|
@@ -124643,7 +124903,7 @@ var init_renderNode = __esm({
|
|
|
124643
124903
|
// Reuses the motion-grammar loader keyframe rather than minting a new
|
|
124644
124904
|
// one — a name that no `ensure*Styles` injects is a spinner that never
|
|
124645
124905
|
// spins, and nothing in the DOM says so.
|
|
124646
|
-
/* @__PURE__ */
|
|
124906
|
+
/* @__PURE__ */ jsx10(
|
|
124647
124907
|
"span",
|
|
124648
124908
|
{
|
|
124649
124909
|
"aria-hidden": true,
|
|
@@ -124659,19 +124919,19 @@ var init_renderNode = __esm({
|
|
|
124659
124919
|
}
|
|
124660
124920
|
}
|
|
124661
124921
|
)
|
|
124662
|
-
) : isFailed ? /* @__PURE__ */
|
|
124663
|
-
/* @__PURE__ */
|
|
124664
|
-
/* @__PURE__ */
|
|
124665
|
-
] }) : isPlaying ? /* @__PURE__ */
|
|
124666
|
-
/* @__PURE__ */
|
|
124667
|
-
/* @__PURE__ */
|
|
124668
|
-
] }) : /* @__PURE__ */
|
|
124922
|
+
) : isFailed ? /* @__PURE__ */ jsxs7("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: onAccent, strokeWidth: "2.4", strokeLinecap: "round", "aria-hidden": true, children: [
|
|
124923
|
+
/* @__PURE__ */ jsx10("path", { d: "M20 11a8 8 0 1 0-2.3 5.7" }),
|
|
124924
|
+
/* @__PURE__ */ jsx10("path", { d: "M20 5v6h-6" })
|
|
124925
|
+
] }) : isPlaying ? /* @__PURE__ */ jsxs7("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: onAccent, "aria-hidden": true, children: [
|
|
124926
|
+
/* @__PURE__ */ jsx10("rect", { x: "5", y: "4", width: "5", height: "16", rx: "1.4" }),
|
|
124927
|
+
/* @__PURE__ */ jsx10("rect", { x: "14", y: "4", width: "5", height: "16", rx: "1.4" })
|
|
124928
|
+
] }) : /* @__PURE__ */ jsx10("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: onAccent, "aria-hidden": true, children: /* @__PURE__ */ jsx10("path", { d: "M7 4.5 19.5 12 7 19.5Z" }) })
|
|
124669
124929
|
}
|
|
124670
124930
|
)
|
|
124671
124931
|
}
|
|
124672
124932
|
),
|
|
124673
|
-
/* @__PURE__ */
|
|
124674
|
-
/* @__PURE__ */
|
|
124933
|
+
/* @__PURE__ */ jsxs7("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
124934
|
+
/* @__PURE__ */ jsx10(
|
|
124675
124935
|
"svg",
|
|
124676
124936
|
{
|
|
124677
124937
|
width: "100%",
|
|
@@ -124697,11 +124957,11 @@ var init_renderNode = __esm({
|
|
|
124697
124957
|
children: bars.length === 0 ? (
|
|
124698
124958
|
// No envelope (an arm that could not meter, or a clip still uploading):
|
|
124699
124959
|
// a flat rule, never a fabricated waveform.
|
|
124700
|
-
/* @__PURE__ */
|
|
124960
|
+
/* @__PURE__ */ jsx10("rect", { x: 0, y: H2 / 2 - 1.5, width: W2, height: 3, fill: accent, opacity: 0.28 })
|
|
124701
124961
|
) : bars.map((v2, i2) => {
|
|
124702
124962
|
const cx = slot * (i2 + 0.5);
|
|
124703
124963
|
const bh = Math.max(4, v2 * H2);
|
|
124704
|
-
return /* @__PURE__ */
|
|
124964
|
+
return /* @__PURE__ */ jsx10(
|
|
124705
124965
|
"rect",
|
|
124706
124966
|
{
|
|
124707
124967
|
x: cx - barW / 2,
|
|
@@ -124717,12 +124977,12 @@ var init_renderNode = __esm({
|
|
|
124717
124977
|
})
|
|
124718
124978
|
}
|
|
124719
124979
|
),
|
|
124720
|
-
/* @__PURE__ */
|
|
124721
|
-
/* @__PURE__ */
|
|
124722
|
-
isUploading && /* @__PURE__ */
|
|
124723
|
-
isFailed && /* @__PURE__ */
|
|
124724
|
-
/* @__PURE__ */
|
|
124725
|
-
rates.length > 0 && isPlayable && /* @__PURE__ */
|
|
124980
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 8, fontFamily: bodyFont(ctx) }, children: [
|
|
124981
|
+
/* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(12), fontWeight: 500, fontVariantNumeric: "tabular-nums", color: isFailed ? danger : secondary }, children: voiceNoteClock(clockMs) }),
|
|
124982
|
+
isUploading && /* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(12), color: secondary }, children: "Sending\u2026" }),
|
|
124983
|
+
isFailed && /* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(12), color: danger }, children: "Not sent" }),
|
|
124984
|
+
/* @__PURE__ */ jsx10("span", { style: { flex: 1 } }),
|
|
124985
|
+
rates.length > 0 && isPlayable && /* @__PURE__ */ jsx10(
|
|
124726
124986
|
"button",
|
|
124727
124987
|
{
|
|
124728
124988
|
type: "button",
|
|
@@ -124756,21 +125016,21 @@ var init_renderNode = __esm({
|
|
|
124756
125016
|
const bound = useResolvedScalar(props.entriesPath, ctx);
|
|
124757
125017
|
const raw = props.entriesPath != null ? bound : props.entries;
|
|
124758
125018
|
const entries = Array.isArray(raw) ? raw : [];
|
|
124759
|
-
return /* @__PURE__ */
|
|
125019
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "column", width: "100%", ...wrap }, children: entries.map((e2, i2) => {
|
|
124760
125020
|
const done = e2?.done === true;
|
|
124761
125021
|
const last = i2 === entries.length - 1;
|
|
124762
125022
|
const dotCol = done ? C2("accentPrimary", "#116DFF") : C2("surfaceTertiary", "#cdd2d9");
|
|
124763
|
-
return /* @__PURE__ */
|
|
124764
|
-
/* @__PURE__ */
|
|
124765
|
-
/* @__PURE__ */
|
|
124766
|
-
!last && /* @__PURE__ */
|
|
125023
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 12 }, children: [
|
|
125024
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", flex: "none" }, children: [
|
|
125025
|
+
/* @__PURE__ */ jsx10("span", { style: { width: 12, height: 12, borderRadius: "50%", background: dotCol, border: `2px solid ${done ? dotCol : C2("border", "#cdd2d9")}`, marginTop: 4 } }),
|
|
125026
|
+
!last && /* @__PURE__ */ jsx10("span", { style: { flex: 1, width: 2, background: C2("surfaceTertiary", "#e3e6ea"), minHeight: 18 } })
|
|
124767
125027
|
] }),
|
|
124768
|
-
/* @__PURE__ */
|
|
124769
|
-
/* @__PURE__ */
|
|
124770
|
-
/* @__PURE__ */
|
|
124771
|
-
e2?.time && /* @__PURE__ */
|
|
125028
|
+
/* @__PURE__ */ jsxs7("div", { style: { paddingBottom: last ? 0 : 14, minWidth: 0 }, children: [
|
|
125029
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 8, alignItems: "baseline" }, children: [
|
|
125030
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(15), fontWeight: 600, color: C2("textPrimary", "#13171e") }, children: asText2(e2?.title) }),
|
|
125031
|
+
e2?.time && /* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(12), color: C2("textSecondary", "#888") }, children: asText2(e2.time) })
|
|
124772
125032
|
] }),
|
|
124773
|
-
e2?.subtitle && /* @__PURE__ */
|
|
125033
|
+
e2?.subtitle && /* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(13), color: C2("textSecondary", "#636b78") }, children: asText2(e2.subtitle) })
|
|
124774
125034
|
] })
|
|
124775
125035
|
] }, i2);
|
|
124776
125036
|
}) });
|
|
@@ -124805,8 +125065,8 @@ var init_renderNode = __esm({
|
|
|
124805
125065
|
}, interval);
|
|
124806
125066
|
return () => clearInterval(timer);
|
|
124807
125067
|
}, [props.autoplayIntervalMs, props.__pager, boundRail, pages.length, props.onChange, ctx]);
|
|
124808
|
-
return /* @__PURE__ */
|
|
124809
|
-
/* @__PURE__ */
|
|
125068
|
+
return /* @__PURE__ */ jsxs7("div", { style: { width: "100%", ...wrap }, children: [
|
|
125069
|
+
/* @__PURE__ */ jsx10(
|
|
124810
125070
|
"div",
|
|
124811
125071
|
{
|
|
124812
125072
|
ref: rail,
|
|
@@ -124824,10 +125084,10 @@ var init_renderNode = __esm({
|
|
|
124824
125084
|
if (!boundRail && event.currentTarget.clientWidth > 0) select(Math.max(0, Math.min(pages.length - 1, Math.round(event.currentTarget.scrollLeft / event.currentTarget.clientWidth))));
|
|
124825
125085
|
},
|
|
124826
125086
|
style: { display: "flex", overflowX: "auto", scrollSnapType: boundRail ? void 0 : "x mandatory", gap: boundRail ? 12 : void 0, width: "100%" },
|
|
124827
|
-
children: boundRail ? /* @__PURE__ */
|
|
125087
|
+
children: boundRail ? /* @__PURE__ */ jsx10(BoundList, { ctx, itemsPath, template: items[0], renderRow: (template, itemCtx) => /* @__PURE__ */ jsx10("div", { style: { flex: "0 0 auto" }, children: renderNode(template, itemCtx) }) }) : pages.map((page, index) => /* @__PURE__ */ jsx10("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: renderNode(page, ctx) }, page?.id ?? index))
|
|
124828
125088
|
}
|
|
124829
125089
|
),
|
|
124830
|
-
!boundRail && pages.length > 1 && (!props.__pager || props.showIndicator !== false) && /* @__PURE__ */
|
|
125090
|
+
!boundRail && pages.length > 1 && (!props.__pager || props.showIndicator !== false) && /* @__PURE__ */ jsx10("div", { "aria-label": `Page ${current + 1} of ${pages.length}`, style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages.map((_2, index) => /* @__PURE__ */ jsx10("span", { "aria-current": index === current ? "true" : void 0, style: { width: index === current ? 18 : 7, height: 7, borderRadius: 999, background: index === current ? ctx.color("accentPrimary", "#116DFF") : ctx.color("border", "#ccc") } }, index)) })
|
|
124831
125091
|
] });
|
|
124832
125092
|
});
|
|
124833
125093
|
WheelPickerNode = withExtras("WheelPickerNode", ({ props, ctx, wrap }) => {
|
|
@@ -124851,9 +125111,9 @@ var init_renderNode = __esm({
|
|
|
124851
125111
|
if (viewport.current) viewport.current.scrollTop = selIdx * 32;
|
|
124852
125112
|
}, [selIdx, opts.length]);
|
|
124853
125113
|
React9.useEffect(() => () => clearTimeout(settle.current), []);
|
|
124854
|
-
return /* @__PURE__ */
|
|
124855
|
-
/* @__PURE__ */
|
|
124856
|
-
/* @__PURE__ */
|
|
125114
|
+
return /* @__PURE__ */ jsxs7("div", { style: { position: "relative", width: "100%", maxWidth: 220, height: 160, overflow: "hidden", background: C2("surfaceSecondary", "#f5f7fa"), borderRadius: 12, ...wrap }, children: [
|
|
125115
|
+
/* @__PURE__ */ jsx10("div", { "aria-hidden": "true", style: { position: "absolute", top: 64, left: 8, right: 8, height: 32, background: C2("surfacePrimary", "#fff"), borderRadius: 8, boxShadow: "inset 0 0 0 1px rgba(0,0,0,.06)" } }),
|
|
125116
|
+
/* @__PURE__ */ jsx10(
|
|
124857
125117
|
"div",
|
|
124858
125118
|
{
|
|
124859
125119
|
ref: viewport,
|
|
@@ -124874,7 +125134,7 @@ var init_renderNode = __esm({
|
|
|
124874
125134
|
settle.current = setTimeout(() => emit(Math.max(0, Math.min(opts.length - 1, Math.round((viewport.current?.scrollTop ?? 0) / 32)))), 120);
|
|
124875
125135
|
},
|
|
124876
125136
|
style: { position: "relative", height: "100%", overflowY: "auto", scrollbarWidth: "none", scrollSnapType: "y mandatory", padding: "64px 0", boxSizing: "border-box" },
|
|
124877
|
-
children: opts.map((o2, index) => /* @__PURE__ */
|
|
125137
|
+
children: opts.map((o2, index) => /* @__PURE__ */ jsx10(
|
|
124878
125138
|
"div",
|
|
124879
125139
|
{
|
|
124880
125140
|
id: `${pickerId}-${index}`,
|
|
@@ -124897,13 +125157,13 @@ var init_renderNode = __esm({
|
|
|
124897
125157
|
const cur = typeof raw === "string" ? raw : "#116DFF";
|
|
124898
125158
|
const swatches = Array.isArray(props.swatches) ? props.swatches : ["#116DFF", "#23924D", "#E89F00", "#E62214", "#8B5CF6", "#111827"];
|
|
124899
125159
|
const onPick = (hex2) => ctx.onAction && props.onChange ? () => ctx.onAction({ ...props.onChange, args: { ...props.onChange?.args ?? {}, value: hex2 } }) : void 0;
|
|
124900
|
-
return /* @__PURE__ */
|
|
124901
|
-
/* @__PURE__ */
|
|
124902
|
-
/* @__PURE__ */
|
|
124903
|
-
props.label != null && /* @__PURE__ */
|
|
124904
|
-
/* @__PURE__ */
|
|
125160
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", flexDirection: "column", gap: 8, ...wrap }, children: [
|
|
125161
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
|
|
125162
|
+
/* @__PURE__ */ jsx10("span", { style: { width: 28, height: 28, borderRadius: 8, background: C2(cur, cur), border: `1px solid ${C2("border", "#e3e3e3")}`, flex: "none" } }),
|
|
125163
|
+
props.label != null && /* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#13171e") }, children: txt(props.label, ctx) }),
|
|
125164
|
+
/* @__PURE__ */ jsx10("span", { style: { marginLeft: "auto", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(13), color: C2("textSecondary", "#636b78") }, children: asText2(cur) })
|
|
124905
125165
|
] }),
|
|
124906
|
-
/* @__PURE__ */
|
|
125166
|
+
/* @__PURE__ */ jsx10("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: swatches.map((s2, i2) => /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": `Choose ${s2}`, "aria-pressed": s2 === cur, disabled: !onPick(s2), onClick: onPick(s2), style: { width: 44, height: 44, padding: 9, border: "none", background: "transparent", cursor: onPick(s2) ? "pointer" : "default", display: "grid", placeItems: "center" }, children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", style: { width: 26, height: 26, borderRadius: "50%", background: C2(s2, s2), boxShadow: s2 === cur ? `0 0 0 2px ${C2("surfacePrimary", "#fff")}, 0 0 0 4px ${C2(s2, s2)}` : "inset 0 0 0 1px rgba(0,0,0,.08)" } }) }, i2)) })
|
|
124907
125167
|
] });
|
|
124908
125168
|
});
|
|
124909
125169
|
FilterChipsNode = withExtras("FilterChipsNode", ({ props, ctx, wrap }) => {
|
|
@@ -124930,17 +125190,17 @@ var init_renderNode = __esm({
|
|
|
124930
125190
|
// ONE horizontally scrolling row, like the iOS ScrollView(.horizontal) and the
|
|
124931
125191
|
// Android LazyRow. Wrapping here turned a long filter set into a ragged grid and
|
|
124932
125192
|
// pushed a sibling count onto two lines (#3080, #3004).
|
|
124933
|
-
/* @__PURE__ */
|
|
125193
|
+
/* @__PURE__ */ jsx10("div", { role: "group", style: { display: "flex", gap: 8, flexWrap: "nowrap", overflowX: "auto", scrollbarWidth: "none", width: "100%", minWidth: 0, ...wrap }, children: chips.map((c2, i2) => {
|
|
124934
125194
|
const on4 = selected.includes(c2.id);
|
|
124935
125195
|
const chipStyle = { display: "flex", flex: "none", whiteSpace: "nowrap", gap: 6, alignItems: "center", fontFamily: bodyFont(ctx), fontWeight: 500, fontSize: pxToRem(13), border: `1px solid ${on4 ? "transparent" : C2("border", "#ddd")}`, background: on4 ? C2("accentPrimary", "#116DFF") : "transparent", color: on4 ? C2("textOnAccent", "#fff") : C2("textSecondary", "#666"), padding: "6px 12px", borderRadius: 999 };
|
|
124936
|
-
const inner = /* @__PURE__ */
|
|
125196
|
+
const inner = /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
124937
125197
|
asText2(c2.label),
|
|
124938
|
-
c2.count != null && /* @__PURE__ */
|
|
125198
|
+
c2.count != null && /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
124939
125199
|
" ",
|
|
124940
|
-
/* @__PURE__ */
|
|
125200
|
+
/* @__PURE__ */ jsx10("span", { style: { ...on4 ? {} : { opacity: 0.7 }, fontSize: pxToRem(11) }, children: c2.count })
|
|
124941
125201
|
] })
|
|
124942
125202
|
] });
|
|
124943
|
-
return interactive ? /* @__PURE__ */
|
|
125203
|
+
return interactive ? /* @__PURE__ */ jsx10("button", { type: "button", "aria-pressed": on4, onClick: () => toggle(c2.id), style: { all: "unset", cursor: "pointer", boxSizing: "border-box", ...chipStyle }, children: inner }, c2.id ?? i2) : /* @__PURE__ */ jsx10("span", { style: chipStyle, children: inner }, c2.id ?? i2);
|
|
124944
125204
|
}) })
|
|
124945
125205
|
);
|
|
124946
125206
|
});
|
|
@@ -125154,7 +125414,7 @@ var init_renderNode = __esm({
|
|
|
125154
125414
|
});
|
|
125155
125415
|
}
|
|
125156
125416
|
}
|
|
125157
|
-
if (usesTileArm) return /* @__PURE__ */
|
|
125417
|
+
if (usesTileArm) return /* @__PURE__ */ jsxs7(
|
|
125158
125418
|
"div",
|
|
125159
125419
|
{
|
|
125160
125420
|
ref: attachBox,
|
|
@@ -125181,20 +125441,20 @@ var init_renderNode = __esm({
|
|
|
125181
125441
|
...wrap
|
|
125182
125442
|
},
|
|
125183
125443
|
children: [
|
|
125184
|
-
tiles.map((t2) => /* @__PURE__ */
|
|
125185
|
-
/* @__PURE__ */
|
|
125444
|
+
tiles.map((t2) => /* @__PURE__ */ jsx10("img", { src: t2.src, alt: "", loading: "lazy", draggable: false, onLoad: () => setTileStatus((s2) => ({ ...s2, [t2.src]: "loaded" })), onError: () => setTileStatus((s2) => ({ ...s2, [t2.src]: "failed" })), style: { position: "absolute", left: t2.left, top: t2.top, width: TILE_PX, height: TILE_PX } }, t2.key)),
|
|
125445
|
+
/* @__PURE__ */ jsxs7("svg", { viewBox: `0 0 ${W2} ${H2}`, preserveAspectRatio: "none", style: { position: "absolute", inset: 0, width: "100%", height: "100%", pointerEvents: "none" }, children: [
|
|
125186
125446
|
shapes.map((sh, i2) => {
|
|
125187
125447
|
if (sh.kind === "unknown" || sh.points.length < 2) return null;
|
|
125188
125448
|
const stroke = C2(typeof sh.stroke === "string" && sh.stroke ? sh.stroke : "accentPrimary", accent);
|
|
125189
125449
|
const width = typeof sh.strokeWidth === "number" && sh.strokeWidth > 0 ? sh.strokeWidth : sh.kind === "line" ? 4 : 2;
|
|
125190
125450
|
const pts = sh.points.map((p2) => `${sx(p2)},${sy(p2)}`).join(" ");
|
|
125191
125451
|
if (sh.kind === "line") {
|
|
125192
|
-
return /* @__PURE__ */
|
|
125452
|
+
return /* @__PURE__ */ jsx10("polyline", { points: pts, fill: "none", stroke, strokeWidth: width, strokeLinejoin: "round", strokeLinecap: "round" }, sh.id ?? `sh${i2}`);
|
|
125193
125453
|
}
|
|
125194
125454
|
const fill = typeof sh.fill === "string" && sh.fill ? C2(sh.fill, stroke) : stroke;
|
|
125195
|
-
return /* @__PURE__ */
|
|
125455
|
+
return /* @__PURE__ */ jsx10("polygon", { points: pts, fill, fillOpacity: typeof sh.fill === "string" && sh.fill ? 0.35 : 0.18, stroke, strokeWidth: width }, sh.id ?? `sh${i2}`);
|
|
125196
125456
|
}),
|
|
125197
|
-
route.length > 1 && /* @__PURE__ */
|
|
125457
|
+
route.length > 1 && /* @__PURE__ */ jsx10(
|
|
125198
125458
|
"polyline",
|
|
125199
125459
|
{
|
|
125200
125460
|
points: route.map((p2) => `${sx(p2)},${sy(p2)}`).join(" "),
|
|
@@ -125211,18 +125471,18 @@ var init_renderNode = __esm({
|
|
|
125211
125471
|
// `icon` adds a glyph from the SAME table the Icon component uses, so a name means
|
|
125212
125472
|
// one thing across the renderer; an unknown name yields the neutral "·" rather than
|
|
125213
125473
|
// an empty box.
|
|
125214
|
-
/* @__PURE__ */
|
|
125215
|
-
/* @__PURE__ */
|
|
125216
|
-
typeof m2.icon === "string" && m2.icon ? /* @__PURE__ */
|
|
125474
|
+
/* @__PURE__ */ jsxs7("g", { children: [
|
|
125475
|
+
/* @__PURE__ */ jsx10("circle", { cx: sx(m2), cy: sy(m2), r: typeof m2.icon === "string" && m2.icon ? 9 : 6, fill: typeof m2.tint === "string" && m2.tint ? C2(m2.tint, accent) : accent, stroke: "#fff", strokeWidth: 2 }),
|
|
125476
|
+
typeof m2.icon === "string" && m2.icon ? /* @__PURE__ */ jsx10("text", { x: sx(m2), y: sy(m2), textAnchor: "middle", dominantBaseline: "central", fontSize: 9, fill: "#fff", children: iconGlyph(m2.icon) }) : null
|
|
125217
125477
|
] }, i2)
|
|
125218
125478
|
)),
|
|
125219
|
-
userFix && (props.showUserLocation === true || follow) ? /* @__PURE__ */
|
|
125220
|
-
/* @__PURE__ */
|
|
125221
|
-
/* @__PURE__ */
|
|
125479
|
+
userFix && (props.showUserLocation === true || follow) ? /* @__PURE__ */ jsxs7("g", { "data-testid": "map-user-location", "data-following": followActive ? "true" : "false", children: [
|
|
125480
|
+
/* @__PURE__ */ jsx10("circle", { cx: sx({ latitude: userFix.lat, longitude: userFix.lng }), cy: sy({ latitude: userFix.lat, longitude: userFix.lng }), r: 14, fill: accent, fillOpacity: 0.18 }),
|
|
125481
|
+
/* @__PURE__ */ jsx10("circle", { cx: sx({ latitude: userFix.lat, longitude: userFix.lng }), cy: sy({ latitude: userFix.lat, longitude: userFix.lng }), r: 7, fill: accent, stroke: "#fff", strokeWidth: 2.5 })
|
|
125222
125482
|
] }) : null
|
|
125223
125483
|
] }),
|
|
125224
|
-
tiles.length > 0 && tiles.every((t2) => tileStatus[t2.src] === "failed") && /* @__PURE__ */
|
|
125225
|
-
/* @__PURE__ */
|
|
125484
|
+
tiles.length > 0 && tiles.every((t2) => tileStatus[t2.src] === "failed") && /* @__PURE__ */ jsx10("div", { role: "status", "data-map-tiles-unavailable": "", style: { position: "absolute", left: 8, right: 8, bottom: 20, padding: "8px 10px", borderRadius: 6, color: C2("textPrimary", "#13171E"), background: C2("surfacePrimary", "#fff"), fontSize: 12 }, children: "Map tiles unavailable. Connect to the internet to view streets; saved markers remain available." }),
|
|
125485
|
+
/* @__PURE__ */ jsx10("div", { style: { position: "absolute", right: 2, bottom: 1, font: "10px/12px system-ui", color: "#333", background: "rgba(255,255,255,.7)", padding: "0 3px", borderRadius: 2 }, children: resolvedTileSource?.attribution ?? "\xA9 OpenStreetMap" })
|
|
125226
125486
|
]
|
|
125227
125487
|
}
|
|
125228
125488
|
);
|
|
@@ -125236,9 +125496,9 @@ var init_renderNode = __esm({
|
|
|
125236
125496
|
const ny = (la2) => maxLa > minLa ? H2 - pad3 - (la2 - minLa) / (maxLa - minLa) * (H2 - 2 * pad3) : H2 / 2;
|
|
125237
125497
|
const accent = C2("accentPrimary", "#116DFF");
|
|
125238
125498
|
const poly = route.map((p2) => `${nx(p2.longitude)},${ny(p2.latitude)}`).join(" ");
|
|
125239
|
-
return /* @__PURE__ */
|
|
125240
|
-
route.length > 1 && /* @__PURE__ */
|
|
125241
|
-
markers.map((m2, i2) => /* @__PURE__ */
|
|
125499
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: "100%", boxSizing: "border-box", height: h2, borderRadius: ctx.radius("md", 8), overflow: "hidden", border: `1px solid ${C2("border", "#e3e3e3")}`, background: C2("surfaceSecondary", "#eef1f5"), position: "relative", ...wrap }, children: /* @__PURE__ */ jsxs7("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", style: { width: "100%", height: "100%" }, children: [
|
|
125500
|
+
route.length > 1 && /* @__PURE__ */ jsx10("polyline", { points: poly, fill: "none", stroke: accent, strokeWidth: 1.6, strokeLinejoin: "round", strokeLinecap: "round", strokeDasharray: "3 2" }),
|
|
125501
|
+
markers.map((m2, i2) => /* @__PURE__ */ jsx10("g", { children: /* @__PURE__ */ jsx10("circle", { cx: nx(m2.longitude), cy: ny(m2.latitude), r: 2.6, fill: typeof m2.tint === "string" && m2.tint ? C2(m2.tint, accent) : accent, stroke: "#fff", strokeWidth: 0.8 }) }, i2))
|
|
125242
125502
|
] }) });
|
|
125243
125503
|
}
|
|
125244
125504
|
const lat = typeof props.latitude === "number" ? props.latitude : 37.7749;
|
|
@@ -125247,7 +125507,7 @@ var init_renderNode = __esm({
|
|
|
125247
125507
|
const d2 = 0.04 * Math.pow(2, 13 - zoom);
|
|
125248
125508
|
const bbox = `${lng - d2},${lat - d2},${lng + d2},${lat + d2}`;
|
|
125249
125509
|
const src = `https://www.openstreetmap.org/export/embed.html?bbox=${encodeURIComponent(bbox)}&layer=mapnik&marker=${lat},${lng}`;
|
|
125250
|
-
return /* @__PURE__ */
|
|
125510
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: "100%", boxSizing: "border-box", height: h2, borderRadius: ctx.radius("md", 8), overflow: "hidden", border: `1px solid ${C2("border", "#e3e3e3")}`, position: "relative", ...wrap }, children: /* @__PURE__ */ jsx10("iframe", { title: "map", src, style: { width: "100%", height: "100%", border: "none", pointerEvents: props.interactive === false ? "none" : "auto" }, loading: "lazy" }) });
|
|
125251
125511
|
});
|
|
125252
125512
|
CAROUSEL_SETTLE_MS = 1e3;
|
|
125253
125513
|
scrollCarouselTo = (el2, page) => {
|
|
@@ -125337,7 +125597,7 @@ var init_renderNode = __esm({
|
|
|
125337
125597
|
if (event.type === "keydown") setFocused(true);
|
|
125338
125598
|
else setHovered(true);
|
|
125339
125599
|
};
|
|
125340
|
-
return /* @__PURE__ */
|
|
125600
|
+
return /* @__PURE__ */ jsxs7(
|
|
125341
125601
|
"div",
|
|
125342
125602
|
{
|
|
125343
125603
|
"data-carousel-index": index,
|
|
@@ -125349,15 +125609,15 @@ var init_renderNode = __esm({
|
|
|
125349
125609
|
onBlur: onFocusOut,
|
|
125350
125610
|
style: { width: "100%", ...wrap },
|
|
125351
125611
|
children: [
|
|
125352
|
-
/* @__PURE__ */
|
|
125612
|
+
/* @__PURE__ */ jsx10("div", { ref: trackRef, "data-page-rail": "", tabIndex: 0, "aria-label": "Carousel", onScroll, onPointerDown: userTakesOver, onTouchStart: userTakesOver, onWheel: userTakesOver, onKeyDown: (event) => {
|
|
125353
125613
|
userTakesOver(event);
|
|
125354
125614
|
if (event.target !== event.currentTarget || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
|
|
125355
125615
|
event.preventDefault();
|
|
125356
125616
|
const next = event.key === "Home" ? 0 : event.key === "End" ? count2 - 1 : Math.max(0, Math.min(count2 - 1, indexRef.current + (event.key === "ArrowRight" ? 1 : -1)));
|
|
125357
125617
|
if (trackRef.current) trackRef.current.scrollLeft = next * trackRef.current.clientWidth;
|
|
125358
125618
|
pageTo(next);
|
|
125359
|
-
}, style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" }, children: pages.map((pg, i2) => /* @__PURE__ */
|
|
125360
|
-
count2 > 1 && /* @__PURE__ */
|
|
125619
|
+
}, style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" }, children: pages.map((pg, i2) => /* @__PURE__ */ jsx10("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: renderNode(pg, ctx) }, pg?.id ?? i2)) }),
|
|
125620
|
+
count2 > 1 && /* @__PURE__ */ jsx10("div", { "aria-label": `Page ${index + 1} of ${count2}`, style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages.map((_2, i2) => /* @__PURE__ */ jsx10("span", { "aria-current": i2 === index ? "true" : void 0, style: { width: i2 === index ? 18 : 7, height: 7, borderRadius: 999, background: i2 === index ? C2("accentPrimary", "#116DFF") : C2("border", "#ccc") } }, i2)) })
|
|
125361
125621
|
]
|
|
125362
125622
|
}
|
|
125363
125623
|
);
|
|
@@ -125367,14 +125627,14 @@ var init_renderNode = __esm({
|
|
|
125367
125627
|
const [dismissed, setDismissed] = React9.useState(false);
|
|
125368
125628
|
if (dismissed) return null;
|
|
125369
125629
|
const accent = sevColor(ctx, props.severity ?? "info");
|
|
125370
|
-
return /* @__PURE__ */
|
|
125371
|
-
/* @__PURE__ */
|
|
125372
|
-
/* @__PURE__ */
|
|
125373
|
-
/* @__PURE__ */
|
|
125374
|
-
props.message && /* @__PURE__ */
|
|
125630
|
+
return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 11, width: "100%", boxSizing: "border-box", borderRadius: ctx.radius("md", 10), padding: 13, background: `color-mix(in srgb, ${accent} 12%, ${C2("surfacePrimary", "#fff")})`, border: `1px solid color-mix(in srgb, ${accent} 32%, transparent)`, ...wrap }, children: [
|
|
125631
|
+
/* @__PURE__ */ jsx10("div", { style: { width: 3, borderRadius: 3, background: accent, flex: "none" } }),
|
|
125632
|
+
/* @__PURE__ */ jsxs7("div", { style: props.dismissible === true ? { flex: 1, minWidth: 0 } : void 0, children: [
|
|
125633
|
+
/* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(14), color: C2("textPrimary", "#111") }, children: txt(props.title, ctx) }),
|
|
125634
|
+
props.message && /* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(13), lineHeight: 1.4, color: C2("textSecondary", "#666"), marginTop: 2 }, children: txt(props.message, ctx) }),
|
|
125375
125635
|
actionTextButton(ctx, props.action, asBoundText(props.actionLabel, ctx) || "Take action", C2("textPrimary", "#111"), { marginTop: 7, textDecoration: "underline" })
|
|
125376
125636
|
] }),
|
|
125377
|
-
props.dismissible === true && /* @__PURE__ */
|
|
125637
|
+
props.dismissible === true && /* @__PURE__ */ jsx10(
|
|
125378
125638
|
"button",
|
|
125379
125639
|
{
|
|
125380
125640
|
type: "button",
|
|
@@ -125385,7 +125645,7 @@ var init_renderNode = __esm({
|
|
|
125385
125645
|
setDismissed(true);
|
|
125386
125646
|
},
|
|
125387
125647
|
style: { flex: "none", alignSelf: "flex-start", appearance: "none", WebkitAppearance: "none", border: "none", background: "transparent", padding: 0, minWidth: 24, minHeight: 24, display: "grid", placeItems: "center", color: C2("textSecondary", "#666"), fontSize: pxToRem(16), lineHeight: 1, cursor: "pointer" },
|
|
125388
|
-
children: /* @__PURE__ */
|
|
125648
|
+
children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", children: "\u2715" })
|
|
125389
125649
|
}
|
|
125390
125650
|
)
|
|
125391
125651
|
] });
|
|
@@ -125432,17 +125692,17 @@ var init_renderNode = __esm({
|
|
|
125432
125692
|
const height = Math.round(expanded - (expanded - collapsed) * progress);
|
|
125433
125693
|
const lost = expanded - height;
|
|
125434
125694
|
const fade = 1 - progress * 0.7;
|
|
125435
|
-
return /* @__PURE__ */
|
|
125436
|
-
/* @__PURE__ */
|
|
125437
|
-
imageUrl && /* @__PURE__ */
|
|
125438
|
-
imageUrl && /* @__PURE__ */
|
|
125439
|
-
/* @__PURE__ */
|
|
125440
|
-
/* @__PURE__ */
|
|
125441
|
-
props.subtitle && /* @__PURE__ */
|
|
125695
|
+
return /* @__PURE__ */ jsxs7("div", { ref: rootRef, ...{ [A11Y_PART]: "root" }, "data-collapsing-header-scroll": "", onScroll: (event) => setOffset(event.currentTarget.scrollTop), style: { width: "100%", maxHeight: items.length ? "min(640px, 100dvh)" : void 0, overflowY: items.length ? "auto" : void 0, overflowAnchor: "none", ...wrap }, children: [
|
|
125696
|
+
/* @__PURE__ */ jsxs7("div", { "data-collapsing-header-hero": "", "data-collapse-progress": progress.toFixed(2), style: { position: "sticky", top: 0, zIndex: 1, height, borderRadius: ctx.radius("md", 10), overflow: "hidden", background: imageUrl ? C2("surfaceSecondary", "#eef1f5") : `linear-gradient(135deg, ${C2("accentPrimary", "#116DFF")}, ${C2("accentSecondary", "#0E5FE3")})` }, children: [
|
|
125697
|
+
imageUrl && /* @__PURE__ */ jsx10("img", { src: imageUrl, alt: "", "data-testid": "collapsing-header-image", onError: () => setFailedHero(imageUrl), style: { position: "absolute", left: 0, top: 0, width: "100%", height: expanded, objectFit: "cover", ...lost > 0 ? { transform: `translateY(${-Math.round(lost * (1 - parallax))}px)` } : {} } }),
|
|
125698
|
+
imageUrl && /* @__PURE__ */ jsx10("div", { "data-testid": "collapsing-header-scrim", "aria-hidden": "true", style: { position: "absolute", left: 0, right: 0, bottom: 0, height: "60%", background: "linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.45))", pointerEvents: "none", ...progress > 0 ? { opacity: fade } : {} } }),
|
|
125699
|
+
/* @__PURE__ */ jsxs7("div", { style: { position: "absolute", left: 14, bottom: 12, color: "#fff", textShadow: "0 1px 4px rgba(0,0,0,.5)", ...progress > 0 ? { opacity: fade } : {} }, children: [
|
|
125700
|
+
/* @__PURE__ */ jsx10("div", { ...{ [A11Y_PART]: "node" }, role: "heading", "aria-level": 2, 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: pxToRem(20) }, children: txt(props.title, ctx) }),
|
|
125701
|
+
props.subtitle && /* @__PURE__ */ jsx10("div", { style: { fontSize: pxToRem(13), opacity: 0.9 }, children: txt(props.subtitle, ctx) })
|
|
125442
125702
|
] })
|
|
125443
125703
|
] }),
|
|
125444
|
-
lost > 0 && /* @__PURE__ */
|
|
125445
|
-
items.length > 0 && /* @__PURE__ */
|
|
125704
|
+
lost > 0 && /* @__PURE__ */ jsx10("div", { "aria-hidden": "true", style: { height: lost } }),
|
|
125705
|
+
items.length > 0 && /* @__PURE__ */ jsx10("div", { style: { paddingTop: 12, display: "flex", flexDirection: "column", gap: 12 }, children: kids2(items, ctx) })
|
|
125446
125706
|
] });
|
|
125447
125707
|
});
|
|
125448
125708
|
UnsupportedOnSurface = ({
|
|
@@ -125450,7 +125710,7 @@ var init_renderNode = __esm({
|
|
|
125450
125710
|
reason,
|
|
125451
125711
|
surface,
|
|
125452
125712
|
ctx
|
|
125453
|
-
}) => /* @__PURE__ */
|
|
125713
|
+
}) => /* @__PURE__ */ jsxs7(
|
|
125454
125714
|
"div",
|
|
125455
125715
|
{
|
|
125456
125716
|
"data-testid": "unsupported-on-surface",
|
|
@@ -125466,11 +125726,11 @@ var init_renderNode = __esm({
|
|
|
125466
125726
|
color: ctx.color("error", "#a8362a")
|
|
125467
125727
|
},
|
|
125468
125728
|
children: [
|
|
125469
|
-
/* @__PURE__ */
|
|
125729
|
+
/* @__PURE__ */ jsxs7("strong", { style: { display: "block" }, children: [
|
|
125470
125730
|
"\u26A0 ",
|
|
125471
125731
|
type
|
|
125472
125732
|
] }),
|
|
125473
|
-
/* @__PURE__ */
|
|
125733
|
+
/* @__PURE__ */ jsxs7("span", { style: { opacity: 0.85 }, children: [
|
|
125474
125734
|
"unsupported on ",
|
|
125475
125735
|
surface,
|
|
125476
125736
|
" \u2014 ",
|
|
@@ -125564,9 +125824,9 @@ var init_renderNode = __esm({
|
|
|
125564
125824
|
e2.preventDefault();
|
|
125565
125825
|
focusDay(localDayKey(new Date(d2.getFullYear(), d2.getMonth(), d2.getDate() + delta)));
|
|
125566
125826
|
};
|
|
125567
|
-
return /* @__PURE__ */
|
|
125568
|
-
/* @__PURE__ */
|
|
125569
|
-
/* @__PURE__ */
|
|
125827
|
+
return /* @__PURE__ */ jsxs7("div", { style: { width: "100%", boxSizing: "border-box", ...wrap }, children: [
|
|
125828
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 10 }, children: [
|
|
125829
|
+
/* @__PURE__ */ jsx10(
|
|
125570
125830
|
"button",
|
|
125571
125831
|
{
|
|
125572
125832
|
type: "button",
|
|
@@ -125577,8 +125837,8 @@ var init_renderNode = __esm({
|
|
|
125577
125837
|
children: "\u2039"
|
|
125578
125838
|
}
|
|
125579
125839
|
),
|
|
125580
|
-
/* @__PURE__ */
|
|
125581
|
-
/* @__PURE__ */
|
|
125840
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontWeight: 700, fontSize: pxToRem(15), color: C2("textPrimary", "#13171e") }, children: monthLabel }),
|
|
125841
|
+
/* @__PURE__ */ jsx10(
|
|
125582
125842
|
"button",
|
|
125583
125843
|
{
|
|
125584
125844
|
type: "button",
|
|
@@ -125590,10 +125850,10 @@ var init_renderNode = __esm({
|
|
|
125590
125850
|
}
|
|
125591
125851
|
)
|
|
125592
125852
|
] }),
|
|
125593
|
-
/* @__PURE__ */
|
|
125594
|
-
/* @__PURE__ */
|
|
125853
|
+
/* @__PURE__ */ jsx10("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, minmax(0, 1fr))", gap: 2, marginBottom: 4 }, children: heads.map((h2, i2) => /* @__PURE__ */ jsx10("div", { style: { textAlign: "center", fontFamily: bodyFont(ctx), fontSize: pxToRem(11), fontWeight: 600, color: C2("textSecondary", "#888"), textTransform: "uppercase" }, children: h2 }, i2)) }),
|
|
125854
|
+
/* @__PURE__ */ jsx10("div", { ref: gridRef, role: "grid", "aria-label": monthLabel, style: { display: "grid", gridTemplateColumns: "repeat(7, minmax(0, 1fr))", gap: 2, width: "100%" }, children: rows.flatMap(
|
|
125595
125855
|
(row, ri2) => row.map((cell2, ci2) => {
|
|
125596
|
-
if (!cell2.inMonth && !showAdjacent) return /* @__PURE__ */
|
|
125856
|
+
if (!cell2.inMonth && !showAdjacent) return /* @__PURE__ */ jsx10("div", { "aria-hidden": "true" }, `${ri2}-${ci2}`);
|
|
125597
125857
|
const dec = decByDate.get(cell2.date);
|
|
125598
125858
|
const disabled = dec?.disabled === true || !calWithinWindow(cell2.date, minDate, maxDate);
|
|
125599
125859
|
const rangeStart = isRange && !!range.start && cell2.date === range.start;
|
|
@@ -125603,7 +125863,7 @@ var init_renderNode = __esm({
|
|
|
125603
125863
|
const dotCount = Math.min(maxDots, typeof dec?.dotCount === "number" ? dec.dotCount : 0);
|
|
125604
125864
|
const dotColor = C2(dec?.dotColorToken ?? "accentPrimary", "#116DFF");
|
|
125605
125865
|
const tabbable = selected || !selectedDate && cell2.isToday;
|
|
125606
|
-
return /* @__PURE__ */
|
|
125866
|
+
return /* @__PURE__ */ jsxs7(
|
|
125607
125867
|
"button",
|
|
125608
125868
|
{
|
|
125609
125869
|
type: "button",
|
|
@@ -125636,9 +125896,9 @@ var init_renderNode = __esm({
|
|
|
125636
125896
|
boxShadow: cell2.isToday && !selected ? `inset 0 0 0 1.5px ${C2("accentPrimary", "#116DFF")}` : "none"
|
|
125637
125897
|
},
|
|
125638
125898
|
children: [
|
|
125639
|
-
/* @__PURE__ */
|
|
125640
|
-
dotCount > 0 && /* @__PURE__ */
|
|
125641
|
-
dec?.badge != null && /* @__PURE__ */
|
|
125899
|
+
/* @__PURE__ */ jsx10("span", { children: cell2.day }),
|
|
125900
|
+
dotCount > 0 && /* @__PURE__ */ jsx10("span", { style: { display: "flex", gap: 2 }, children: Array.from({ length: dotCount }).map((_2, i2) => /* @__PURE__ */ jsx10("span", { style: { width: 4, height: 4, borderRadius: "50%", background: selected ? C2("textOnAccent", "#fff") : dotColor } }, i2)) }),
|
|
125901
|
+
dec?.badge != null && /* @__PURE__ */ jsx10("span", { style: { fontSize: pxToRem(9), lineHeight: 1, maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: selected ? C2("textOnAccent", "#fff") : C2("textSecondary", "#888") }, children: asText2(dec.badge) })
|
|
125642
125902
|
]
|
|
125643
125903
|
},
|
|
125644
125904
|
cell2.date
|
|
@@ -125701,9 +125961,9 @@ var init_renderNode = __esm({
|
|
|
125701
125961
|
const nowKey = localDayKey(now);
|
|
125702
125962
|
const showNow = props.showNowLine === true && nowMinutes >= startHour * 60 && nowMinutes <= endHour * 60;
|
|
125703
125963
|
const rangeLabel = days.length > 1 ? `${days[0].toLocaleDateString(void 0, { month: "short", day: "numeric" })} \u2013 ${days[days.length - 1].toLocaleDateString(void 0, { month: "short", day: "numeric" })}` : days[0].toLocaleDateString(void 0, { weekday: "long", month: "short", day: "numeric" });
|
|
125704
|
-
return /* @__PURE__ */
|
|
125705
|
-
/* @__PURE__ */
|
|
125706
|
-
/* @__PURE__ */
|
|
125964
|
+
return /* @__PURE__ */ jsxs7("div", { style: { width: "100%", boxSizing: "border-box", overflowX: "auto", ...wrap }, children: [
|
|
125965
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 8 }, children: [
|
|
125966
|
+
/* @__PURE__ */ jsx10(
|
|
125707
125967
|
"button",
|
|
125708
125968
|
{
|
|
125709
125969
|
type: "button",
|
|
@@ -125714,8 +125974,8 @@ var init_renderNode = __esm({
|
|
|
125714
125974
|
children: "\u2039"
|
|
125715
125975
|
}
|
|
125716
125976
|
),
|
|
125717
|
-
/* @__PURE__ */
|
|
125718
|
-
/* @__PURE__ */
|
|
125977
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontWeight: 700, fontSize: pxToRem(14), color: C2("textPrimary", "#13171e") }, children: rangeLabel }),
|
|
125978
|
+
/* @__PURE__ */ jsx10(
|
|
125719
125979
|
"button",
|
|
125720
125980
|
{
|
|
125721
125981
|
type: "button",
|
|
@@ -125727,10 +125987,10 @@ var init_renderNode = __esm({
|
|
|
125727
125987
|
}
|
|
125728
125988
|
)
|
|
125729
125989
|
] }),
|
|
125730
|
-
/* @__PURE__ */
|
|
125731
|
-
days.some((_2, i2) => (byDay.get(dayKeys[i2])?.allDay.length ?? 0) > 0) && /* @__PURE__ */
|
|
125990
|
+
/* @__PURE__ */ jsx10("div", { style: { display: "flex", marginLeft: 44, minWidth: days.length * 90 }, children: laneMode ? laneCols.map((lane) => /* @__PURE__ */ jsx10("div", { "data-lane": lane.id, style: { flex: "1 1 0", minWidth: 0, textAlign: "center", fontFamily: bodyFont(ctx), fontSize: pxToRem(12), fontWeight: 600, color: C2("textSecondary", "#888"), padding: "4px 2px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: laneTitle(lane.id) }, lane.id)) : days.map((d2, i2) => /* @__PURE__ */ jsx10("div", { style: { flex: "1 1 0", minWidth: 0, textAlign: "center", fontFamily: bodyFont(ctx), fontSize: pxToRem(11), fontWeight: 600, color: dayKeys[i2] === nowKey ? accentTextColor(ctx) : C2("textSecondary", "#888") }, children: d2.toLocaleDateString(void 0, { weekday: "short", day: "numeric" }) }, i2)) }),
|
|
125991
|
+
days.some((_2, i2) => (byDay.get(dayKeys[i2])?.allDay.length ?? 0) > 0) && /* @__PURE__ */ jsx10("div", { style: { display: "flex", marginLeft: 44, gap: 2, marginBottom: 4, minWidth: days.length * 90 }, children: days.map((d2, i2) => /* @__PURE__ */ jsx10("div", { style: { flex: "1 1 0", minWidth: 0, display: "flex", flexDirection: "column", gap: 2, padding: "0 1px" }, children: (byDay.get(dayKeys[i2])?.allDay ?? []).map((ev, j2) => {
|
|
125732
125992
|
const tappable = !!(ev?.onTap || props.onSelectEvent);
|
|
125733
|
-
return /* @__PURE__ */
|
|
125993
|
+
return /* @__PURE__ */ jsx10(
|
|
125734
125994
|
"div",
|
|
125735
125995
|
{
|
|
125736
125996
|
onClick: () => onSelect(ev),
|
|
@@ -125743,12 +126003,12 @@ var init_renderNode = __esm({
|
|
|
125743
126003
|
j2
|
|
125744
126004
|
);
|
|
125745
126005
|
}) }, i2)) }),
|
|
125746
|
-
/* @__PURE__ */
|
|
125747
|
-
/* @__PURE__ */
|
|
126006
|
+
/* @__PURE__ */ jsxs7("div", { style: { display: "flex", position: "relative", minWidth: 44 + days.length * 90 }, children: [
|
|
126007
|
+
/* @__PURE__ */ jsx10("div", { style: { width: 44, flex: "none" }, children: Array.from({ length: Math.max(0, endHour - startHour) }).map((_2, i2) => /* @__PURE__ */ jsxs7("div", { style: { height: HOUR_PX, boxSizing: "border-box", fontFamily: bodyFont(ctx), fontSize: pxToRem(10), color: C2("textTertiary", "#aab2bd"), textAlign: "right", paddingRight: 6 }, children: [
|
|
125748
126008
|
String(startHour + i2).padStart(2, "0"),
|
|
125749
126009
|
":00"
|
|
125750
126010
|
] }, i2)) }),
|
|
125751
|
-
/* @__PURE__ */
|
|
126011
|
+
/* @__PURE__ */ jsx10("div", { style: { display: "flex", flex: 1, minWidth: 0 }, children: (laneMode ? laneCols.map((l2) => ({ laneId: l2.id, key: dayKeys[0], timed: l2.events })) : days.map((_2, i2) => ({ laneId: void 0, key: dayKeys[i2], timed: byDay.get(dayKeys[i2])?.timed ?? [] }))).map(({ laneId, key: key2, timed }, i2) => {
|
|
125752
126012
|
const withRange = timed.map((ev) => {
|
|
125753
126013
|
const s2 = parseLocalDate(ev.start);
|
|
125754
126014
|
if (!s2) return null;
|
|
@@ -125759,7 +126019,7 @@ var init_renderNode = __esm({
|
|
|
125759
126019
|
return { ev, startMin, endMin: Math.max(startMin + 15, endMin) };
|
|
125760
126020
|
}).filter((x2) => x2 != null);
|
|
125761
126021
|
const positioned = packOverlaps(withRange);
|
|
125762
|
-
return /* @__PURE__ */
|
|
126022
|
+
return /* @__PURE__ */ jsxs7(
|
|
125763
126023
|
"div",
|
|
125764
126024
|
{
|
|
125765
126025
|
"data-lane": laneId,
|
|
@@ -125775,7 +126035,7 @@ var init_renderNode = __esm({
|
|
|
125775
126035
|
} : void 0,
|
|
125776
126036
|
style: { flex: "1 1 0", minWidth: 0, position: "relative", borderLeft: `1px solid ${C2("border", "#e8eaed")}`, height: totalHeight, boxSizing: "border-box" },
|
|
125777
126037
|
children: [
|
|
125778
|
-
Array.from({ length: Math.max(0, endHour - startHour) }).map((_2, hi2) => /* @__PURE__ */
|
|
126038
|
+
Array.from({ length: Math.max(0, endHour - startHour) }).map((_2, hi2) => /* @__PURE__ */ jsx10("div", { style: { position: "absolute", top: hi2 * HOUR_PX, left: 0, right: 0, borderTop: `1px solid ${C2("border", "#eef0f3")}` } }, hi2)),
|
|
125779
126039
|
positioned.map((p2, pi2) => {
|
|
125780
126040
|
const top = Math.max(0, (p2.startMin - startHour * 60) / 60 * HOUR_PX);
|
|
125781
126041
|
const height = Math.max(18, (p2.endMin - p2.startMin) / 60 * HOUR_PX);
|
|
@@ -125803,7 +126063,7 @@ var init_renderNode = __esm({
|
|
|
125803
126063
|
};
|
|
125804
126064
|
window.addEventListener("pointerup", onUp);
|
|
125805
126065
|
};
|
|
125806
|
-
return /* @__PURE__ */
|
|
126066
|
+
return /* @__PURE__ */ jsxs7(
|
|
125807
126067
|
"div",
|
|
125808
126068
|
{
|
|
125809
126069
|
"data-event-block": p2.ev?.id ?? "",
|
|
@@ -125829,9 +126089,9 @@ var init_renderNode = __esm({
|
|
|
125829
126089
|
boxSizing: "border-box"
|
|
125830
126090
|
},
|
|
125831
126091
|
children: [
|
|
125832
|
-
/* @__PURE__ */
|
|
125833
|
-
editable && /* @__PURE__ */
|
|
125834
|
-
/* @__PURE__ */
|
|
126092
|
+
/* @__PURE__ */ jsx10("div", { style: { fontWeight: 700, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: asText2(p2.ev?.title) }),
|
|
126093
|
+
editable && /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
126094
|
+
/* @__PURE__ */ jsx10(
|
|
125835
126095
|
"button",
|
|
125836
126096
|
{
|
|
125837
126097
|
type: "button",
|
|
@@ -125844,10 +126104,10 @@ var init_renderNode = __esm({
|
|
|
125844
126104
|
},
|
|
125845
126105
|
...{ [REVEAL_ON_FOCUS_ATTR]: "" },
|
|
125846
126106
|
style: revealOnFocusStyle(C2),
|
|
125847
|
-
children: /* @__PURE__ */
|
|
126107
|
+
children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", children: moveLabel || "Move\u2026" })
|
|
125848
126108
|
}
|
|
125849
126109
|
),
|
|
125850
|
-
/* @__PURE__ */
|
|
126110
|
+
/* @__PURE__ */ jsx10(
|
|
125851
126111
|
"button",
|
|
125852
126112
|
{
|
|
125853
126113
|
type: "button",
|
|
@@ -125860,10 +126120,10 @@ var init_renderNode = __esm({
|
|
|
125860
126120
|
},
|
|
125861
126121
|
...{ [REVEAL_ON_FOCUS_ATTR]: "" },
|
|
125862
126122
|
style: revealOnFocusStyle(C2),
|
|
125863
|
-
children: /* @__PURE__ */
|
|
126123
|
+
children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", children: resizeLabel || "Change time\u2026" })
|
|
125864
126124
|
}
|
|
125865
126125
|
),
|
|
125866
|
-
/* @__PURE__ */
|
|
126126
|
+
/* @__PURE__ */ jsx10(
|
|
125867
126127
|
"div",
|
|
125868
126128
|
{
|
|
125869
126129
|
"data-resize-handle": p2.ev?.id ?? "",
|
|
@@ -125877,7 +126137,7 @@ var init_renderNode = __esm({
|
|
|
125877
126137
|
pi2
|
|
125878
126138
|
);
|
|
125879
126139
|
}),
|
|
125880
|
-
showNow && key2 === nowKey && /* @__PURE__ */
|
|
126140
|
+
showNow && key2 === nowKey && /* @__PURE__ */ jsx10("div", { style: { position: "absolute", top: Math.max(0, (nowMinutes - startHour * 60) / 60 * HOUR_PX), left: 0, right: 0, height: 2, background: C2("danger", "#E62214") } })
|
|
125881
126141
|
]
|
|
125882
126142
|
},
|
|
125883
126143
|
i2
|
|
@@ -125936,7 +126196,7 @@ var init_renderNode = __esm({
|
|
|
125936
126196
|
return () => io2.disconnect();
|
|
125937
126197
|
}, [hasMore, windowEnd]);
|
|
125938
126198
|
if (groups.length === 0) {
|
|
125939
|
-
return /* @__PURE__ */
|
|
126199
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: "100%", padding: "28px 16px", boxSizing: "border-box", textAlign: "center", fontFamily: bodyFont(ctx), fontSize: pxToRem(14), color: C2("textSecondary", "#888"), ...wrap }, children: emptyLabel || "No events" });
|
|
125940
126200
|
}
|
|
125941
126201
|
const sticky = props.stickyHeaders === true;
|
|
125942
126202
|
const todayKey = localDayKey(/* @__PURE__ */ new Date());
|
|
@@ -125947,16 +126207,16 @@ var init_renderNode = __esm({
|
|
|
125947
126207
|
const d2 = parseLocalDate(key2);
|
|
125948
126208
|
return d2 ? d2.toLocaleDateString(void 0, { weekday: "short", month: "short", day: "numeric" }) : key2;
|
|
125949
126209
|
};
|
|
125950
|
-
return /* @__PURE__ */
|
|
125951
|
-
shown2.map((g2) => /* @__PURE__ */
|
|
125952
|
-
/* @__PURE__ */
|
|
126210
|
+
return /* @__PURE__ */ jsxs7("div", { ref: containerRef, "data-agenda-days": shown2.length, style: { width: "100%", boxSizing: "border-box", ...wrap }, children: [
|
|
126211
|
+
shown2.map((g2) => /* @__PURE__ */ jsxs7("div", { "data-daygroup": g2.key, children: [
|
|
126212
|
+
/* @__PURE__ */ jsx10("div", { style: { position: sticky ? "sticky" : "static", top: 0, zIndex: 1, background: C2("surfacePrimary", "#fff"), fontFamily: bodyFont(ctx), fontSize: pxToRem(12), fontWeight: 700, textTransform: "uppercase", letterSpacing: 0.4, color: C2("textSecondary", "#888"), padding: "8px 4px" }, children: dayHeaderLabel(g2.key) }),
|
|
125953
126213
|
g2.items.map((ev, i2) => {
|
|
125954
126214
|
const start = parseLocalDate(ev.start);
|
|
125955
126215
|
const timeStr = ev.allDay === true ? "All day" : start ? localTimeLabel(start) : "";
|
|
125956
126216
|
const tappable = !!(ev?.onTap || props.onSelectEvent);
|
|
125957
126217
|
if (props.eventTemplate) {
|
|
125958
126218
|
const itemCtx = { ...ctx, itemScope: calEventScope(ev, i2) };
|
|
125959
|
-
return /* @__PURE__ */
|
|
126219
|
+
return /* @__PURE__ */ jsx10(
|
|
125960
126220
|
"div",
|
|
125961
126221
|
{
|
|
125962
126222
|
"data-event-id": ev?.id ?? "",
|
|
@@ -125970,7 +126230,7 @@ var init_renderNode = __esm({
|
|
|
125970
126230
|
ev?.id ?? i2
|
|
125971
126231
|
);
|
|
125972
126232
|
}
|
|
125973
|
-
return /* @__PURE__ */
|
|
126233
|
+
return /* @__PURE__ */ jsxs7(
|
|
125974
126234
|
"div",
|
|
125975
126235
|
{
|
|
125976
126236
|
onClick: () => onSelect(ev),
|
|
@@ -125979,11 +126239,11 @@ var init_renderNode = __esm({
|
|
|
125979
126239
|
tabIndex: ctx.onAction && tappable ? 0 : void 0,
|
|
125980
126240
|
style: { display: "flex", alignItems: "center", gap: 10, padding: "10px 4px", cursor: ctx.onAction && tappable ? "pointer" : "default" },
|
|
125981
126241
|
children: [
|
|
125982
|
-
/* @__PURE__ */
|
|
125983
|
-
/* @__PURE__ */
|
|
125984
|
-
/* @__PURE__ */
|
|
125985
|
-
/* @__PURE__ */
|
|
125986
|
-
ev?.subtitle != null && /* @__PURE__ */
|
|
126242
|
+
/* @__PURE__ */ jsx10("div", { style: { width: 6, height: 6, borderRadius: "50%", background: C2(ev?.colorToken ?? "accentPrimary", "#116DFF"), flex: "none" } }),
|
|
126243
|
+
/* @__PURE__ */ jsx10("div", { style: { width: 52, flex: "none", fontFamily: bodyFont(ctx), fontSize: pxToRem(12), color: C2("textSecondary", "#888") }, children: timeStr }),
|
|
126244
|
+
/* @__PURE__ */ jsxs7("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
126245
|
+
/* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(15), fontWeight: 600, color: C2("textPrimary", "#13171e"), whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: asText2(ev?.title) }),
|
|
126246
|
+
ev?.subtitle != null && /* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(13), color: C2("textSecondary", "#636b78") }, children: asText2(ev.subtitle) })
|
|
125987
126247
|
] })
|
|
125988
126248
|
]
|
|
125989
126249
|
},
|
|
@@ -125994,7 +126254,7 @@ var init_renderNode = __esm({
|
|
|
125994
126254
|
hasMore && // The sentinel is also the honest disclosure: a list that silently stopped
|
|
125995
126255
|
// at day 14 would look complete. It says how much is left AND is the thing
|
|
125996
126256
|
// whose visibility loads it.
|
|
125997
|
-
/* @__PURE__ */
|
|
126257
|
+
/* @__PURE__ */ jsx10(
|
|
125998
126258
|
"div",
|
|
125999
126259
|
{
|
|
126000
126260
|
ref: sentinelRef,
|
|
@@ -126044,13 +126304,13 @@ var init_renderNode = __esm({
|
|
|
126044
126304
|
const next = { ...forwarded };
|
|
126045
126305
|
if (forwarded.style) next.style = { ...own4.style ?? {}, ...forwarded.style };
|
|
126046
126306
|
next["aria-describedby"] = [own4["aria-describedby"], descId].filter(Boolean).join(" ");
|
|
126047
|
-
return /* @__PURE__ */
|
|
126307
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
126048
126308
|
React9.cloneElement(children, next),
|
|
126049
|
-
/* @__PURE__ */
|
|
126309
|
+
/* @__PURE__ */ jsx10("span", { id: descId, hidden: true, "data-hm-a11y-hint": "", children: hint })
|
|
126050
126310
|
] });
|
|
126051
126311
|
};
|
|
126052
126312
|
WebRenderer = ({ node, tokens: tokens2, scheme = "light", opts }) => {
|
|
126053
|
-
return /* @__PURE__ */
|
|
126313
|
+
return /* @__PURE__ */ jsx10(Fragment4, { children: renderNode(node, makeCtx(tokens2, scheme, opts)) });
|
|
126054
126314
|
};
|
|
126055
126315
|
}
|
|
126056
126316
|
});
|
|
@@ -134210,6 +134470,7 @@ __export(build_exports2, {
|
|
|
134210
134470
|
buildRelease: () => buildRelease,
|
|
134211
134471
|
buildReleaseFromContent: () => buildReleaseFromContent,
|
|
134212
134472
|
bundleNameFromUrl: () => bundleNameFromUrl,
|
|
134473
|
+
collectComponentTypes: () => collectComponentTypes,
|
|
134213
134474
|
contentReleaseId: () => contentReleaseId,
|
|
134214
134475
|
countingWixCall: () => countingWixCall,
|
|
134215
134476
|
gitSha: () => gitSha,
|
|
@@ -134467,6 +134728,13 @@ function gitSha() {
|
|
|
134467
134728
|
function logicBundleOf(descriptor) {
|
|
134468
134729
|
return descriptor?.logicBundle ?? descriptor?.logic_bundle ?? null;
|
|
134469
134730
|
}
|
|
134731
|
+
function collectComponentTypes(value, into = /* @__PURE__ */ new Set()) {
|
|
134732
|
+
if (!value || typeof value !== "object") return into;
|
|
134733
|
+
const obj3 = value;
|
|
134734
|
+
if ((obj3.package === "himalaya" || obj3.package === "himalaya.core") && typeof obj3.type === "string") into.add(obj3.type);
|
|
134735
|
+
for (const child of Object.values(obj3)) collectComponentTypes(child, into);
|
|
134736
|
+
return into;
|
|
134737
|
+
}
|
|
134470
134738
|
function collectNativeComponents(value, into) {
|
|
134471
134739
|
if (!value || typeof value !== "object") return;
|
|
134472
134740
|
const obj3 = value;
|
|
@@ -134803,9 +135071,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
134803
135071
|
screens: [],
|
|
134804
135072
|
bundles: {}
|
|
134805
135073
|
};
|
|
134806
|
-
const noteScreenCapabilities = (screenId, bundle, declared) => {
|
|
135074
|
+
const noteScreenCapabilities = (screenId, bundle, declared, descriptor) => {
|
|
134807
135075
|
const ids = Array.isArray(declared) ? declared.filter((c2) => typeof c2 === "string") : [];
|
|
134808
|
-
capabilityUsage.screens.push({ screenId, bundle, declared: ids });
|
|
135076
|
+
capabilityUsage.screens.push({ screenId, bundle, declared: ids, components: [...collectComponentTypes(descriptor)].sort() });
|
|
134809
135077
|
};
|
|
134810
135078
|
const requiredNativeComponents = /* @__PURE__ */ new Set();
|
|
134811
135079
|
const tierScreens = [];
|
|
@@ -135026,7 +135294,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
135026
135294
|
if (Array.isArray(declared)) {
|
|
135027
135295
|
for (const capability of declared) if (typeof capability === "string") requiredCapabilities.add(capability);
|
|
135028
135296
|
}
|
|
135029
|
-
noteScreenCapabilities(screenId, bundleName, declared);
|
|
135297
|
+
noteScreenCapabilities(screenId, bundleName, declared, descriptor);
|
|
135298
|
+
} else {
|
|
135299
|
+
noteScreenCapabilities(screenId, null, [], descriptor);
|
|
135030
135300
|
}
|
|
135031
135301
|
tierScreens.push(summarize3({ ...descriptor, ...lb ? { logicBundle: lb } : {} }));
|
|
135032
135302
|
delete descriptor.etag;
|
|
@@ -135169,7 +135439,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
135169
135439
|
if (Array.isArray(declared)) {
|
|
135170
135440
|
for (const c2 of declared) if (typeof c2 === "string") requiredCapabilities.add(c2);
|
|
135171
135441
|
}
|
|
135172
|
-
noteScreenCapabilities(screenId, bundleName, declared);
|
|
135442
|
+
noteScreenCapabilities(screenId, bundleName, declared, descriptor);
|
|
135443
|
+
} else {
|
|
135444
|
+
noteScreenCapabilities(screenId, null, [], descriptor);
|
|
135173
135445
|
}
|
|
135174
135446
|
delete descriptor.etag;
|
|
135175
135447
|
if (typeof descriptor.screenId === "string" && descriptor.screenId !== screenId) descriptor.screenId = screenId;
|
|
@@ -136466,10 +136738,10 @@ function testRuns(dir) {
|
|
|
136466
136738
|
runs.push({
|
|
136467
136739
|
runId: r2.runId,
|
|
136468
136740
|
ok: report3?.ok === true,
|
|
136469
|
-
errors:
|
|
136470
|
-
screens:
|
|
136471
|
-
actions:
|
|
136472
|
-
gaps:
|
|
136741
|
+
errors: num2(obj(report3?.counts)?.errors),
|
|
136742
|
+
screens: num2(coverage?.screens),
|
|
136743
|
+
actions: num2(coverage?.actionsDispatched),
|
|
136744
|
+
gaps: num2(coverage?.gaps)
|
|
136473
136745
|
});
|
|
136474
136746
|
}
|
|
136475
136747
|
return runs.sort((a2, b2) => a2.runId.localeCompare(b2.runId));
|
|
@@ -136632,7 +136904,7 @@ function buildView(dir, memory, now) {
|
|
|
136632
136904
|
screens,
|
|
136633
136905
|
focus,
|
|
136634
136906
|
health: {
|
|
136635
|
-
validate: validate3 && typeof validate3.ok === "boolean" ? { ok: validate3.ok, errors:
|
|
136907
|
+
validate: validate3 && typeof validate3.ok === "boolean" ? { ok: validate3.ok, errors: num2(validate3.errors), warnings: num2(validate3.warnings), at: text(validate3.at) ?? now } : null,
|
|
136636
136908
|
test: last ? { ok: last.ok, screens: last.screens, actions: last.actions, gaps: last.gaps, prevGaps: prev ? prev.gaps : null, errors: last.errors, at: runTime(last.runId) } : null,
|
|
136637
136909
|
ux: uxStatuses(dir),
|
|
136638
136910
|
push: push && text(push.releaseId) && text(push.app) ? { app: text(push.app), releaseId: text(push.releaseId), draft: push.draft !== false, at: text(push.at) ?? now } : null
|
|
@@ -136700,7 +136972,7 @@ function writeStudioRecord(dir, record2, value) {
|
|
|
136700
136972
|
} catch {
|
|
136701
136973
|
}
|
|
136702
136974
|
}
|
|
136703
|
-
var STUDIO_DIR, STUDIO_PAGE, STATE_FILE, MEMORY_FILE, VALIDATE_RECORD, PUSH_RECORD, EDGES_RECORD, MAP_RECORD, RUN_RECORD, MAX_TIMELINE, MAX_JOURNAL, MAX_NAV_EDGES, readJson3, obj,
|
|
136975
|
+
var STUDIO_DIR, STUDIO_PAGE, STATE_FILE, MEMORY_FILE, VALIDATE_RECORD, PUSH_RECORD, EDGES_RECORD, MAP_RECORD, RUN_RECORD, MAX_TIMELINE, MAX_JOURNAL, MAX_NAV_EDGES, readJson3, obj, num2, text, historyUrl, runTime, MAP_STATUSES, count, CHANGE_KINDS;
|
|
136704
136976
|
var init_studio = __esm({
|
|
136705
136977
|
"src/studio.ts"() {
|
|
136706
136978
|
init_studio_page();
|
|
@@ -136729,7 +137001,7 @@ var init_studio = __esm({
|
|
|
136729
137001
|
}
|
|
136730
137002
|
};
|
|
136731
137003
|
obj = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : null;
|
|
136732
|
-
|
|
137004
|
+
num2 = (v2, fallback = 0) => typeof v2 === "number" && Number.isFinite(v2) ? v2 : fallback;
|
|
136733
137005
|
text = (v2) => typeof v2 === "string" && v2 ? v2 : null;
|
|
136734
137006
|
historyUrl = (fileName) => `../history/${fileName}`;
|
|
136735
137007
|
runTime = (runId) => runId.replace(/-[0-9a-f]+$/i, "");
|
|
@@ -139911,20 +140183,20 @@ function testPostcardMessage(s2) {
|
|
|
139911
140183
|
function testPostcardCounts(message) {
|
|
139912
140184
|
const head = message.split(". ")[0];
|
|
139913
140185
|
const counts = /* @__PURE__ */ new Map();
|
|
139914
|
-
const
|
|
140186
|
+
const num4 = (re2, label2) => {
|
|
139915
140187
|
const m2 = re2.exec(head);
|
|
139916
140188
|
if (m2) counts.set(label2, Number(m2[1]));
|
|
139917
140189
|
};
|
|
139918
140190
|
if (head.startsWith("Test crawl in the browser: ")) {
|
|
139919
|
-
|
|
140191
|
+
num4(/ — (\d+) findings? to fix\.?$/, "findings");
|
|
139920
140192
|
if (/ — no findings\.?$/.test(head)) counts.set("findings", 0);
|
|
139921
140193
|
return counts;
|
|
139922
140194
|
}
|
|
139923
|
-
|
|
139924
|
-
|
|
139925
|
-
|
|
139926
|
-
|
|
139927
|
-
|
|
140195
|
+
num4(/^Test crawl: (\d+) screens? and/, "screens");
|
|
140196
|
+
num4(/ and (\d+) actions? exercised/, "actions");
|
|
140197
|
+
num4(/, (\d+) broken links?[,— ]/, "broken links");
|
|
140198
|
+
num4(/, (\d+) screens? nothing links to/, "unlinked screens");
|
|
140199
|
+
num4(/ — (\d+) errors? to fix\.?$/, "errors");
|
|
139928
140200
|
if (/ — no errors\.?$/.test(head)) counts.set("errors", 0);
|
|
139929
140201
|
return counts;
|
|
139930
140202
|
}
|
|
@@ -147726,25 +147998,25 @@ var init_preview_assets_generated = __esm({
|
|
|
147726
147998
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
147727
147999
|
init_preview_assets_format();
|
|
147728
148000
|
PREVIEW_ASSET_MANIFEST = [
|
|
147729
|
-
{ key: "assets/index-
|
|
147730
|
-
{ key: "assets/pdf-
|
|
147731
|
-
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
147732
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
147733
|
-
{ key: "assets/pdfDocument-
|
|
147734
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
147735
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
147736
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
147737
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
147738
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
147739
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
147740
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
147741
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
147742
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
147743
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
147744
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
147745
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
147746
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
147747
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
148001
|
+
{ key: "assets/index-DI1RdmH2.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1242518, sha256: "0980dcdd25bb79d6d68e118668d2a0c8f870a46d11eddf60b0bc9b7f2e286434" },
|
|
148002
|
+
{ key: "assets/pdf-DqmwILqe.js", contentType: "application/javascript; charset=utf-8", offset: 1242526, length: 488199, sha256: "90808167378cb972ebc4a79918808a2a6741b1278ecf69907983c25c0f1cebe2" },
|
|
148003
|
+
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1730725, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
|
|
148004
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1730798, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
148005
|
+
{ key: "assets/pdfDocument-CbbMJVov.js", contentType: "application/javascript; charset=utf-8", offset: 3047832, length: 2858, sha256: "1e0d119b99864bd42714dba55f09eccd195fbbb204c70f6347376007614b8765" },
|
|
148006
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3050690, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
148007
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3055300, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
148008
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3543884, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
148009
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3634808, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
148010
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3725792, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
148011
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3816772, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
148012
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3907644, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
148013
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3998624, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
148014
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4107260, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
148015
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4216344, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
148016
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4325392, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
148017
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4433092, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
148018
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4521200, length: 4947, sha256: "bfe9d8a8b4272b0fa4d7b439ccead268061630c5c244e7257281fcf98c60fc48" },
|
|
148019
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4526147, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
147748
148020
|
];
|
|
147749
148021
|
}
|
|
147750
148022
|
});
|
|
@@ -165915,7 +166187,7 @@ function parseFlags(argv) {
|
|
|
165915
166187
|
var caveatLead = (ni2) => ni2.severity === "category" ? "WARNING \u2014 not implemented" : "NOTE \u2014 implemented, but these props are inert";
|
|
165916
166188
|
var niEntries = (ni2) => ni2 == null ? [] : Array.isArray(ni2) ? ni2 : [ni2];
|
|
165917
166189
|
var str9 = (v2) => typeof v2 === "string" ? v2 : void 0;
|
|
165918
|
-
var
|
|
166190
|
+
var num3 = (v2) => typeof v2 === "string" && v2 !== "" && Number.isFinite(Number(v2)) ? Number(v2) : void 0;
|
|
165919
166191
|
function embeddedTemplateCatalog() {
|
|
165920
166192
|
return availableTemplates().map((name) => {
|
|
165921
166193
|
const path2 = join79(templateSourceDir(name), TEMPLATE_META_FILE);
|
|
@@ -172423,7 +172695,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172423
172695
|
screenId: str9(flags.screen) ?? str9(flags.screenId),
|
|
172424
172696
|
event: str9(flags.type) ?? str9(flags.event),
|
|
172425
172697
|
since: eventSince,
|
|
172426
|
-
limit:
|
|
172698
|
+
limit: num3(flags.limit),
|
|
172427
172699
|
crashesOnly: flags["crashes-only"] === true || flags.crashesOnly === true
|
|
172428
172700
|
});
|
|
172429
172701
|
if (!r2.ok) throw Object.assign(new Error("events_read_failed"), { response: r2 });
|
|
@@ -172436,7 +172708,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172436
172708
|
releaseId: release2,
|
|
172437
172709
|
screenId: str9(flags.screen) ?? str9(flags.screenId),
|
|
172438
172710
|
since: logSince,
|
|
172439
|
-
limit:
|
|
172711
|
+
limit: num3(flags.limit)
|
|
172440
172712
|
});
|
|
172441
172713
|
if (!r2.ok) throw Object.assign(new Error("logs_read_failed"), { response: r2 });
|
|
172442
172714
|
const rawLogs = r2.json?.logs ?? [];
|
|
@@ -172450,13 +172722,13 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172450
172722
|
out2.summary = r2.json;
|
|
172451
172723
|
}
|
|
172452
172724
|
if (includeCrashes) {
|
|
172453
|
-
const r2 = await c2.telemetryCrashes(app, { releaseId: release2, limit:
|
|
172725
|
+
const r2 = await c2.telemetryCrashes(app, { releaseId: release2, limit: num3(flags.limit) });
|
|
172454
172726
|
if (!r2.ok) throw Object.assign(new Error("crashes_read_failed"), { response: r2 });
|
|
172455
172727
|
out2.crashes = r2.json?.crashes ?? [];
|
|
172456
172728
|
}
|
|
172457
172729
|
const eventCount = out2.events?.length ?? 0;
|
|
172458
172730
|
const logCount = out2.logs?.length ?? 0;
|
|
172459
|
-
const narrowed = !!(level || str9(flags.screen) || str9(flags.screenId) || str9(flags.type) || str9(flags.event) || flags["crashes-only"] === true || flags.crashesOnly === true ||
|
|
172731
|
+
const narrowed = !!(level || str9(flags.screen) || str9(flags.screenId) || str9(flags.type) || str9(flags.event) || flags["crashes-only"] === true || flags.crashesOnly === true || num3(flags.limit) !== void 0 || eventSince !== void 0 || logSince !== void 0);
|
|
172460
172732
|
const wholeChannels = includeEvents && includeLogs && !narrowed;
|
|
172461
172733
|
if (wholeChannels && eventCount === 0 && logCount === 0 && !includeSummary && !includeCrashes) {
|
|
172462
172734
|
out2.note = "no events and no worker console output on this release \u2014 open the web preview or Himi Player link for it, then retry or use --follow";
|
|
@@ -172469,13 +172741,13 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172469
172741
|
};
|
|
172470
172742
|
try {
|
|
172471
172743
|
if (flags.follow !== true) {
|
|
172472
|
-
print(await readOnce(
|
|
172744
|
+
print(await readOnce(num3(flags.since), num3(flags["log-since"]) ?? num3(flags.since)));
|
|
172473
172745
|
return 0;
|
|
172474
172746
|
}
|
|
172475
|
-
const interval =
|
|
172476
|
-
const deadline =
|
|
172477
|
-
let eventSince =
|
|
172478
|
-
let logSince =
|
|
172747
|
+
const interval = num3(flags.interval) ?? 2e3;
|
|
172748
|
+
const deadline = num3(flags.for) !== void 0 ? Date.now() + num3(flags.for) : Infinity;
|
|
172749
|
+
let eventSince = num3(flags.since) ?? 0;
|
|
172750
|
+
let logSince = num3(flags["log-since"]) ?? eventSince;
|
|
172479
172751
|
for (; ; ) {
|
|
172480
172752
|
const out2 = await readOnce(includeEvents ? eventSince : void 0, includeLogs ? logSince : void 0);
|
|
172481
172753
|
const events = out2.events ?? [];
|
|
@@ -172577,7 +172849,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172577
172849
|
const release2 = str9(flags.release);
|
|
172578
172850
|
const level = str9(flags.level);
|
|
172579
172851
|
const byLevel = (ls2) => level ? ls2.filter((l2) => l2.level === level) : ls2;
|
|
172580
|
-
const
|
|
172852
|
+
const num4 = (v2) => typeof v2 === "string" && v2 ? Number(v2) : void 0;
|
|
172581
172853
|
const c2 = client2();
|
|
172582
172854
|
if (flags.follow !== true) {
|
|
172583
172855
|
let r2;
|
|
@@ -172585,8 +172857,8 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172585
172857
|
r2 = await c2.telemetryLogs(app, {
|
|
172586
172858
|
releaseId: release2,
|
|
172587
172859
|
screenId: str9(flags.screen) ?? str9(flags.screenId),
|
|
172588
|
-
since:
|
|
172589
|
-
limit:
|
|
172860
|
+
since: num4(flags.since),
|
|
172861
|
+
limit: num4(flags.limit)
|
|
172590
172862
|
});
|
|
172591
172863
|
} catch (e2) {
|
|
172592
172864
|
const target = targetName();
|
|
@@ -172602,15 +172874,15 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172602
172874
|
}
|
|
172603
172875
|
const rawLogs = r2.json?.logs ?? [];
|
|
172604
172876
|
const logs = byLevel(rawLogs);
|
|
172605
|
-
const narrowed = !!(level || str9(flags.screen) || str9(flags.screenId) ||
|
|
172877
|
+
const narrowed = !!(level || str9(flags.screen) || str9(flags.screenId) || num4(flags.since) !== void 0 || num4(flags.limit) !== void 0);
|
|
172606
172878
|
const scope = release2 ? "this release" : "this app";
|
|
172607
172879
|
const note = logs.length > 0 ? void 0 : narrowed ? `no worker \`console.*\` lines matched this query${level && rawLogs.length ? ` (${rawLogs.length} line(s) were hidden by --level ${level})` : ""}. Drop --level/--screen/--since/--limit to see the whole console channel for ${scope}; the telemetry EVENT stream is a separate channel, read with \`himi telemetry\`.` : `no worker \`console.*\` output on ${scope}. This is the console channel \u2014 distinct from the telemetry EVENT stream, which \`himi telemetry --app <app> --release <id>\` reads: ${scope} can carry many events and no console lines \u2014 commonly because the worker never logged any, though an empty channel can also mean the lines aged out or never made it through ingestion. Boot-time \`console.log\` is visible via \`himi validate\` / \`himi render\`.`;
|
|
172608
172880
|
print({ ok: true, logs, ...note ? { note } : {} });
|
|
172609
172881
|
return 0;
|
|
172610
172882
|
}
|
|
172611
|
-
const interval =
|
|
172612
|
-
const deadline =
|
|
172613
|
-
let since =
|
|
172883
|
+
const interval = num4(flags.interval) ?? 2e3;
|
|
172884
|
+
const deadline = num4(flags.for) !== void 0 ? Date.now() + num4(flags.for) : Infinity;
|
|
172885
|
+
let since = num4(flags.since) ?? 0;
|
|
172614
172886
|
for (; ; ) {
|
|
172615
172887
|
const r2 = await c2.telemetryLogs(app, { releaseId: release2, screenId: str9(flags.screen) ?? str9(flags.screenId), since });
|
|
172616
172888
|
if (r2.ok) {
|
|
@@ -172638,7 +172910,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172638
172910
|
return 2;
|
|
172639
172911
|
}
|
|
172640
172912
|
const percentGiven = flags.percent !== void 0;
|
|
172641
|
-
const percent =
|
|
172913
|
+
const percent = num3(flags.percent);
|
|
172642
172914
|
if (percentGiven && (percent === void 0 || percent < 0 || percent > 100)) {
|
|
172643
172915
|
io2.error(JSON.stringify({ error: `--percent must be 0..100, got ${String(flags.percent)}` }));
|
|
172644
172916
|
return 2;
|
|
@@ -173030,7 +173302,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
173030
173302
|
}
|
|
173031
173303
|
if (sub === "ramp") {
|
|
173032
173304
|
const percentGiven = flags.percent !== void 0;
|
|
173033
|
-
const percent =
|
|
173305
|
+
const percent = num3(flags.percent);
|
|
173034
173306
|
if (percentGiven && (percent === void 0 || percent < 0 || percent > 100)) {
|
|
173035
173307
|
io2.error(JSON.stringify({ error: `--percent must be 0..100, got ${String(flags.percent)}` }));
|
|
173036
173308
|
return 2;
|