@wix/himalaya-cli 0.1295.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) {
|
|
@@ -7585,6 +7585,7 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
|
|
|
7585
7585
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
7586
7586
|
var init_bindings = __esm({
|
|
7587
7587
|
"../../core/ts/src/bindings.ts"() {
|
|
7588
|
+
"use strict";
|
|
7588
7589
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
7589
7590
|
BINDING_SIGIL_RE = new RegExp(
|
|
7590
7591
|
`^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -21619,7 +21620,7 @@ function parseIconConfig(configTs) {
|
|
|
21619
21620
|
if (!block) return {};
|
|
21620
21621
|
const body = block[1];
|
|
21621
21622
|
const str10 = (k2) => new RegExp(`\\b${k2}\\s*:\\s*["']([^"']+)["']`).exec(body)?.[1];
|
|
21622
|
-
const
|
|
21623
|
+
const num4 = (k2) => {
|
|
21623
21624
|
const m2 = new RegExp(`\\b${k2}\\s*:\\s*(-?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*(?=[,}\\n]|$)`).exec(body);
|
|
21624
21625
|
if (!m2) return void 0;
|
|
21625
21626
|
const n2 = Number(m2[1]);
|
|
@@ -21633,7 +21634,7 @@ function parseIconConfig(configTs) {
|
|
|
21633
21634
|
const glyph = str10("glyph");
|
|
21634
21635
|
const accentColor = str10("accentColor");
|
|
21635
21636
|
const backgroundColor = str10("backgroundColor");
|
|
21636
|
-
const glyphScale =
|
|
21637
|
+
const glyphScale = num4("glyphScale");
|
|
21637
21638
|
for (const [key2, parsed] of [
|
|
21638
21639
|
["source", source],
|
|
21639
21640
|
["glyph", glyph],
|
|
@@ -35264,6 +35265,150 @@ var init_icons = __esm({
|
|
|
35264
35265
|
}
|
|
35265
35266
|
});
|
|
35266
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
|
+
|
|
35267
35412
|
// ../../core/web-renderer/src/symbolEffects.ts
|
|
35268
35413
|
import React3 from "react";
|
|
35269
35414
|
function useSymbolEffect(effect, reduceMotion) {
|
|
@@ -35959,7 +36104,7 @@ var init_host_toolbar = __esm({
|
|
|
35959
36104
|
|
|
35960
36105
|
// ../../core/web-renderer/src/richContentEditor.tsx
|
|
35961
36106
|
import React4 from "react";
|
|
35962
|
-
import { jsx as
|
|
36107
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
35963
36108
|
function effectiveTools(tools, uploadService) {
|
|
35964
36109
|
return ricosEffectiveTools(tools, typeof uploadService === "string" && uploadService !== "");
|
|
35965
36110
|
}
|
|
@@ -36128,14 +36273,14 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36128
36273
|
if (!live3) {
|
|
36129
36274
|
const { paddingTop: _t2, paddingBottom: _b, paddingLeft: _l2, paddingRight: _r2, ...rootNoSides } = root;
|
|
36130
36275
|
const own4 = { ...rootNoSides, border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 8, padding: 12, boxSizing: "border-box" };
|
|
36131
|
-
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" }) });
|
|
36132
36277
|
}
|
|
36133
36278
|
if (status === "unavailable") {
|
|
36134
|
-
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" }) }) });
|
|
36135
36280
|
}
|
|
36136
36281
|
const ready = status === "ready";
|
|
36137
|
-
return /* @__PURE__ */
|
|
36138
|
-
/* @__PURE__ */
|
|
36282
|
+
return /* @__PURE__ */ jsxs2("div", { ...dom, style: root, children: [
|
|
36283
|
+
/* @__PURE__ */ jsx5(
|
|
36139
36284
|
"div",
|
|
36140
36285
|
{
|
|
36141
36286
|
role: "toolbar",
|
|
@@ -36145,7 +36290,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36145
36290
|
children: tools.map((tool) => {
|
|
36146
36291
|
const isOn = ricosToolPressed(tool, toolbar);
|
|
36147
36292
|
const disabled = ricosToolDisabled(tool, toolbar, ready);
|
|
36148
|
-
return /* @__PURE__ */
|
|
36293
|
+
return /* @__PURE__ */ jsx5(
|
|
36149
36294
|
"button",
|
|
36150
36295
|
{
|
|
36151
36296
|
type: "button",
|
|
@@ -36173,8 +36318,8 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36173
36318
|
})
|
|
36174
36319
|
}
|
|
36175
36320
|
),
|
|
36176
|
-
link && /* @__PURE__ */
|
|
36177
|
-
/* @__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(
|
|
36178
36323
|
"input",
|
|
36179
36324
|
{
|
|
36180
36325
|
"data-component-id": `${id}/link_url`,
|
|
@@ -36185,7 +36330,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36185
36330
|
onChange: (e2) => setLink({ ...link, url: e2.currentTarget.value, error: "" })
|
|
36186
36331
|
}
|
|
36187
36332
|
),
|
|
36188
|
-
/* @__PURE__ */
|
|
36333
|
+
/* @__PURE__ */ jsx5(
|
|
36189
36334
|
"input",
|
|
36190
36335
|
{
|
|
36191
36336
|
"data-component-id": `${id}/link_text`,
|
|
@@ -36195,13 +36340,13 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36195
36340
|
onChange: (e2) => setLink({ ...link, text: e2.currentTarget.value })
|
|
36196
36341
|
}
|
|
36197
36342
|
),
|
|
36198
|
-
link.error && /* @__PURE__ */
|
|
36199
|
-
/* @__PURE__ */
|
|
36200
|
-
/* @__PURE__ */
|
|
36201
|
-
/* @__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" })
|
|
36202
36347
|
] })
|
|
36203
36348
|
] }),
|
|
36204
|
-
src && /* @__PURE__ */
|
|
36349
|
+
src && /* @__PURE__ */ jsx5(
|
|
36205
36350
|
"iframe",
|
|
36206
36351
|
{
|
|
36207
36352
|
ref: iframeRef,
|
|
@@ -36212,7 +36357,7 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36212
36357
|
style: { flex: "1 1 auto", width: "100%", border: 0, minHeight: fill ? 0 : minHeight, background: "transparent" }
|
|
36213
36358
|
}
|
|
36214
36359
|
),
|
|
36215
|
-
tools.includes("image") && /* @__PURE__ */
|
|
36360
|
+
tools.includes("image") && /* @__PURE__ */ jsx5(
|
|
36216
36361
|
"input",
|
|
36217
36362
|
{
|
|
36218
36363
|
ref: fileRef,
|
|
@@ -36225,8 +36370,8 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
36225
36370
|
onChange: onPickFile
|
|
36226
36371
|
}
|
|
36227
36372
|
),
|
|
36228
|
-
uploadError && /* @__PURE__ */
|
|
36229
|
-
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(
|
|
36230
36375
|
"div",
|
|
36231
36376
|
{
|
|
36232
36377
|
"data-component-id": `${id}/loading`,
|
|
@@ -36472,7 +36617,7 @@ var init_pdfSource = __esm({
|
|
|
36472
36617
|
|
|
36473
36618
|
// ../../core/web-renderer/src/a11y/controls.tsx
|
|
36474
36619
|
import React5 from "react";
|
|
36475
|
-
import { jsx as
|
|
36620
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
36476
36621
|
function labelText(label2, ctx) {
|
|
36477
36622
|
if (typeof label2 === "string" && isBinding(label2)) {
|
|
36478
36623
|
const v2 = resolveScalarStatic(label2, ctx);
|
|
@@ -36562,9 +36707,9 @@ var init_controls = __esm({
|
|
|
36562
36707
|
}
|
|
36563
36708
|
} : void 0;
|
|
36564
36709
|
const rowStretch = ctx.rowStretch === true;
|
|
36565
|
-
return /* @__PURE__ */
|
|
36566
|
-
props.label != null && /* @__PURE__ */
|
|
36567
|
-
/* @__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(
|
|
36568
36713
|
"button",
|
|
36569
36714
|
{
|
|
36570
36715
|
type: "button",
|
|
@@ -36574,7 +36719,7 @@ var init_controls = __esm({
|
|
|
36574
36719
|
disabled: props.disabled === true,
|
|
36575
36720
|
onClick: fire,
|
|
36576
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 },
|
|
36577
|
-
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" } })
|
|
36578
36723
|
}
|
|
36579
36724
|
)
|
|
36580
36725
|
] });
|
|
@@ -36640,9 +36785,9 @@ var init_controls = __esm({
|
|
|
36640
36785
|
}
|
|
36641
36786
|
};
|
|
36642
36787
|
const groupName = labelText(props.label, ctx) || void 0;
|
|
36643
|
-
return /* @__PURE__ */
|
|
36644
|
-
/* @__PURE__ */
|
|
36645
|
-
[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(
|
|
36646
36791
|
"span",
|
|
36647
36792
|
{
|
|
36648
36793
|
...i2 === 0 ? { [A11Y_PART]: "focus" } : {},
|
|
@@ -36712,7 +36857,7 @@ var init_controls = __esm({
|
|
|
36712
36857
|
dragging.current = false;
|
|
36713
36858
|
commit(valueAt(e2) ?? val);
|
|
36714
36859
|
};
|
|
36715
|
-
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(
|
|
36716
36861
|
"div",
|
|
36717
36862
|
{
|
|
36718
36863
|
...{ [A11Y_PART]: "node" },
|
|
@@ -36729,9 +36874,9 @@ var init_controls = __esm({
|
|
|
36729
36874
|
onPointerMove,
|
|
36730
36875
|
onPointerUp,
|
|
36731
36876
|
style: { position: "relative", height: 18, display: "flex", alignItems: "center", outlineOffset: 4, cursor: props.disabled ? "default" : "pointer", touchAction: "pan-y" },
|
|
36732
|
-
children: /* @__PURE__ */
|
|
36733
|
-
/* @__PURE__ */
|
|
36734
|
-
/* @__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)" } })
|
|
36735
36880
|
] })
|
|
36736
36881
|
}
|
|
36737
36882
|
) });
|
|
@@ -36751,8 +36896,8 @@ var init_controls = __esm({
|
|
|
36751
36896
|
} : void 0;
|
|
36752
36897
|
const indeterminate = !isRadio && props.indeterminate === true && !on4;
|
|
36753
36898
|
const marked = on4 || indeterminate;
|
|
36754
|
-
const box = isRadio ? /* @__PURE__ */
|
|
36755
|
-
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(
|
|
36756
36901
|
"button",
|
|
36757
36902
|
{
|
|
36758
36903
|
type: "button",
|
|
@@ -36764,7 +36909,7 @@ var init_controls = __esm({
|
|
|
36764
36909
|
style: { all: "unset", display: "inline-flex", alignItems: "center", gap: 10, cursor: fire ? "pointer" : "default", opacity: props.disabled ? 0.5 : 1, outlineOffset: 2, ...wrap },
|
|
36765
36910
|
children: [
|
|
36766
36911
|
box,
|
|
36767
|
-
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) })
|
|
36768
36913
|
]
|
|
36769
36914
|
}
|
|
36770
36915
|
);
|
|
@@ -36849,9 +36994,9 @@ var init_controls = __esm({
|
|
|
36849
36994
|
const accent = C2("accentPrimary", "#116DFF");
|
|
36850
36995
|
const activeTint = activeName ? C2(activeName, accent) : accent;
|
|
36851
36996
|
const activeLabel = activeName ? C2(activeName, accentTextColor(ctx)) : accentTextColor(ctx);
|
|
36852
|
-
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) => {
|
|
36853
36998
|
const on4 = i2 === selIdx;
|
|
36854
|
-
return /* @__PURE__ */
|
|
36999
|
+
return /* @__PURE__ */ jsxs3(
|
|
36855
37000
|
"button",
|
|
36856
37001
|
{
|
|
36857
37002
|
type: "button",
|
|
@@ -36862,16 +37007,16 @@ var init_controls = __esm({
|
|
|
36862
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 },
|
|
36863
37008
|
children: [
|
|
36864
37009
|
asText2(t2.label),
|
|
36865
|
-
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 })
|
|
36866
37011
|
]
|
|
36867
37012
|
},
|
|
36868
37013
|
t2.id ?? i2
|
|
36869
37014
|
);
|
|
36870
37015
|
}) });
|
|
36871
37016
|
if (!pages) return strip3;
|
|
36872
|
-
return /* @__PURE__ */
|
|
37017
|
+
return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", width: "100%", ...wrap }, children: [
|
|
36873
37018
|
strip3,
|
|
36874
|
-
/* @__PURE__ */
|
|
37019
|
+
/* @__PURE__ */ jsx6(
|
|
36875
37020
|
"div",
|
|
36876
37021
|
{
|
|
36877
37022
|
ref: pagerRef,
|
|
@@ -36883,7 +37028,7 @@ var init_controls = __esm({
|
|
|
36883
37028
|
return (
|
|
36884
37029
|
// An off-screen page is `inert`, not just `aria-hidden`: its controls must leave the
|
|
36885
37030
|
// tab order too, or Tab focuses a hidden control (axe `aria-hidden-focus`).
|
|
36886
|
-
/* @__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)
|
|
36887
37032
|
);
|
|
36888
37033
|
})
|
|
36889
37034
|
}
|
|
@@ -36913,7 +37058,7 @@ var init_controls = __esm({
|
|
|
36913
37058
|
e2.preventDefault();
|
|
36914
37059
|
if (ni2 !== selIdx) select(ni2);
|
|
36915
37060
|
};
|
|
36916
|
-
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) => {
|
|
36917
37062
|
const on4 = o2.id === selId;
|
|
36918
37063
|
const outerR = radius(seg.segmentRadius, "sm", 6);
|
|
36919
37064
|
const outlinedShape = seg.outlined ? {
|
|
@@ -36921,7 +37066,7 @@ var init_controls = __esm({
|
|
|
36921
37066
|
marginLeft: i2 > 0 ? -1 : 0,
|
|
36922
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`
|
|
36923
37068
|
} : {};
|
|
36924
|
-
return /* @__PURE__ */
|
|
37069
|
+
return /* @__PURE__ */ jsxs3(
|
|
36925
37070
|
"button",
|
|
36926
37071
|
{
|
|
36927
37072
|
type: "button",
|
|
@@ -36931,7 +37076,7 @@ var init_controls = __esm({
|
|
|
36931
37076
|
onClick: () => select(i2),
|
|
36932
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 },
|
|
36933
37078
|
children: [
|
|
36934
|
-
on4 && seg.selectedCheck ? /* @__PURE__ */
|
|
37079
|
+
on4 && seg.selectedCheck ? /* @__PURE__ */ jsx6("span", { "aria-hidden": "true", children: "\u2713 " }) : null,
|
|
36935
37080
|
asText2(o2.label ?? o2.title ?? o2.id) || `Option ${i2 + 1}`
|
|
36936
37081
|
]
|
|
36937
37082
|
},
|
|
@@ -36948,8 +37093,8 @@ var init_controls = __esm({
|
|
|
36948
37093
|
const open = expanded === true;
|
|
36949
37094
|
const fire = ctx.onAction && props.onToggle ? () => ctx.onAction(resolveRowAction(props.onToggle, ctx)) : void 0;
|
|
36950
37095
|
const regionId = React5.useMemo(() => `himi-disclosure-${++disclosureSeq}`, []);
|
|
36951
|
-
return /* @__PURE__ */
|
|
36952
|
-
/* @__PURE__ */
|
|
37096
|
+
return /* @__PURE__ */ jsxs3("div", { style: { width: "100%", ...wrap }, children: [
|
|
37097
|
+
/* @__PURE__ */ jsxs3(
|
|
36953
37098
|
"button",
|
|
36954
37099
|
{
|
|
36955
37100
|
type: "button",
|
|
@@ -36958,15 +37103,15 @@ var init_controls = __esm({
|
|
|
36958
37103
|
onClick: fire,
|
|
36959
37104
|
style: { all: "unset", display: "flex", alignItems: "center", gap: 8, padding: "13px 2px", width: "100%", boxSizing: "border-box", cursor: fire ? "pointer" : "default" },
|
|
36960
37105
|
children: [
|
|
36961
|
-
/* @__PURE__ */
|
|
36962
|
-
/* @__PURE__ */
|
|
36963
|
-
/* @__PURE__ */
|
|
36964
|
-
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) })
|
|
36965
37110
|
] })
|
|
36966
37111
|
]
|
|
36967
37112
|
}
|
|
36968
37113
|
),
|
|
36969
|
-
/* @__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)) })
|
|
36970
37115
|
] });
|
|
36971
37116
|
};
|
|
36972
37117
|
}
|
|
@@ -37115,7 +37260,7 @@ var init_sheet = __esm({
|
|
|
37115
37260
|
|
|
37116
37261
|
// ../../core/web-renderer/src/listGestures.tsx
|
|
37117
37262
|
import { useRef, useState as useState2 } from "react";
|
|
37118
|
-
import { Fragment as Fragment2, jsx as
|
|
37263
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
37119
37264
|
var PULL_THRESHOLD, SWIPE_OPEN, PullToRefreshList, SwipeRow, DISMISS_THRESHOLD, SwipeDismissWrap;
|
|
37120
37265
|
var init_listGestures = __esm({
|
|
37121
37266
|
"../../core/web-renderer/src/listGestures.tsx"() {
|
|
@@ -37147,7 +37292,7 @@ var init_listGestures = __esm({
|
|
|
37147
37292
|
setPull(0);
|
|
37148
37293
|
startY.current = null;
|
|
37149
37294
|
};
|
|
37150
|
-
return /* @__PURE__ */
|
|
37295
|
+
return /* @__PURE__ */ jsxs4(
|
|
37151
37296
|
"div",
|
|
37152
37297
|
{
|
|
37153
37298
|
"data-himalaya-pull-host": true,
|
|
@@ -37156,7 +37301,7 @@ var init_listGestures = __esm({
|
|
|
37156
37301
|
onTouchEnd,
|
|
37157
37302
|
style: { position: "relative", overflowY: "auto", ...style },
|
|
37158
37303
|
children: [
|
|
37159
|
-
/* @__PURE__ */
|
|
37304
|
+
/* @__PURE__ */ jsx7(
|
|
37160
37305
|
"button",
|
|
37161
37306
|
{
|
|
37162
37307
|
type: "button",
|
|
@@ -37182,7 +37327,7 @@ var init_listGestures = __esm({
|
|
|
37182
37327
|
opacity: busy || pull > 0 ? 1 : 0,
|
|
37183
37328
|
transition: startY.current == null && !busy ? "height .2s, opacity .2s" : void 0
|
|
37184
37329
|
},
|
|
37185
|
-
children: /* @__PURE__ */
|
|
37330
|
+
children: /* @__PURE__ */ jsxs4(
|
|
37186
37331
|
"svg",
|
|
37187
37332
|
{
|
|
37188
37333
|
"aria-hidden": "true",
|
|
@@ -37192,14 +37337,14 @@ var init_listGestures = __esm({
|
|
|
37192
37337
|
viewBox: "0 0 16 16",
|
|
37193
37338
|
style: { display: "inline-block", transform: busy ? "rotate(360deg)" : `rotate(${pull * 4}deg)`, transition: busy ? "transform .7s linear" : void 0 },
|
|
37194
37339
|
children: [
|
|
37195
|
-
/* @__PURE__ */
|
|
37196
|
-
/* @__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" })
|
|
37197
37342
|
]
|
|
37198
37343
|
}
|
|
37199
37344
|
)
|
|
37200
37345
|
}
|
|
37201
37346
|
),
|
|
37202
|
-
/* @__PURE__ */
|
|
37347
|
+
/* @__PURE__ */ jsx7("div", { style: { background: surface, color: fg }, children })
|
|
37203
37348
|
]
|
|
37204
37349
|
}
|
|
37205
37350
|
);
|
|
@@ -37208,7 +37353,7 @@ var init_listGestures = __esm({
|
|
|
37208
37353
|
const [offset, setOffset] = useState2(0);
|
|
37209
37354
|
const startX = useRef(null);
|
|
37210
37355
|
const base = useRef(0);
|
|
37211
|
-
if (!trailing.length && !leading.length) return /* @__PURE__ */
|
|
37356
|
+
if (!trailing.length && !leading.length) return /* @__PURE__ */ jsx7(Fragment2, { children });
|
|
37212
37357
|
const fireAndClose = (a2) => {
|
|
37213
37358
|
onAction(a2);
|
|
37214
37359
|
setOffset(0);
|
|
@@ -37233,7 +37378,7 @@ var init_listGestures = __esm({
|
|
|
37233
37378
|
} else setOffset(Math.abs(offset) >= SWIPE_OPEN * 0.5 ? Math.sign(offset) * SWIPE_OPEN : 0);
|
|
37234
37379
|
startX.current = null;
|
|
37235
37380
|
};
|
|
37236
|
-
const actionBtn = (a2, i2, edge, hidden) => /* @__PURE__ */
|
|
37381
|
+
const actionBtn = (a2, i2, edge, hidden) => /* @__PURE__ */ jsx7(
|
|
37237
37382
|
"button",
|
|
37238
37383
|
{
|
|
37239
37384
|
type: "button",
|
|
@@ -37256,10 +37401,10 @@ var init_listGestures = __esm({
|
|
|
37256
37401
|
},
|
|
37257
37402
|
`${edge}-${i2}`
|
|
37258
37403
|
);
|
|
37259
|
-
return /* @__PURE__ */
|
|
37260
|
-
leading.length > 0 && /* @__PURE__ */
|
|
37261
|
-
trailing.length > 0 && /* @__PURE__ */
|
|
37262
|
-
/* @__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(
|
|
37263
37408
|
"div",
|
|
37264
37409
|
{
|
|
37265
37410
|
onPointerDown,
|
|
@@ -37299,7 +37444,7 @@ var init_listGestures = __esm({
|
|
|
37299
37444
|
start.current = null;
|
|
37300
37445
|
};
|
|
37301
37446
|
const transform2 = axis === "x" ? `translateX(${off}px)` : `translateY(${off}px)`;
|
|
37302
|
-
return /* @__PURE__ */
|
|
37447
|
+
return /* @__PURE__ */ jsx7(
|
|
37303
37448
|
"div",
|
|
37304
37449
|
{
|
|
37305
37450
|
"data-himalaya-swipe-dismiss": true,
|
|
@@ -37958,7 +38103,7 @@ var init_rich_text_field = __esm({
|
|
|
37958
38103
|
|
|
37959
38104
|
// ../../core/web-renderer/src/richContent.tsx
|
|
37960
38105
|
import React7 from "react";
|
|
37961
|
-
import { Fragment as Fragment3, jsx as
|
|
38106
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
37962
38107
|
function richContentFollow(ctx, onLink) {
|
|
37963
38108
|
return (url) => {
|
|
37964
38109
|
if (!ctx.onAction) return;
|
|
@@ -37987,15 +38132,15 @@ function textStyle(ctx, token, color) {
|
|
|
37987
38132
|
}
|
|
37988
38133
|
function Spans({ spans, env }) {
|
|
37989
38134
|
const accent = accentTextColor(env.ctx);
|
|
37990
|
-
return /* @__PURE__ */
|
|
38135
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children: spans.map((s2, i2) => {
|
|
37991
38136
|
const style = {
|
|
37992
38137
|
fontWeight: s2.bold ? 700 : void 0,
|
|
37993
38138
|
fontStyle: s2.italic ? "italic" : void 0,
|
|
37994
38139
|
textDecoration: s2.underline || s2.link ? "underline" : void 0
|
|
37995
38140
|
};
|
|
37996
|
-
if (!s2.link) return /* @__PURE__ */
|
|
38141
|
+
if (!s2.link) return /* @__PURE__ */ jsx8("span", { style, children: s2.text }, i2);
|
|
37997
38142
|
const href = s2.link;
|
|
37998
|
-
return /* @__PURE__ */
|
|
38143
|
+
return /* @__PURE__ */ jsx8("a", { href, style: { ...style, color: accent }, onClick: (e2) => {
|
|
37999
38144
|
e2.preventDefault();
|
|
38000
38145
|
e2.stopPropagation();
|
|
38001
38146
|
env.follow(href);
|
|
@@ -38006,7 +38151,7 @@ function LinkButton({ label: label2, url, env, testId }) {
|
|
|
38006
38151
|
const { ctx } = env;
|
|
38007
38152
|
const fg = accentTextColor(ctx);
|
|
38008
38153
|
const f2 = ctx.font("bodyEmphasis");
|
|
38009
|
-
return /* @__PURE__ */
|
|
38154
|
+
return /* @__PURE__ */ jsx8(
|
|
38010
38155
|
"button",
|
|
38011
38156
|
{
|
|
38012
38157
|
type: "button",
|
|
@@ -38046,7 +38191,7 @@ function LinkButton({ label: label2, url, env, testId }) {
|
|
|
38046
38191
|
}
|
|
38047
38192
|
function NamedImage({ node, alt, env }) {
|
|
38048
38193
|
const img = env.render(node, env.ctx);
|
|
38049
|
-
return alt ? /* @__PURE__ */
|
|
38194
|
+
return alt ? /* @__PURE__ */ jsx8("div", { role: "img", "aria-label": alt, style: { width: "100%" }, children: img }) : /* @__PURE__ */ jsx8(Fragment3, { children: img });
|
|
38050
38195
|
}
|
|
38051
38196
|
function Block({ b: b2, env, depth }) {
|
|
38052
38197
|
const { ctx } = env;
|
|
@@ -38055,34 +38200,34 @@ function Block({ b: b2, env, depth }) {
|
|
|
38055
38200
|
const border = ctx.color("border", "#e5e5e5");
|
|
38056
38201
|
switch (b2.kind) {
|
|
38057
38202
|
case "paragraph":
|
|
38058
|
-
return /* @__PURE__ */
|
|
38203
|
+
return /* @__PURE__ */ jsx8("p", { ...tid(env, b2.id, b2.kind), style: {
|
|
38059
38204
|
...textStyle(ctx, "body", text8),
|
|
38060
38205
|
textAlign: b2.align,
|
|
38061
38206
|
paddingInlineStart: b2.indent ? Math.min(b2.indent, 8) * 16 : void 0,
|
|
38062
38207
|
minHeight: b2.spans.length ? void 0 : "1.5em"
|
|
38063
|
-
}, children: /* @__PURE__ */
|
|
38208
|
+
}, children: /* @__PURE__ */ jsx8(Spans, { spans: b2.spans, env }) });
|
|
38064
38209
|
case "heading":
|
|
38065
38210
|
return React7.createElement(
|
|
38066
38211
|
`h${b2.level}`,
|
|
38067
38212
|
{ ...tid(env, b2.id, b2.kind), style: textStyle(ctx, RICH_CONTENT_HEADING_TOKENS[b2.level - 1], text8) },
|
|
38068
|
-
/* @__PURE__ */
|
|
38213
|
+
/* @__PURE__ */ jsx8(Spans, { spans: b2.spans, env })
|
|
38069
38214
|
);
|
|
38070
38215
|
case "list": {
|
|
38071
38216
|
const Tag = b2.ordered ? "ol" : "ul";
|
|
38072
|
-
return /* @__PURE__ */
|
|
38217
|
+
return /* @__PURE__ */ jsx8(
|
|
38073
38218
|
Tag,
|
|
38074
38219
|
{
|
|
38075
38220
|
...tid(env, b2.id, b2.kind),
|
|
38076
38221
|
start: b2.ordered ? b2.start : void 0,
|
|
38077
38222
|
style: { ...textStyle(ctx, "body", text8), paddingInlineStart: 24, listStyleType: b2.ordered ? "decimal" : depth % 2 ? "circle" : "disc" },
|
|
38078
|
-
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}`))
|
|
38079
38224
|
}
|
|
38080
38225
|
);
|
|
38081
38226
|
}
|
|
38082
38227
|
case "quote":
|
|
38083
|
-
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}`)) });
|
|
38084
38229
|
case "code":
|
|
38085
|
-
return /* @__PURE__ */
|
|
38230
|
+
return /* @__PURE__ */ jsx8("pre", { ...tid(env, b2.id, b2.kind), style: {
|
|
38086
38231
|
margin: 0,
|
|
38087
38232
|
whiteSpace: "pre-wrap",
|
|
38088
38233
|
overflowWrap: "anywhere",
|
|
@@ -38092,29 +38237,29 @@ function Block({ b: b2, env, depth }) {
|
|
|
38092
38237
|
background: ctx.color("surfaceSecondary", "#f5f5f7"),
|
|
38093
38238
|
padding: 10,
|
|
38094
38239
|
borderRadius: 6
|
|
38095
|
-
}, children: /* @__PURE__ */
|
|
38240
|
+
}, children: /* @__PURE__ */ jsx8("code", { children: b2.text }) });
|
|
38096
38241
|
case "divider":
|
|
38097
|
-
return /* @__PURE__ */
|
|
38242
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children: env.render(richContentDividerNode(env.componentId, b2), env.ctx) });
|
|
38098
38243
|
case "image":
|
|
38099
|
-
return /* @__PURE__ */
|
|
38100
|
-
/* @__PURE__ */
|
|
38101
|
-
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
|
|
38102
38247
|
] });
|
|
38103
38248
|
case "gallery":
|
|
38104
|
-
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)) });
|
|
38105
38250
|
case "video":
|
|
38106
|
-
return /* @__PURE__ */
|
|
38251
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children: env.render(richContentVideoNode(env.componentId, b2), env.ctx) });
|
|
38107
38252
|
case "button":
|
|
38108
|
-
return /* @__PURE__ */
|
|
38253
|
+
return /* @__PURE__ */ jsx8(LinkButton, { label: b2.label, url: b2.url, env, testId: `${env.componentId}/${b2.id}` });
|
|
38109
38254
|
case "table":
|
|
38110
|
-
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)) }) });
|
|
38111
38256
|
case "card": {
|
|
38112
38257
|
const title = richContentCardTitle(b2);
|
|
38113
|
-
return /* @__PURE__ */
|
|
38114
|
-
/* @__PURE__ */
|
|
38115
|
-
b2.url ? /* @__PURE__ */
|
|
38116
|
-
/* @__PURE__ */
|
|
38117
|
-
/* @__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` })
|
|
38118
38263
|
] }) : null
|
|
38119
38264
|
] });
|
|
38120
38265
|
}
|
|
@@ -38122,7 +38267,7 @@ function Block({ b: b2, env, depth }) {
|
|
|
38122
38267
|
}
|
|
38123
38268
|
function RichContentBlocks({ blocks, componentId, onLink, ctx, render }) {
|
|
38124
38269
|
const env = { ctx, componentId, follow: richContentFollow(ctx, onLink), render };
|
|
38125
|
-
return /* @__PURE__ */
|
|
38270
|
+
return /* @__PURE__ */ jsx8(Fragment3, { children: blocks.map((b2, i2) => /* @__PURE__ */ jsx8(Block, { b: b2, env, depth: 0 }, `${i2}:${b2.id}`)) });
|
|
38126
38271
|
}
|
|
38127
38272
|
var tid;
|
|
38128
38273
|
var init_richContent = __esm({
|
|
@@ -118746,7 +118891,7 @@ __export(pdfDocument_exports, {
|
|
|
118746
118891
|
destroyPdfDocumentLoad: () => destroyPdfDocumentLoad
|
|
118747
118892
|
});
|
|
118748
118893
|
import React8 from "react";
|
|
118749
|
-
import { jsx as
|
|
118894
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
118750
118895
|
async function loadPdfDocument(src, ownerDocument) {
|
|
118751
118896
|
const [pdfjs, pdfWorkerAsset] = await Promise.all([
|
|
118752
118897
|
Promise.resolve().then(() => (init_pdf(), pdf_exports)),
|
|
@@ -118812,11 +118957,11 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
|
|
|
118812
118957
|
overflow: "auto"
|
|
118813
118958
|
};
|
|
118814
118959
|
if (failed2) {
|
|
118815
|
-
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 });
|
|
118816
118961
|
}
|
|
118817
|
-
return /* @__PURE__ */
|
|
118818
|
-
/* @__PURE__ */
|
|
118819
|
-
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: [
|
|
118820
118965
|
pages,
|
|
118821
118966
|
" pages"
|
|
118822
118967
|
] }) : null
|
|
@@ -118832,7 +118977,7 @@ var init_pdfDocument = __esm({
|
|
|
118832
118977
|
|
|
118833
118978
|
// ../../core/web-renderer/src/renderNode.tsx
|
|
118834
118979
|
import React9 from "react";
|
|
118835
|
-
import { Fragment as Fragment4, jsx as
|
|
118980
|
+
import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
118836
118981
|
function boundTokenName(path2, fallback, ctx) {
|
|
118837
118982
|
if (typeof path2 === "string" && path2) {
|
|
118838
118983
|
const r2 = resolveScalarStatic(path2, ctx);
|
|
@@ -119238,14 +119383,14 @@ function vectorAnimSvg(name, color, size, animated) {
|
|
|
119238
119383
|
const common = { width: size, height: size, viewBox: "0 0 24 24" };
|
|
119239
119384
|
if (name === "success") {
|
|
119240
119385
|
const st3 = animated ? { strokeDasharray: 30, animation: "himalaya-vectoranim-success .6s ease forwards" } : {};
|
|
119241
|
-
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 }) });
|
|
119242
119387
|
}
|
|
119243
119388
|
if (name === "loader") {
|
|
119244
119389
|
const st3 = animated ? { transformOrigin: "center", animation: "himalaya-vectoranim-loader 1s linear infinite" } : {};
|
|
119245
|
-
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" }) });
|
|
119246
119391
|
}
|
|
119247
119392
|
const st2 = animated ? { transformOrigin: "center", animation: "himalaya-vectoranim-pulse 1.2s ease-in-out infinite" } : {};
|
|
119248
|
-
return /* @__PURE__ */
|
|
119393
|
+
return /* @__PURE__ */ jsx10("svg", { ...common, children: /* @__PURE__ */ jsx10("circle", { cx: 12, cy: 12, r: 7, fill: color, style: st2 }) });
|
|
119249
119394
|
}
|
|
119250
119395
|
function nearestScroller(el2) {
|
|
119251
119396
|
const doc = document.documentElement;
|
|
@@ -119551,7 +119696,7 @@ function autoGrowBox(contentHeight, lineHeight, verticalPadding, maxLines) {
|
|
|
119551
119696
|
return { height: Math.max(floor2, Math.min(contentHeight, cap)), scrolls: contentHeight > cap };
|
|
119552
119697
|
}
|
|
119553
119698
|
function wrapModalMenu(modal, label2, placement, ref, menu) {
|
|
119554
|
-
return modal ? /* @__PURE__ */
|
|
119699
|
+
return modal ? /* @__PURE__ */ jsx10("div", { ref, role: "dialog", "aria-modal": "true", "aria-label": label2, style: placement, children: menu }) : menu;
|
|
119555
119700
|
}
|
|
119556
119701
|
function bindMediaSlot(value, sessionId) {
|
|
119557
119702
|
if (typeof value === "string") {
|
|
@@ -119785,7 +119930,7 @@ function TapActivator({ label: label2, state, tabIndex = 0, role = "button", hin
|
|
|
119785
119930
|
activatorNameObservers.delete(el2);
|
|
119786
119931
|
};
|
|
119787
119932
|
}, [label2]);
|
|
119788
|
-
const activator = /* @__PURE__ */
|
|
119933
|
+
const activator = /* @__PURE__ */ jsx10(
|
|
119789
119934
|
"span",
|
|
119790
119935
|
{
|
|
119791
119936
|
ref,
|
|
@@ -119806,15 +119951,15 @@ function TapActivator({ label: label2, state, tabIndex = 0, role = "button", hin
|
|
|
119806
119951
|
}
|
|
119807
119952
|
}
|
|
119808
119953
|
);
|
|
119809
|
-
return hint ? /* @__PURE__ */
|
|
119954
|
+
return hint ? /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
119810
119955
|
activator,
|
|
119811
|
-
/* @__PURE__ */
|
|
119956
|
+
/* @__PURE__ */ jsx10("span", { id: hintId, hidden: true, "data-hm-a11y-hint": "", children: hint })
|
|
119812
119957
|
] }) : activator;
|
|
119813
119958
|
}
|
|
119814
119959
|
function withExtras(name, render) {
|
|
119815
119960
|
const Wrapped = ({ props, ctx, wrap, nodeId, gap, ...pass }) => {
|
|
119816
119961
|
const el2 = render({ props, ctx, wrap, nodeId, gap });
|
|
119817
|
-
if (!React9.isValidElement(el2)) return /* @__PURE__ */
|
|
119962
|
+
if (!React9.isValidElement(el2)) return /* @__PURE__ */ jsx10(Fragment4, { children: el2 });
|
|
119818
119963
|
const additive = addIntrinsicPadding(el2.props.style, wrap ?? {});
|
|
119819
119964
|
const inferredDecorative = el2.props[INFERRED_DECORATIVE] === true;
|
|
119820
119965
|
const selfRenderedLeaf = el2.props[SELF_RENDERED_LEAF] === true;
|
|
@@ -119833,7 +119978,7 @@ function withExtras(name, render) {
|
|
|
119833
119978
|
}, hasA11yParts ? editA11yParts(kids3, a11yPartEdit({}, false, () => {
|
|
119834
119979
|
})) : kids3);
|
|
119835
119980
|
}
|
|
119836
|
-
return additive ? React9.cloneElement(el2, { style: additive }) : /* @__PURE__ */
|
|
119981
|
+
return additive ? React9.cloneElement(el2, { style: additive }) : /* @__PURE__ */ jsx10(Fragment4, { children: el2 });
|
|
119837
119982
|
}
|
|
119838
119983
|
const prev = el2.props;
|
|
119839
119984
|
const next = { ...pass };
|
|
@@ -120116,8 +120261,8 @@ function regionArgs(centerLat, centerLng, z4, w2, h2) {
|
|
|
120116
120261
|
function decodeCamera(v2) {
|
|
120117
120262
|
if (!v2 || typeof v2 !== "object" || Array.isArray(v2)) return null;
|
|
120118
120263
|
const o2 = v2;
|
|
120119
|
-
const
|
|
120120
|
-
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") };
|
|
120121
120266
|
return out2.latitude === void 0 && out2.longitude === void 0 && out2.zoom === void 0 ? null : out2;
|
|
120122
120267
|
}
|
|
120123
120268
|
function resolveCamera(command, fallbackLatitude, fallbackLongitude, fallbackZoom) {
|
|
@@ -120414,7 +120559,7 @@ function actionClick(ctx, action) {
|
|
|
120414
120559
|
function actionTextButton(ctx, action, label2, color, extra) {
|
|
120415
120560
|
if (action == null) return null;
|
|
120416
120561
|
const onClick = actionClick(ctx, action);
|
|
120417
|
-
return /* @__PURE__ */
|
|
120562
|
+
return /* @__PURE__ */ jsx10(
|
|
120418
120563
|
"button",
|
|
120419
120564
|
{
|
|
120420
120565
|
type: "button",
|
|
@@ -120629,7 +120774,7 @@ function renderNodeInner(node, ctx) {
|
|
|
120629
120774
|
const key2 = `${node.body?.package ?? "himalaya"}.${type}`;
|
|
120630
120775
|
const verdict = isComponentAllowed(ctx.previewSurface, key2);
|
|
120631
120776
|
if (!verdict.allowed) {
|
|
120632
|
-
return /* @__PURE__ */
|
|
120777
|
+
return /* @__PURE__ */ jsx10(UnsupportedOnSurface, { type: key2, reason: verdict.reason ?? "unsupported", surface: ctx.previewSurface.id, ctx });
|
|
120633
120778
|
}
|
|
120634
120779
|
}
|
|
120635
120780
|
const hp = node?.modifiers?.hiddenPath ?? node?.modifiers?.hidden_path;
|
|
@@ -120644,7 +120789,7 @@ function renderNodeInner(node, ctx) {
|
|
|
120644
120789
|
} else if (hp.startsWith("$service:")) {
|
|
120645
120790
|
if (ctx.provider) {
|
|
120646
120791
|
const bare = { ...node, modifiers: { ...node.modifiers, hiddenPath: void 0, hidden_path: void 0 } };
|
|
120647
|
-
return /* @__PURE__ */
|
|
120792
|
+
return /* @__PURE__ */ jsx10(HiddenGate, { ctx, binding: hp, children: renderNode(bare, ctx) });
|
|
120648
120793
|
}
|
|
120649
120794
|
if (ctx.runtimeDegraded) return null;
|
|
120650
120795
|
}
|
|
@@ -120723,7 +120868,7 @@ function renderNodeInner(node, ctx) {
|
|
|
120723
120868
|
delete extra["data-himalaya-initial-focus"];
|
|
120724
120869
|
if (extra.tabIndex === -1) delete extra.tabIndex;
|
|
120725
120870
|
}
|
|
120726
|
-
tapActivator = /* @__PURE__ */
|
|
120871
|
+
tapActivator = /* @__PURE__ */ jsx10(
|
|
120727
120872
|
TapActivator,
|
|
120728
120873
|
{
|
|
120729
120874
|
label: typeof authored2 === "string" ? authored2 : void 0,
|
|
@@ -120827,11 +120972,11 @@ function renderNodeInner(node, ctx) {
|
|
|
120827
120972
|
}
|
|
120828
120973
|
let out2 = tapActivator ? React9.cloneElement(el2, extra, tapActivator, el2.props.children) : Object.keys(extra).length ? React9.cloneElement(el2, extra) : el2;
|
|
120829
120974
|
if (a11yHint && !tapActivator) {
|
|
120830
|
-
out2 = /* @__PURE__ */
|
|
120975
|
+
out2 = /* @__PURE__ */ jsx10(A11yHintDescription, { hint: a11yHint, idBase: componentId, children: out2 });
|
|
120831
120976
|
}
|
|
120832
120977
|
const sd = node?.modifiers?.swipeDismiss ?? node?.modifiers?.swipe_dismiss;
|
|
120833
120978
|
if (sd?.action && ctx.onAction) {
|
|
120834
|
-
return /* @__PURE__ */
|
|
120979
|
+
return /* @__PURE__ */ jsx10(SwipeDismissWrap, { action: sd.action, direction: sd.direction, onAction: ctx.onAction, children: out2 });
|
|
120835
120980
|
}
|
|
120836
120981
|
return out2;
|
|
120837
120982
|
}
|
|
@@ -120853,7 +120998,7 @@ function boundPaddingInsets(modifiers, ctx) {
|
|
|
120853
120998
|
function renderNode(node, ctx) {
|
|
120854
120999
|
ensureFocusStyles();
|
|
120855
121000
|
const bindings = directServiceBindings(node);
|
|
120856
|
-
return bindings.length > 0 && ctx.provider ? /* @__PURE__ */
|
|
121001
|
+
return bindings.length > 0 && ctx.provider ? /* @__PURE__ */ jsx10(ReactiveDirectScalars, { node, ctx, bindings }) : renderNodeInner(node, ctx);
|
|
120857
121002
|
}
|
|
120858
121003
|
function renderInner(node, ctx) {
|
|
120859
121004
|
if (!node || typeof node !== "object") return null;
|
|
@@ -120927,13 +121072,13 @@ function renderInner(node, ctx) {
|
|
|
120927
121072
|
const inner = renderNode({ ...node, modifiers: { ...modifiers, transition: void 0, revealOnScroll: void 0 } }, itemCtx);
|
|
120928
121073
|
const style = { opacity: 0, ...rowItem };
|
|
120929
121074
|
if (spec.distance != null) style["--hm-d"] = `${spec.distance}px`;
|
|
120930
|
-
return /* @__PURE__ */
|
|
121075
|
+
return /* @__PURE__ */ jsx10("div", { "data-himalaya-reveal": spec.animation, style, children: inner });
|
|
120931
121076
|
}
|
|
120932
121077
|
}
|
|
120933
121078
|
if (typeof modifiers?.parallax === "number" && modifiers.parallax !== 0 && !ctx.reduceMotion()) {
|
|
120934
121079
|
ensureParallaxRuntime();
|
|
120935
121080
|
const inner = renderNode({ ...node, modifiers: { ...modifiers, parallax: void 0 } }, itemCtx);
|
|
120936
|
-
return /* @__PURE__ */
|
|
121081
|
+
return /* @__PURE__ */ jsx10("div", { "data-himalaya-parallax": String(modifiers.parallax), style: rowItemHold ? rowItem : void 0, children: inner });
|
|
120937
121082
|
}
|
|
120938
121083
|
if (modifiers?.scrollProgress) {
|
|
120939
121084
|
ensureScrollProgressRuntime();
|
|
@@ -120948,14 +121093,14 @@ function renderInner(node, ctx) {
|
|
|
120948
121093
|
barStyle.top = 0;
|
|
120949
121094
|
barStyle.zIndex = 1;
|
|
120950
121095
|
}
|
|
120951
|
-
return /* @__PURE__ */
|
|
121096
|
+
return /* @__PURE__ */ jsx10("div", { "data-himalaya-scroll-progress": true, style: barStyle, children: inner });
|
|
120952
121097
|
}
|
|
120953
121098
|
if (typeof modifiers?.vectorAnim === "string" && modifiers.vectorAnim) {
|
|
120954
121099
|
ensureVectorAnimStyles();
|
|
120955
121100
|
const name = modifiers.vectorAnim;
|
|
120956
121101
|
const col = C2(resolveScalarStatic(modifiers.color, ctx) ?? "accentPrimary", "#116DFF");
|
|
120957
121102
|
const inner = renderNode({ ...node, modifiers: { ...modifiers, vectorAnim: void 0 } }, itemCtx);
|
|
120958
|
-
return /* @__PURE__ */
|
|
121103
|
+
return /* @__PURE__ */ jsxs7("div", { "data-himalaya-vectoranim": name, style: { position: "relative", display: "inline-flex", alignItems: "center", justifyContent: "center", ...rowItem }, children: [
|
|
120959
121104
|
inner,
|
|
120960
121105
|
vectorAnimSvg(name, col, 36, !ctx.reduceMotion())
|
|
120961
121106
|
] });
|
|
@@ -120963,9 +121108,9 @@ function renderInner(node, ctx) {
|
|
|
120963
121108
|
if (modifiers?.confetti && !ctx.reduceMotion()) {
|
|
120964
121109
|
ensureConfettiRuntime();
|
|
120965
121110
|
const inner = renderNode({ ...node, modifiers: { ...modifiers, confetti: void 0 } }, itemCtx);
|
|
120966
|
-
return /* @__PURE__ */
|
|
121111
|
+
return /* @__PURE__ */ jsxs7("div", { style: { position: "relative", ...rowItem }, children: [
|
|
120967
121112
|
inner,
|
|
120968
|
-
/* @__PURE__ */
|
|
121113
|
+
/* @__PURE__ */ jsx10("div", { "data-himalaya-confetti": true, style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: "hidden" } })
|
|
120969
121114
|
] });
|
|
120970
121115
|
}
|
|
120971
121116
|
const gapScale = ctx.densityScale(modifiers?.density ?? ctx.kit?.density);
|
|
@@ -120973,20 +121118,20 @@ function renderInner(node, ctx) {
|
|
|
120973
121118
|
switch (type) {
|
|
120974
121119
|
// ───────────── layout ─────────────
|
|
120975
121120
|
case "VStack":
|
|
120976
|
-
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) });
|
|
120977
121122
|
case "HStack": {
|
|
120978
121123
|
const rowFills = Array.isArray(props.children) && props.children.some((c2) => {
|
|
120979
121124
|
const n2 = normalize(c2);
|
|
120980
121125
|
return n2.type === "Spacer" || wantsRowStretch(c2) || Number(n2.modifiers?.weight ?? 0) > 0;
|
|
120981
121126
|
});
|
|
120982
|
-
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) });
|
|
120983
121128
|
}
|
|
120984
121129
|
case "ZStack": {
|
|
120985
121130
|
const hasW = modifiers?.width != null || modifiers?.fillMaxWidth === true;
|
|
120986
121131
|
const hasH = modifiers?.height != null;
|
|
120987
121132
|
const justifyItems = zJustifyItems(props.alignment);
|
|
120988
121133
|
const fillsWidth = !hasW && !hListItem;
|
|
120989
|
-
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)) });
|
|
120990
121135
|
}
|
|
120991
121136
|
case "LazyList": {
|
|
120992
121137
|
const itemsPath = props.itemsPath ?? props.items_path;
|
|
@@ -121018,7 +121163,7 @@ function renderInner(node, ctx) {
|
|
|
121018
121163
|
const boundRefresh = props.onPullToRefresh ?? props.on_pull_to_refresh;
|
|
121019
121164
|
const boundPagination = props.pagination;
|
|
121020
121165
|
const boundStagger = ctx.reduceMotion() ? 0 : Number(props.staggerMs ?? props.stagger_ms ?? 0);
|
|
121021
|
-
const boundBody = /* @__PURE__ */
|
|
121166
|
+
const boundBody = /* @__PURE__ */ jsx10(
|
|
121022
121167
|
BoundList,
|
|
121023
121168
|
{
|
|
121024
121169
|
ctx,
|
|
@@ -121035,7 +121180,7 @@ function renderInner(node, ctx) {
|
|
|
121035
121180
|
const leading = resolveSwipeActions(boundSwipe.leading, ic);
|
|
121036
121181
|
const trailing = resolveSwipeActions(boundSwipe.trailing, ic);
|
|
121037
121182
|
if (leading.length || trailing.length) {
|
|
121038
|
-
return /* @__PURE__ */
|
|
121183
|
+
return /* @__PURE__ */ jsx10(
|
|
121039
121184
|
SwipeRow,
|
|
121040
121185
|
{
|
|
121041
121186
|
leading,
|
|
@@ -121054,12 +121199,12 @@ function renderInner(node, ctx) {
|
|
|
121054
121199
|
}
|
|
121055
121200
|
}
|
|
121056
121201
|
);
|
|
121057
|
-
const withSentinel = /* @__PURE__ */
|
|
121202
|
+
const withSentinel = /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
121058
121203
|
boundBody,
|
|
121059
|
-
boundPagination ? /* @__PURE__ */
|
|
121204
|
+
boundPagination ? /* @__PURE__ */ jsx10(LoadMoreSentinel, { ctx, pagination: boundPagination }) : null
|
|
121060
121205
|
] });
|
|
121061
121206
|
if (boundRefresh && ctx.onAction && !props.horizontal) {
|
|
121062
|
-
return /* @__PURE__ */
|
|
121207
|
+
return /* @__PURE__ */ jsx10(
|
|
121063
121208
|
PullToRefreshList,
|
|
121064
121209
|
{
|
|
121065
121210
|
onRefresh: () => ctx.onAction(resolveItemDeep2(boundRefresh, ctx)),
|
|
@@ -121072,7 +121217,7 @@ function renderInner(node, ctx) {
|
|
|
121072
121217
|
}
|
|
121073
121218
|
);
|
|
121074
121219
|
}
|
|
121075
|
-
return /* @__PURE__ */
|
|
121220
|
+
return /* @__PURE__ */ jsx10("div", { style: listStyle, ...hListAttr, children: withSentinel });
|
|
121076
121221
|
}
|
|
121077
121222
|
if (!itemsPath && items.length) {
|
|
121078
121223
|
const staggerMs = ctx.reduceMotion() ? 0 : Number(props.staggerMs ?? props.stagger_ms ?? 0);
|
|
@@ -121081,14 +121226,14 @@ function renderInner(node, ctx) {
|
|
|
121081
121226
|
const animateItems = !ctx.reduceMotion() && (props.animateItems ?? props.animate_items) === true && !props.horizontal;
|
|
121082
121227
|
if (animateItems) ensureListAnimateRuntime();
|
|
121083
121228
|
const stickyHeader = props.stickyHeader ?? props.sticky_header;
|
|
121084
|
-
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;
|
|
121085
121230
|
const rendered = staggerMs > 0 ? staggeredKids(items, asItem(ctx), staggerMs) : kids2(items, asItem(ctx));
|
|
121086
121231
|
let body = rendered;
|
|
121087
121232
|
if (swipe && ctx.onAction && !props.horizontal) {
|
|
121088
121233
|
const leading = swipe.leading ?? [];
|
|
121089
121234
|
const trailing = swipe.trailing ?? [];
|
|
121090
121235
|
const arr = React9.Children.toArray(rendered);
|
|
121091
|
-
body = arr.map((child, i2) => /* @__PURE__ */
|
|
121236
|
+
body = arr.map((child, i2) => /* @__PURE__ */ jsx10(
|
|
121092
121237
|
SwipeRow,
|
|
121093
121238
|
{
|
|
121094
121239
|
leading,
|
|
@@ -121104,7 +121249,7 @@ function renderInner(node, ctx) {
|
|
|
121104
121249
|
));
|
|
121105
121250
|
}
|
|
121106
121251
|
if (refresh && ctx.onAction && !props.horizontal) {
|
|
121107
|
-
return /* @__PURE__ */
|
|
121252
|
+
return /* @__PURE__ */ jsxs7(
|
|
121108
121253
|
PullToRefreshList,
|
|
121109
121254
|
{
|
|
121110
121255
|
onRefresh: () => ctx.onAction(resolveItemDeep2(refresh, ctx)),
|
|
@@ -121120,21 +121265,21 @@ function renderInner(node, ctx) {
|
|
|
121120
121265
|
}
|
|
121121
121266
|
);
|
|
121122
121267
|
}
|
|
121123
|
-
return /* @__PURE__ */
|
|
121268
|
+
return /* @__PURE__ */ jsxs7("div", { style: listStyle, ...hListAttr, ...animateItems ? { "data-himalaya-animate-items": "1" } : {}, children: [
|
|
121124
121269
|
stickyEl,
|
|
121125
121270
|
body
|
|
121126
121271
|
] });
|
|
121127
121272
|
}
|
|
121128
|
-
return /* @__PURE__ */
|
|
121129
|
-
!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: [
|
|
121130
121275
|
"dynamic list",
|
|
121131
121276
|
itemsPath ? ` \xB7 ${itemsPath.replace(/^\$service:/, "")}` : ""
|
|
121132
121277
|
] }),
|
|
121133
|
-
[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))
|
|
121134
121279
|
] });
|
|
121135
121280
|
}
|
|
121136
121281
|
case "Grid":
|
|
121137
|
-
return /* @__PURE__ */
|
|
121282
|
+
return /* @__PURE__ */ jsx10(GridNode, { props, ctx, wrap, gap });
|
|
121138
121283
|
case "Card": {
|
|
121139
121284
|
const m2 = modifiers;
|
|
121140
121285
|
const ownSurface = !!(m2?.backgroundGradient ?? m2?.background_gradient ?? m2?.material) || m2?.animatedGradient === true || m2?.meshGradient === true;
|
|
@@ -121144,15 +121289,15 @@ function renderInner(node, ctx) {
|
|
|
121144
121289
|
const wrapShadow = wrap.boxShadow;
|
|
121145
121290
|
const explicit = m2?.shadow != null || m2?.boxShadow != null || m2?.box_shadow != null;
|
|
121146
121291
|
const elevationShadow = !elevation ? wrapShadow : explicit ? elevationBoxShadow({ border: elevation.border, shadow: wrapShadow }) : [elevationBoxShadow(elevation), wrapShadow].filter(Boolean).join(", ") || void 0;
|
|
121147
|
-
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) });
|
|
121148
121293
|
}
|
|
121149
121294
|
case "SplitView":
|
|
121150
|
-
return /* @__PURE__ */
|
|
121295
|
+
return /* @__PURE__ */ jsx10(SplitViewNode, { props, ctx, wrap });
|
|
121151
121296
|
case "Divider":
|
|
121152
121297
|
if (ctx.rowDivider) {
|
|
121153
|
-
return /* @__PURE__ */
|
|
121298
|
+
return /* @__PURE__ */ jsx10("div", { style: { width: 1, alignSelf: "stretch", flexShrink: 0, margin: "4px 0", background: C2("border", "#e6edf3"), ...wrap } });
|
|
121154
121299
|
}
|
|
121155
|
-
return /* @__PURE__ */
|
|
121300
|
+
return /* @__PURE__ */ jsx10("div", { style: { height: 1, alignSelf: "stretch", width: "100%", background: C2("border", "#e6edf3"), ...wrap } });
|
|
121156
121301
|
case "Spacer": {
|
|
121157
121302
|
if (props.collapseWhenEmpty === true) {
|
|
121158
121303
|
const raw = props.value;
|
|
@@ -121160,33 +121305,33 @@ function renderInner(node, ctx) {
|
|
|
121160
121305
|
const s2 = resolved2 == null ? "" : String(resolved2);
|
|
121161
121306
|
if (!s2 || s2 === "\u2014") return null;
|
|
121162
121307
|
}
|
|
121163
|
-
return /* @__PURE__ */
|
|
121308
|
+
return /* @__PURE__ */ jsx10("div", { style: { flex: 1 } });
|
|
121164
121309
|
}
|
|
121165
121310
|
case "EmptyState":
|
|
121166
|
-
return /* @__PURE__ */
|
|
121311
|
+
return /* @__PURE__ */ jsx10(EmptyStateNode, { props, ctx, wrap, nodeId: node.id });
|
|
121167
121312
|
// ───────────── atoms ─────────────
|
|
121168
121313
|
case "Text":
|
|
121169
|
-
return /* @__PURE__ */
|
|
121314
|
+
return /* @__PURE__ */ jsx10(TextNode, { props, ctx, wrap });
|
|
121170
121315
|
case "RichText": {
|
|
121171
121316
|
const runs = Array.isArray(props.runs) ? props.runs : [];
|
|
121172
|
-
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) => {
|
|
121173
121318
|
const marks = Array.isArray(r2.marks) ? r2.marks : [];
|
|
121174
121319
|
const f2 = ctx.font(r2.style);
|
|
121175
|
-
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);
|
|
121176
121321
|
}) });
|
|
121177
121322
|
}
|
|
121178
121323
|
case "Image":
|
|
121179
|
-
return /* @__PURE__ */
|
|
121324
|
+
return /* @__PURE__ */ jsx10(ImageNode, { props, ctx, wrap });
|
|
121180
121325
|
case "Icon":
|
|
121181
|
-
return /* @__PURE__ */
|
|
121326
|
+
return /* @__PURE__ */ jsx10(IconNode, { props, ctx, wrap });
|
|
121182
121327
|
case "Button":
|
|
121183
|
-
return /* @__PURE__ */
|
|
121328
|
+
return /* @__PURE__ */ jsx10(ButtonNode, { props, ctx, wrap });
|
|
121184
121329
|
case "MediaField":
|
|
121185
|
-
return /* @__PURE__ */
|
|
121330
|
+
return /* @__PURE__ */ jsx10(MediaFieldNode, { props, ctx, wrap });
|
|
121186
121331
|
case "TextField":
|
|
121187
|
-
return /* @__PURE__ */
|
|
121332
|
+
return /* @__PURE__ */ jsx10(EditableField, { props, ctx, wrap, multiline: false });
|
|
121188
121333
|
case "RichTextField":
|
|
121189
|
-
return /* @__PURE__ */
|
|
121334
|
+
return /* @__PURE__ */ jsx10(
|
|
121190
121335
|
EditableField,
|
|
121191
121336
|
{
|
|
121192
121337
|
props: { ...props, __formFieldId: props.id },
|
|
@@ -121201,11 +121346,11 @@ function renderInner(node, ctx) {
|
|
|
121201
121346
|
}
|
|
121202
121347
|
);
|
|
121203
121348
|
case "Toggle":
|
|
121204
|
-
return /* @__PURE__ */
|
|
121349
|
+
return /* @__PURE__ */ jsx10(ToggleNode, { props, ctx, wrap });
|
|
121205
121350
|
case "Stepper":
|
|
121206
|
-
return /* @__PURE__ */
|
|
121351
|
+
return /* @__PURE__ */ jsx10(InteractiveStepper, { props, ctx, wrap });
|
|
121207
121352
|
case "Avatar":
|
|
121208
|
-
return /* @__PURE__ */
|
|
121353
|
+
return /* @__PURE__ */ jsx10(AvatarNode, { props, ctx, wrap });
|
|
121209
121354
|
case "Badge": {
|
|
121210
121355
|
const _bt = boundTokenName(props.tokenPath, props.token, ctx);
|
|
121211
121356
|
const c2 = _bt ? C2(_bt, "#116DFF") : sevColor(ctx, props.style ?? "info");
|
|
@@ -121217,16 +121362,16 @@ function renderInner(node, ctx) {
|
|
|
121217
121362
|
const badgeLabel = m2?.accessibilityLabel ?? m2?.accessibility_label;
|
|
121218
121363
|
const badgeRole = roleDeclared ? void 0 : liveCount ? "status" : typeof badgeLabel === "string" && badgeLabel.trim() !== "" ? "img" : void 0;
|
|
121219
121364
|
const fg = _bt ? c2 : sevTextColor(ctx, props.style ?? "info");
|
|
121220
|
-
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" });
|
|
121221
121366
|
}
|
|
121222
121367
|
case "Tag": {
|
|
121223
121368
|
const tagToken = boundTokenName(props.tokenPath, props.token, ctx);
|
|
121224
121369
|
const c2 = C2(tagToken ?? "accentPrimary", "#116DFF");
|
|
121225
121370
|
const tagFg = tagToken ? c2 : accentTextColor(ctx);
|
|
121226
|
-
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" });
|
|
121227
121372
|
}
|
|
121228
121373
|
case "ProgressBar":
|
|
121229
|
-
return /* @__PURE__ */
|
|
121374
|
+
return /* @__PURE__ */ jsx10(ProgressBarNode, { props, ctx, wrap });
|
|
121230
121375
|
// ───────────── controls & cells (RFC 0028) ─────────────
|
|
121231
121376
|
case "ListItem": {
|
|
121232
121377
|
const titleF = ctx.font(props.titleStyle ?? "body");
|
|
@@ -121253,20 +121398,20 @@ function renderInner(node, ctx) {
|
|
|
121253
121398
|
e2.currentTarget.click();
|
|
121254
121399
|
}
|
|
121255
121400
|
} : void 0;
|
|
121256
|
-
const leadingEl = props.leading && /* @__PURE__ */
|
|
121257
|
-
const textEl = /* @__PURE__ */
|
|
121258
|
-
props.overline != null && /* @__PURE__ */
|
|
121259
|
-
/* @__PURE__ */
|
|
121260
|
-
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) })
|
|
121261
121406
|
] });
|
|
121262
|
-
return /* @__PURE__ */
|
|
121263
|
-
splitButton ? /* @__PURE__ */
|
|
121264
|
-
leadingInteractive && /* @__PURE__ */
|
|
121265
|
-
/* @__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: [
|
|
121266
121411
|
!leadingInteractive && leadingEl,
|
|
121267
121412
|
textEl
|
|
121268
121413
|
] })
|
|
121269
|
-
] }) : /* @__PURE__ */
|
|
121414
|
+
] }) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
121270
121415
|
leadingEl,
|
|
121271
121416
|
textEl
|
|
121272
121417
|
] }),
|
|
@@ -121278,113 +121423,113 @@ function renderInner(node, ctx) {
|
|
|
121278
121423
|
// makes the trailing slot fire ONLY its own action — and, because the
|
|
121279
121424
|
// Menu popup renders inside this slot, menu-item clicks don't double-fire
|
|
121280
121425
|
// the row either. Mirrors the Button node, which stops for the same reason.
|
|
121281
|
-
/* @__PURE__ */
|
|
121282
|
-
) : 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 })
|
|
121283
121428
|
] });
|
|
121284
121429
|
}
|
|
121285
121430
|
case "Slider":
|
|
121286
|
-
return /* @__PURE__ */
|
|
121431
|
+
return /* @__PURE__ */ jsx10(SliderNode, { props, ctx, wrap });
|
|
121287
121432
|
case "SelectionControl":
|
|
121288
|
-
return /* @__PURE__ */
|
|
121433
|
+
return /* @__PURE__ */ jsx10(SelectionControlNode, { props, ctx, wrap });
|
|
121289
121434
|
case "ActivityIndicator":
|
|
121290
|
-
return /* @__PURE__ */
|
|
121435
|
+
return /* @__PURE__ */ jsx10(ActivityIndicatorNode, { props, ctx, wrap });
|
|
121291
121436
|
// ───────────── overlays & menus (RFC 0029) ─────────────
|
|
121292
121437
|
case "BottomSheet":
|
|
121293
|
-
return /* @__PURE__ */
|
|
121438
|
+
return /* @__PURE__ */ jsx10(BottomSheetNode, { props, ctx, wrap });
|
|
121294
121439
|
case "Menu":
|
|
121295
|
-
return /* @__PURE__ */
|
|
121440
|
+
return /* @__PURE__ */ jsx10(MenuNode, { props, ctx, wrap });
|
|
121296
121441
|
case "Tooltip": {
|
|
121297
121442
|
const rich = props.title != null && props.title !== "";
|
|
121298
|
-
return /* @__PURE__ */
|
|
121299
|
-
/* @__PURE__ */
|
|
121300
|
-
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) }),
|
|
121301
121446
|
txt(props.text, ctx)
|
|
121302
121447
|
] }),
|
|
121303
121448
|
props.anchor ? renderNode(props.anchor, ctx) : null
|
|
121304
121449
|
] });
|
|
121305
121450
|
}
|
|
121306
121451
|
case "Popover":
|
|
121307
|
-
return /* @__PURE__ */
|
|
121452
|
+
return /* @__PURE__ */ jsx10(PopoverNode, { props, ctx, wrap });
|
|
121308
121453
|
// ───────────── chips & selection (RFC 0030) ─────────────
|
|
121309
121454
|
case "Chip":
|
|
121310
|
-
return /* @__PURE__ */
|
|
121455
|
+
return /* @__PURE__ */ jsx10(ChipNode, { props, ctx, wrap });
|
|
121311
121456
|
case "ChipsInput":
|
|
121312
|
-
return /* @__PURE__ */
|
|
121457
|
+
return /* @__PURE__ */ jsx10(ChipsInputNode, { props, ctx, wrap });
|
|
121313
121458
|
// ───────────── structure & disclosure (RFC 0031) ─────────────
|
|
121314
121459
|
case "Section": {
|
|
121315
121460
|
const inset = props.inset === true;
|
|
121316
|
-
return /* @__PURE__ */
|
|
121317
|
-
props.header != null && /* @__PURE__ */
|
|
121318
|
-
/* @__PURE__ */
|
|
121319
|
-
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) })
|
|
121320
121465
|
] });
|
|
121321
121466
|
}
|
|
121322
121467
|
case "DisclosureGroup":
|
|
121323
|
-
return /* @__PURE__ */
|
|
121468
|
+
return /* @__PURE__ */ jsx10(DisclosureGroupNode, { props, ctx, wrap });
|
|
121324
121469
|
case "LabeledContent": {
|
|
121325
|
-
return /* @__PURE__ */
|
|
121326
|
-
/* @__PURE__ */
|
|
121327
|
-
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) })
|
|
121328
121473
|
] });
|
|
121329
121474
|
}
|
|
121330
121475
|
case "Label": {
|
|
121331
121476
|
const f2 = ctx.font(props.style ?? "body");
|
|
121332
121477
|
const col = C2(resolveScalarStatic(props.color, ctx) ?? "textPrimary", "#13171e");
|
|
121333
|
-
return /* @__PURE__ */
|
|
121334
|
-
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 }) }),
|
|
121335
121480
|
txt(props.text, ctx)
|
|
121336
121481
|
] });
|
|
121337
121482
|
}
|
|
121338
121483
|
case "Table":
|
|
121339
|
-
return /* @__PURE__ */
|
|
121484
|
+
return /* @__PURE__ */ jsx10(TableNode, { props, ctx, wrap });
|
|
121340
121485
|
// ───────────── display & data-viz (RFC 0032) ─────────────
|
|
121341
121486
|
case "Gauge":
|
|
121342
|
-
return /* @__PURE__ */
|
|
121487
|
+
return /* @__PURE__ */ jsx10(GaugeNode, { props, ctx, wrap });
|
|
121343
121488
|
case "Rating":
|
|
121344
|
-
return /* @__PURE__ */
|
|
121489
|
+
return /* @__PURE__ */ jsx10(RatingNode, { props, ctx, wrap });
|
|
121345
121490
|
case "Chart":
|
|
121346
|
-
return /* @__PURE__ */
|
|
121491
|
+
return /* @__PURE__ */ jsx10(ChartNode, { props, ctx, wrap });
|
|
121347
121492
|
// RFC 0057 — analytics data-viz.
|
|
121348
121493
|
case "DonutChart":
|
|
121349
|
-
return /* @__PURE__ */
|
|
121494
|
+
return /* @__PURE__ */ jsx10(DonutChartNode, { props, ctx, wrap });
|
|
121350
121495
|
case "Legend":
|
|
121351
|
-
return /* @__PURE__ */
|
|
121496
|
+
return /* @__PURE__ */ jsx10(LegendNode, { props, ctx, wrap });
|
|
121352
121497
|
case "DataTable":
|
|
121353
|
-
return /* @__PURE__ */
|
|
121498
|
+
return /* @__PURE__ */ jsx10(DataTableNode, { props, ctx, wrap });
|
|
121354
121499
|
// RFC 0063 — Wix Ricos rich content (never a WebView; binding + fallback inside).
|
|
121355
121500
|
case "RichContent":
|
|
121356
|
-
return /* @__PURE__ */
|
|
121501
|
+
return /* @__PURE__ */ jsx10(RichContentNode, { props, ctx, wrap, nodeId: resolvedComponentId(node.id, ctx) ?? "" });
|
|
121357
121502
|
// Recorded-audio bubble (messenger design G4). Presentational: playback is
|
|
121358
121503
|
// driven by the worker through `media_playback`, not by this node.
|
|
121359
121504
|
case "VoiceNote":
|
|
121360
|
-
return /* @__PURE__ */
|
|
121505
|
+
return /* @__PURE__ */ jsx10(VoiceNoteNode, { props, ctx, wrap });
|
|
121361
121506
|
case "Marquee": {
|
|
121362
121507
|
ensureMarqueeKeyframes();
|
|
121363
121508
|
const f2 = ctx.font(props.style ?? "body");
|
|
121364
121509
|
const dur = props.durationMs ?? 8e3;
|
|
121365
|
-
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) }) });
|
|
121366
121511
|
}
|
|
121367
121512
|
case "Timeline":
|
|
121368
|
-
return /* @__PURE__ */
|
|
121513
|
+
return /* @__PURE__ */ jsx10(TimelineNode, { props, ctx, wrap });
|
|
121369
121514
|
case "MonthCalendar":
|
|
121370
|
-
return /* @__PURE__ */
|
|
121515
|
+
return /* @__PURE__ */ jsx10(MonthCalendarNode, { props, ctx, wrap });
|
|
121371
121516
|
case "TimeGrid":
|
|
121372
|
-
return /* @__PURE__ */
|
|
121517
|
+
return /* @__PURE__ */ jsx10(TimeGridNode, { props, ctx, wrap });
|
|
121373
121518
|
case "Agenda":
|
|
121374
|
-
return /* @__PURE__ */
|
|
121519
|
+
return /* @__PURE__ */ jsx10(AgendaNode, { props, ctx, wrap });
|
|
121375
121520
|
case "PageControl": {
|
|
121376
121521
|
const count2 = props.count ?? 0;
|
|
121377
121522
|
const cur = props.currentIndex ?? 0;
|
|
121378
121523
|
const accent = C2("accentPrimary", "#116DFF");
|
|
121379
|
-
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)) });
|
|
121380
121525
|
}
|
|
121381
121526
|
// ───────────── pickers & inputs (RFC 0033) ─────────────
|
|
121382
121527
|
case "WheelPicker":
|
|
121383
|
-
return /* @__PURE__ */
|
|
121528
|
+
return /* @__PURE__ */ jsx10(WheelPickerNode, { props, ctx, wrap });
|
|
121384
121529
|
case "ColorPicker":
|
|
121385
|
-
return /* @__PURE__ */
|
|
121530
|
+
return /* @__PURE__ */ jsx10(ColorPickerNode, { props, ctx, wrap });
|
|
121386
121531
|
case "OtpInput":
|
|
121387
|
-
return /* @__PURE__ */
|
|
121532
|
+
return /* @__PURE__ */ jsx10(OtpInputNode, { props, ctx, wrap });
|
|
121388
121533
|
// ───────────── cross-cutting & media (RFC 0035) ─────────────
|
|
121389
121534
|
case "Fab": {
|
|
121390
121535
|
const bg = C2(props.tint ?? "accentPrimary", "#116DFF");
|
|
@@ -121394,34 +121539,34 @@ function renderInner(node, ctx) {
|
|
|
121394
121539
|
const extended = props.label != null && props.label !== "";
|
|
121395
121540
|
const actionable = Boolean(props.action);
|
|
121396
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 };
|
|
121397
|
-
const content = /* @__PURE__ */
|
|
121398
|
-
props.icon && /* @__PURE__ */
|
|
121399
|
-
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) })
|
|
121400
121545
|
] });
|
|
121401
|
-
if (!actionable) return /* @__PURE__ */
|
|
121402
|
-
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) => {
|
|
121403
121548
|
e2.stopPropagation();
|
|
121404
121549
|
ctx.onAction(resolveItemDeep2(props.action, ctx));
|
|
121405
121550
|
} : void 0, style: { ...style, appearance: "none", border: 0, font: "inherit" }, children: content });
|
|
121406
121551
|
}
|
|
121407
121552
|
case "Map":
|
|
121408
|
-
return /* @__PURE__ */
|
|
121553
|
+
return /* @__PURE__ */ jsx10(MapNode, { props, ctx, wrap });
|
|
121409
121554
|
case "Video":
|
|
121410
|
-
return /* @__PURE__ */
|
|
121555
|
+
return /* @__PURE__ */ jsx10(VideoNode, { props, ctx, wrap });
|
|
121411
121556
|
// Inline PDF document — see PdfViewNode: `url` must resolve through the
|
|
121412
121557
|
// binding seam, so this delegates rather than reading props.url directly.
|
|
121413
121558
|
case "PdfView":
|
|
121414
|
-
return /* @__PURE__ */
|
|
121559
|
+
return /* @__PURE__ */ jsx10(PdfViewNode, { props, ctx, wrap });
|
|
121415
121560
|
case "MediaPlayer":
|
|
121416
|
-
return /* @__PURE__ */
|
|
121561
|
+
return /* @__PURE__ */ jsx10(MediaPlayerView, { nodeId: node.id, props, ctx, wrap });
|
|
121417
121562
|
// Motion grammar (Batch 4 / Phase-2) — Lottie and Rive; see LottieNode / RiveNode.
|
|
121418
121563
|
case "Lottie":
|
|
121419
|
-
return /* @__PURE__ */
|
|
121564
|
+
return /* @__PURE__ */ jsx10(LottieNode, { props, ctx, wrap });
|
|
121420
121565
|
case "Rive":
|
|
121421
|
-
return /* @__PURE__ */
|
|
121566
|
+
return /* @__PURE__ */ jsx10(RiveNode, { props, ctx, wrap });
|
|
121422
121567
|
// ───────────── forms ─────────────
|
|
121423
121568
|
case "Form":
|
|
121424
|
-
return /* @__PURE__ */
|
|
121569
|
+
return /* @__PURE__ */ jsx10(FormView, { props, ctx, wrap });
|
|
121425
121570
|
case "FormField": {
|
|
121426
121571
|
const fieldRule = effectiveFieldRule({
|
|
121427
121572
|
wrapper: props.validation,
|
|
@@ -121468,82 +121613,82 @@ function renderInner(node, ctx) {
|
|
|
121468
121613
|
inner.modifiers = { ...inner.modifiers ?? {}, accessibilityHint: props.helpText };
|
|
121469
121614
|
}
|
|
121470
121615
|
const showOwnError = !isTextKind && props.errorMessage;
|
|
121471
|
-
return /* @__PURE__ */
|
|
121472
|
-
(fieldLabel || props.required) && /* @__PURE__ */
|
|
121473
|
-
fieldLabel ? /* @__PURE__ */
|
|
121474
|
-
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: " *" })
|
|
121475
121620
|
] }),
|
|
121476
121621
|
renderNode(inner, ctx),
|
|
121477
|
-
props.helpText && /* @__PURE__ */
|
|
121478
|
-
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) })
|
|
121479
121624
|
] });
|
|
121480
121625
|
};
|
|
121481
|
-
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 });
|
|
121482
121627
|
}
|
|
121483
121628
|
case "FieldError":
|
|
121484
|
-
return /* @__PURE__ */
|
|
121629
|
+
return /* @__PURE__ */ jsx10(FieldErrorNode, { props, ctx, wrap });
|
|
121485
121630
|
case "Picker":
|
|
121486
|
-
return /* @__PURE__ */
|
|
121631
|
+
return /* @__PURE__ */ jsx10(InteractivePicker, { props, ctx, wrap });
|
|
121487
121632
|
case "DatePicker":
|
|
121488
|
-
return /* @__PURE__ */
|
|
121633
|
+
return /* @__PURE__ */ jsx10(InteractiveDatePicker, { props, ctx, wrap });
|
|
121489
121634
|
// ───────────── state envelopes ─────────────
|
|
121490
121635
|
case "StatefulSection": {
|
|
121491
121636
|
const branch = isNodeLike(props.data) ? "data" : isNodeLike(props.loading) ? "loading" : isNodeLike(props.error) ? "error" : null;
|
|
121492
121637
|
const cfg = !branch ? props.state === "error" ? props.error ?? props.empty : props.empty ?? props.error : null;
|
|
121493
|
-
return /* @__PURE__ */
|
|
121494
|
-
cfg.title && /* @__PURE__ */
|
|
121495
|
-
(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) }),
|
|
121496
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" })
|
|
121497
121642
|
] }) : null });
|
|
121498
121643
|
}
|
|
121499
121644
|
case "FragmentSlot":
|
|
121500
|
-
return /* @__PURE__ */
|
|
121645
|
+
return /* @__PURE__ */ jsx10(FragmentSlotNode, { props, ctx, wrap, nodeId: node.id });
|
|
121501
121646
|
case "WorkerSubtree":
|
|
121502
|
-
return /* @__PURE__ */
|
|
121647
|
+
return /* @__PURE__ */ jsx10(WorkerSubtreeNode, { props, ctx, wrap, nodeId: node.id });
|
|
121503
121648
|
case "RichContentEditor":
|
|
121504
|
-
return /* @__PURE__ */
|
|
121649
|
+
return /* @__PURE__ */ jsx10(RichContentEditorNode, { props, ctx, wrap, nodeId: node.id });
|
|
121505
121650
|
case "Skeleton": {
|
|
121506
121651
|
const count2 = typeof props.count === "number" ? props.count : 1;
|
|
121507
|
-
if (count2 <= 1) return /* @__PURE__ */
|
|
121508
|
-
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)) });
|
|
121509
121654
|
}
|
|
121510
121655
|
// ───────────── search & filter ─────────────
|
|
121511
121656
|
case "SearchField":
|
|
121512
|
-
return /* @__PURE__ */
|
|
121657
|
+
return /* @__PURE__ */ jsx10(InteractiveSearchField, { props, ctx, wrap });
|
|
121513
121658
|
case "FilterChips":
|
|
121514
|
-
return /* @__PURE__ */
|
|
121659
|
+
return /* @__PURE__ */ jsx10(FilterChipsNode, { props, ctx, wrap });
|
|
121515
121660
|
// ───────────── navigation ─────────────
|
|
121516
121661
|
case "Tabs":
|
|
121517
|
-
return /* @__PURE__ */
|
|
121662
|
+
return /* @__PURE__ */ jsx10(TabsNode, { props, ctx, wrap });
|
|
121518
121663
|
case "SegmentedControl":
|
|
121519
|
-
return /* @__PURE__ */
|
|
121664
|
+
return /* @__PURE__ */ jsx10(SegmentedControlNode, { props, ctx, wrap });
|
|
121520
121665
|
case "Carousel":
|
|
121521
121666
|
case "Pager": {
|
|
121522
121667
|
const items = (type === "Carousel" ? props.items : props.pages) ?? [];
|
|
121523
121668
|
const carItemsPath = props.itemsPath ?? props.items_path;
|
|
121524
121669
|
if (carItemsPath && items[0] && ctx.provider) {
|
|
121525
|
-
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) }) }) }) });
|
|
121526
121671
|
}
|
|
121527
|
-
if (type === "Carousel") return /* @__PURE__ */
|
|
121528
|
-
return /* @__PURE__ */
|
|
121672
|
+
if (type === "Carousel") return /* @__PURE__ */ jsx10(CarouselNode, { props, ctx, wrap });
|
|
121673
|
+
return /* @__PURE__ */ jsx10(PagingNode, { props: { ...props, __pager: true }, ctx, wrap });
|
|
121529
121674
|
}
|
|
121530
121675
|
case "StepIndicator": {
|
|
121531
121676
|
const steps = Array.isArray(props.steps) ? props.steps : [];
|
|
121532
121677
|
const cur = props.currentIndex ?? 0;
|
|
121533
|
-
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)) });
|
|
121534
121679
|
}
|
|
121535
121680
|
case "CollapsingHeader":
|
|
121536
|
-
return /* @__PURE__ */
|
|
121681
|
+
return /* @__PURE__ */ jsx10(CollapsingHeaderNode, { props, ctx, wrap });
|
|
121537
121682
|
case "AvatarStrip":
|
|
121538
|
-
return /* @__PURE__ */
|
|
121683
|
+
return /* @__PURE__ */ jsx10(AvatarStripNode, { props, ctx, wrap });
|
|
121539
121684
|
// ───────────── feedback ─────────────
|
|
121540
121685
|
case "Banner":
|
|
121541
|
-
return /* @__PURE__ */
|
|
121686
|
+
return /* @__PURE__ */ jsx10(BannerNode, { props, ctx, wrap });
|
|
121542
121687
|
case "Snackbar": {
|
|
121543
121688
|
const dot = sevColor(ctx, props.severity ?? "info");
|
|
121544
|
-
return /* @__PURE__ */
|
|
121545
|
-
/* @__PURE__ */
|
|
121546
|
-
/* @__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) }),
|
|
121547
121692
|
actionTextButton(ctx, props.action, asBoundText(props.actionLabel, ctx) || "Take action", "#fff", { flex: "none", textDecoration: "underline" })
|
|
121548
121693
|
] });
|
|
121549
121694
|
}
|
|
@@ -121556,25 +121701,25 @@ function renderInner(node, ctx) {
|
|
|
121556
121701
|
// it. A presented alert is `presentation: "alert"` on a navigating Action, which the web host
|
|
121557
121702
|
// draws as its own modal dialog.
|
|
121558
121703
|
case "AlertDialog":
|
|
121559
|
-
return /* @__PURE__ */
|
|
121560
|
-
/* @__PURE__ */
|
|
121561
|
-
/* @__PURE__ */
|
|
121562
|
-
/* @__PURE__ */
|
|
121563
|
-
props.cancelAction != null && /* @__PURE__ */
|
|
121564
|
-
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") })
|
|
121565
121710
|
] })
|
|
121566
121711
|
] });
|
|
121567
121712
|
// ───────────── embeddable WebView ─────────────
|
|
121568
121713
|
case "WebView":
|
|
121569
|
-
return /* @__PURE__ */
|
|
121714
|
+
return /* @__PURE__ */ jsx10(WebViewNode, { props, ctx, wrap });
|
|
121570
121715
|
// ───────────── app intents + unknown ─────────────
|
|
121571
121716
|
default: {
|
|
121572
121717
|
const intent = pkg ? ctx.intents?.[`${pkg}.${type}`] : void 0;
|
|
121573
|
-
if (intent) return /* @__PURE__ */
|
|
121718
|
+
if (intent) return /* @__PURE__ */ jsx10("div", { style: { alignSelf: "stretch", ...wrap }, children: intent(props, ctx) });
|
|
121574
121719
|
const childKeys = Object.entries(props).filter(([, v2]) => isNodeLike(v2) || Array.isArray(v2) && v2.some(isNodeLike));
|
|
121575
|
-
return /* @__PURE__ */
|
|
121576
|
-
/* @__PURE__ */
|
|
121577
|
-
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))
|
|
121578
121723
|
] });
|
|
121579
121724
|
}
|
|
121580
121725
|
}
|
|
@@ -121598,6 +121743,8 @@ var init_renderNode = __esm({
|
|
|
121598
121743
|
init_env();
|
|
121599
121744
|
init_actionParams();
|
|
121600
121745
|
init_icons();
|
|
121746
|
+
init_picker_field();
|
|
121747
|
+
init_pickerField();
|
|
121601
121748
|
init_symbolEffects();
|
|
121602
121749
|
init_webviewFrame();
|
|
121603
121750
|
init_richContentEditor();
|
|
@@ -121631,7 +121778,7 @@ var init_renderNode = __esm({
|
|
|
121631
121778
|
ro2.observe(el2);
|
|
121632
121779
|
return () => ro2.disconnect();
|
|
121633
121780
|
}, [base, medium, expanded, initialCols, seedWidth]);
|
|
121634
|
-
return /* @__PURE__ */
|
|
121781
|
+
return /* @__PURE__ */ jsx10(
|
|
121635
121782
|
"div",
|
|
121636
121783
|
{
|
|
121637
121784
|
ref,
|
|
@@ -121660,7 +121807,7 @@ var init_renderNode = __esm({
|
|
|
121660
121807
|
ro2.observe(el2);
|
|
121661
121808
|
return () => ro2.disconnect();
|
|
121662
121809
|
}, [initialWide, seedWidth]);
|
|
121663
|
-
return /* @__PURE__ */
|
|
121810
|
+
return /* @__PURE__ */ jsxs7(
|
|
121664
121811
|
"div",
|
|
121665
121812
|
{
|
|
121666
121813
|
ref,
|
|
@@ -121668,8 +121815,8 @@ var init_renderNode = __esm({
|
|
|
121668
121815
|
"data-layout": wide ? "row" : "column",
|
|
121669
121816
|
style: { display: "flex", flexDirection: wide ? "row" : "column", gap: SPLIT_COLUMN_GAP, width: "100%", alignItems: "stretch", ...extra },
|
|
121670
121817
|
children: [
|
|
121671
|
-
/* @__PURE__ */
|
|
121672
|
-
/* @__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 })
|
|
121673
121820
|
]
|
|
121674
121821
|
}
|
|
121675
121822
|
);
|
|
@@ -121678,7 +121825,7 @@ var init_renderNode = __esm({
|
|
|
121678
121825
|
appearKeyframesInjected = false;
|
|
121679
121826
|
pressStylesInjected = false;
|
|
121680
121827
|
REVEAL_ON_FOCUS_ATTR = "data-hm-reveal-on-focus";
|
|
121681
|
-
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}`;
|
|
121682
121829
|
focusStylesInjected = false;
|
|
121683
121830
|
HLIST_CHILD_CSS = "[data-himalaya-hlist]>*{flex:0 0 auto}";
|
|
121684
121831
|
hListStylesInjected = false;
|
|
@@ -121730,12 +121877,12 @@ var init_renderNode = __esm({
|
|
|
121730
121877
|
}
|
|
121731
121878
|
};
|
|
121732
121879
|
bodyFont = (ctx) => fontStack(ctx.font("body").family, ctx.idiom);
|
|
121733
|
-
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;
|
|
121734
121881
|
rowKidCtx = (n2, ctx) => wantsRowStretch(n2) ? { ...ctx, rowStretch: true } : normalize(n2).type === "Divider" ? { ...ctx, rowDivider: true } : ctx;
|
|
121735
|
-
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;
|
|
121736
121883
|
staggeredKids = (arr, ctx, staggerMs) => Array.isArray(arr) ? arr.map((n2, i2) => {
|
|
121737
121884
|
const el2 = renderNode(n2, ctx);
|
|
121738
|
-
if (!React9.isValidElement(el2)) return /* @__PURE__ */
|
|
121885
|
+
if (!React9.isValidElement(el2)) return /* @__PURE__ */ jsx10(React9.Fragment, { children: el2 }, n2?.id ?? i2);
|
|
121739
121886
|
const prev = el2.props.style ?? {};
|
|
121740
121887
|
return React9.cloneElement(el2, { key: n2?.id ?? i2, style: { ...prev, animationDelay: `${i2 * staggerMs}ms` } });
|
|
121741
121888
|
}) : null;
|
|
@@ -121768,7 +121915,7 @@ var init_renderNode = __esm({
|
|
|
121768
121915
|
for (const [k2, v2] of Object.entries(params)) {
|
|
121769
121916
|
if (typeof v2 === "string" && v2.startsWith("$item")) resolved2[k2] = resolveScalarStatic(v2, ctx);
|
|
121770
121917
|
}
|
|
121771
|
-
return /* @__PURE__ */
|
|
121918
|
+
return /* @__PURE__ */ jsx10(Fragment4, { children: formatInterpolated(pattern, params, resolved2, ctx) });
|
|
121772
121919
|
};
|
|
121773
121920
|
txt = (v2, ctx) => {
|
|
121774
121921
|
if (!isBinding(v2)) return asText2(v2);
|
|
@@ -121779,7 +121926,7 @@ var init_renderNode = __esm({
|
|
|
121779
121926
|
if (resolved2 != null) return asTextL10n(resolved2, ctx);
|
|
121780
121927
|
return ctx.itemScope ? null : bindingPlaceholder(v2, ctx);
|
|
121781
121928
|
}
|
|
121782
|
-
if (ctx.provider) return /* @__PURE__ */
|
|
121929
|
+
if (ctx.provider) return /* @__PURE__ */ jsx10(Bound, { ctx, binding: v2, render: (val) => asTextL10n(val, ctx) });
|
|
121783
121930
|
return bindingPlaceholder(v2, ctx);
|
|
121784
121931
|
};
|
|
121785
121932
|
selectFragmentCase = (props, discriminator) => {
|
|
@@ -121829,9 +121976,9 @@ var init_renderNode = __esm({
|
|
|
121829
121976
|
// padding adds OUTSIDE the 100% width, so the slot renders wider than its parent
|
|
121830
121977
|
// and the right edge clips (branded-lite's home is a FragmentSlot → 32px cut in
|
|
121831
121978
|
// the phone preview). Included before ...extra so a modifier can still override.
|
|
121832
|
-
/* @__PURE__ */
|
|
121833
|
-
selected?.content ? /* @__PURE__ */
|
|
121834
|
-
/* @__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 })
|
|
121835
121982
|
] })
|
|
121836
121983
|
);
|
|
121837
121984
|
};
|
|
@@ -121842,7 +121989,7 @@ var init_renderNode = __esm({
|
|
|
121842
121989
|
const discriminator = isService ? bound : isEnvExpr(casePath) ? evalEnvExpr(casePath, ctxEnv(ctx)) : resolveScalarStatic(casePath, ctx);
|
|
121843
121990
|
return fragmentSlotContent({ props, ctx, discriminator, slotId: nodeId, extra: wrap });
|
|
121844
121991
|
});
|
|
121845
|
-
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) }));
|
|
121846
121993
|
MediaFieldNode = withExtras("MediaFieldNode", ({ props, ctx, wrap }) => {
|
|
121847
121994
|
const C2 = ctx.color;
|
|
121848
121995
|
const servicePathStr = mediaFieldServicePath(props.valuePath);
|
|
@@ -121887,7 +122034,7 @@ var init_renderNode = __esm({
|
|
|
121887
122034
|
};
|
|
121888
122035
|
const f2 = ctx.font("bodyEmphasis");
|
|
121889
122036
|
const radius = 12;
|
|
121890
|
-
return /* @__PURE__ */
|
|
122037
|
+
return /* @__PURE__ */ jsxs7(
|
|
121891
122038
|
"div",
|
|
121892
122039
|
{
|
|
121893
122040
|
role: "button",
|
|
@@ -121904,13 +122051,13 @@ var init_renderNode = __esm({
|
|
|
121904
122051
|
},
|
|
121905
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 },
|
|
121906
122053
|
children: [
|
|
121907
|
-
/* @__PURE__ */
|
|
121908
|
-
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: [
|
|
121909
122056
|
iconSvg("camera", { size: 28, color: accentTextColor(ctx) }),
|
|
121910
|
-
/* @__PURE__ */
|
|
122057
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: fontStack(f2.family, ctx.idiom), fontWeight: f2.weight, fontSize: f2.remSize }, children: name })
|
|
121911
122058
|
] }),
|
|
121912
|
-
uploading ? /* @__PURE__ */
|
|
121913
|
-
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
|
|
121914
122061
|
]
|
|
121915
122062
|
}
|
|
121916
122063
|
);
|
|
@@ -121954,7 +122101,7 @@ var init_renderNode = __esm({
|
|
|
121954
122101
|
const component = validation.ok ? validation.component : fallback;
|
|
121955
122102
|
const reason = validation.ok ? "accepted" : validation.reason;
|
|
121956
122103
|
const maxHeight = Number.isInteger(policy?.maxHeight) && policy.maxHeight > 0 ? Math.min(policy.maxHeight, WORKER_SUBTREE_CEILINGS.maxHeight) : WORKER_SUBTREE_CEILINGS.maxHeight;
|
|
121957
|
-
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 });
|
|
121958
122105
|
});
|
|
121959
122106
|
RichContentNode = withExtras("RichContentNode", ({ props, ctx, wrap, nodeId }) => {
|
|
121960
122107
|
const componentId = nodeId ?? "";
|
|
@@ -121973,12 +122120,12 @@ var init_renderNode = __esm({
|
|
|
121973
122120
|
ctx.emitTelemetry?.("rich_content_rejected", { componentId, reason }, ctx.screenId);
|
|
121974
122121
|
}, [ctx, componentId, reason, raw]);
|
|
121975
122122
|
const style = { width: "100%", display: "flex", flexDirection: "column", gap: 12, ...wrap };
|
|
121976
|
-
if (result === null) return /* @__PURE__ */
|
|
122123
|
+
if (result === null) return /* @__PURE__ */ jsx10("div", { "data-rich-content-status": "pending", style });
|
|
121977
122124
|
if ("rejected" in result) {
|
|
121978
122125
|
const fallback = props.fallback;
|
|
121979
|
-
return /* @__PURE__ */
|
|
122126
|
+
return /* @__PURE__ */ jsx10("div", { "data-rich-content-status": result.rejected, style, children: fallback ? renderNode(fallback, ctx) : null });
|
|
121980
122127
|
}
|
|
121981
|
-
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 }) });
|
|
121982
122129
|
});
|
|
121983
122130
|
resolveItemDeep2 = (v2, ctx) => {
|
|
121984
122131
|
if (typeof v2 === "string") return isBinding(v2) && v2.startsWith("$item") ? resolveScalarStatic(v2, ctx) : v2;
|
|
@@ -122075,11 +122222,11 @@ var init_renderNode = __esm({
|
|
|
122075
122222
|
return () => unsubs.forEach((unsubscribe) => unsubscribe());
|
|
122076
122223
|
}, [ctx.provider, bindingKey]);
|
|
122077
122224
|
const rendered = renderNodeInner(node, ctx);
|
|
122078
|
-
return /* @__PURE__ */
|
|
122225
|
+
return /* @__PURE__ */ jsx10(Fragment4, { children: style ? withRootStyle(rendered, style) : rendered });
|
|
122079
122226
|
};
|
|
122080
122227
|
HiddenGate = ({ ctx, binding: binding2, children }) => {
|
|
122081
122228
|
const v2 = useBoundValue(ctx, binding2);
|
|
122082
|
-
return hiddenBool(v2) ? null : /* @__PURE__ */
|
|
122229
|
+
return hiddenBool(v2) ? null : /* @__PURE__ */ jsx10(Fragment4, { children });
|
|
122083
122230
|
};
|
|
122084
122231
|
KEYBOARD_INPUT_MODES = { email: "email", phone: "tel", number: "numeric", decimal: "decimal", url: "url" };
|
|
122085
122232
|
AUTOCAPITALIZE_VALUES = /* @__PURE__ */ new Set(["none", "words", "sentences", "characters"]);
|
|
@@ -122307,24 +122454,24 @@ var init_renderNode = __esm({
|
|
|
122307
122454
|
submit();
|
|
122308
122455
|
};
|
|
122309
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" };
|
|
122310
|
-
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 }) });
|
|
122311
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 };
|
|
122312
122459
|
const composedBox = addIntrinsicPadding(box, wrap) ?? box;
|
|
122313
|
-
return /* @__PURE__ */
|
|
122314
|
-
fieldLabel ? /* @__PURE__ */
|
|
122315
|
-
/* @__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: [
|
|
122316
122463
|
props.leadingIcon && accIcon(props.leadingIcon),
|
|
122317
|
-
prefixText && /* @__PURE__ */
|
|
122318
|
-
multilineBox ? /* @__PURE__ */
|
|
122319
|
-
suffixText && /* @__PURE__ */
|
|
122320
|
-
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: () => {
|
|
122321
122468
|
setLocal("");
|
|
122322
122469
|
setEdited(true);
|
|
122323
122470
|
emit("");
|
|
122324
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" }),
|
|
122325
122472
|
props.trailingIcon && accIcon(props.trailingIcon)
|
|
122326
122473
|
] }),
|
|
122327
|
-
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
|
|
122328
122475
|
] });
|
|
122329
122476
|
};
|
|
122330
122477
|
MenuNode = withExtras("MenuNode", ({ props, ctx, wrap }) => {
|
|
@@ -122353,7 +122500,9 @@ var init_renderNode = __esm({
|
|
|
122353
122500
|
}, [open]);
|
|
122354
122501
|
const modal = isOverlayModal("Menu", props.modal);
|
|
122355
122502
|
const anchorLabel = props.anchor?.modifiers?.accessibilityLabel || "More actions";
|
|
122356
|
-
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 };
|
|
122357
122506
|
const anchorRef = React9.useRef(null);
|
|
122358
122507
|
const menuRef = React9.useRef(null);
|
|
122359
122508
|
const dialogRef = React9.useRef(null);
|
|
@@ -122385,8 +122534,8 @@ var init_renderNode = __esm({
|
|
|
122385
122534
|
e2.preventDefault();
|
|
122386
122535
|
items2[next].focus();
|
|
122387
122536
|
};
|
|
122388
|
-
return /* @__PURE__ */
|
|
122389
|
-
/* @__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(
|
|
122390
122539
|
"span",
|
|
122391
122540
|
{
|
|
122392
122541
|
ref: anchorRef,
|
|
@@ -122406,11 +122555,11 @@ var init_renderNode = __esm({
|
|
|
122406
122555
|
setOpen((v2) => !v2);
|
|
122407
122556
|
}
|
|
122408
122557
|
},
|
|
122409
|
-
style: { display: "inline-flex", alignItems: "center", justifyContent: "center", minWidth: 44, minHeight: 44, cursor: "pointer" },
|
|
122410
|
-
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") })
|
|
122411
122560
|
}
|
|
122412
122561
|
),
|
|
122413
|
-
open && wrapModalMenu(modal, anchorLabel, popupPlacement, dialogRef, /* @__PURE__ */
|
|
122562
|
+
open && wrapModalMenu(modal, anchorLabel, popupPlacement, dialogRef, /* @__PURE__ */ jsx10(
|
|
122414
122563
|
"div",
|
|
122415
122564
|
{
|
|
122416
122565
|
ref: menuRef,
|
|
@@ -122418,7 +122567,7 @@ var init_renderNode = __esm({
|
|
|
122418
122567
|
tabIndex: modal ? -1 : void 0,
|
|
122419
122568
|
onKeyDown: trapTab,
|
|
122420
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 },
|
|
122421
|
-
children: items.map((it2, i2) => /* @__PURE__ */
|
|
122570
|
+
children: items.map((it2, i2) => /* @__PURE__ */ jsxs7(
|
|
122422
122571
|
"div",
|
|
122423
122572
|
{
|
|
122424
122573
|
role: "menuitem",
|
|
@@ -122439,8 +122588,8 @@ var init_renderNode = __esm({
|
|
|
122439
122588
|
} : void 0,
|
|
122440
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) },
|
|
122441
122590
|
children: [
|
|
122442
|
-
it2?.icon && /* @__PURE__ */
|
|
122443
|
-
/* @__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" })
|
|
122444
122593
|
]
|
|
122445
122594
|
},
|
|
122446
122595
|
it2?.id ?? i2
|
|
@@ -122469,7 +122618,7 @@ var init_renderNode = __esm({
|
|
|
122469
122618
|
return () => io2.disconnect();
|
|
122470
122619
|
}, [cursor]);
|
|
122471
122620
|
if (!cursor) return null;
|
|
122472
|
-
return /* @__PURE__ */
|
|
122621
|
+
return /* @__PURE__ */ jsx10("div", { ref, style: { height: 1 }, "aria-hidden": "true", "data-testid": "load-more-sentinel" });
|
|
122473
122622
|
};
|
|
122474
122623
|
FieldErrorNode = withExtras("FieldErrorNode", ({ props, ctx, wrap }) => {
|
|
122475
122624
|
const literalErrorText = useBoundString(props.text ?? props.message, ctx);
|
|
@@ -122480,8 +122629,8 @@ var init_renderNode = __esm({
|
|
|
122480
122629
|
if (props.visible === false) return null;
|
|
122481
122630
|
if (isBoundText && !text8) return null;
|
|
122482
122631
|
const c2 = (props.severity ?? "error") === "warning" ? C2("warning", "#E89F00") : C2("danger", "#E62214");
|
|
122483
|
-
return /* @__PURE__ */
|
|
122484
|
-
/* @__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" }),
|
|
122485
122634
|
text8
|
|
122486
122635
|
] });
|
|
122487
122636
|
});
|
|
@@ -122513,7 +122662,7 @@ var init_renderNode = __esm({
|
|
|
122513
122662
|
if (node.body) return { ...node, body: { ...node.body, props: { ...node.body.props ?? {}, disabled: true } } };
|
|
122514
122663
|
return { ...node, props: { ...node.props ?? {}, disabled: true } };
|
|
122515
122664
|
}, [props.submitButton, valid]);
|
|
122516
|
-
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: [
|
|
122517
122666
|
kids2(props.fields, ctx),
|
|
122518
122667
|
submitNode && renderNode(submitNode, submitCtx)
|
|
122519
122668
|
] }) });
|
|
@@ -122865,7 +123014,7 @@ var init_renderNode = __esm({
|
|
|
122865
123014
|
const chrome = props.controls ?? "builtIn";
|
|
122866
123015
|
const poster = String(item?.artworkUrl ?? props.posterUrl ?? "");
|
|
122867
123016
|
const mediaTracks = Array.isArray(item?.textTracks) ? item.textTracks.filter((track) => typeof track?.url === "string" && ["subtitles", "captions", "chapters"].includes(String(track.kind ?? "subtitles"))) : [];
|
|
122868
|
-
const renderMediaTracks = () => mediaTracks.map((track, trackIndex) => /* @__PURE__ */
|
|
123017
|
+
const renderMediaTracks = () => mediaTracks.map((track, trackIndex) => /* @__PURE__ */ jsx10(
|
|
122869
123018
|
"track",
|
|
122870
123019
|
{
|
|
122871
123020
|
kind: String(track.kind ?? "subtitles"),
|
|
@@ -122880,16 +123029,16 @@ var init_renderNode = __esm({
|
|
|
122880
123029
|
const safe = Number.isFinite(seconds) ? Math.max(0, seconds) : 0;
|
|
122881
123030
|
return `${Math.floor(safe / 60)}:${String(Math.floor(safe % 60)).padStart(2, "0")}`;
|
|
122882
123031
|
};
|
|
122883
|
-
const builtInControls = /* @__PURE__ */
|
|
122884
|
-
items.length > 1 && /* @__PURE__ */
|
|
122885
|
-
/* @__PURE__ */
|
|
122886
|
-
/* @__PURE__ */
|
|
122887
|
-
/* @__PURE__ */
|
|
122888
|
-
/* @__PURE__ */
|
|
122889
|
-
/* @__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) })
|
|
122890
123039
|
] }),
|
|
122891
|
-
items.length > 1 && /* @__PURE__ */
|
|
122892
|
-
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" })
|
|
122893
123042
|
] });
|
|
122894
123043
|
const customControls = chrome === "custom" ? slot("controls") : null;
|
|
122895
123044
|
const showBuiltIn = chrome === "builtIn";
|
|
@@ -122943,34 +123092,34 @@ var init_renderNode = __esm({
|
|
|
122943
123092
|
emit(props.onError, { state: "error", status: "error", error: message, code: "source_error" });
|
|
122944
123093
|
}
|
|
122945
123094
|
};
|
|
122946
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
122947
|
-
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: [
|
|
122948
123097
|
slot("audioBackground"),
|
|
122949
|
-
isUnsupportedProvider ? /* @__PURE__ */
|
|
122950
|
-
/* @__PURE__ */
|
|
122951
|
-
/* @__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: [
|
|
122952
123101
|
"This course uses an unsupported provider adapter: ",
|
|
122953
123102
|
provider,
|
|
122954
123103
|
"."
|
|
122955
123104
|
] })
|
|
122956
|
-
] }) : isYouTube ? /* @__PURE__ */
|
|
122957
|
-
poster && /* @__PURE__ */
|
|
122958
|
-
chrome === "custom" && /* @__PURE__ */
|
|
122959
|
-
!hidden && chrome !== "custom" && /* @__PURE__ */
|
|
122960
|
-
/* @__PURE__ */
|
|
122961
|
-
/* @__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 ?? "") })
|
|
122962
123111
|
] }),
|
|
122963
|
-
/* @__PURE__ */
|
|
123112
|
+
/* @__PURE__ */ jsx10("audio", { ref: (el2) => {
|
|
122964
123113
|
mediaRef.current = el2;
|
|
122965
123114
|
}, ...commonMedia, children: renderMediaTracks() }, mediaKey2)
|
|
122966
|
-
] }) : /* @__PURE__ */
|
|
123115
|
+
] }) : /* @__PURE__ */ jsx10("video", { ref: (el2) => {
|
|
122967
123116
|
mediaRef.current = el2;
|
|
122968
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),
|
|
122969
123118
|
status === "idle" && slot("poster"),
|
|
122970
123119
|
slot("overlay"),
|
|
122971
123120
|
status === "loading" && slot("loading"),
|
|
122972
|
-
(status === "error" || status === "blocked") && (slot("error") ?? /* @__PURE__ */
|
|
122973
|
-
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" }),
|
|
122974
123123
|
!hidden && !isYouTube && !isUnsupportedProvider && (showBuiltIn ? builtInControls : customControls),
|
|
122975
123124
|
fullscreen && slot("fullscreenOverlay")
|
|
122976
123125
|
] });
|
|
@@ -122984,7 +123133,7 @@ var init_renderNode = __esm({
|
|
|
122984
123133
|
const ar2 = typeof props.aspectRatio === "number" && props.aspectRatio > 0 ? props.aspectRatio : 16 / 9;
|
|
122985
123134
|
const srcStr = typeof url === "string" && !isBinding(url) ? url : void 0;
|
|
122986
123135
|
const posterStr = typeof poster === "string" && !isBinding(poster) ? poster : void 0;
|
|
122987
|
-
return /* @__PURE__ */
|
|
123136
|
+
return /* @__PURE__ */ jsx10(
|
|
122988
123137
|
"video",
|
|
122989
123138
|
{
|
|
122990
123139
|
src: srcStr,
|
|
@@ -123039,7 +123188,7 @@ var init_renderNode = __esm({
|
|
|
123039
123188
|
...wrap
|
|
123040
123189
|
};
|
|
123041
123190
|
if (loading) {
|
|
123042
|
-
return /* @__PURE__ */
|
|
123191
|
+
return /* @__PURE__ */ jsx10(
|
|
123043
123192
|
"div",
|
|
123044
123193
|
{
|
|
123045
123194
|
"data-himalaya-pdf": "loading",
|
|
@@ -123051,7 +123200,7 @@ var init_renderNode = __esm({
|
|
|
123051
123200
|
);
|
|
123052
123201
|
}
|
|
123053
123202
|
if (!src) {
|
|
123054
|
-
return /* @__PURE__ */
|
|
123203
|
+
return /* @__PURE__ */ jsx10(
|
|
123055
123204
|
"div",
|
|
123056
123205
|
{
|
|
123057
123206
|
"data-himalaya-pdf": "placeholder",
|
|
@@ -123068,7 +123217,7 @@ var init_renderNode = __esm({
|
|
|
123068
123217
|
const nativeFragment = startPage ? fragmentWithPage(originalFragment, startPage) : originalFragment;
|
|
123069
123218
|
const nativeSrc = src.split("#", 1)[0] + nativeFragment;
|
|
123070
123219
|
if (typeof window === "undefined") {
|
|
123071
|
-
return /* @__PURE__ */
|
|
123220
|
+
return /* @__PURE__ */ jsx10(
|
|
123072
123221
|
"object",
|
|
123073
123222
|
{
|
|
123074
123223
|
"data-himalaya-pdf": "static-fallback",
|
|
@@ -123079,7 +123228,7 @@ var init_renderNode = __esm({
|
|
|
123079
123228
|
}
|
|
123080
123229
|
);
|
|
123081
123230
|
}
|
|
123082
|
-
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 }) });
|
|
123083
123232
|
});
|
|
123084
123233
|
WebViewNode = withExtras("WebViewNode", ({ props, ctx, wrap }) => {
|
|
123085
123234
|
const boundUrl = useResolvedScalar(props.url != null && isBinding(props.url) ? props.url : void 0, ctx);
|
|
@@ -123110,11 +123259,11 @@ var init_renderNode = __esm({
|
|
|
123110
123259
|
const showLoading = !loaded && (config.loadingText != null || config.showProgressBar) && (htmlStr != null || urlFrame != null);
|
|
123111
123260
|
const rawBand = config.coverBandColor ?? props.coverBandColor;
|
|
123112
123261
|
const bandColor = typeof rawBand === "string" && rawBand.length > 0 ? rawBand : void 0;
|
|
123113
|
-
return /* @__PURE__ */
|
|
123114
|
-
bandColor ? /* @__PURE__ */
|
|
123115
|
-
htmlStr ? /* @__PURE__ */
|
|
123116
|
-
showLoading ? /* @__PURE__ */
|
|
123117
|
-
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,
|
|
123118
123267
|
config.loadingText ?? null
|
|
123119
123268
|
] }) : null
|
|
123120
123269
|
] });
|
|
@@ -123143,31 +123292,87 @@ var init_renderNode = __esm({
|
|
|
123143
123292
|
React9.useEffect(() => {
|
|
123144
123293
|
if (pickerBag && pickerFieldId) pickerBag.set(pickerFieldId, sel);
|
|
123145
123294
|
}, [sel, pickerFieldId, pickerBag]);
|
|
123146
|
-
|
|
123147
|
-
|
|
123148
|
-
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) => {
|
|
123149
|
-
const on4 = o2.id === staticSel;
|
|
123150
|
-
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);
|
|
123151
|
-
}) });
|
|
123152
|
-
}
|
|
123153
|
-
const emit = (id) => {
|
|
123295
|
+
const emitPick = (id) => {
|
|
123296
|
+
if (!pickerOptionPickable(opts.find((option) => String(option?.id) === id))) return;
|
|
123154
123297
|
setSel(id);
|
|
123155
123298
|
if (onChange && ctx.onAction) {
|
|
123156
123299
|
ctx.onAction({ ...onChange, params: { ...onChange.params ?? {}, selectedId: id }, args: { ...onChange.args ?? {}, selectedId: id } });
|
|
123157
123300
|
}
|
|
123158
123301
|
};
|
|
123159
|
-
const
|
|
123160
|
-
|
|
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(
|
|
123161
123366
|
"select",
|
|
123162
123367
|
{
|
|
123163
123368
|
value: sel,
|
|
123164
|
-
onChange: (e2) =>
|
|
123165
|
-
"aria-label":
|
|
123166
|
-
...
|
|
123369
|
+
onChange: (e2) => emitPick(e2.currentTarget.value),
|
|
123370
|
+
"aria-label": pickerName,
|
|
123371
|
+
...pickerA11yProps,
|
|
123167
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 },
|
|
123168
123373
|
children: [
|
|
123169
|
-
props.placeholder && /* @__PURE__ */
|
|
123170
|
-
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))
|
|
123171
123376
|
]
|
|
123172
123377
|
}
|
|
123173
123378
|
);
|
|
@@ -123226,9 +123431,9 @@ var init_renderNode = __esm({
|
|
|
123226
123431
|
const d2 = new Date(props.valueUnix * 1e3);
|
|
123227
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" });
|
|
123228
123433
|
}
|
|
123229
|
-
return /* @__PURE__ */
|
|
123230
|
-
/* @__PURE__ */
|
|
123231
|
-
/* @__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}" })
|
|
123232
123437
|
] });
|
|
123233
123438
|
}
|
|
123234
123439
|
const onChange = props.onChange;
|
|
@@ -123251,7 +123456,7 @@ var init_renderNode = __esm({
|
|
|
123251
123456
|
if (!onChange || !ctx.onAction) return;
|
|
123252
123457
|
ctx.onAction({ ...onChange, params: { ...onChange.params ?? {}, value }, args: { ...onChange.args ?? {}, value } });
|
|
123253
123458
|
};
|
|
123254
|
-
return /* @__PURE__ */
|
|
123459
|
+
return /* @__PURE__ */ jsx10(
|
|
123255
123460
|
"input",
|
|
123256
123461
|
{
|
|
123257
123462
|
type: timeMode ? "time" : dateTimeMode ? "datetime-local" : "date",
|
|
@@ -123269,13 +123474,13 @@ var init_renderNode = __esm({
|
|
|
123269
123474
|
const placeholderText = useBoundString(props.placeholder, ctx);
|
|
123270
123475
|
const C2 = ctx.color;
|
|
123271
123476
|
const muted = C2("textSecondary", "#888");
|
|
123272
|
-
const icon = /* @__PURE__ */
|
|
123273
|
-
/* @__PURE__ */
|
|
123274
|
-
/* @__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" })
|
|
123275
123480
|
] });
|
|
123276
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 };
|
|
123277
123482
|
if (!ctx.onAction) {
|
|
123278
|
-
return /* @__PURE__ */
|
|
123483
|
+
return /* @__PURE__ */ jsxs7("div", { style: box, children: [
|
|
123279
123484
|
icon,
|
|
123280
123485
|
placeholderText || "Search\u2026"
|
|
123281
123486
|
] });
|
|
@@ -123301,9 +123506,9 @@ var init_renderNode = __esm({
|
|
|
123301
123506
|
if (timer.current) clearTimeout(timer.current);
|
|
123302
123507
|
timer.current = setTimeout(() => dispatch(onChange, v2), debounceMs);
|
|
123303
123508
|
};
|
|
123304
|
-
return /* @__PURE__ */
|
|
123509
|
+
return /* @__PURE__ */ jsxs7("div", { style: box, children: [
|
|
123305
123510
|
icon,
|
|
123306
|
-
/* @__PURE__ */
|
|
123511
|
+
/* @__PURE__ */ jsx10(
|
|
123307
123512
|
"input",
|
|
123308
123513
|
{
|
|
123309
123514
|
value: local,
|
|
@@ -123319,7 +123524,7 @@ var init_renderNode = __esm({
|
|
|
123319
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") }
|
|
123320
123525
|
}
|
|
123321
123526
|
),
|
|
123322
|
-
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" })
|
|
123323
123528
|
] });
|
|
123324
123529
|
});
|
|
123325
123530
|
InteractiveStepper = withExtras("InteractiveStepper", ({ props, ctx, wrap }) => {
|
|
@@ -123411,24 +123616,24 @@ var init_renderNode = __esm({
|
|
|
123411
123616
|
};
|
|
123412
123617
|
const root = { [A11Y_PART]: "root" };
|
|
123413
123618
|
if (ctx.empty) {
|
|
123414
|
-
return /* @__PURE__ */
|
|
123415
|
-
/* @__PURE__ */
|
|
123416
|
-
/* @__PURE__ */
|
|
123417
|
-
/* @__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: "+" })
|
|
123418
123623
|
] });
|
|
123419
123624
|
}
|
|
123420
123625
|
if (!ctx.onAction) {
|
|
123421
|
-
return /* @__PURE__ */
|
|
123422
|
-
/* @__PURE__ */
|
|
123423
|
-
/* @__PURE__ */
|
|
123424
|
-
/* @__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: "+" })
|
|
123425
123630
|
] });
|
|
123426
123631
|
}
|
|
123427
|
-
return /* @__PURE__ */
|
|
123428
|
-
/* @__PURE__ */
|
|
123429
|
-
/* @__PURE__ */
|
|
123430
|
-
/* @__PURE__ */
|
|
123431
|
-
/* @__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" : "") })
|
|
123432
123637
|
] });
|
|
123433
123638
|
});
|
|
123434
123639
|
SYNTHETIC_TAP_ROLE = "data-hm-synthetic-role";
|
|
@@ -123517,7 +123722,7 @@ var init_renderNode = __esm({
|
|
|
123517
123722
|
const prev = el2.props.style ?? {};
|
|
123518
123723
|
return React9.cloneElement(el2, { style: { ...prev, animationDelay: `${i2 * gridStagger}ms` } });
|
|
123519
123724
|
};
|
|
123520
|
-
const inner = itemsPath && items[0] && ctx.provider ? /* @__PURE__ */
|
|
123725
|
+
const inner = itemsPath && items[0] && ctx.provider ? /* @__PURE__ */ jsx10(
|
|
123521
123726
|
BoundList,
|
|
123522
123727
|
{
|
|
123523
123728
|
ctx,
|
|
@@ -123601,7 +123806,7 @@ var init_renderNode = __esm({
|
|
|
123601
123806
|
}, [text8, reduce, total]);
|
|
123602
123807
|
const fade = reduce ? void 0 : `opacity ${REVEAL_FADE_MS}ms ease-out`;
|
|
123603
123808
|
if (markdownHtml != null) {
|
|
123604
|
-
return /* @__PURE__ */
|
|
123809
|
+
return /* @__PURE__ */ jsx10(
|
|
123605
123810
|
"span",
|
|
123606
123811
|
{
|
|
123607
123812
|
"data-himalaya-reveal": `${Math.min(shown2, total)}/${total}`,
|
|
@@ -123610,10 +123815,10 @@ var init_renderNode = __esm({
|
|
|
123610
123815
|
);
|
|
123611
123816
|
}
|
|
123612
123817
|
let w2 = 0;
|
|
123613
|
-
return /* @__PURE__ */
|
|
123818
|
+
return /* @__PURE__ */ jsx10("span", { "data-himalaya-reveal": `${Math.min(shown2, total)}/${total}`, children: tokens2.map((t2, i2) => {
|
|
123614
123819
|
if (/^\s+$/.test(t2)) return t2;
|
|
123615
123820
|
const visible = w2++ < shown2;
|
|
123616
|
-
return /* @__PURE__ */
|
|
123821
|
+
return /* @__PURE__ */ jsx10("span", { style: { opacity: visible ? 1 : 0, transition: fade }, children: t2 }, i2);
|
|
123617
123822
|
}) });
|
|
123618
123823
|
};
|
|
123619
123824
|
TextNode = withExtras("TextNode", ({ props, ctx, wrap }) => {
|
|
@@ -123666,13 +123871,13 @@ var init_renderNode = __esm({
|
|
|
123666
123871
|
return v2 == null ? null : String(v2);
|
|
123667
123872
|
})();
|
|
123668
123873
|
const revealMarkdown = props.markdown === true && revealSource != null ? mdSource ?? revealSource : null;
|
|
123669
|
-
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);
|
|
123670
123875
|
const authoredDirection = props.textDirection === "auto" || props.textDirection === "ltr" || props.textDirection === "rtl";
|
|
123671
123876
|
const dir = authoredDirection ? props.textDirection : "auto";
|
|
123672
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;
|
|
123673
123878
|
const tDecor = props.decoration === "strikethrough" ? "line-through" : props.decoration === "underline" ? "underline" : void 0;
|
|
123674
123879
|
const ln2 = typeof props.lineSpacing === "number" ? pxToRem((f2.line ?? 1.4) * f2.size + props.lineSpacing) : f2.line;
|
|
123675
|
-
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 });
|
|
123676
123881
|
});
|
|
123677
123882
|
ImageNode = withExtras("ImageNode", ({ props, ctx, wrap }) => {
|
|
123678
123883
|
const C2 = ctx.color;
|
|
@@ -123703,9 +123908,9 @@ var init_renderNode = __esm({
|
|
|
123703
123908
|
const tplTint = props.tint != null && renderingMode !== "original" ? C2(props.tint, "#000") : null;
|
|
123704
123909
|
if (tplTint != null) {
|
|
123705
123910
|
const mSize = objectFit === "cover" ? "cover" : "contain";
|
|
123706
|
-
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 } });
|
|
123707
123912
|
}
|
|
123708
|
-
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 } });
|
|
123709
123914
|
}
|
|
123710
123915
|
if (imgInitials && typeof imgInitials === "string") {
|
|
123711
123916
|
const alt = asText2(boundAlt).trim();
|
|
@@ -123714,15 +123919,15 @@ var init_renderNode = __esm({
|
|
|
123714
123919
|
}
|
|
123715
123920
|
if (props.icon != null && props.url == null && props.asset == null && imgInitials == null) {
|
|
123716
123921
|
const side2 = typeof w2 === "number" ? w2 : 40;
|
|
123717
|
-
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) }) });
|
|
123718
123923
|
}
|
|
123719
|
-
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" });
|
|
123720
123925
|
});
|
|
123721
123926
|
ANIMATION_LEAF = { "aria-hidden": "true", [INFERRED_DECORATIVE]: true, [SELF_RENDERED_LEAF]: true, [ROLE_WHEN_NAMED]: "img" };
|
|
123722
123927
|
LottieNode = withExtras("LottieNode", ({ props, ctx, wrap }) => {
|
|
123723
123928
|
ensureLottieRuntime();
|
|
123724
123929
|
const lh = typeof props.height === "number" && props.height > 0 ? props.height : 160;
|
|
123725
|
-
return /* @__PURE__ */
|
|
123930
|
+
return /* @__PURE__ */ jsx10(
|
|
123726
123931
|
"div",
|
|
123727
123932
|
{
|
|
123728
123933
|
"data-himalaya-lottie": props.source ? String(props.source) : "",
|
|
@@ -123738,7 +123943,7 @@ var init_renderNode = __esm({
|
|
|
123738
123943
|
RiveNode = withExtras("RiveNode", ({ props, ctx, wrap }) => {
|
|
123739
123944
|
ensureRiveRuntime();
|
|
123740
123945
|
const rh = typeof props.height === "number" && props.height > 0 ? props.height : 160;
|
|
123741
|
-
return /* @__PURE__ */
|
|
123946
|
+
return /* @__PURE__ */ jsx10(
|
|
123742
123947
|
"canvas",
|
|
123743
123948
|
{
|
|
123744
123949
|
"data-himalaya-rive": props.source ? String(props.source) : "",
|
|
@@ -123760,9 +123965,9 @@ var init_renderNode = __esm({
|
|
|
123760
123965
|
const size = props.size ?? 48;
|
|
123761
123966
|
const a11y = { [ROLE_WHEN_NAMED]: "img", [SELF_RENDERED_LEAF]: true };
|
|
123762
123967
|
if (typeof imageUrl === "string" && imageUrl) {
|
|
123763
|
-
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 } });
|
|
123764
123969
|
}
|
|
123765
|
-
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() });
|
|
123766
123971
|
});
|
|
123767
123972
|
IconNode = withExtras("IconNode", ({ props, ctx, wrap }) => {
|
|
123768
123973
|
const C2 = ctx.color;
|
|
@@ -123775,7 +123980,7 @@ var init_renderNode = __esm({
|
|
|
123775
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" };
|
|
123776
123981
|
const glyph = iconSvg(iconName, { size, color: C2(resolveScalarStatic(props.tint, ctx) ?? "textPrimary", "#636b78") });
|
|
123777
123982
|
const animatedGlyph = Object.keys(effectStyle).length ? React9.cloneElement(glyph, { style: { ...glyph.props.style, ...effectStyle } }) : glyph;
|
|
123778
|
-
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 });
|
|
123779
123984
|
});
|
|
123780
123985
|
EMPTY_STATE_SPACING = {
|
|
123781
123986
|
padding: ["lg", 16],
|
|
@@ -123800,11 +124005,11 @@ var init_renderNode = __esm({
|
|
|
123800
124005
|
const label2 = props.actionLabel;
|
|
123801
124006
|
const hasAction = props.action != null && typeof label2 === "string" && label2.trim().length > 0;
|
|
123802
124007
|
const padding = spacingToken(ctx, EMPTY_STATE_SPACING.padding);
|
|
123803
|
-
return /* @__PURE__ */
|
|
123804
|
-
hasIcon2 && /* @__PURE__ */
|
|
123805
|
-
/* @__PURE__ */
|
|
123806
|
-
hasSubtitle && /* @__PURE__ */
|
|
123807
|
-
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({
|
|
123808
124013
|
id: `${nodeId ?? "empty_state"}.action`,
|
|
123809
124014
|
body: {
|
|
123810
124015
|
package: "himalaya",
|
|
@@ -123857,13 +124062,13 @@ var init_renderNode = __esm({
|
|
|
123857
124062
|
const glyph = bt2.icon ?? (props.size === "sm" ? 14 : props.size === "lg" ? 18 : 16);
|
|
123858
124063
|
const visibleMin = props.iconOnly ? 44 : props.minHeight ?? bt2.height ?? 44;
|
|
123859
124064
|
const slop = props.iconOnly ? 0 : buttonHitSlop(Math.max(visibleMin, 2 * vPad + Math.max(f2.size * (f2.line ?? 1.25), glyph)));
|
|
123860
|
-
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 }) });
|
|
123861
124066
|
const iconLabel = typeof resolvedLeadingIcon === "string" && resolvedLeadingIcon ? resolvedLeadingIcon.replace(/[_-]+/g, " ").replace(/\b\w/g, (c2) => c2.toUpperCase()) : "";
|
|
123862
124067
|
const hasTitle = typeof resolvedTitle === "string" && resolvedTitle.length > 0 || typeof resolvedTitle === "number";
|
|
123863
124068
|
const accessibleLabel = hasTitle ? String(resolvedTitle) : asText2(txt(props.title, ctx)) || (props.iconOnly ? iconLabel : "") || "Button";
|
|
123864
124069
|
if (props.loading) ensureSpinKeyframes();
|
|
123865
124070
|
const rowStretch = ctx.rowStretch === true && !props.iconOnly;
|
|
123866
|
-
return /* @__PURE__ */
|
|
124071
|
+
return /* @__PURE__ */ jsxs7(
|
|
123867
124072
|
"button",
|
|
123868
124073
|
{
|
|
123869
124074
|
type: "button",
|
|
@@ -123934,7 +124139,7 @@ var init_renderNode = __esm({
|
|
|
123934
124139
|
...wrap
|
|
123935
124140
|
}, rowStretch, "fit-content"),
|
|
123936
124141
|
children: [
|
|
123937
|
-
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" } }),
|
|
123938
124143
|
!props.loading && resolvedLeadingIcon && ic(String(resolvedLeadingIcon)),
|
|
123939
124144
|
!props.iconOnly && (resolvedTitle != null && resolvedTitle !== "" ? String(resolvedTitle) : txt(props.title, ctx) || "Button"),
|
|
123940
124145
|
!props.loading && !props.iconOnly && resolvedTrailingIcon && ic(String(resolvedTrailingIcon))
|
|
@@ -123947,10 +124152,10 @@ var init_renderNode = __esm({
|
|
|
123947
124152
|
const bound = useResolvedScalar(props.valuePath, ctx);
|
|
123948
124153
|
const val = props.valuePath != null ? typeof bound === "string" ? bound : typeof bound === "number" ? String(bound) : "" : typeof props.value === "string" ? props.value : "";
|
|
123949
124154
|
const len = Math.max(0, props.length ?? 6);
|
|
123950
|
-
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) => {
|
|
123951
124156
|
const ch2 = val[i2];
|
|
123952
124157
|
const active = i2 === val.length;
|
|
123953
|
-
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);
|
|
123954
124159
|
}) });
|
|
123955
124160
|
});
|
|
123956
124161
|
ProgressBarNode = withExtras("ProgressBarNode", ({ props, ctx, wrap }) => {
|
|
@@ -123974,7 +124179,7 @@ var init_renderNode = __esm({
|
|
|
123974
124179
|
...numP !== void 0 && Number.isFinite(numP) && p2 != null ? { "aria-valuenow": Math.round(p2 * 100) } : {},
|
|
123975
124180
|
[SELF_RENDERED_LEAF]: true
|
|
123976
124181
|
};
|
|
123977
|
-
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) } : {} } }) });
|
|
123978
124183
|
});
|
|
123979
124184
|
ACTIVITY_DEFAULT_NAME = "Loading";
|
|
123980
124185
|
ActivityIndicatorNode = withExtras("ActivityIndicatorNode", ({ props, ctx, wrap }) => {
|
|
@@ -123991,10 +124196,10 @@ var init_renderNode = __esm({
|
|
|
123991
124196
|
const pct = Math.max(0, Math.min(1, aiNum));
|
|
123992
124197
|
const ringMask = `radial-gradient(farthest-side, transparent calc(100% - ${thick}px), #000 calc(100% - ${thick}px))`;
|
|
123993
124198
|
const a11y = { "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(pct * 100) };
|
|
123994
|
-
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 } });
|
|
123995
124200
|
}
|
|
123996
124201
|
ensureSpinKeyframes();
|
|
123997
|
-
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 } });
|
|
123998
124203
|
});
|
|
123999
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]';
|
|
124000
124205
|
BottomSheetNode = withExtras("BottomSheetNode", ({ props, ctx, wrap }) => {
|
|
@@ -124065,9 +124270,9 @@ var init_renderNode = __esm({
|
|
|
124065
124270
|
// Rounded on the side that faces the screen — logical corners, so RTL flips them too.
|
|
124066
124271
|
...edge === "leading" ? { borderStartEndRadius: r2, borderEndEndRadius: r2 } : { borderStartStartRadius: r2, borderEndStartRadius: r2 }
|
|
124067
124272
|
} : { width: "100%", borderRadius: `${r2} ${r2} 0 0`, boxShadow: "0 -4px 24px rgba(0,0,0,.12)", ...sized };
|
|
124068
|
-
const handleBar = /* @__PURE__ */
|
|
124273
|
+
const handleBar = /* @__PURE__ */ jsx10("div", { style: { width: sheet.grabberWidth, height: sheet.grabberHeight, borderRadius: 999, background: C2("surfaceTertiary", "#d8dce2") } });
|
|
124069
124274
|
const handleBox = { display: "flex", justifyContent: "center", padding: "8px 0 4px", flexShrink: 0 };
|
|
124070
|
-
return /* @__PURE__ */
|
|
124275
|
+
return /* @__PURE__ */ jsx10(
|
|
124071
124276
|
"div",
|
|
124072
124277
|
{
|
|
124073
124278
|
"data-sheet-scrim": "",
|
|
@@ -124079,8 +124284,8 @@ var init_renderNode = __esm({
|
|
|
124079
124284
|
if (e2.target === e2.currentTarget) dismiss();
|
|
124080
124285
|
} : void 0,
|
|
124081
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 },
|
|
124082
|
-
children: /* @__PURE__ */
|
|
124083
|
-
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(
|
|
124084
124289
|
"button",
|
|
124085
124290
|
{
|
|
124086
124291
|
type: "button",
|
|
@@ -124109,8 +124314,8 @@ var init_renderNode = __esm({
|
|
|
124109
124314
|
style: { ...handleBox, width: "100%", border: "none", background: "transparent", cursor: "ns-resize", touchAction: "none" },
|
|
124110
124315
|
children: handleBar
|
|
124111
124316
|
}
|
|
124112
|
-
) : /* @__PURE__ */
|
|
124113
|
-
/* @__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 })
|
|
124114
124319
|
] })
|
|
124115
124320
|
}
|
|
124116
124321
|
);
|
|
@@ -124166,9 +124371,9 @@ var init_renderNode = __esm({
|
|
|
124166
124371
|
};
|
|
124167
124372
|
}, [gated, shown2]);
|
|
124168
124373
|
const floating = gated ? { position: "absolute", left: 0, zIndex: 40, ...props.edge === "top" ? { bottom: "100%", marginBottom: 6 } : { top: "100%", marginTop: 6 } } : {};
|
|
124169
|
-
return /* @__PURE__ */
|
|
124170
|
-
props.anchor ? gated ? /* @__PURE__ */
|
|
124171
|
-
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 })
|
|
124172
124377
|
] });
|
|
124173
124378
|
});
|
|
124174
124379
|
ChipsInputNode = withExtras("ChipsInputNode", ({ props, ctx, wrap }) => {
|
|
@@ -124178,16 +124383,16 @@ var init_renderNode = __esm({
|
|
|
124178
124383
|
const bound = useResolvedScalar(props.valuesPath, ctx);
|
|
124179
124384
|
const raw = props.valuesPath != null ? bound : props.values;
|
|
124180
124385
|
const values = Array.isArray(raw) ? raw : [];
|
|
124181
|
-
return /* @__PURE__ */
|
|
124182
|
-
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: [
|
|
124183
124388
|
asText2(v2),
|
|
124184
|
-
props.onRemove && /* @__PURE__ */
|
|
124389
|
+
props.onRemove && /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": `Remove ${asText2(v2)}`, disabled: !!props.disabled || !ctx.onAction, onClick: () => {
|
|
124185
124390
|
if (props.disabled || !ctx.onAction) return;
|
|
124186
124391
|
const action = resolveItemDeep2(props.onRemove, ctx);
|
|
124187
124392
|
ctx.onAction({ ...action, args: { ...action.args, value: v2, index: i2 } });
|
|
124188
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" })
|
|
124189
124394
|
] }, i2)),
|
|
124190
|
-
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) => {
|
|
124191
124396
|
if (event.key !== "Enter" || event.nativeEvent.isComposing || props.disabled || !ctx.onAction) return;
|
|
124192
124397
|
event.preventDefault();
|
|
124193
124398
|
const value = draft.trim();
|
|
@@ -124195,7 +124400,7 @@ var init_renderNode = __esm({
|
|
|
124195
124400
|
const action = resolveItemDeep2(props.onAdd, ctx);
|
|
124196
124401
|
ctx.onAction({ ...action, args: { ...action.args, value } });
|
|
124197
124402
|
setDraft("");
|
|
124198
|
-
}, 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" })
|
|
124199
124404
|
] });
|
|
124200
124405
|
});
|
|
124201
124406
|
ChipNode = withExtras("ChipNode", ({ props, ctx, wrap }) => {
|
|
@@ -124207,27 +124412,27 @@ var init_renderNode = __esm({
|
|
|
124207
124412
|
const onClick = ctx.onAction && props.onTap && !props.disabled ? () => ctx.onAction(resolveItemDeep2(props.onTap, ctx)) : void 0;
|
|
124208
124413
|
const fg = selected ? C2("textOnAccent", "#fff") : C2("textPrimary", "#13171e");
|
|
124209
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 };
|
|
124210
|
-
const hitArea = /* @__PURE__ */
|
|
124211
|
-
const content = /* @__PURE__ */
|
|
124212
|
-
props.leadingAvatarUrl && !isBinding(props.leadingAvatarUrl) && /* @__PURE__ */
|
|
124213
|
-
props.leadingIcon && /* @__PURE__ */
|
|
124214
|
-
/* @__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) })
|
|
124215
124420
|
] });
|
|
124216
124421
|
const pressed = props.selectedPath != null || props.selected != null ? selected : void 0;
|
|
124217
|
-
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: [
|
|
124218
124423
|
content,
|
|
124219
124424
|
hitArea
|
|
124220
|
-
] }) : /* @__PURE__ */
|
|
124425
|
+
] }) : /* @__PURE__ */ jsx10("span", { style, children: content });
|
|
124221
124426
|
const remove = ctx.onAction && props.onRemove && !props.disabled ? (event) => {
|
|
124222
124427
|
event.stopPropagation();
|
|
124223
124428
|
ctx.onAction(resolveItemDeep2(props.onRemove, ctx));
|
|
124224
124429
|
} : void 0;
|
|
124225
|
-
return /* @__PURE__ */
|
|
124226
|
-
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: [
|
|
124227
124432
|
content,
|
|
124228
124433
|
hitArea
|
|
124229
124434
|
] }) : content,
|
|
124230
|
-
/* @__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: [
|
|
124231
124436
|
"\xD7",
|
|
124232
124437
|
hitArea
|
|
124233
124438
|
] })
|
|
@@ -124240,11 +124445,11 @@ var init_renderNode = __esm({
|
|
|
124240
124445
|
const rawRows = props.rowsPath != null ? bound : props.rows;
|
|
124241
124446
|
const rows = Array.isArray(rawRows) ? rawRows : [];
|
|
124242
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" });
|
|
124243
|
-
return /* @__PURE__ */
|
|
124244
|
-
cols.length > 0 && /* @__PURE__ */
|
|
124245
|
-
/* @__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) => {
|
|
124246
124451
|
const cells = Array.isArray(r2?.cells) ? r2.cells : Array.isArray(r2) ? r2 : [];
|
|
124247
|
-
return /* @__PURE__ */
|
|
124452
|
+
return /* @__PURE__ */ jsx10("tr", { children: cells.map((cell2, ci2) => /* @__PURE__ */ jsx10("td", { style: cellStyle(false), children: asText2(cell2) }, ci2)) }, ri2);
|
|
124248
124453
|
}) })
|
|
124249
124454
|
] }) });
|
|
124250
124455
|
});
|
|
@@ -124255,7 +124460,7 @@ var init_renderNode = __esm({
|
|
|
124255
124460
|
const rt2 = ctx.color(ring?.tint ?? "accentPrimary", "#116DFF");
|
|
124256
124461
|
const d2 = size - index * step, off = (size - d2) / 2;
|
|
124257
124462
|
const mask = `radial-gradient(farthest-side, transparent calc(100% - ${thick}px), #000 calc(100% - ${thick}px))`;
|
|
124258
|
-
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 } });
|
|
124259
124464
|
};
|
|
124260
124465
|
GaugeNode = withExtras("GaugeNode", ({ props, ctx, wrap }) => {
|
|
124261
124466
|
const C2 = ctx.color;
|
|
@@ -124275,19 +124480,19 @@ var init_renderNode = __esm({
|
|
|
124275
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 };
|
|
124276
124481
|
if (Array.isArray(props.rings) && props.rings.length) {
|
|
124277
124482
|
const size = 96, thick = 9, step = 22;
|
|
124278
|
-
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)) });
|
|
124279
124484
|
}
|
|
124280
124485
|
if (props.kind === "linear") {
|
|
124281
|
-
return /* @__PURE__ */
|
|
124282
|
-
props.label != null && /* @__PURE__ */
|
|
124283
|
-
/* @__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 } }) })
|
|
124284
124489
|
] });
|
|
124285
124490
|
}
|
|
124286
124491
|
const ringMask = "radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 8px))";
|
|
124287
124492
|
const capF = ctx.font("caption");
|
|
124288
|
-
return /* @__PURE__ */
|
|
124289
|
-
/* @__PURE__ */
|
|
124290
|
-
/* @__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)}%` })
|
|
124291
124496
|
] }) });
|
|
124292
124497
|
});
|
|
124293
124498
|
RATING_METRICS = {
|
|
@@ -124308,9 +124513,9 @@ var init_renderNode = __esm({
|
|
|
124308
124513
|
const filledCount = Math.round(val);
|
|
124309
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;
|
|
124310
124515
|
const cv = Number.isFinite(val) ? Math.max(0, Math.min(max, val)) : 0, summary2 = `${Number.isInteger(cv) ? cv : cv.toFixed(1)} of ${max}`;
|
|
124311
|
-
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) => {
|
|
124312
124517
|
const filled = i2 < filledCount;
|
|
124313
|
-
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);
|
|
124314
124519
|
}) });
|
|
124315
124520
|
});
|
|
124316
124521
|
AvatarStripNode = withExtras("AvatarStripNode", ({ props, ctx, wrap }) => {
|
|
@@ -124328,8 +124533,8 @@ var init_renderNode = __esm({
|
|
|
124328
124533
|
const count2 = shown2.length + overflow;
|
|
124329
124534
|
const countText = count2 > 0 ? `${count2} ${count2 === 1 ? "person" : "people"}` : "";
|
|
124330
124535
|
const groupName = [caption, countText].filter(Boolean).join(", ");
|
|
124331
|
-
return /* @__PURE__ */
|
|
124332
|
-
/* @__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: [
|
|
124333
124538
|
shown2.map((a2, i2) => {
|
|
124334
124539
|
const ring = props.ringGradient ? ctx.gradient(props.ringGradient) : void 0;
|
|
124335
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%" };
|
|
@@ -124340,18 +124545,18 @@ var init_renderNode = __esm({
|
|
|
124340
124545
|
initials,
|
|
124341
124546
|
{ style: { ...initials.props.style, position: "relative", overflow: "hidden" } },
|
|
124342
124547
|
initials.props.children,
|
|
124343
|
-
/* @__PURE__ */
|
|
124548
|
+
/* @__PURE__ */ jsx10("img", { src: photo, alt: "", onError: (e2) => {
|
|
124344
124549
|
e2.currentTarget.style.display = "none";
|
|
124345
124550
|
}, style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover" } })
|
|
124346
124551
|
) : initials;
|
|
124347
|
-
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);
|
|
124348
124553
|
}),
|
|
124349
|
-
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: [
|
|
124350
124555
|
"+",
|
|
124351
124556
|
overflow
|
|
124352
124557
|
] }) })
|
|
124353
124558
|
] }),
|
|
124354
|
-
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) })
|
|
124355
124560
|
] });
|
|
124356
124561
|
});
|
|
124357
124562
|
CHART_STROKE_CYCLE = ["solid", "dashed", "dotted"];
|
|
@@ -124396,7 +124601,7 @@ var init_renderNode = __esm({
|
|
|
124396
124601
|
stroke: "solid"
|
|
124397
124602
|
}];
|
|
124398
124603
|
const drawable = series.filter((sr2) => sr2.values.length > 0);
|
|
124399
|
-
if (drawable.length === 0) return /* @__PURE__ */
|
|
124604
|
+
if (drawable.length === 0) return /* @__PURE__ */ jsx10("div", { style: { width: "100%", height, ...wrap } });
|
|
124400
124605
|
const W2 = 100;
|
|
124401
124606
|
const H2 = 100;
|
|
124402
124607
|
const all = drawable.flatMap((sr2) => sr2.values);
|
|
@@ -124407,14 +124612,14 @@ var init_renderNode = __esm({
|
|
|
124407
124612
|
const xAt = (i2, n2) => n2 === 1 ? W2 / 2 : i2 / (n2 - 1) * W2;
|
|
124408
124613
|
const bars = drawable.filter((sr2) => sr2.kind === "bar");
|
|
124409
124614
|
const barGeom = chartBarLayout(bars.map((sr2) => sr2.values.length), W2);
|
|
124410
|
-
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) => {
|
|
124411
124616
|
const n2 = sr2.values.length;
|
|
124412
124617
|
if (sr2.kind === "bar") {
|
|
124413
124618
|
const lane = Math.max(bars.indexOf(sr2), 0);
|
|
124414
124619
|
const w2 = Math.max(barGeom.width, 0.5);
|
|
124415
|
-
return /* @__PURE__ */
|
|
124620
|
+
return /* @__PURE__ */ jsx10("g", { "data-series": sr2.label || si2, children: sr2.values.map((v2, i2) => {
|
|
124416
124621
|
const top = yAt(v2);
|
|
124417
|
-
return /* @__PURE__ */
|
|
124622
|
+
return /* @__PURE__ */ jsx10(
|
|
124418
124623
|
"rect",
|
|
124419
124624
|
{
|
|
124420
124625
|
x: barGeom.lefts[lane]?.[i2] ?? 0,
|
|
@@ -124429,8 +124634,8 @@ var init_renderNode = __esm({
|
|
|
124429
124634
|
}
|
|
124430
124635
|
const pts = sr2.values.map((v2, i2) => `${xAt(i2, n2)},${yAt(v2)}`).join(" ");
|
|
124431
124636
|
const dash = chartDashArray(sr2.stroke);
|
|
124432
|
-
return /* @__PURE__ */
|
|
124433
|
-
sr2.kind === "area" && /* @__PURE__ */
|
|
124637
|
+
return /* @__PURE__ */ jsxs7("g", { "data-series": sr2.label || si2, children: [
|
|
124638
|
+
sr2.kind === "area" && /* @__PURE__ */ jsx10(
|
|
124434
124639
|
"polygon",
|
|
124435
124640
|
{
|
|
124436
124641
|
points: `${xAt(0, n2)},${H2} ${pts} ${xAt(n2 - 1, n2)},${H2}`,
|
|
@@ -124438,7 +124643,7 @@ var init_renderNode = __esm({
|
|
|
124438
124643
|
opacity: 0.18
|
|
124439
124644
|
}
|
|
124440
124645
|
),
|
|
124441
|
-
/* @__PURE__ */
|
|
124646
|
+
/* @__PURE__ */ jsx10(
|
|
124442
124647
|
"polyline",
|
|
124443
124648
|
{
|
|
124444
124649
|
points: pts,
|
|
@@ -124466,13 +124671,13 @@ var init_renderNode = __esm({
|
|
|
124466
124671
|
const R2 = 50 - thickness / 2;
|
|
124467
124672
|
const CIRC = 2 * Math.PI * R2;
|
|
124468
124673
|
let offset = 0;
|
|
124469
|
-
return /* @__PURE__ */
|
|
124470
|
-
/* @__PURE__ */
|
|
124471
|
-
/* @__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 }),
|
|
124472
124677
|
total > 0 && slices.map((sl2, i2) => {
|
|
124473
124678
|
const frac = sl2.value / total;
|
|
124474
124679
|
const dash = `${frac * CIRC} ${CIRC}`;
|
|
124475
|
-
const el2 = /* @__PURE__ */
|
|
124680
|
+
const el2 = /* @__PURE__ */ jsx10(
|
|
124476
124681
|
"circle",
|
|
124477
124682
|
{
|
|
124478
124683
|
cx: 50,
|
|
@@ -124493,7 +124698,7 @@ var init_renderNode = __esm({
|
|
|
124493
124698
|
return el2;
|
|
124494
124699
|
})
|
|
124495
124700
|
] }),
|
|
124496
|
-
(props.centerTitle || props.centerSubtitle) && /* @__PURE__ */
|
|
124701
|
+
(props.centerTitle || props.centerSubtitle) && /* @__PURE__ */ jsxs7("div", { style: {
|
|
124497
124702
|
position: "absolute",
|
|
124498
124703
|
inset: 0,
|
|
124499
124704
|
display: "flex",
|
|
@@ -124503,15 +124708,15 @@ var init_renderNode = __esm({
|
|
|
124503
124708
|
gap: 2,
|
|
124504
124709
|
pointerEvents: "none"
|
|
124505
124710
|
}, children: [
|
|
124506
|
-
props.centerTitle && /* @__PURE__ */
|
|
124507
|
-
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) })
|
|
124508
124713
|
] })
|
|
124509
124714
|
] }) });
|
|
124510
124715
|
});
|
|
124511
124716
|
LegendMarker = ({ marker, color }) => {
|
|
124512
|
-
if (marker === "square") return /* @__PURE__ */
|
|
124717
|
+
if (marker === "square") return /* @__PURE__ */ jsx10("span", { style: { width: 10, height: 10, background: color, flex: "0 0 auto" } });
|
|
124513
124718
|
if (marker === "line" || marker === "dashed") {
|
|
124514
|
-
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(
|
|
124515
124720
|
"line",
|
|
124516
124721
|
{
|
|
124517
124722
|
x1: 0,
|
|
@@ -124525,15 +124730,15 @@ var init_renderNode = __esm({
|
|
|
124525
124730
|
}
|
|
124526
124731
|
) });
|
|
124527
124732
|
}
|
|
124528
|
-
return /* @__PURE__ */
|
|
124733
|
+
return /* @__PURE__ */ jsx10("span", { style: { width: 10, height: 10, borderRadius: 5, background: color, flex: "0 0 auto" } });
|
|
124529
124734
|
};
|
|
124530
124735
|
LegendNode = withExtras("LegendNode", ({ props, ctx, wrap }) => {
|
|
124531
124736
|
const C2 = ctx.color;
|
|
124532
124737
|
const bound = useResolvedScalar(props.itemsPath, ctx);
|
|
124533
124738
|
const items = legendItems(props.itemsPath != null ? bound : props.items);
|
|
124534
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
124739
|
+
if (items.length === 0) return /* @__PURE__ */ jsx10("div", { style: { ...wrap } });
|
|
124535
124740
|
const vertical = props.orientation === "vertical";
|
|
124536
|
-
return /* @__PURE__ */
|
|
124741
|
+
return /* @__PURE__ */ jsx10("ul", { style: {
|
|
124537
124742
|
display: "flex",
|
|
124538
124743
|
flexDirection: vertical ? "column" : "row",
|
|
124539
124744
|
flexWrap: vertical ? "nowrap" : "wrap",
|
|
@@ -124542,10 +124747,10 @@ var init_renderNode = __esm({
|
|
|
124542
124747
|
padding: 0,
|
|
124543
124748
|
listStyle: "none",
|
|
124544
124749
|
...wrap
|
|
124545
|
-
}, children: items.map((it2, i2) => /* @__PURE__ */
|
|
124546
|
-
/* @__PURE__ */
|
|
124547
|
-
/* @__PURE__ */
|
|
124548
|
-
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) })
|
|
124549
124754
|
] }, i2)) });
|
|
124550
124755
|
});
|
|
124551
124756
|
cellAlign = (align) => align === "center" ? "center" : align === "trailing" ? "right" : "left";
|
|
@@ -124558,28 +124763,28 @@ var init_renderNode = __esm({
|
|
|
124558
124763
|
const max = Number(props.maxRows);
|
|
124559
124764
|
const rows = Number.isFinite(max) && max > 0 ? rawRows.slice(0, max) : rawRows;
|
|
124560
124765
|
const totalsRow = props.totalsPath != null ? boundTotals : props.totals;
|
|
124561
|
-
if (columns.length === 0) return /* @__PURE__ */
|
|
124766
|
+
if (columns.length === 0) return /* @__PURE__ */ jsx10("div", { style: { ...wrap } });
|
|
124562
124767
|
const totalWeight = columns.reduce((a2, c2) => a2 + c2.weight, 0) || 1;
|
|
124563
124768
|
const th = { fontSize: pxToRem(12), fontWeight: 600, color: C2("textSecondary", "#888"), padding: "8px 10px", borderBottom: `1px solid ${C2("border", "#e5e5e5")}` };
|
|
124564
124769
|
const td = { fontSize: pxToRem(14), color: C2("textPrimary", "#111"), padding: "8px 10px" };
|
|
124565
124770
|
return (
|
|
124566
124771
|
// Tables are the one shape allowed to exceed the content width, in their own
|
|
124567
124772
|
// scroller — the page body must not scroll horizontally because of one.
|
|
124568
|
-
/* @__PURE__ */
|
|
124569
|
-
!props.hideHeader && /* @__PURE__ */
|
|
124570
|
-
/* @__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) => {
|
|
124571
124776
|
const cells = dataTableCells(r2, columns);
|
|
124572
124777
|
const id = r2 && typeof r2 === "object" && !Array.isArray(r2) ? r2.id : void 0;
|
|
124573
|
-
return /* @__PURE__ */
|
|
124778
|
+
return /* @__PURE__ */ jsx10(
|
|
124574
124779
|
"tr",
|
|
124575
124780
|
{
|
|
124576
124781
|
style: props.zebra && ri2 % 2 === 1 ? { background: C2("surfaceSecondary", "#fafafa") } : void 0,
|
|
124577
|
-
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))
|
|
124578
124783
|
},
|
|
124579
124784
|
typeof id === "string" && id ? id : ri2
|
|
124580
124785
|
);
|
|
124581
124786
|
}) }),
|
|
124582
|
-
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)) }) })
|
|
124583
124788
|
] }) })
|
|
124584
124789
|
);
|
|
124585
124790
|
});
|
|
@@ -124595,17 +124800,17 @@ var init_renderNode = __esm({
|
|
|
124595
124800
|
const boundState = useResolvedScalar(props.statePath, ctx);
|
|
124596
124801
|
const boundDelivery = useResolvedScalar(props.deliveryPath, ctx);
|
|
124597
124802
|
const boundRate = useResolvedScalar(props.ratePath, ctx);
|
|
124598
|
-
const
|
|
124803
|
+
const num4 = (bound, literal, dflt) => {
|
|
124599
124804
|
const v2 = bound !== void 0 && bound !== null ? bound : literal;
|
|
124600
124805
|
const n2 = typeof v2 === "number" ? v2 : typeof v2 === "string" ? Number(v2) : NaN;
|
|
124601
124806
|
return Number.isFinite(n2) ? n2 : dflt;
|
|
124602
124807
|
};
|
|
124603
124808
|
const rawWave = props.waveformPath != null ? boundWave : props.waveform;
|
|
124604
124809
|
const samples = Array.isArray(rawWave) ? rawWave.map(Number).filter((n2) => Number.isFinite(n2)) : [];
|
|
124605
|
-
const durationMs = Math.max(0,
|
|
124810
|
+
const durationMs = Math.max(0, num4(props.durationMsPath != null ? boundDuration : void 0, props.durationMs, 0));
|
|
124606
124811
|
const state = voiceNoteState(props.statePath != null ? boundState : props.state);
|
|
124607
124812
|
const delivery = voiceNoteDelivery(props.deliveryPath != null ? boundDelivery : props.delivery);
|
|
124608
|
-
const rate =
|
|
124813
|
+
const rate = num4(props.ratePath != null ? boundRate : void 0, props.rate, 1);
|
|
124609
124814
|
const isFailed = delivery === "failed";
|
|
124610
124815
|
const isUploading = delivery === "uploading";
|
|
124611
124816
|
const isPlayable = !isFailed && !isUploading;
|
|
@@ -124613,7 +124818,7 @@ var init_renderNode = __esm({
|
|
|
124613
124818
|
const isLoading = state === "loading";
|
|
124614
124819
|
const [scrub, setScrub] = React9.useState(null);
|
|
124615
124820
|
const [seeked, setSeeked] = React9.useState(null);
|
|
124616
|
-
const positionMs = Math.max(0,
|
|
124821
|
+
const positionMs = Math.max(0, num4(props.positionMsPath != null ? boundPosition : void 0, props.positionMs, 0));
|
|
124617
124822
|
React9.useEffect(() => {
|
|
124618
124823
|
setSeeked(null);
|
|
124619
124824
|
}, [positionMs]);
|
|
@@ -124662,8 +124867,8 @@ var init_renderNode = __esm({
|
|
|
124662
124867
|
}, [rate]);
|
|
124663
124868
|
const effectiveRate = pickedRate ?? rate;
|
|
124664
124869
|
const rateText = `${Math.round(effectiveRate * 100) / 100}\xD7`;
|
|
124665
|
-
return /* @__PURE__ */
|
|
124666
|
-
/* @__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(
|
|
124667
124872
|
"button",
|
|
124668
124873
|
{
|
|
124669
124874
|
type: "button",
|
|
@@ -124681,7 +124886,7 @@ var init_renderNode = __esm({
|
|
|
124681
124886
|
placeItems: "center",
|
|
124682
124887
|
cursor: isUploading ? "default" : "pointer"
|
|
124683
124888
|
},
|
|
124684
|
-
children: /* @__PURE__ */
|
|
124889
|
+
children: /* @__PURE__ */ jsx10(
|
|
124685
124890
|
"span",
|
|
124686
124891
|
{
|
|
124687
124892
|
style: {
|
|
@@ -124698,7 +124903,7 @@ var init_renderNode = __esm({
|
|
|
124698
124903
|
// Reuses the motion-grammar loader keyframe rather than minting a new
|
|
124699
124904
|
// one — a name that no `ensure*Styles` injects is a spinner that never
|
|
124700
124905
|
// spins, and nothing in the DOM says so.
|
|
124701
|
-
/* @__PURE__ */
|
|
124906
|
+
/* @__PURE__ */ jsx10(
|
|
124702
124907
|
"span",
|
|
124703
124908
|
{
|
|
124704
124909
|
"aria-hidden": true,
|
|
@@ -124714,19 +124919,19 @@ var init_renderNode = __esm({
|
|
|
124714
124919
|
}
|
|
124715
124920
|
}
|
|
124716
124921
|
)
|
|
124717
|
-
) : isFailed ? /* @__PURE__ */
|
|
124718
|
-
/* @__PURE__ */
|
|
124719
|
-
/* @__PURE__ */
|
|
124720
|
-
] }) : isPlaying ? /* @__PURE__ */
|
|
124721
|
-
/* @__PURE__ */
|
|
124722
|
-
/* @__PURE__ */
|
|
124723
|
-
] }) : /* @__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" }) })
|
|
124724
124929
|
}
|
|
124725
124930
|
)
|
|
124726
124931
|
}
|
|
124727
124932
|
),
|
|
124728
|
-
/* @__PURE__ */
|
|
124729
|
-
/* @__PURE__ */
|
|
124933
|
+
/* @__PURE__ */ jsxs7("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
124934
|
+
/* @__PURE__ */ jsx10(
|
|
124730
124935
|
"svg",
|
|
124731
124936
|
{
|
|
124732
124937
|
width: "100%",
|
|
@@ -124752,11 +124957,11 @@ var init_renderNode = __esm({
|
|
|
124752
124957
|
children: bars.length === 0 ? (
|
|
124753
124958
|
// No envelope (an arm that could not meter, or a clip still uploading):
|
|
124754
124959
|
// a flat rule, never a fabricated waveform.
|
|
124755
|
-
/* @__PURE__ */
|
|
124960
|
+
/* @__PURE__ */ jsx10("rect", { x: 0, y: H2 / 2 - 1.5, width: W2, height: 3, fill: accent, opacity: 0.28 })
|
|
124756
124961
|
) : bars.map((v2, i2) => {
|
|
124757
124962
|
const cx = slot * (i2 + 0.5);
|
|
124758
124963
|
const bh = Math.max(4, v2 * H2);
|
|
124759
|
-
return /* @__PURE__ */
|
|
124964
|
+
return /* @__PURE__ */ jsx10(
|
|
124760
124965
|
"rect",
|
|
124761
124966
|
{
|
|
124762
124967
|
x: cx - barW / 2,
|
|
@@ -124772,12 +124977,12 @@ var init_renderNode = __esm({
|
|
|
124772
124977
|
})
|
|
124773
124978
|
}
|
|
124774
124979
|
),
|
|
124775
|
-
/* @__PURE__ */
|
|
124776
|
-
/* @__PURE__ */
|
|
124777
|
-
isUploading && /* @__PURE__ */
|
|
124778
|
-
isFailed && /* @__PURE__ */
|
|
124779
|
-
/* @__PURE__ */
|
|
124780
|
-
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(
|
|
124781
124986
|
"button",
|
|
124782
124987
|
{
|
|
124783
124988
|
type: "button",
|
|
@@ -124811,21 +125016,21 @@ var init_renderNode = __esm({
|
|
|
124811
125016
|
const bound = useResolvedScalar(props.entriesPath, ctx);
|
|
124812
125017
|
const raw = props.entriesPath != null ? bound : props.entries;
|
|
124813
125018
|
const entries = Array.isArray(raw) ? raw : [];
|
|
124814
|
-
return /* @__PURE__ */
|
|
125019
|
+
return /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "column", width: "100%", ...wrap }, children: entries.map((e2, i2) => {
|
|
124815
125020
|
const done = e2?.done === true;
|
|
124816
125021
|
const last = i2 === entries.length - 1;
|
|
124817
125022
|
const dotCol = done ? C2("accentPrimary", "#116DFF") : C2("surfaceTertiary", "#cdd2d9");
|
|
124818
|
-
return /* @__PURE__ */
|
|
124819
|
-
/* @__PURE__ */
|
|
124820
|
-
/* @__PURE__ */
|
|
124821
|
-
!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 } })
|
|
124822
125027
|
] }),
|
|
124823
|
-
/* @__PURE__ */
|
|
124824
|
-
/* @__PURE__ */
|
|
124825
|
-
/* @__PURE__ */
|
|
124826
|
-
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) })
|
|
124827
125032
|
] }),
|
|
124828
|
-
e2?.subtitle && /* @__PURE__ */
|
|
125033
|
+
e2?.subtitle && /* @__PURE__ */ jsx10("div", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(13), color: C2("textSecondary", "#636b78") }, children: asText2(e2.subtitle) })
|
|
124829
125034
|
] })
|
|
124830
125035
|
] }, i2);
|
|
124831
125036
|
}) });
|
|
@@ -124860,8 +125065,8 @@ var init_renderNode = __esm({
|
|
|
124860
125065
|
}, interval);
|
|
124861
125066
|
return () => clearInterval(timer);
|
|
124862
125067
|
}, [props.autoplayIntervalMs, props.__pager, boundRail, pages.length, props.onChange, ctx]);
|
|
124863
|
-
return /* @__PURE__ */
|
|
124864
|
-
/* @__PURE__ */
|
|
125068
|
+
return /* @__PURE__ */ jsxs7("div", { style: { width: "100%", ...wrap }, children: [
|
|
125069
|
+
/* @__PURE__ */ jsx10(
|
|
124865
125070
|
"div",
|
|
124866
125071
|
{
|
|
124867
125072
|
ref: rail,
|
|
@@ -124879,10 +125084,10 @@ var init_renderNode = __esm({
|
|
|
124879
125084
|
if (!boundRail && event.currentTarget.clientWidth > 0) select(Math.max(0, Math.min(pages.length - 1, Math.round(event.currentTarget.scrollLeft / event.currentTarget.clientWidth))));
|
|
124880
125085
|
},
|
|
124881
125086
|
style: { display: "flex", overflowX: "auto", scrollSnapType: boundRail ? void 0 : "x mandatory", gap: boundRail ? 12 : void 0, width: "100%" },
|
|
124882
|
-
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))
|
|
124883
125088
|
}
|
|
124884
125089
|
),
|
|
124885
|
-
!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)) })
|
|
124886
125091
|
] });
|
|
124887
125092
|
});
|
|
124888
125093
|
WheelPickerNode = withExtras("WheelPickerNode", ({ props, ctx, wrap }) => {
|
|
@@ -124906,9 +125111,9 @@ var init_renderNode = __esm({
|
|
|
124906
125111
|
if (viewport.current) viewport.current.scrollTop = selIdx * 32;
|
|
124907
125112
|
}, [selIdx, opts.length]);
|
|
124908
125113
|
React9.useEffect(() => () => clearTimeout(settle.current), []);
|
|
124909
|
-
return /* @__PURE__ */
|
|
124910
|
-
/* @__PURE__ */
|
|
124911
|
-
/* @__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(
|
|
124912
125117
|
"div",
|
|
124913
125118
|
{
|
|
124914
125119
|
ref: viewport,
|
|
@@ -124929,7 +125134,7 @@ var init_renderNode = __esm({
|
|
|
124929
125134
|
settle.current = setTimeout(() => emit(Math.max(0, Math.min(opts.length - 1, Math.round((viewport.current?.scrollTop ?? 0) / 32)))), 120);
|
|
124930
125135
|
},
|
|
124931
125136
|
style: { position: "relative", height: "100%", overflowY: "auto", scrollbarWidth: "none", scrollSnapType: "y mandatory", padding: "64px 0", boxSizing: "border-box" },
|
|
124932
|
-
children: opts.map((o2, index) => /* @__PURE__ */
|
|
125137
|
+
children: opts.map((o2, index) => /* @__PURE__ */ jsx10(
|
|
124933
125138
|
"div",
|
|
124934
125139
|
{
|
|
124935
125140
|
id: `${pickerId}-${index}`,
|
|
@@ -124952,13 +125157,13 @@ var init_renderNode = __esm({
|
|
|
124952
125157
|
const cur = typeof raw === "string" ? raw : "#116DFF";
|
|
124953
125158
|
const swatches = Array.isArray(props.swatches) ? props.swatches : ["#116DFF", "#23924D", "#E89F00", "#E62214", "#8B5CF6", "#111827"];
|
|
124954
125159
|
const onPick = (hex2) => ctx.onAction && props.onChange ? () => ctx.onAction({ ...props.onChange, args: { ...props.onChange?.args ?? {}, value: hex2 } }) : void 0;
|
|
124955
|
-
return /* @__PURE__ */
|
|
124956
|
-
/* @__PURE__ */
|
|
124957
|
-
/* @__PURE__ */
|
|
124958
|
-
props.label != null && /* @__PURE__ */
|
|
124959
|
-
/* @__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) })
|
|
124960
125165
|
] }),
|
|
124961
|
-
/* @__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)) })
|
|
124962
125167
|
] });
|
|
124963
125168
|
});
|
|
124964
125169
|
FilterChipsNode = withExtras("FilterChipsNode", ({ props, ctx, wrap }) => {
|
|
@@ -124985,17 +125190,17 @@ var init_renderNode = __esm({
|
|
|
124985
125190
|
// ONE horizontally scrolling row, like the iOS ScrollView(.horizontal) and the
|
|
124986
125191
|
// Android LazyRow. Wrapping here turned a long filter set into a ragged grid and
|
|
124987
125192
|
// pushed a sibling count onto two lines (#3080, #3004).
|
|
124988
|
-
/* @__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) => {
|
|
124989
125194
|
const on4 = selected.includes(c2.id);
|
|
124990
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 };
|
|
124991
|
-
const inner = /* @__PURE__ */
|
|
125196
|
+
const inner = /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
124992
125197
|
asText2(c2.label),
|
|
124993
|
-
c2.count != null && /* @__PURE__ */
|
|
125198
|
+
c2.count != null && /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
124994
125199
|
" ",
|
|
124995
|
-
/* @__PURE__ */
|
|
125200
|
+
/* @__PURE__ */ jsx10("span", { style: { ...on4 ? {} : { opacity: 0.7 }, fontSize: pxToRem(11) }, children: c2.count })
|
|
124996
125201
|
] })
|
|
124997
125202
|
] });
|
|
124998
|
-
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);
|
|
124999
125204
|
}) })
|
|
125000
125205
|
);
|
|
125001
125206
|
});
|
|
@@ -125209,7 +125414,7 @@ var init_renderNode = __esm({
|
|
|
125209
125414
|
});
|
|
125210
125415
|
}
|
|
125211
125416
|
}
|
|
125212
|
-
if (usesTileArm) return /* @__PURE__ */
|
|
125417
|
+
if (usesTileArm) return /* @__PURE__ */ jsxs7(
|
|
125213
125418
|
"div",
|
|
125214
125419
|
{
|
|
125215
125420
|
ref: attachBox,
|
|
@@ -125236,20 +125441,20 @@ var init_renderNode = __esm({
|
|
|
125236
125441
|
...wrap
|
|
125237
125442
|
},
|
|
125238
125443
|
children: [
|
|
125239
|
-
tiles.map((t2) => /* @__PURE__ */
|
|
125240
|
-
/* @__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: [
|
|
125241
125446
|
shapes.map((sh, i2) => {
|
|
125242
125447
|
if (sh.kind === "unknown" || sh.points.length < 2) return null;
|
|
125243
125448
|
const stroke = C2(typeof sh.stroke === "string" && sh.stroke ? sh.stroke : "accentPrimary", accent);
|
|
125244
125449
|
const width = typeof sh.strokeWidth === "number" && sh.strokeWidth > 0 ? sh.strokeWidth : sh.kind === "line" ? 4 : 2;
|
|
125245
125450
|
const pts = sh.points.map((p2) => `${sx(p2)},${sy(p2)}`).join(" ");
|
|
125246
125451
|
if (sh.kind === "line") {
|
|
125247
|
-
return /* @__PURE__ */
|
|
125452
|
+
return /* @__PURE__ */ jsx10("polyline", { points: pts, fill: "none", stroke, strokeWidth: width, strokeLinejoin: "round", strokeLinecap: "round" }, sh.id ?? `sh${i2}`);
|
|
125248
125453
|
}
|
|
125249
125454
|
const fill = typeof sh.fill === "string" && sh.fill ? C2(sh.fill, stroke) : stroke;
|
|
125250
|
-
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}`);
|
|
125251
125456
|
}),
|
|
125252
|
-
route.length > 1 && /* @__PURE__ */
|
|
125457
|
+
route.length > 1 && /* @__PURE__ */ jsx10(
|
|
125253
125458
|
"polyline",
|
|
125254
125459
|
{
|
|
125255
125460
|
points: route.map((p2) => `${sx(p2)},${sy(p2)}`).join(" "),
|
|
@@ -125266,18 +125471,18 @@ var init_renderNode = __esm({
|
|
|
125266
125471
|
// `icon` adds a glyph from the SAME table the Icon component uses, so a name means
|
|
125267
125472
|
// one thing across the renderer; an unknown name yields the neutral "·" rather than
|
|
125268
125473
|
// an empty box.
|
|
125269
|
-
/* @__PURE__ */
|
|
125270
|
-
/* @__PURE__ */
|
|
125271
|
-
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
|
|
125272
125477
|
] }, i2)
|
|
125273
125478
|
)),
|
|
125274
|
-
userFix && (props.showUserLocation === true || follow) ? /* @__PURE__ */
|
|
125275
|
-
/* @__PURE__ */
|
|
125276
|
-
/* @__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 })
|
|
125277
125482
|
] }) : null
|
|
125278
125483
|
] }),
|
|
125279
|
-
tiles.length > 0 && tiles.every((t2) => tileStatus[t2.src] === "failed") && /* @__PURE__ */
|
|
125280
|
-
/* @__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" })
|
|
125281
125486
|
]
|
|
125282
125487
|
}
|
|
125283
125488
|
);
|
|
@@ -125291,9 +125496,9 @@ var init_renderNode = __esm({
|
|
|
125291
125496
|
const ny = (la2) => maxLa > minLa ? H2 - pad3 - (la2 - minLa) / (maxLa - minLa) * (H2 - 2 * pad3) : H2 / 2;
|
|
125292
125497
|
const accent = C2("accentPrimary", "#116DFF");
|
|
125293
125498
|
const poly = route.map((p2) => `${nx(p2.longitude)},${ny(p2.latitude)}`).join(" ");
|
|
125294
|
-
return /* @__PURE__ */
|
|
125295
|
-
route.length > 1 && /* @__PURE__ */
|
|
125296
|
-
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))
|
|
125297
125502
|
] }) });
|
|
125298
125503
|
}
|
|
125299
125504
|
const lat = typeof props.latitude === "number" ? props.latitude : 37.7749;
|
|
@@ -125302,7 +125507,7 @@ var init_renderNode = __esm({
|
|
|
125302
125507
|
const d2 = 0.04 * Math.pow(2, 13 - zoom);
|
|
125303
125508
|
const bbox = `${lng - d2},${lat - d2},${lng + d2},${lat + d2}`;
|
|
125304
125509
|
const src = `https://www.openstreetmap.org/export/embed.html?bbox=${encodeURIComponent(bbox)}&layer=mapnik&marker=${lat},${lng}`;
|
|
125305
|
-
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" }) });
|
|
125306
125511
|
});
|
|
125307
125512
|
CAROUSEL_SETTLE_MS = 1e3;
|
|
125308
125513
|
scrollCarouselTo = (el2, page) => {
|
|
@@ -125392,7 +125597,7 @@ var init_renderNode = __esm({
|
|
|
125392
125597
|
if (event.type === "keydown") setFocused(true);
|
|
125393
125598
|
else setHovered(true);
|
|
125394
125599
|
};
|
|
125395
|
-
return /* @__PURE__ */
|
|
125600
|
+
return /* @__PURE__ */ jsxs7(
|
|
125396
125601
|
"div",
|
|
125397
125602
|
{
|
|
125398
125603
|
"data-carousel-index": index,
|
|
@@ -125404,15 +125609,15 @@ var init_renderNode = __esm({
|
|
|
125404
125609
|
onBlur: onFocusOut,
|
|
125405
125610
|
style: { width: "100%", ...wrap },
|
|
125406
125611
|
children: [
|
|
125407
|
-
/* @__PURE__ */
|
|
125612
|
+
/* @__PURE__ */ jsx10("div", { ref: trackRef, "data-page-rail": "", tabIndex: 0, "aria-label": "Carousel", onScroll, onPointerDown: userTakesOver, onTouchStart: userTakesOver, onWheel: userTakesOver, onKeyDown: (event) => {
|
|
125408
125613
|
userTakesOver(event);
|
|
125409
125614
|
if (event.target !== event.currentTarget || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
|
|
125410
125615
|
event.preventDefault();
|
|
125411
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)));
|
|
125412
125617
|
if (trackRef.current) trackRef.current.scrollLeft = next * trackRef.current.clientWidth;
|
|
125413
125618
|
pageTo(next);
|
|
125414
|
-
}, style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" }, children: pages.map((pg, i2) => /* @__PURE__ */
|
|
125415
|
-
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)) })
|
|
125416
125621
|
]
|
|
125417
125622
|
}
|
|
125418
125623
|
);
|
|
@@ -125422,14 +125627,14 @@ var init_renderNode = __esm({
|
|
|
125422
125627
|
const [dismissed, setDismissed] = React9.useState(false);
|
|
125423
125628
|
if (dismissed) return null;
|
|
125424
125629
|
const accent = sevColor(ctx, props.severity ?? "info");
|
|
125425
|
-
return /* @__PURE__ */
|
|
125426
|
-
/* @__PURE__ */
|
|
125427
|
-
/* @__PURE__ */
|
|
125428
|
-
/* @__PURE__ */
|
|
125429
|
-
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) }),
|
|
125430
125635
|
actionTextButton(ctx, props.action, asBoundText(props.actionLabel, ctx) || "Take action", C2("textPrimary", "#111"), { marginTop: 7, textDecoration: "underline" })
|
|
125431
125636
|
] }),
|
|
125432
|
-
props.dismissible === true && /* @__PURE__ */
|
|
125637
|
+
props.dismissible === true && /* @__PURE__ */ jsx10(
|
|
125433
125638
|
"button",
|
|
125434
125639
|
{
|
|
125435
125640
|
type: "button",
|
|
@@ -125440,7 +125645,7 @@ var init_renderNode = __esm({
|
|
|
125440
125645
|
setDismissed(true);
|
|
125441
125646
|
},
|
|
125442
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" },
|
|
125443
|
-
children: /* @__PURE__ */
|
|
125648
|
+
children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", children: "\u2715" })
|
|
125444
125649
|
}
|
|
125445
125650
|
)
|
|
125446
125651
|
] });
|
|
@@ -125487,17 +125692,17 @@ var init_renderNode = __esm({
|
|
|
125487
125692
|
const height = Math.round(expanded - (expanded - collapsed) * progress);
|
|
125488
125693
|
const lost = expanded - height;
|
|
125489
125694
|
const fade = 1 - progress * 0.7;
|
|
125490
|
-
return /* @__PURE__ */
|
|
125491
|
-
/* @__PURE__ */
|
|
125492
|
-
imageUrl && /* @__PURE__ */
|
|
125493
|
-
imageUrl && /* @__PURE__ */
|
|
125494
|
-
/* @__PURE__ */
|
|
125495
|
-
/* @__PURE__ */
|
|
125496
|
-
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) })
|
|
125497
125702
|
] })
|
|
125498
125703
|
] }),
|
|
125499
|
-
lost > 0 && /* @__PURE__ */
|
|
125500
|
-
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) })
|
|
125501
125706
|
] });
|
|
125502
125707
|
});
|
|
125503
125708
|
UnsupportedOnSurface = ({
|
|
@@ -125505,7 +125710,7 @@ var init_renderNode = __esm({
|
|
|
125505
125710
|
reason,
|
|
125506
125711
|
surface,
|
|
125507
125712
|
ctx
|
|
125508
|
-
}) => /* @__PURE__ */
|
|
125713
|
+
}) => /* @__PURE__ */ jsxs7(
|
|
125509
125714
|
"div",
|
|
125510
125715
|
{
|
|
125511
125716
|
"data-testid": "unsupported-on-surface",
|
|
@@ -125521,11 +125726,11 @@ var init_renderNode = __esm({
|
|
|
125521
125726
|
color: ctx.color("error", "#a8362a")
|
|
125522
125727
|
},
|
|
125523
125728
|
children: [
|
|
125524
|
-
/* @__PURE__ */
|
|
125729
|
+
/* @__PURE__ */ jsxs7("strong", { style: { display: "block" }, children: [
|
|
125525
125730
|
"\u26A0 ",
|
|
125526
125731
|
type
|
|
125527
125732
|
] }),
|
|
125528
|
-
/* @__PURE__ */
|
|
125733
|
+
/* @__PURE__ */ jsxs7("span", { style: { opacity: 0.85 }, children: [
|
|
125529
125734
|
"unsupported on ",
|
|
125530
125735
|
surface,
|
|
125531
125736
|
" \u2014 ",
|
|
@@ -125619,9 +125824,9 @@ var init_renderNode = __esm({
|
|
|
125619
125824
|
e2.preventDefault();
|
|
125620
125825
|
focusDay(localDayKey(new Date(d2.getFullYear(), d2.getMonth(), d2.getDate() + delta)));
|
|
125621
125826
|
};
|
|
125622
|
-
return /* @__PURE__ */
|
|
125623
|
-
/* @__PURE__ */
|
|
125624
|
-
/* @__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(
|
|
125625
125830
|
"button",
|
|
125626
125831
|
{
|
|
125627
125832
|
type: "button",
|
|
@@ -125632,8 +125837,8 @@ var init_renderNode = __esm({
|
|
|
125632
125837
|
children: "\u2039"
|
|
125633
125838
|
}
|
|
125634
125839
|
),
|
|
125635
|
-
/* @__PURE__ */
|
|
125636
|
-
/* @__PURE__ */
|
|
125840
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontWeight: 700, fontSize: pxToRem(15), color: C2("textPrimary", "#13171e") }, children: monthLabel }),
|
|
125841
|
+
/* @__PURE__ */ jsx10(
|
|
125637
125842
|
"button",
|
|
125638
125843
|
{
|
|
125639
125844
|
type: "button",
|
|
@@ -125645,10 +125850,10 @@ var init_renderNode = __esm({
|
|
|
125645
125850
|
}
|
|
125646
125851
|
)
|
|
125647
125852
|
] }),
|
|
125648
|
-
/* @__PURE__ */
|
|
125649
|
-
/* @__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(
|
|
125650
125855
|
(row, ri2) => row.map((cell2, ci2) => {
|
|
125651
|
-
if (!cell2.inMonth && !showAdjacent) return /* @__PURE__ */
|
|
125856
|
+
if (!cell2.inMonth && !showAdjacent) return /* @__PURE__ */ jsx10("div", { "aria-hidden": "true" }, `${ri2}-${ci2}`);
|
|
125652
125857
|
const dec = decByDate.get(cell2.date);
|
|
125653
125858
|
const disabled = dec?.disabled === true || !calWithinWindow(cell2.date, minDate, maxDate);
|
|
125654
125859
|
const rangeStart = isRange && !!range.start && cell2.date === range.start;
|
|
@@ -125658,7 +125863,7 @@ var init_renderNode = __esm({
|
|
|
125658
125863
|
const dotCount = Math.min(maxDots, typeof dec?.dotCount === "number" ? dec.dotCount : 0);
|
|
125659
125864
|
const dotColor = C2(dec?.dotColorToken ?? "accentPrimary", "#116DFF");
|
|
125660
125865
|
const tabbable = selected || !selectedDate && cell2.isToday;
|
|
125661
|
-
return /* @__PURE__ */
|
|
125866
|
+
return /* @__PURE__ */ jsxs7(
|
|
125662
125867
|
"button",
|
|
125663
125868
|
{
|
|
125664
125869
|
type: "button",
|
|
@@ -125691,9 +125896,9 @@ var init_renderNode = __esm({
|
|
|
125691
125896
|
boxShadow: cell2.isToday && !selected ? `inset 0 0 0 1.5px ${C2("accentPrimary", "#116DFF")}` : "none"
|
|
125692
125897
|
},
|
|
125693
125898
|
children: [
|
|
125694
|
-
/* @__PURE__ */
|
|
125695
|
-
dotCount > 0 && /* @__PURE__ */
|
|
125696
|
-
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) })
|
|
125697
125902
|
]
|
|
125698
125903
|
},
|
|
125699
125904
|
cell2.date
|
|
@@ -125756,9 +125961,9 @@ var init_renderNode = __esm({
|
|
|
125756
125961
|
const nowKey = localDayKey(now);
|
|
125757
125962
|
const showNow = props.showNowLine === true && nowMinutes >= startHour * 60 && nowMinutes <= endHour * 60;
|
|
125758
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" });
|
|
125759
|
-
return /* @__PURE__ */
|
|
125760
|
-
/* @__PURE__ */
|
|
125761
|
-
/* @__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(
|
|
125762
125967
|
"button",
|
|
125763
125968
|
{
|
|
125764
125969
|
type: "button",
|
|
@@ -125769,8 +125974,8 @@ var init_renderNode = __esm({
|
|
|
125769
125974
|
children: "\u2039"
|
|
125770
125975
|
}
|
|
125771
125976
|
),
|
|
125772
|
-
/* @__PURE__ */
|
|
125773
|
-
/* @__PURE__ */
|
|
125977
|
+
/* @__PURE__ */ jsx10("span", { style: { fontFamily: bodyFont(ctx), fontWeight: 700, fontSize: pxToRem(14), color: C2("textPrimary", "#13171e") }, children: rangeLabel }),
|
|
125978
|
+
/* @__PURE__ */ jsx10(
|
|
125774
125979
|
"button",
|
|
125775
125980
|
{
|
|
125776
125981
|
type: "button",
|
|
@@ -125782,10 +125987,10 @@ var init_renderNode = __esm({
|
|
|
125782
125987
|
}
|
|
125783
125988
|
)
|
|
125784
125989
|
] }),
|
|
125785
|
-
/* @__PURE__ */
|
|
125786
|
-
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) => {
|
|
125787
125992
|
const tappable = !!(ev?.onTap || props.onSelectEvent);
|
|
125788
|
-
return /* @__PURE__ */
|
|
125993
|
+
return /* @__PURE__ */ jsx10(
|
|
125789
125994
|
"div",
|
|
125790
125995
|
{
|
|
125791
125996
|
onClick: () => onSelect(ev),
|
|
@@ -125798,12 +126003,12 @@ var init_renderNode = __esm({
|
|
|
125798
126003
|
j2
|
|
125799
126004
|
);
|
|
125800
126005
|
}) }, i2)) }),
|
|
125801
|
-
/* @__PURE__ */
|
|
125802
|
-
/* @__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: [
|
|
125803
126008
|
String(startHour + i2).padStart(2, "0"),
|
|
125804
126009
|
":00"
|
|
125805
126010
|
] }, i2)) }),
|
|
125806
|
-
/* @__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) => {
|
|
125807
126012
|
const withRange = timed.map((ev) => {
|
|
125808
126013
|
const s2 = parseLocalDate(ev.start);
|
|
125809
126014
|
if (!s2) return null;
|
|
@@ -125814,7 +126019,7 @@ var init_renderNode = __esm({
|
|
|
125814
126019
|
return { ev, startMin, endMin: Math.max(startMin + 15, endMin) };
|
|
125815
126020
|
}).filter((x2) => x2 != null);
|
|
125816
126021
|
const positioned = packOverlaps(withRange);
|
|
125817
|
-
return /* @__PURE__ */
|
|
126022
|
+
return /* @__PURE__ */ jsxs7(
|
|
125818
126023
|
"div",
|
|
125819
126024
|
{
|
|
125820
126025
|
"data-lane": laneId,
|
|
@@ -125830,7 +126035,7 @@ var init_renderNode = __esm({
|
|
|
125830
126035
|
} : void 0,
|
|
125831
126036
|
style: { flex: "1 1 0", minWidth: 0, position: "relative", borderLeft: `1px solid ${C2("border", "#e8eaed")}`, height: totalHeight, boxSizing: "border-box" },
|
|
125832
126037
|
children: [
|
|
125833
|
-
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)),
|
|
125834
126039
|
positioned.map((p2, pi2) => {
|
|
125835
126040
|
const top = Math.max(0, (p2.startMin - startHour * 60) / 60 * HOUR_PX);
|
|
125836
126041
|
const height = Math.max(18, (p2.endMin - p2.startMin) / 60 * HOUR_PX);
|
|
@@ -125858,7 +126063,7 @@ var init_renderNode = __esm({
|
|
|
125858
126063
|
};
|
|
125859
126064
|
window.addEventListener("pointerup", onUp);
|
|
125860
126065
|
};
|
|
125861
|
-
return /* @__PURE__ */
|
|
126066
|
+
return /* @__PURE__ */ jsxs7(
|
|
125862
126067
|
"div",
|
|
125863
126068
|
{
|
|
125864
126069
|
"data-event-block": p2.ev?.id ?? "",
|
|
@@ -125884,9 +126089,9 @@ var init_renderNode = __esm({
|
|
|
125884
126089
|
boxSizing: "border-box"
|
|
125885
126090
|
},
|
|
125886
126091
|
children: [
|
|
125887
|
-
/* @__PURE__ */
|
|
125888
|
-
editable && /* @__PURE__ */
|
|
125889
|
-
/* @__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(
|
|
125890
126095
|
"button",
|
|
125891
126096
|
{
|
|
125892
126097
|
type: "button",
|
|
@@ -125899,10 +126104,10 @@ var init_renderNode = __esm({
|
|
|
125899
126104
|
},
|
|
125900
126105
|
...{ [REVEAL_ON_FOCUS_ATTR]: "" },
|
|
125901
126106
|
style: revealOnFocusStyle(C2),
|
|
125902
|
-
children: /* @__PURE__ */
|
|
126107
|
+
children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", children: moveLabel || "Move\u2026" })
|
|
125903
126108
|
}
|
|
125904
126109
|
),
|
|
125905
|
-
/* @__PURE__ */
|
|
126110
|
+
/* @__PURE__ */ jsx10(
|
|
125906
126111
|
"button",
|
|
125907
126112
|
{
|
|
125908
126113
|
type: "button",
|
|
@@ -125915,10 +126120,10 @@ var init_renderNode = __esm({
|
|
|
125915
126120
|
},
|
|
125916
126121
|
...{ [REVEAL_ON_FOCUS_ATTR]: "" },
|
|
125917
126122
|
style: revealOnFocusStyle(C2),
|
|
125918
|
-
children: /* @__PURE__ */
|
|
126123
|
+
children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", children: resizeLabel || "Change time\u2026" })
|
|
125919
126124
|
}
|
|
125920
126125
|
),
|
|
125921
|
-
/* @__PURE__ */
|
|
126126
|
+
/* @__PURE__ */ jsx10(
|
|
125922
126127
|
"div",
|
|
125923
126128
|
{
|
|
125924
126129
|
"data-resize-handle": p2.ev?.id ?? "",
|
|
@@ -125932,7 +126137,7 @@ var init_renderNode = __esm({
|
|
|
125932
126137
|
pi2
|
|
125933
126138
|
);
|
|
125934
126139
|
}),
|
|
125935
|
-
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") } })
|
|
125936
126141
|
]
|
|
125937
126142
|
},
|
|
125938
126143
|
i2
|
|
@@ -125991,7 +126196,7 @@ var init_renderNode = __esm({
|
|
|
125991
126196
|
return () => io2.disconnect();
|
|
125992
126197
|
}, [hasMore, windowEnd]);
|
|
125993
126198
|
if (groups.length === 0) {
|
|
125994
|
-
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" });
|
|
125995
126200
|
}
|
|
125996
126201
|
const sticky = props.stickyHeaders === true;
|
|
125997
126202
|
const todayKey = localDayKey(/* @__PURE__ */ new Date());
|
|
@@ -126002,16 +126207,16 @@ var init_renderNode = __esm({
|
|
|
126002
126207
|
const d2 = parseLocalDate(key2);
|
|
126003
126208
|
return d2 ? d2.toLocaleDateString(void 0, { weekday: "short", month: "short", day: "numeric" }) : key2;
|
|
126004
126209
|
};
|
|
126005
|
-
return /* @__PURE__ */
|
|
126006
|
-
shown2.map((g2) => /* @__PURE__ */
|
|
126007
|
-
/* @__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) }),
|
|
126008
126213
|
g2.items.map((ev, i2) => {
|
|
126009
126214
|
const start = parseLocalDate(ev.start);
|
|
126010
126215
|
const timeStr = ev.allDay === true ? "All day" : start ? localTimeLabel(start) : "";
|
|
126011
126216
|
const tappable = !!(ev?.onTap || props.onSelectEvent);
|
|
126012
126217
|
if (props.eventTemplate) {
|
|
126013
126218
|
const itemCtx = { ...ctx, itemScope: calEventScope(ev, i2) };
|
|
126014
|
-
return /* @__PURE__ */
|
|
126219
|
+
return /* @__PURE__ */ jsx10(
|
|
126015
126220
|
"div",
|
|
126016
126221
|
{
|
|
126017
126222
|
"data-event-id": ev?.id ?? "",
|
|
@@ -126025,7 +126230,7 @@ var init_renderNode = __esm({
|
|
|
126025
126230
|
ev?.id ?? i2
|
|
126026
126231
|
);
|
|
126027
126232
|
}
|
|
126028
|
-
return /* @__PURE__ */
|
|
126233
|
+
return /* @__PURE__ */ jsxs7(
|
|
126029
126234
|
"div",
|
|
126030
126235
|
{
|
|
126031
126236
|
onClick: () => onSelect(ev),
|
|
@@ -126034,11 +126239,11 @@ var init_renderNode = __esm({
|
|
|
126034
126239
|
tabIndex: ctx.onAction && tappable ? 0 : void 0,
|
|
126035
126240
|
style: { display: "flex", alignItems: "center", gap: 10, padding: "10px 4px", cursor: ctx.onAction && tappable ? "pointer" : "default" },
|
|
126036
126241
|
children: [
|
|
126037
|
-
/* @__PURE__ */
|
|
126038
|
-
/* @__PURE__ */
|
|
126039
|
-
/* @__PURE__ */
|
|
126040
|
-
/* @__PURE__ */
|
|
126041
|
-
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) })
|
|
126042
126247
|
] })
|
|
126043
126248
|
]
|
|
126044
126249
|
},
|
|
@@ -126049,7 +126254,7 @@ var init_renderNode = __esm({
|
|
|
126049
126254
|
hasMore && // The sentinel is also the honest disclosure: a list that silently stopped
|
|
126050
126255
|
// at day 14 would look complete. It says how much is left AND is the thing
|
|
126051
126256
|
// whose visibility loads it.
|
|
126052
|
-
/* @__PURE__ */
|
|
126257
|
+
/* @__PURE__ */ jsx10(
|
|
126053
126258
|
"div",
|
|
126054
126259
|
{
|
|
126055
126260
|
ref: sentinelRef,
|
|
@@ -126099,13 +126304,13 @@ var init_renderNode = __esm({
|
|
|
126099
126304
|
const next = { ...forwarded };
|
|
126100
126305
|
if (forwarded.style) next.style = { ...own4.style ?? {}, ...forwarded.style };
|
|
126101
126306
|
next["aria-describedby"] = [own4["aria-describedby"], descId].filter(Boolean).join(" ");
|
|
126102
|
-
return /* @__PURE__ */
|
|
126307
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
126103
126308
|
React9.cloneElement(children, next),
|
|
126104
|
-
/* @__PURE__ */
|
|
126309
|
+
/* @__PURE__ */ jsx10("span", { id: descId, hidden: true, "data-hm-a11y-hint": "", children: hint })
|
|
126105
126310
|
] });
|
|
126106
126311
|
};
|
|
126107
126312
|
WebRenderer = ({ node, tokens: tokens2, scheme = "light", opts }) => {
|
|
126108
|
-
return /* @__PURE__ */
|
|
126313
|
+
return /* @__PURE__ */ jsx10(Fragment4, { children: renderNode(node, makeCtx(tokens2, scheme, opts)) });
|
|
126109
126314
|
};
|
|
126110
126315
|
}
|
|
126111
126316
|
});
|
|
@@ -136533,10 +136738,10 @@ function testRuns(dir) {
|
|
|
136533
136738
|
runs.push({
|
|
136534
136739
|
runId: r2.runId,
|
|
136535
136740
|
ok: report3?.ok === true,
|
|
136536
|
-
errors:
|
|
136537
|
-
screens:
|
|
136538
|
-
actions:
|
|
136539
|
-
gaps:
|
|
136741
|
+
errors: num2(obj(report3?.counts)?.errors),
|
|
136742
|
+
screens: num2(coverage?.screens),
|
|
136743
|
+
actions: num2(coverage?.actionsDispatched),
|
|
136744
|
+
gaps: num2(coverage?.gaps)
|
|
136540
136745
|
});
|
|
136541
136746
|
}
|
|
136542
136747
|
return runs.sort((a2, b2) => a2.runId.localeCompare(b2.runId));
|
|
@@ -136699,7 +136904,7 @@ function buildView(dir, memory, now) {
|
|
|
136699
136904
|
screens,
|
|
136700
136905
|
focus,
|
|
136701
136906
|
health: {
|
|
136702
|
-
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,
|
|
136703
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,
|
|
136704
136909
|
ux: uxStatuses(dir),
|
|
136705
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
|
|
@@ -136767,7 +136972,7 @@ function writeStudioRecord(dir, record2, value) {
|
|
|
136767
136972
|
} catch {
|
|
136768
136973
|
}
|
|
136769
136974
|
}
|
|
136770
|
-
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;
|
|
136771
136976
|
var init_studio = __esm({
|
|
136772
136977
|
"src/studio.ts"() {
|
|
136773
136978
|
init_studio_page();
|
|
@@ -136796,7 +137001,7 @@ var init_studio = __esm({
|
|
|
136796
137001
|
}
|
|
136797
137002
|
};
|
|
136798
137003
|
obj = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : null;
|
|
136799
|
-
|
|
137004
|
+
num2 = (v2, fallback = 0) => typeof v2 === "number" && Number.isFinite(v2) ? v2 : fallback;
|
|
136800
137005
|
text = (v2) => typeof v2 === "string" && v2 ? v2 : null;
|
|
136801
137006
|
historyUrl = (fileName) => `../history/${fileName}`;
|
|
136802
137007
|
runTime = (runId) => runId.replace(/-[0-9a-f]+$/i, "");
|
|
@@ -139978,20 +140183,20 @@ function testPostcardMessage(s2) {
|
|
|
139978
140183
|
function testPostcardCounts(message) {
|
|
139979
140184
|
const head = message.split(". ")[0];
|
|
139980
140185
|
const counts = /* @__PURE__ */ new Map();
|
|
139981
|
-
const
|
|
140186
|
+
const num4 = (re2, label2) => {
|
|
139982
140187
|
const m2 = re2.exec(head);
|
|
139983
140188
|
if (m2) counts.set(label2, Number(m2[1]));
|
|
139984
140189
|
};
|
|
139985
140190
|
if (head.startsWith("Test crawl in the browser: ")) {
|
|
139986
|
-
|
|
140191
|
+
num4(/ — (\d+) findings? to fix\.?$/, "findings");
|
|
139987
140192
|
if (/ — no findings\.?$/.test(head)) counts.set("findings", 0);
|
|
139988
140193
|
return counts;
|
|
139989
140194
|
}
|
|
139990
|
-
|
|
139991
|
-
|
|
139992
|
-
|
|
139993
|
-
|
|
139994
|
-
|
|
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");
|
|
139995
140200
|
if (/ — no errors\.?$/.test(head)) counts.set("errors", 0);
|
|
139996
140201
|
return counts;
|
|
139997
140202
|
}
|
|
@@ -147793,25 +147998,25 @@ var init_preview_assets_generated = __esm({
|
|
|
147793
147998
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
147794
147999
|
init_preview_assets_format();
|
|
147795
148000
|
PREVIEW_ASSET_MANIFEST = [
|
|
147796
|
-
{ key: "assets/index-
|
|
147797
|
-
{ key: "assets/pdf-
|
|
147798
|
-
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
147799
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
147800
|
-
{ key: "assets/pdfDocument-
|
|
147801
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
147802
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
147803
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
147804
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
147805
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
147806
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
147807
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
147808
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
147809
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
147810
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
147811
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
147812
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
147813
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
147814
|
-
{ 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" }
|
|
147815
148020
|
];
|
|
147816
148021
|
}
|
|
147817
148022
|
});
|
|
@@ -165982,7 +166187,7 @@ function parseFlags(argv) {
|
|
|
165982
166187
|
var caveatLead = (ni2) => ni2.severity === "category" ? "WARNING \u2014 not implemented" : "NOTE \u2014 implemented, but these props are inert";
|
|
165983
166188
|
var niEntries = (ni2) => ni2 == null ? [] : Array.isArray(ni2) ? ni2 : [ni2];
|
|
165984
166189
|
var str9 = (v2) => typeof v2 === "string" ? v2 : void 0;
|
|
165985
|
-
var
|
|
166190
|
+
var num3 = (v2) => typeof v2 === "string" && v2 !== "" && Number.isFinite(Number(v2)) ? Number(v2) : void 0;
|
|
165986
166191
|
function embeddedTemplateCatalog() {
|
|
165987
166192
|
return availableTemplates().map((name) => {
|
|
165988
166193
|
const path2 = join79(templateSourceDir(name), TEMPLATE_META_FILE);
|
|
@@ -172490,7 +172695,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172490
172695
|
screenId: str9(flags.screen) ?? str9(flags.screenId),
|
|
172491
172696
|
event: str9(flags.type) ?? str9(flags.event),
|
|
172492
172697
|
since: eventSince,
|
|
172493
|
-
limit:
|
|
172698
|
+
limit: num3(flags.limit),
|
|
172494
172699
|
crashesOnly: flags["crashes-only"] === true || flags.crashesOnly === true
|
|
172495
172700
|
});
|
|
172496
172701
|
if (!r2.ok) throw Object.assign(new Error("events_read_failed"), { response: r2 });
|
|
@@ -172503,7 +172708,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172503
172708
|
releaseId: release2,
|
|
172504
172709
|
screenId: str9(flags.screen) ?? str9(flags.screenId),
|
|
172505
172710
|
since: logSince,
|
|
172506
|
-
limit:
|
|
172711
|
+
limit: num3(flags.limit)
|
|
172507
172712
|
});
|
|
172508
172713
|
if (!r2.ok) throw Object.assign(new Error("logs_read_failed"), { response: r2 });
|
|
172509
172714
|
const rawLogs = r2.json?.logs ?? [];
|
|
@@ -172517,13 +172722,13 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172517
172722
|
out2.summary = r2.json;
|
|
172518
172723
|
}
|
|
172519
172724
|
if (includeCrashes) {
|
|
172520
|
-
const r2 = await c2.telemetryCrashes(app, { releaseId: release2, limit:
|
|
172725
|
+
const r2 = await c2.telemetryCrashes(app, { releaseId: release2, limit: num3(flags.limit) });
|
|
172521
172726
|
if (!r2.ok) throw Object.assign(new Error("crashes_read_failed"), { response: r2 });
|
|
172522
172727
|
out2.crashes = r2.json?.crashes ?? [];
|
|
172523
172728
|
}
|
|
172524
172729
|
const eventCount = out2.events?.length ?? 0;
|
|
172525
172730
|
const logCount = out2.logs?.length ?? 0;
|
|
172526
|
-
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);
|
|
172527
172732
|
const wholeChannels = includeEvents && includeLogs && !narrowed;
|
|
172528
172733
|
if (wholeChannels && eventCount === 0 && logCount === 0 && !includeSummary && !includeCrashes) {
|
|
172529
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";
|
|
@@ -172536,13 +172741,13 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172536
172741
|
};
|
|
172537
172742
|
try {
|
|
172538
172743
|
if (flags.follow !== true) {
|
|
172539
|
-
print(await readOnce(
|
|
172744
|
+
print(await readOnce(num3(flags.since), num3(flags["log-since"]) ?? num3(flags.since)));
|
|
172540
172745
|
return 0;
|
|
172541
172746
|
}
|
|
172542
|
-
const interval =
|
|
172543
|
-
const deadline =
|
|
172544
|
-
let eventSince =
|
|
172545
|
-
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;
|
|
172546
172751
|
for (; ; ) {
|
|
172547
172752
|
const out2 = await readOnce(includeEvents ? eventSince : void 0, includeLogs ? logSince : void 0);
|
|
172548
172753
|
const events = out2.events ?? [];
|
|
@@ -172644,7 +172849,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172644
172849
|
const release2 = str9(flags.release);
|
|
172645
172850
|
const level = str9(flags.level);
|
|
172646
172851
|
const byLevel = (ls2) => level ? ls2.filter((l2) => l2.level === level) : ls2;
|
|
172647
|
-
const
|
|
172852
|
+
const num4 = (v2) => typeof v2 === "string" && v2 ? Number(v2) : void 0;
|
|
172648
172853
|
const c2 = client2();
|
|
172649
172854
|
if (flags.follow !== true) {
|
|
172650
172855
|
let r2;
|
|
@@ -172652,8 +172857,8 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172652
172857
|
r2 = await c2.telemetryLogs(app, {
|
|
172653
172858
|
releaseId: release2,
|
|
172654
172859
|
screenId: str9(flags.screen) ?? str9(flags.screenId),
|
|
172655
|
-
since:
|
|
172656
|
-
limit:
|
|
172860
|
+
since: num4(flags.since),
|
|
172861
|
+
limit: num4(flags.limit)
|
|
172657
172862
|
});
|
|
172658
172863
|
} catch (e2) {
|
|
172659
172864
|
const target = targetName();
|
|
@@ -172669,15 +172874,15 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172669
172874
|
}
|
|
172670
172875
|
const rawLogs = r2.json?.logs ?? [];
|
|
172671
172876
|
const logs = byLevel(rawLogs);
|
|
172672
|
-
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);
|
|
172673
172878
|
const scope = release2 ? "this release" : "this app";
|
|
172674
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\`.`;
|
|
172675
172880
|
print({ ok: true, logs, ...note ? { note } : {} });
|
|
172676
172881
|
return 0;
|
|
172677
172882
|
}
|
|
172678
|
-
const interval =
|
|
172679
|
-
const deadline =
|
|
172680
|
-
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;
|
|
172681
172886
|
for (; ; ) {
|
|
172682
172887
|
const r2 = await c2.telemetryLogs(app, { releaseId: release2, screenId: str9(flags.screen) ?? str9(flags.screenId), since });
|
|
172683
172888
|
if (r2.ok) {
|
|
@@ -172705,7 +172910,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
172705
172910
|
return 2;
|
|
172706
172911
|
}
|
|
172707
172912
|
const percentGiven = flags.percent !== void 0;
|
|
172708
|
-
const percent =
|
|
172913
|
+
const percent = num3(flags.percent);
|
|
172709
172914
|
if (percentGiven && (percent === void 0 || percent < 0 || percent > 100)) {
|
|
172710
172915
|
io2.error(JSON.stringify({ error: `--percent must be 0..100, got ${String(flags.percent)}` }));
|
|
172711
172916
|
return 2;
|
|
@@ -173097,7 +173302,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
173097
173302
|
}
|
|
173098
173303
|
if (sub === "ramp") {
|
|
173099
173304
|
const percentGiven = flags.percent !== void 0;
|
|
173100
|
-
const percent =
|
|
173305
|
+
const percent = num3(flags.percent);
|
|
173101
173306
|
if (percentGiven && (percent === void 0 || percent < 0 || percent > 100)) {
|
|
173102
173307
|
io2.error(JSON.stringify({ error: `--percent must be 0..100, got ${String(flags.percent)}` }));
|
|
173103
173308
|
return 2;
|