@wix/himalaya-cli 0.1267.0 → 0.1269.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
@@ -13592,7 +13592,6 @@ function resolveIdiom(tokens2, ctx = {}) {
13592
13592
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
13593
13593
  var init_idiom = __esm({
13594
13594
  "../../core/ts/src/idiom.ts"() {
13595
- "use strict";
13596
13595
  IDIOM_CONTEXTS = {
13597
13596
  ios: { native: ["ios"] },
13598
13597
  android: { native: ["material"] },
@@ -31583,6 +31582,22 @@ var init_env = __esm({
31583
31582
  }
31584
31583
  });
31585
31584
 
31585
+ // ../../core/web-renderer/src/browserAssetUrl.ts
31586
+ function browserAssetUrl(asset, baseURI) {
31587
+ if (asset.startsWith("/preview/") && new URL(baseURI).pathname.includes("/preview/")) {
31588
+ const base = new URL(baseURI);
31589
+ base.pathname = base.pathname.slice(0, base.pathname.indexOf("/preview/") + "/preview/".length);
31590
+ base.search = "";
31591
+ base.hash = "";
31592
+ return new URL(asset.slice("/preview/".length), base).href;
31593
+ }
31594
+ return new URL(asset, baseURI).href;
31595
+ }
31596
+ var init_browserAssetUrl = __esm({
31597
+ "../../core/web-renderer/src/browserAssetUrl.ts"() {
31598
+ }
31599
+ });
31600
+
31586
31601
  // ../../core/web-renderer/src/modifiers.ts
31587
31602
  function padStyle(p2, scale = 1) {
31588
31603
  if (p2 == null) return {};
@@ -33645,8 +33660,17 @@ var init_mediaFieldUpload = __esm({
33645
33660
  });
33646
33661
 
33647
33662
  // ../../core/web-renderer/src/pdfSource.ts
33648
- function pdfEmbedPlan(url, pageOrigin = currentOrigin()) {
33649
- const target = classifyEmbedUrl(url, pageOrigin);
33663
+ function pdfEmbedPlan(url, pageOrigin = currentOrigin(), pageUrl) {
33664
+ let source = url;
33665
+ if (pageOrigin !== null && pageUrl) {
33666
+ try {
33667
+ const base = new URL(pageUrl);
33668
+ if (base.origin === pageOrigin) source = new URL(url, base).href;
33669
+ } catch {
33670
+ return null;
33671
+ }
33672
+ }
33673
+ const target = classifyEmbedUrl(source, pageOrigin);
33650
33674
  if (!target) return null;
33651
33675
  if (target.protocol === "http:" || target.protocol === "https:") {
33652
33676
  if (pageOrigin === null) {
@@ -35342,7 +35366,107 @@ var init_richContent = __esm({
35342
35366
  }
35343
35367
  });
35344
35368
 
35369
+ // ../../core/web-renderer/src/pdfPainter.ts
35370
+ async function paintPdfDocument(document2, container, width = container.clientWidth || 600, startPage = 1, zoomPercent = 100, isCurrent = () => true) {
35371
+ if (!isCurrent()) return document2.numPages;
35372
+ container.replaceChildren();
35373
+ const pixelRatio = Math.max(1, Math.min(2, container.ownerDocument.defaultView?.devicePixelRatio || 1));
35374
+ const zoom = Math.max(1, zoomPercent) / 100;
35375
+ for (let pageNumber = 1; pageNumber <= document2.numPages; pageNumber++) {
35376
+ const page = await document2.getPage(pageNumber);
35377
+ if (!isCurrent()) return document2.numPages;
35378
+ const natural = page.getViewport({ scale: 1 });
35379
+ const viewport = page.getViewport({ scale: width / natural.width * zoom * pixelRatio });
35380
+ const canvas = container.ownerDocument.createElement("canvas");
35381
+ canvas.width = Math.ceil(viewport.width);
35382
+ canvas.height = Math.ceil(viewport.height);
35383
+ canvas.setAttribute("aria-label", `Page ${pageNumber} of ${document2.numPages}`);
35384
+ canvas.setAttribute("role", "img");
35385
+ canvas.dataset.pdfPage = String(pageNumber);
35386
+ canvas.style.cssText = `display:block;width:${width * zoom}px;height:auto;background:#fff`;
35387
+ const context = canvas.getContext("2d");
35388
+ if (!context) throw new Error("Canvas 2D is unavailable");
35389
+ container.append(canvas);
35390
+ await page.render({ canvas, canvasContext: context, viewport }).promise;
35391
+ if (!isCurrent()) return document2.numPages;
35392
+ }
35393
+ const requestedPage = Math.min(document2.numPages, Math.max(1, Math.floor(startPage) || 1));
35394
+ if (requestedPage > 1 && isCurrent()) {
35395
+ container.querySelector(`[data-pdf-page="${requestedPage}"]`)?.scrollIntoView?.({ block: "start" });
35396
+ }
35397
+ return document2.numPages;
35398
+ }
35399
+ var init_pdfPainter = __esm({
35400
+ "../../core/web-renderer/src/pdfPainter.ts"() {
35401
+ }
35402
+ });
35403
+
35345
35404
  // ../../node_modules/pdfjs-dist/legacy/build/pdf.mjs
35405
+ var pdf_exports = {};
35406
+ __export(pdf_exports, {
35407
+ AbortException: () => AbortException,
35408
+ AnnotationEditorLayer: () => AnnotationEditorLayer,
35409
+ AnnotationEditorParamsType: () => AnnotationEditorParamsType,
35410
+ AnnotationEditorType: () => AnnotationEditorType,
35411
+ AnnotationEditorUIManager: () => AnnotationEditorUIManager,
35412
+ AnnotationLayer: () => AnnotationLayer,
35413
+ AnnotationMode: () => AnnotationMode,
35414
+ AnnotationType: () => AnnotationType,
35415
+ CSSConstants: () => CSSConstants,
35416
+ ColorPicker: () => ColorPicker,
35417
+ DOMSVGFactory: () => DOMSVGFactory,
35418
+ DrawLayer: () => DrawLayer,
35419
+ FeatureTest: () => FeatureTest,
35420
+ GlobalWorkerOptions: () => GlobalWorkerOptions,
35421
+ ImageKind: () => ImageKind,
35422
+ InvalidPDFException: () => InvalidPDFException,
35423
+ MathClamp: () => MathClamp,
35424
+ OPS: () => OPS,
35425
+ OutputScale: () => OutputScale,
35426
+ PDFDataRangeTransport: () => PDFDataRangeTransport,
35427
+ PDFDateString: () => PDFDateString,
35428
+ PDFWorker: () => PDFWorker,
35429
+ PasswordException: () => PasswordException,
35430
+ PasswordResponses: () => PasswordResponses,
35431
+ PermissionFlag: () => PermissionFlag,
35432
+ PixelsPerInch: () => PixelsPerInch,
35433
+ RenderingCancelledException: () => RenderingCancelledException,
35434
+ ResponseException: () => ResponseException,
35435
+ SignatureExtractor: () => SignatureExtractor,
35436
+ SupportedImageMimeTypes: () => SupportedImageMimeTypes,
35437
+ TextLayer: () => TextLayer,
35438
+ TextLayerImages: () => TextLayerImages,
35439
+ TouchManager: () => TouchManager,
35440
+ Util: () => Util,
35441
+ VerbosityLevel: () => VerbosityLevel,
35442
+ XfaLayer: () => XfaLayer,
35443
+ applyOpacity: () => applyOpacity,
35444
+ build: () => build2,
35445
+ createValidAbsoluteUrl: () => createValidAbsoluteUrl,
35446
+ fetchData: () => fetchData,
35447
+ findContrastColor: () => findContrastColor,
35448
+ getDocument: () => getDocument,
35449
+ getFilenameFromUrl: () => getFilenameFromUrl,
35450
+ getPdfFilenameFromUrl: () => getPdfFilenameFromUrl,
35451
+ getRGB: () => getRGB,
35452
+ getRGBA: () => getRGBA,
35453
+ getUuid: () => getUuid,
35454
+ isDataScheme: () => isDataScheme,
35455
+ isPdfFile: () => isPdfFile,
35456
+ isValidExplicitDest: () => isValidExplicitDest,
35457
+ makeArr: () => makeArr,
35458
+ makeMap: () => makeMap,
35459
+ makeObj: () => makeObj,
35460
+ makeSet: () => makeSet,
35461
+ noContextMenu: () => noContextMenu,
35462
+ normalizeUnicode: () => normalizeUnicode,
35463
+ renderRichText: () => renderRichText,
35464
+ setLayerDimensions: () => setLayerDimensions,
35465
+ shadow: () => shadow,
35466
+ stopEvent: () => stopEvent,
35467
+ updateUrlHash: () => updateUrlHash,
35468
+ version: () => version
35469
+ });
35346
35470
  function __webpack_require__(moduleId) {
35347
35471
  const cachedModule = __webpack_module_cache__[moduleId];
35348
35472
  if (cachedModule !== void 0) {
@@ -67517,6 +67641,10 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
67517
67641
  });
67518
67642
 
67519
67643
  // ../../node_modules/pdfjs-dist/legacy/build/pdf.worker.min.mjs?url
67644
+ var pdf_worker_min_exports = {};
67645
+ __export(pdf_worker_min_exports, {
67646
+ WorkerMessageHandler: () => WorkerMessageHandler
67647
+ });
67520
67648
  function __webpack_require__2(n2) {
67521
67649
  const a2 = t[n2];
67522
67650
  if (void 0 !== a2) return a2.exports;
@@ -115839,71 +115967,68 @@ var init_pdf_worker_min = __esm({
115839
115967
  }
115840
115968
  });
115841
115969
 
115842
- // ../../core/web-renderer/src/pdfPainter.ts
115843
- async function paintPdfDocument(document2, container, width = container.clientWidth || 600, startPage = 1, zoomPercent = 100, isCurrent = () => true) {
115844
- if (!isCurrent()) return document2.numPages;
115845
- container.replaceChildren();
115846
- const pixelRatio = Math.max(1, Math.min(2, container.ownerDocument.defaultView?.devicePixelRatio || 1));
115847
- const zoom = Math.max(1, zoomPercent) / 100;
115848
- for (let pageNumber = 1; pageNumber <= document2.numPages; pageNumber++) {
115849
- const page = await document2.getPage(pageNumber);
115850
- if (!isCurrent()) return document2.numPages;
115851
- const natural = page.getViewport({ scale: 1 });
115852
- const viewport = page.getViewport({ scale: width / natural.width * zoom * pixelRatio });
115853
- const canvas = container.ownerDocument.createElement("canvas");
115854
- canvas.width = Math.ceil(viewport.width);
115855
- canvas.height = Math.ceil(viewport.height);
115856
- canvas.setAttribute("aria-label", `Page ${pageNumber} of ${document2.numPages}`);
115857
- canvas.setAttribute("role", "img");
115858
- canvas.dataset.pdfPage = String(pageNumber);
115859
- canvas.style.cssText = `display:block;width:${width * zoom}px;height:auto;background:#fff`;
115860
- const context = canvas.getContext("2d");
115861
- if (!context) throw new Error("Canvas 2D is unavailable");
115862
- container.append(canvas);
115863
- await page.render({ canvas, canvasContext: context, viewport }).promise;
115864
- if (!isCurrent()) return document2.numPages;
115865
- }
115866
- const requestedPage = Math.min(document2.numPages, Math.max(1, Math.floor(startPage) || 1));
115867
- if (requestedPage > 1 && isCurrent()) {
115868
- container.querySelector(`[data-pdf-page="${requestedPage}"]`)?.scrollIntoView?.({ block: "start" });
115869
- }
115870
- return document2.numPages;
115871
- }
115872
- var init_pdfPainter = __esm({
115873
- "../../core/web-renderer/src/pdfPainter.ts"() {
115874
- }
115875
- });
115876
-
115877
115970
  // ../../core/web-renderer/src/pdfDocument.tsx
115878
115971
  var pdfDocument_exports = {};
115879
115972
  __export(pdfDocument_exports, {
115880
- PdfDocument: () => PdfDocument
115973
+ PdfDocument: () => PdfDocument,
115974
+ destroyPdfDocumentLoad: () => destroyPdfDocumentLoad
115881
115975
  });
115882
115976
  import React7 from "react";
115883
115977
  import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
115884
- function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, style }) {
115978
+ async function loadPdfDocument(src, ownerDocument) {
115979
+ const [pdfjs, pdfWorkerAsset] = await Promise.all([
115980
+ Promise.resolve().then(() => (init_pdf(), pdf_exports)),
115981
+ Promise.resolve().then(() => (init_pdf_worker_min(), pdf_worker_min_exports))
115982
+ ]);
115983
+ const workerAsset = pdfWorkerAsset.default ?? "";
115984
+ pdfjs.GlobalWorkerOptions.workerSrc = browserAssetUrl(workerAsset, ownerDocument.baseURI);
115985
+ const task = pdfjs.getDocument({ url: src });
115986
+ return { promise: task.promise, destroy: () => task.destroy() };
115987
+ }
115988
+ async function destroyPdfDocumentLoad(loading) {
115989
+ try {
115990
+ await loading.destroy();
115991
+ } catch {
115992
+ }
115993
+ }
115994
+ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, style, loadDocument = loadPdfDocument }) {
115885
115995
  const [pages, setPages] = React7.useState(0);
115886
- const [failed2, setFailed] = React7.useState(false);
115996
+ const [failedRequest, setFailedRequest] = React7.useState(null);
115997
+ const request = JSON.stringify([src, startPage, zoomPercent]);
115998
+ const failed2 = failedRequest === request;
115887
115999
  const containerRef = React7.useRef(null);
115888
116000
  React7.useEffect(() => {
115889
116001
  let live3 = true;
115890
- setFailed(false);
116002
+ let loading;
116003
+ const container = containerRef.current;
116004
+ setFailedRequest(null);
115891
116005
  setPages(0);
115892
- const loading = getDocument({ url: src });
115893
- void loading.promise.then(async (document2) => {
115894
- const container = containerRef.current;
116006
+ void (async () => {
115895
116007
  if (!container) return;
116008
+ if (!container.ownerDocument.createElement("canvas").getContext("2d")) {
116009
+ if (live3) setFailedRequest(request);
116010
+ return;
116011
+ }
116012
+ const task = await loadDocument(src, container.ownerDocument);
116013
+ if (!live3) {
116014
+ void task.promise.catch(() => {
116015
+ });
116016
+ void destroyPdfDocumentLoad(task);
116017
+ return;
116018
+ }
116019
+ loading = task;
116020
+ const document2 = await task.promise;
115896
116021
  const count2 = await paintPdfDocument(document2, container, container.clientWidth || 600, startPage, zoomPercent, () => live3);
115897
116022
  if (live3) setPages(count2);
115898
- }).catch(() => {
115899
- if (live3) setFailed(true);
116023
+ })().catch(() => {
116024
+ if (live3) setFailedRequest(request);
115900
116025
  });
115901
116026
  return () => {
115902
116027
  live3 = false;
115903
- loading.destroy();
115904
- containerRef.current?.replaceChildren();
116028
+ if (loading) void destroyPdfDocumentLoad(loading);
116029
+ container?.replaceChildren();
115905
116030
  };
115906
- }, [src, startPage, zoomPercent]);
116031
+ }, [src, startPage, zoomPercent, loadDocument, request]);
115907
116032
  const frame = {
115908
116033
  width: "100%",
115909
116034
  height: height ?? 320,
@@ -115915,7 +116040,7 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
115915
116040
  overflow: "auto"
115916
116041
  };
115917
116042
  if (failed2) {
115918
- return /* @__PURE__ */ jsx8("object", { "data-himalaya-pdf": "native-fallback", data: nativeSrc, type: "application/pdf", "aria-label": title, style: frame });
116043
+ return /* @__PURE__ */ jsx8("object", { "data-himalaya-pdf": "native-fallback", "data-himalaya-pdf-zoom": zoomPercent ?? 100, data: nativeSrc, type: "application/pdf", "aria-label": title, style: frame });
115919
116044
  }
115920
116045
  return /* @__PURE__ */ jsxs5("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: [
115921
116046
  /* @__PURE__ */ jsx8("div", { ref: containerRef, "data-himalaya-pdf-pages": "true" }),
@@ -115928,10 +116053,8 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
115928
116053
  var init_pdfDocument = __esm({
115929
116054
  "../../core/web-renderer/src/pdfDocument.tsx"() {
115930
116055
  "use strict";
115931
- init_pdf();
115932
- init_pdf_worker_min();
116056
+ init_browserAssetUrl();
115933
116057
  init_pdfPainter();
115934
- GlobalWorkerOptions.workerSrc = void 0 ?? "";
115935
116058
  }
115936
116059
  });
115937
116060
 
@@ -116483,7 +116606,11 @@ function ensureRiveRuntime() {
116483
116606
  if (riveRuntimeInjected || typeof document === "undefined") return;
116484
116607
  riveRuntimeInjected = true;
116485
116608
  let libP = null;
116486
- const lib = () => libP ??= import("@rive-app/canvas").then((m2) => m2.default ?? m2).catch(() => null);
116609
+ const lib = () => libP ??= Promise.all([import("@rive-app/canvas"), import("@rive-app/canvas/rive.wasm?url")]).then(([m2, wasm]) => {
116610
+ const runtime = m2.default ?? m2;
116611
+ runtime.RuntimeLoader?.setWasmUrl(browserAssetUrl(wasm.default, document.baseURI));
116612
+ return runtime;
116613
+ }).catch(() => null);
116487
116614
  const mount = async (host) => {
116488
116615
  const el2 = host;
116489
116616
  if (el2.dataset.himalayaRiveDone === "1") return;
@@ -116498,7 +116625,20 @@ function ensureRiveRuntime() {
116498
116625
  const artboard = el2.getAttribute("data-himalaya-rive-artboard") || void 0;
116499
116626
  const sm = el2.getAttribute("data-himalaya-rive-sm") || void 0;
116500
116627
  try {
116501
- new Rive({ src, canvas: el2, autoplay, artboard, stateMachines: sm ? [sm] : void 0 });
116628
+ const instance = new Rive({
116629
+ src,
116630
+ canvas: el2,
116631
+ autoplay,
116632
+ artboard,
116633
+ stateMachines: sm ? [sm] : void 0,
116634
+ onLoad: () => {
116635
+ instance.resizeDrawingSurfaceToCanvas();
116636
+ el2.dataset.himalayaRiveReady = "1";
116637
+ },
116638
+ onLoadError: () => {
116639
+ el2.dataset.himalayaRiveReady = "error";
116640
+ }
116641
+ });
116502
116642
  } catch {
116503
116643
  }
116504
116644
  };
@@ -118305,13 +118445,13 @@ function renderInner(node, ctx) {
118305
118445
  const badgeLabel = m2?.accessibilityLabel ?? m2?.accessibility_label;
118306
118446
  const badgeRole = roleDeclared ? void 0 : liveCount ? "status" : typeof badgeLabel === "string" && badgeLabel.trim() !== "" ? "img" : void 0;
118307
118447
  const fg = _bt ? c2 : sevTextColor(ctx, props.style ?? "info");
118308
- return /* @__PURE__ */ jsx9("span", { role: badgeRole, style: { display: "inline-flex", alignItems: "center", 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" });
118448
+ return /* @__PURE__ */ jsx9("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" });
118309
118449
  }
118310
118450
  case "Tag": {
118311
118451
  const tagToken = boundTokenName(props.tokenPath, props.token, ctx);
118312
118452
  const c2 = C2(tagToken ?? "accentPrimary", "#116DFF");
118313
118453
  const tagFg = tagToken ? c2 : accentTextColor(ctx);
118314
- return /* @__PURE__ */ jsx9("span", { style: { display: "inline-flex", alignItems: "center", 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" });
118454
+ return /* @__PURE__ */ jsx9("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" });
118315
118455
  }
118316
118456
  case "ProgressBar":
118317
118457
  return /* @__PURE__ */ jsx9(ProgressBarNode, { props, ctx, wrap });
@@ -118481,7 +118621,7 @@ function renderInner(node, ctx) {
118481
118621
  const isz = props.size === "small" ? 18 : props.size === "large" ? 28 : 24;
118482
118622
  const extended = props.label != null && props.label !== "";
118483
118623
  const actionable = Boolean(props.action);
118484
- const style = { display: "inline-flex", alignItems: "center", justifyContent: "center", gap: extended ? 10 : 0, height: dim, width: extended ? void 0 : 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 };
118624
+ 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 };
118485
118625
  const content = /* @__PURE__ */ jsxs6(Fragment4, { children: [
118486
118626
  props.icon && /* @__PURE__ */ jsx9("span", { style: { display: "inline-grid", placeItems: "center", width: isz, height: isz }, children: iconSvg(props.icon, { size: isz, color: fg }) }),
118487
118627
  extended && /* @__PURE__ */ jsx9("span", { style: { fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(15) }, children: txt(props.label, ctx) })
@@ -118613,12 +118753,7 @@ function renderInner(node, ctx) {
118613
118753
  return /* @__PURE__ */ jsx9("div", { style: { width: "100%", ...wrap }, children: /* @__PURE__ */ jsx9("div", { style: { display: "flex", overflowX: "auto", gap: 12, width: "100%" }, children: /* @__PURE__ */ jsx9(BoundList, { ctx, itemsPath: carItemsPath, template: items[0], renderRow: (t2, ic) => /* @__PURE__ */ jsx9("div", { style: { flex: "0 0 auto" }, children: renderNode(t2, ic) }) }) }) });
118614
118754
  }
118615
118755
  if (type === "Carousel") return /* @__PURE__ */ jsx9(CarouselNode, { props, ctx, wrap });
118616
- const pages = items.filter((p2) => isNodeLike(p2) || p2?.type);
118617
- const cur = props.currentIndex ?? 0;
118618
- return /* @__PURE__ */ jsxs6("div", { style: { width: "100%", ...wrap }, children: [
118619
- /* @__PURE__ */ jsx9("div", { style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" }, children: pages.map((pg, i2) => /* @__PURE__ */ jsx9("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: renderNode(pg, ctx) }, pg?.id ?? i2)) }),
118620
- pages.length > 1 && props.showIndicator !== false && /* @__PURE__ */ jsx9("div", { style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages.map((_2, i2) => /* @__PURE__ */ jsx9("span", { style: { width: i2 === cur ? 18 : 7, height: 7, borderRadius: 999, background: i2 === cur ? C2("accentPrimary", "#116DFF") : C2("border", "#ccc") } }, i2)) })
118621
- ] });
118756
+ return /* @__PURE__ */ jsx9(PagingNode, { props: { ...props, __pager: true }, ctx, wrap });
118622
118757
  }
118623
118758
  case "StepIndicator": {
118624
118759
  const steps = Array.isArray(props.steps) ? props.steps : [];
@@ -118672,10 +118807,11 @@ function renderInner(node, ctx) {
118672
118807
  }
118673
118808
  }
118674
118809
  }
118675
- var useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, ACTIVITY_DEFAULT_NAME, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, PRESENTED_OVERLAY_ATTR, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, WebRenderer;
118810
+ var useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, ACTIVITY_DEFAULT_NAME, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, PRESENTED_OVERLAY_ATTR, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, WebRenderer;
118676
118811
  var init_renderNode = __esm({
118677
118812
  "../../core/web-renderer/src/renderNode.tsx"() {
118678
118813
  "use strict";
118814
+ init_browserAssetUrl();
118679
118815
  init_tokens2();
118680
118816
  init_idiom_controls();
118681
118817
  init_modifiers();
@@ -119215,6 +119351,7 @@ var init_renderNode = __esm({
119215
119351
  const focused = React8.useRef(false);
119216
119352
  const [touched, setTouched] = React8.useState(false);
119217
119353
  const [isFocused, setIsFocused] = React8.useState(false);
119354
+ const pendingEdits = React8.useRef([]);
119218
119355
  const previousBoundText = React8.useRef(boundText);
119219
119356
  const previousBoundRawText = React8.useRef(boundRawText);
119220
119357
  React8.useEffect(() => {
@@ -119223,6 +119360,12 @@ var init_renderNode = __esm({
119223
119360
  const boundRawTextChanged = previousBoundRawText.current !== boundRawText;
119224
119361
  previousBoundText.current = boundText;
119225
119362
  previousBoundRawText.current = boundRawText;
119363
+ pendingEdits.current = pendingEdits.current.filter((edit) => Date.now() - edit.at < 3e4);
119364
+ const acknowledged = pendingEdits.current.findIndex((edit) => edit.value === boundRawText);
119365
+ if (acknowledged >= 0) {
119366
+ pendingEdits.current.splice(0, acknowledged + 1);
119367
+ if (pendingEdits.current.length > 0) return;
119368
+ }
119226
119369
  if (boundText === "") {
119227
119370
  if (boundTextChanged || serializeRichText && boundRawTextChanged) {
119228
119371
  if (local !== "") setLocal("");
@@ -119261,6 +119404,7 @@ var init_renderNode = __esm({
119261
119404
  React8.useEffect(() => {
119262
119405
  if (previousBinding.current === binding2) return;
119263
119406
  previousBinding.current = binding2;
119407
+ pendingEdits.current = [];
119264
119408
  if (!serializeRichText) return;
119265
119409
  if (fieldId) formBag?.clearValue(fieldId);
119266
119410
  const nextPristineValue = isBound ? boundRawText : typeof valueBinding === "string" ? valueBinding : void 0;
@@ -119303,6 +119447,7 @@ var init_renderNode = __esm({
119303
119447
  const errorId = revealed ? `${componentId ?? generatedId}__error` : void 0;
119304
119448
  const emit = (v2) => {
119305
119449
  if (onChangeAction && ctx.onAction) {
119450
+ if (isBound) pendingEdits.current.push({ value: v2, at: Date.now() });
119306
119451
  ctx.onAction({
119307
119452
  ...onChangeAction,
119308
119453
  params: { ...onChangeAction.params ?? {}, value: v2 },
@@ -120085,7 +120230,7 @@ var init_renderNode = __esm({
120085
120230
  const boundUrl = useResolvedScalar(props.url != null && isBinding(props.url) ? props.url : void 0, ctx);
120086
120231
  const url = props.url != null && isBinding(props.url) ? boundUrl : props.url;
120087
120232
  const rawUrl = typeof url === "string" && !isBinding(url) ? url : "";
120088
- const plan = rawUrl ? pdfEmbedPlan(rawUrl) : null;
120233
+ const plan = rawUrl ? pdfEmbedPlan(rawUrl, void 0, typeof document !== "undefined" ? document.baseURI : void 0) : null;
120089
120234
  const retypeSrc = plan?.mode === "retype" ? plan.src : null;
120090
120235
  const [retyped, setRetyped] = React8.useState(null);
120091
120236
  React8.useEffect(() => {
@@ -121025,11 +121170,11 @@ var init_renderNode = __esm({
121025
121170
  const C2 = ctx.color;
121026
121171
  const bound = useResolvedScalar(props.valuePath, ctx);
121027
121172
  const val = props.valuePath != null ? typeof bound === "string" ? bound : typeof bound === "number" ? String(bound) : "" : typeof props.value === "string" ? props.value : "";
121028
- const len = props.length ?? 6;
121029
- return /* @__PURE__ */ jsx9("div", { style: { display: "inline-flex", gap: 8, ...wrap }, children: Array.from({ length: len }).map((_2, i2) => {
121173
+ const len = Math.max(0, props.length ?? 6);
121174
+ return /* @__PURE__ */ jsx9("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) => {
121030
121175
  const ch2 = val[i2];
121031
121176
  const active = i2 === val.length;
121032
- return /* @__PURE__ */ jsx9("span", { style: { width: 40, 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);
121177
+ return /* @__PURE__ */ jsx9("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);
121033
121178
  }) });
121034
121179
  });
121035
121180
  ProgressBarNode = withExtras("ProgressBarNode", ({ props, ctx, wrap }) => {
@@ -121252,6 +121397,7 @@ var init_renderNode = __esm({
121252
121397
  });
121253
121398
  ChipsInputNode = withExtras("ChipsInputNode", ({ props, ctx, wrap }) => {
121254
121399
  const placeholderText = useBoundString(props.placeholder, ctx);
121400
+ const [draft, setDraft] = React8.useState("");
121255
121401
  const C2 = ctx.color;
121256
121402
  const bound = useResolvedScalar(props.valuesPath, ctx);
121257
121403
  const raw = props.valuesPath != null ? bound : props.values;
@@ -121259,9 +121405,21 @@ var init_renderNode = __esm({
121259
121405
  return /* @__PURE__ */ jsxs6("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: [
121260
121406
  values.map((v2, i2) => /* @__PURE__ */ jsxs6("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: [
121261
121407
  asText2(v2),
121262
- /* @__PURE__ */ jsx9("span", { onClick: ctx.onAction && props.onRemove ? () => ctx.onAction(resolveItemDeep2(props.onRemove, ctx)) : void 0, style: { opacity: 0.6, cursor: "pointer", fontSize: pxToRem(13) }, children: "\xD7" })
121408
+ props.onRemove && /* @__PURE__ */ jsx9("button", { type: "button", "aria-label": `Remove ${asText2(v2)}`, disabled: !!props.disabled || !ctx.onAction, onClick: () => {
121409
+ if (props.disabled || !ctx.onAction) return;
121410
+ const action = resolveItemDeep2(props.onRemove, ctx);
121411
+ ctx.onAction({ ...action, args: { ...action.args, value: v2, index: i2 } });
121412
+ }, style: { minWidth: 44, minHeight: 44, border: 0, background: "transparent", color: "inherit", opacity: 0.6, cursor: props.disabled ? "default" : "pointer", fontSize: pxToRem(13) }, children: "\xD7" })
121263
121413
  ] }, i2)),
121264
- /* @__PURE__ */ jsx9("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(14), color: C2("textSecondary", "#888") }, children: values.length ? "" : placeholderText || "Add\u2026" })
121414
+ props.onAdd ? /* @__PURE__ */ jsx9("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) => {
121415
+ if (event.key !== "Enter" || event.nativeEvent.isComposing || props.disabled || !ctx.onAction) return;
121416
+ event.preventDefault();
121417
+ const value = draft.trim();
121418
+ if (!value) return;
121419
+ const action = resolveItemDeep2(props.onAdd, ctx);
121420
+ ctx.onAction({ ...action, args: { ...action.args, value } });
121421
+ setDraft("");
121422
+ }, 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__ */ jsx9("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(14), color: C2("textSecondary", "#888") }, children: values.length ? "" : placeholderText || "Add\u2026" })
121265
121423
  ] });
121266
121424
  });
121267
121425
  ChipNode = withExtras("ChipNode", ({ props, ctx, wrap }) => {
@@ -121272,14 +121430,31 @@ var init_renderNode = __esm({
121272
121430
  const accent = C2(boundTokenName(props.tokenPath, props.token, ctx) ?? "accentPrimary", "#116DFF");
121273
121431
  const onClick = ctx.onAction && props.onTap && !props.disabled ? () => ctx.onAction(resolveItemDeep2(props.onTap, ctx)) : void 0;
121274
121432
  const fg = selected ? C2("textOnAccent", "#fff") : C2("textPrimary", "#13171e");
121275
- return /* @__PURE__ */ jsxs6("span", { onClick, style: { 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 }, children: [
121433
+ 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 };
121434
+ const hitArea = /* @__PURE__ */ jsx9("span", { "aria-hidden": "true", style: { position: "absolute", left: 0, top: "50%", width: "100%", minWidth: 44, height: 44, transform: "translateY(-50%)" } });
121435
+ const content = /* @__PURE__ */ jsxs6(Fragment4, { children: [
121276
121436
  props.leadingAvatarUrl && !isBinding(props.leadingAvatarUrl) && /* @__PURE__ */ jsx9("img", { src: String(props.leadingAvatarUrl), alt: "", style: { width: 20, height: 20, borderRadius: "50%", objectFit: "cover", margin: "-2px 0 -2px -4px" } }),
121277
121437
  props.leadingIcon && /* @__PURE__ */ jsx9("span", { style: { display: "inline-grid", placeItems: "center", width: 16, height: 16 }, children: iconSvg(props.leadingIcon, { size: 15, color: fg }) }),
121278
- /* @__PURE__ */ jsx9("span", { children: txt(props.label, ctx) }),
121279
- props.removable && /* @__PURE__ */ jsx9("span", { onClick: ctx.onAction && props.onRemove ? (e2) => {
121280
- e2.stopPropagation();
121281
- ctx.onAction(resolveItemDeep2(props.onRemove, ctx));
121282
- } : void 0, style: { display: "inline-grid", placeItems: "center", width: 16, height: 16, borderRadius: "50%", fontSize: 13, opacity: 0.7, cursor: "pointer" }, children: "\xD7" })
121438
+ /* @__PURE__ */ jsx9("span", { children: txt(props.label, ctx) })
121439
+ ] });
121440
+ const pressed = props.selectedPath != null || props.selected != null ? selected : void 0;
121441
+ if (!props.removable) return props.onTap ? /* @__PURE__ */ jsxs6("button", { type: "button", disabled: !!props.disabled || !ctx.onAction, "aria-pressed": pressed, onClick, style, children: [
121442
+ content,
121443
+ hitArea
121444
+ ] }) : /* @__PURE__ */ jsx9("span", { style, children: content });
121445
+ const remove = ctx.onAction && props.onRemove && !props.disabled ? (event) => {
121446
+ event.stopPropagation();
121447
+ ctx.onAction(resolveItemDeep2(props.onRemove, ctx));
121448
+ } : void 0;
121449
+ return /* @__PURE__ */ jsxs6("span", { ...{ [A11Y_PART]: "root" }, style, children: [
121450
+ props.onTap ? /* @__PURE__ */ jsxs6("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: [
121451
+ content,
121452
+ hitArea
121453
+ ] }) : content,
121454
+ /* @__PURE__ */ jsxs6("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: [
121455
+ "\xD7",
121456
+ hitArea
121457
+ ] })
121283
121458
  ] });
121284
121459
  });
121285
121460
  TableNode = withExtras("TableNode", ({ props, ctx, wrap }) => {
@@ -121355,11 +121530,11 @@ var init_renderNode = __esm({
121355
121530
  const invalidIcon = props.icon != null && typeof props.icon !== "string";
121356
121531
  const base = invalidIcon ? ICON_FALLBACK : (typeof props.icon === "string" && props.icon ? props.icon : "star").replace(/_fill$/, "");
121357
121532
  const filledCount = Math.round(val);
121358
- const onClickStar = (i2) => ctx.onAction && props.interactive && props.onChange ? () => ctx.onAction({ ...props.onChange, params: { ...props.onChange?.params ?? {}, value: String(i2 + 1) } }) : void 0;
121533
+ 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;
121359
121534
  const cv = Number.isFinite(val) ? Math.max(0, Math.min(max, val)) : 0, summary2 = `${Number.isInteger(cv) ? cv : cv.toFixed(1)} of ${max}`;
121360
121535
  return /* @__PURE__ */ jsx9("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) => {
121361
121536
  const filled = i2 < filledCount;
121362
- return /* @__PURE__ */ jsx9("span", { onClick: onClickStar(i2), style: { display: "inline-grid", placeItems: "center", width: m2.cell, height: m2.cell, cursor: props.interactive ? "pointer" : "default", opacity: filled ? 1 : 0.28 }, children: iconSvg(filled ? `${base}_fill` : base, { size: m2.glyph, color: col }) }, i2);
121537
+ return onClickStar(i2) ? /* @__PURE__ */ jsx9("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__ */ jsx9("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);
121363
121538
  }) });
121364
121539
  });
121365
121540
  AvatarStripNode = withExtras("AvatarStripNode", ({ props, ctx, wrap }) => {
@@ -121879,6 +122054,61 @@ var init_renderNode = __esm({
121879
122054
  ] }, i2);
121880
122055
  }) });
121881
122056
  });
122057
+ PagingNode = withExtras("PagingNode", ({ props, ctx, wrap }) => {
122058
+ const items = (props.__pager ? props.pages : props.items) ?? [];
122059
+ const pages = items.filter((page) => isNodeLike(page) || page?.type);
122060
+ const requested = Math.max(0, Math.min(pages.length - 1, props.currentIndex ?? 0));
122061
+ const [current, setCurrent] = React8.useState(requested);
122062
+ const rail = React8.useRef(null);
122063
+ const currentRef = React8.useRef(current);
122064
+ const itemsPath = props.itemsPath ?? props.items_path;
122065
+ const boundRail = !!itemsPath && !!items[0] && !!ctx.provider;
122066
+ const select = (index) => {
122067
+ if (index === currentRef.current) return;
122068
+ currentRef.current = index;
122069
+ setCurrent(index);
122070
+ if (props.onChange && ctx.onAction) ctx.onAction({ ...props.onChange, args: { ...props.onChange.args ?? {}, index } });
122071
+ };
122072
+ React8.useEffect(() => {
122073
+ currentRef.current = requested;
122074
+ setCurrent(requested);
122075
+ if (rail.current && !boundRail) rail.current.scrollLeft = requested * rail.current.clientWidth;
122076
+ }, [requested, boundRail, pages.length]);
122077
+ React8.useEffect(() => {
122078
+ const interval = props.autoplayIntervalMs;
122079
+ if (props.__pager || boundRail || !Number.isFinite(interval) || interval <= 0 || pages.length < 2 || ctx.reduceMotion()) return;
122080
+ const timer = setInterval(() => {
122081
+ const next = (currentRef.current + 1) % pages.length;
122082
+ if (rail.current) rail.current.scrollLeft = next * rail.current.clientWidth;
122083
+ select(next);
122084
+ }, interval);
122085
+ return () => clearInterval(timer);
122086
+ }, [props.autoplayIntervalMs, props.__pager, boundRail, pages.length, props.onChange, ctx]);
122087
+ return /* @__PURE__ */ jsxs6("div", { style: { width: "100%", ...wrap }, children: [
122088
+ /* @__PURE__ */ jsx9(
122089
+ "div",
122090
+ {
122091
+ ref: rail,
122092
+ "data-page-rail": "",
122093
+ tabIndex: 0,
122094
+ "aria-label": props.__pager ? "Pages" : "Carousel",
122095
+ onKeyDown: (event) => {
122096
+ if (event.target !== event.currentTarget || boundRail || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
122097
+ event.preventDefault();
122098
+ const index = event.key === "Home" ? 0 : event.key === "End" ? pages.length - 1 : Math.max(0, Math.min(pages.length - 1, currentRef.current + (event.key === "ArrowRight" ? 1 : -1)));
122099
+ if (rail.current) rail.current.scrollLeft = index * rail.current.clientWidth;
122100
+ select(index);
122101
+ },
122102
+ onScroll: (event) => {
122103
+ if (!boundRail && event.currentTarget.clientWidth > 0) select(Math.max(0, Math.min(pages.length - 1, Math.round(event.currentTarget.scrollLeft / event.currentTarget.clientWidth))));
122104
+ },
122105
+ style: { display: "flex", overflowX: "auto", scrollSnapType: boundRail ? void 0 : "x mandatory", gap: boundRail ? 12 : void 0, width: "100%" },
122106
+ children: boundRail ? /* @__PURE__ */ jsx9(BoundList, { ctx, itemsPath, template: items[0], renderRow: (template, itemCtx) => /* @__PURE__ */ jsx9("div", { style: { flex: "0 0 auto" }, children: renderNode(template, itemCtx) }) }) : pages.map((page, index) => /* @__PURE__ */ jsx9("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: renderNode(page, ctx) }, page?.id ?? index))
122107
+ }
122108
+ ),
122109
+ !boundRail && pages.length > 1 && (!props.__pager || props.showIndicator !== false) && /* @__PURE__ */ jsx9("div", { "aria-label": `Page ${current + 1} of ${pages.length}`, style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages.map((_2, index) => /* @__PURE__ */ jsx9("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)) })
122110
+ ] });
122111
+ });
121882
122112
  WheelPickerNode = withExtras("WheelPickerNode", ({ props, ctx, wrap }) => {
121883
122113
  const C2 = ctx.color;
121884
122114
  const boundOpts = useResolvedScalar(props.optionsPath, ctx);
@@ -121887,11 +122117,56 @@ var init_renderNode = __esm({
121887
122117
  const opts = Array.isArray(rawOpts) ? rawOpts : [];
121888
122118
  const selectedId = isBinding(props.selectedId) ? boundSel : props.selectedId;
121889
122119
  const selIdx = Math.max(0, opts.findIndex((o2) => o2?.id === selectedId));
121890
- const row = (o2, dist) => /* @__PURE__ */ jsx9("div", { style: { height: 32, display: "flex", alignItems: "center", justifyContent: "center", fontFamily: bodyFont(ctx), fontSize: pxToRem(16), fontWeight: dist === 0 ? 700 : 400, color: dist === 0 ? C2("textPrimary", "#13171e") : C2("textSecondary", "#9aa3ad"), opacity: 1 - Math.min(0.7, Math.abs(dist) * 0.35) }, children: asText2(o2?.label) ?? asText2(o2?.id) }, o2?.id);
121891
- const window_ = [-2, -1, 0, 1, 2].map((d2) => ({ o: opts[selIdx + d2], d: d2 })).filter((x2) => x2.o);
122120
+ const viewport = React8.useRef(null);
122121
+ const settle = React8.useRef(void 0);
122122
+ const pickerId = React8.useId();
122123
+ const interactive = !!ctx.onAction && !!props.onChange;
122124
+ const emit = (index) => {
122125
+ const id = opts[index]?.id;
122126
+ if (!interactive || id == null || index === selIdx) return;
122127
+ ctx.onAction({ ...props.onChange, args: { ...props.onChange.args ?? {}, selectedId: String(id) } });
122128
+ };
122129
+ React8.useEffect(() => {
122130
+ if (viewport.current) viewport.current.scrollTop = selIdx * 32;
122131
+ }, [selIdx, opts.length]);
122132
+ React8.useEffect(() => () => clearTimeout(settle.current), []);
121892
122133
  return /* @__PURE__ */ jsxs6("div", { style: { position: "relative", width: "100%", maxWidth: 220, height: 160, overflow: "hidden", background: C2("surfaceSecondary", "#f5f7fa"), borderRadius: 12, ...wrap }, children: [
121893
- /* @__PURE__ */ jsx9("div", { style: { position: "absolute", top: "50%", left: 8, right: 8, transform: "translateY(-50%)", height: 32, background: C2("surfacePrimary", "#fff"), borderRadius: 8, boxShadow: "inset 0 0 0 1px rgba(0,0,0,.06)" } }),
121894
- /* @__PURE__ */ jsx9("div", { style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "stretch", paddingTop: 64 }, children: window_.map(({ o: o2, d: d2 }) => row(o2, d2)) })
122134
+ /* @__PURE__ */ jsx9("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)" } }),
122135
+ /* @__PURE__ */ jsx9(
122136
+ "div",
122137
+ {
122138
+ ref: viewport,
122139
+ role: "listbox",
122140
+ "aria-label": "Wheel selection",
122141
+ "aria-activedescendant": opts.length ? `${pickerId}-${selIdx}` : void 0,
122142
+ "aria-disabled": !interactive,
122143
+ tabIndex: interactive ? 0 : void 0,
122144
+ onKeyDown: (event) => {
122145
+ const next = event.key === "ArrowDown" ? Math.min(opts.length - 1, selIdx + 1) : event.key === "ArrowUp" ? Math.max(0, selIdx - 1) : event.key === "Home" ? 0 : event.key === "End" ? opts.length - 1 : null;
122146
+ if (next != null && interactive) {
122147
+ event.preventDefault();
122148
+ emit(next);
122149
+ }
122150
+ },
122151
+ onScroll: () => {
122152
+ clearTimeout(settle.current);
122153
+ settle.current = setTimeout(() => emit(Math.max(0, Math.min(opts.length - 1, Math.round((viewport.current?.scrollTop ?? 0) / 32)))), 120);
122154
+ },
122155
+ style: { position: "relative", height: "100%", overflowY: "auto", scrollbarWidth: "none", scrollSnapType: "y mandatory", padding: "64px 0", boxSizing: "border-box" },
122156
+ children: opts.map((o2, index) => /* @__PURE__ */ jsx9(
122157
+ "div",
122158
+ {
122159
+ id: `${pickerId}-${index}`,
122160
+ role: "option",
122161
+ "aria-selected": index === selIdx,
122162
+ onClick: () => emit(index),
122163
+ style: { height: 32, scrollSnapAlign: "center", display: "flex", alignItems: "center", justifyContent: "center", cursor: interactive ? "pointer" : "default", fontFamily: bodyFont(ctx), fontSize: pxToRem(16), fontWeight: index === selIdx ? 700 : 400, color: index === selIdx ? C2("textPrimary", "#13171e") : C2("textSecondary", "#636b78"), opacity: 1 - Math.min(0.7, Math.abs(index - selIdx) * 0.35) },
122164
+ children: asText2(o2?.label ?? o2?.id)
122165
+ },
122166
+ o2?.id ?? index
122167
+ ))
122168
+ }
122169
+ )
121895
122170
  ] });
121896
122171
  });
121897
122172
  ColorPickerNode = withExtras("ColorPickerNode", ({ props, ctx, wrap }) => {
@@ -121900,14 +122175,14 @@ var init_renderNode = __esm({
121900
122175
  const raw = props.valuePath != null ? bound : props.value;
121901
122176
  const cur = typeof raw === "string" ? raw : "#116DFF";
121902
122177
  const swatches = Array.isArray(props.swatches) ? props.swatches : ["#116DFF", "#23924D", "#E89F00", "#E62214", "#8B5CF6", "#111827"];
121903
- const onPick = (hex2) => ctx.onAction && props.onChange ? () => ctx.onAction({ ...props.onChange, params: { ...props.onChange?.params ?? {}, value: hex2 } }) : void 0;
122178
+ const onPick = (hex2) => ctx.onAction && props.onChange ? () => ctx.onAction({ ...props.onChange, args: { ...props.onChange?.args ?? {}, value: hex2 } }) : void 0;
121904
122179
  return /* @__PURE__ */ jsxs6("div", { style: { display: "flex", flexDirection: "column", gap: 8, ...wrap }, children: [
121905
122180
  /* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
121906
122181
  /* @__PURE__ */ jsx9("span", { style: { width: 28, height: 28, borderRadius: 8, background: C2(cur, cur), border: `1px solid ${C2("border", "#e3e3e3")}`, flex: "none" } }),
121907
122182
  props.label != null && /* @__PURE__ */ jsx9("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#13171e") }, children: txt(props.label, ctx) }),
121908
122183
  /* @__PURE__ */ jsx9("span", { style: { marginLeft: "auto", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(13), color: C2("textSecondary", "#636b78") }, children: asText2(cur) })
121909
122184
  ] }),
121910
- /* @__PURE__ */ jsx9("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: swatches.map((s2, i2) => /* @__PURE__ */ jsx9("span", { onClick: onPick(s2), style: { width: 26, height: 26, borderRadius: "50%", background: C2(s2, s2), cursor: onPick(s2) ? "pointer" : "default", 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)) })
122185
+ /* @__PURE__ */ jsx9("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: swatches.map((s2, i2) => /* @__PURE__ */ jsx9("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__ */ jsx9("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)) })
121911
122186
  ] });
121912
122187
  });
121913
122188
  FilterChipsNode = withExtras("FilterChipsNode", ({ props, ctx, wrap }) => {
@@ -121974,6 +122249,7 @@ var init_renderNode = __esm({
121974
122249
  const boundCameraRaw = useResolvedScalar(props.cameraPath, ctx);
121975
122250
  const commandedCamera = React8.useMemo(() => decodeCamera(boundCameraRaw), [boundCameraRaw]);
121976
122251
  const [box, setBox] = React8.useState({ w: 400, h: h2 });
122252
+ const [tileStatus, setTileStatus] = React8.useState({});
121977
122253
  const [userCam, setUserCam] = React8.useState(null);
121978
122254
  const dragRef = React8.useRef(null);
121979
122255
  const dragMovedRef = React8.useRef(false);
@@ -122117,12 +122393,16 @@ var init_renderNode = __esm({
122117
122393
  const endDrag = () => {
122118
122394
  dragRef.current = null;
122119
122395
  };
122120
- const onWheel = (e2) => {
122121
- if (!interactive) return;
122122
- e2.preventDefault();
122123
- const next = Math.max(1, Math.min(19, z4 + (e2.deltaY < 0 ? 1 : -1)));
122124
- if (next !== z4) setUserCam({ lat: cLat, lng: cLng, z: next });
122125
- };
122396
+ React8.useEffect(() => {
122397
+ if (!boxEl || !usesTileArm || !interactive) return;
122398
+ const zoomOnWheel = (event) => {
122399
+ event.preventDefault();
122400
+ const next = Math.max(1, Math.min(19, z4 + (event.deltaY < 0 ? 1 : -1)));
122401
+ if (next !== z4) setUserCam({ lat: cLat, lng: cLng, z: next });
122402
+ };
122403
+ boxEl.addEventListener("wheel", zoomOnWheel, { passive: false });
122404
+ return () => boxEl.removeEventListener("wheel", zoomOnWheel);
122405
+ }, [boxEl, usesTileArm, interactive, z4, cLat, cLng]);
122126
122406
  React8.useEffect(() => {
122127
122407
  const action = props.onRegionChange;
122128
122408
  const fire = ctx.onAction;
@@ -122158,6 +122438,7 @@ var init_renderNode = __esm({
122158
122438
  {
122159
122439
  ref: attachBox,
122160
122440
  "data-map-mode": "tile",
122441
+ "data-map-tile-state": tiles.some((t2) => tileStatus[t2.src] === "loaded") ? "ready" : tiles.length > 0 && tiles.every((t2) => tileStatus[t2.src] === "failed") ? "unavailable" : "loading",
122161
122442
  "data-route-points": route.length,
122162
122443
  "data-map-zoom": z4,
122163
122444
  onClick: onSurfaceClick,
@@ -122165,7 +122446,6 @@ var init_renderNode = __esm({
122165
122446
  onPointerMove,
122166
122447
  onPointerUp: endDrag,
122167
122448
  onPointerLeave: endDrag,
122168
- onWheel,
122169
122449
  style: {
122170
122450
  width: "100%",
122171
122451
  boxSizing: "border-box",
@@ -122180,7 +122460,7 @@ var init_renderNode = __esm({
122180
122460
  ...wrap
122181
122461
  },
122182
122462
  children: [
122183
- tiles.map((t2) => /* @__PURE__ */ jsx9("img", { src: t2.src, alt: "", loading: "lazy", draggable: false, style: { position: "absolute", left: t2.left, top: t2.top, width: TILE_PX, height: TILE_PX } }, t2.key)),
122463
+ tiles.map((t2) => /* @__PURE__ */ jsx9("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)),
122184
122464
  /* @__PURE__ */ jsxs6("svg", { viewBox: `0 0 ${W2} ${H2}`, preserveAspectRatio: "none", style: { position: "absolute", inset: 0, width: "100%", height: "100%", pointerEvents: "none" }, children: [
122185
122465
  shapes.map((sh, i2) => {
122186
122466
  if (sh.kind === "unknown" || sh.points.length < 2) return null;
@@ -122220,6 +122500,7 @@ var init_renderNode = __esm({
122220
122500
  /* @__PURE__ */ jsx9("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 })
122221
122501
  ] }) : null
122222
122502
  ] }),
122503
+ tiles.length > 0 && tiles.every((t2) => tileStatus[t2.src] === "failed") && /* @__PURE__ */ jsx9("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." }),
122223
122504
  /* @__PURE__ */ jsx9("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" })
122224
122505
  ]
122225
122506
  }
@@ -122275,6 +122556,13 @@ var init_renderNode = __esm({
122275
122556
  if (autoScrollRef.current) clearTimeout(autoScrollRef.current.timer);
122276
122557
  autoScrollRef.current = null;
122277
122558
  }, []);
122559
+ const requestedIndex = Math.max(0, Math.min(count2 - 1, typeof props.currentIndex === "number" ? props.currentIndex : 0));
122560
+ React8.useEffect(() => {
122561
+ endAutoScroll();
122562
+ indexRef.current = requestedIndex;
122563
+ setIndex(requestedIndex);
122564
+ if (trackRef.current) trackRef.current.scrollLeft = requestedIndex * trackRef.current.clientWidth;
122565
+ }, [requestedIndex, count2, endAutoScroll]);
122278
122566
  React8.useEffect(() => {
122279
122567
  const el2 = trackRef.current;
122280
122568
  el2?.addEventListener("scrollend", endAutoScroll);
@@ -122340,8 +122628,15 @@ var init_renderNode = __esm({
122340
122628
  onBlur: onFocusOut,
122341
122629
  style: { width: "100%", ...wrap },
122342
122630
  children: [
122343
- /* @__PURE__ */ jsx9("div", { ref: trackRef, onScroll, onPointerDown: userTakesOver, onTouchStart: userTakesOver, onWheel: userTakesOver, onKeyDown: userTakesOver, style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" }, children: pages.map((pg, i2) => /* @__PURE__ */ jsx9("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: renderNode(pg, ctx) }, pg?.id ?? i2)) }),
122344
- count2 > 1 && /* @__PURE__ */ jsx9("div", { style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages.map((_2, i2) => /* @__PURE__ */ jsx9("span", { style: { width: i2 === index ? 18 : 7, height: 7, borderRadius: 999, background: i2 === index ? C2("accentPrimary", "#116DFF") : C2("border", "#ccc") } }, i2)) })
122631
+ /* @__PURE__ */ jsx9("div", { ref: trackRef, "data-page-rail": "", tabIndex: 0, "aria-label": "Carousel", onScroll, onPointerDown: userTakesOver, onTouchStart: userTakesOver, onWheel: userTakesOver, onKeyDown: (event) => {
122632
+ userTakesOver(event);
122633
+ if (event.target !== event.currentTarget || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
122634
+ event.preventDefault();
122635
+ 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)));
122636
+ if (trackRef.current) trackRef.current.scrollLeft = next * trackRef.current.clientWidth;
122637
+ pageTo(next);
122638
+ }, style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" }, children: pages.map((pg, i2) => /* @__PURE__ */ jsx9("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: renderNode(pg, ctx) }, pg?.id ?? i2)) }),
122639
+ count2 > 1 && /* @__PURE__ */ jsx9("div", { "aria-label": `Page ${index + 1} of ${count2}`, style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages.map((_2, i2) => /* @__PURE__ */ jsx9("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)) })
122345
122640
  ]
122346
122641
  }
122347
122642
  );
@@ -122383,7 +122678,7 @@ var init_renderNode = __esm({
122383
122678
  const resolvedHero = heroSrc ? resolveAssetUrl(heroSrc, ctx.assetBaseUrl) : void 0;
122384
122679
  const [failedHero, setFailedHero] = React8.useState(null);
122385
122680
  const imageUrl = resolvedHero && resolvedHero !== failedHero ? resolvedHero : void 0;
122386
- const expanded = Math.min(props.expandedHeight ?? 120, 160);
122681
+ const expanded = Math.max(0, typeof props.expandedHeight === "number" && Number.isFinite(props.expandedHeight) ? props.expandedHeight : 280);
122387
122682
  const collapsed = Math.max(0, Math.min(expanded, typeof props.collapsedHeight === "number" && props.collapsedHeight > 0 ? props.collapsedHeight : 64));
122388
122683
  const parallax = typeof props.parallaxFactor === "number" && Number.isFinite(props.parallaxFactor) ? Math.max(0, Math.min(1, props.parallaxFactor)) : 0.5;
122389
122684
  const span = Math.max(1, expanded - collapsed);
@@ -122396,7 +122691,7 @@ var init_renderNode = __esm({
122396
122691
  let port = collapsingScrollPort(el2);
122397
122692
  const measure2 = () => {
122398
122693
  const top = port ? port.getBoundingClientRect().top : 0;
122399
- const next = Math.max(0, Math.round(top - el2.getBoundingClientRect().top));
122694
+ const next = Math.max(0, Math.round(top - el2.getBoundingClientRect().top + el2.scrollTop));
122400
122695
  setOffset((prev) => prev === next ? prev : next);
122401
122696
  };
122402
122697
  const onScroll = (e2) => {
@@ -122416,8 +122711,8 @@ var init_renderNode = __esm({
122416
122711
  const height = Math.round(expanded - (expanded - collapsed) * progress);
122417
122712
  const lost = expanded - height;
122418
122713
  const fade = 1 - progress * 0.7;
122419
- return /* @__PURE__ */ jsxs6("div", { ref: rootRef, ...{ [A11Y_PART]: "root" }, style: { width: "100%", ...wrap }, children: [
122420
- /* @__PURE__ */ jsxs6("div", { "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: [
122714
+ return /* @__PURE__ */ jsxs6("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: [
122715
+ /* @__PURE__ */ jsxs6("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: [
122421
122716
  imageUrl && /* @__PURE__ */ jsx9("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)` } : {} } }),
122422
122717
  imageUrl && /* @__PURE__ */ jsx9("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 } : {} } }),
122423
122718
  /* @__PURE__ */ jsxs6("div", { style: { position: "absolute", left: 14, bottom: 12, color: "#fff", textShadow: "0 1px 4px rgba(0,0,0,.5)", ...progress > 0 ? { opacity: fade } : {} }, children: [
@@ -122426,7 +122721,7 @@ var init_renderNode = __esm({
122426
122721
  ] })
122427
122722
  ] }),
122428
122723
  lost > 0 && /* @__PURE__ */ jsx9("div", { "aria-hidden": "true", style: { height: lost } }),
122429
- items.length > 0 && /* @__PURE__ */ jsx9("div", { style: { paddingTop: 12 }, children: kids2(items, ctx) })
122724
+ items.length > 0 && /* @__PURE__ */ jsx9("div", { style: { paddingTop: 12, display: "flex", flexDirection: "column", gap: 12 }, children: kids2(items, ctx) })
122430
122725
  ] });
122431
122726
  });
122432
122727
  UnsupportedOnSurface = ({
@@ -144254,8 +144549,8 @@ function scriptNonce() {
144254
144549
  crypto.getRandomValues(raw);
144255
144550
  return btoa(String.fromCharCode(...raw));
144256
144551
  }
144257
- function previewCsp(nonce) {
144258
- return `script-src 'self' 'nonce-${nonce}'; base-uri 'self'; object-src 'none'`;
144552
+ function previewCsp(nonce, allowWasm = false) {
144553
+ return `script-src 'self' 'nonce-${nonce}'${allowWasm ? " 'wasm-unsafe-eval'" : ""}; base-uri 'self'; object-src 'none'`;
144259
144554
  }
144260
144555
  function inlineJson(value) {
144261
144556
  return JSON.stringify(value).replace(/</g, "\\u003c");
@@ -144266,7 +144561,7 @@ function previewCredentialsJs(creds) {
144266
144561
  function stripHandoverParamJs() {
144267
144562
  return '(function(){window.__himalayaHandoverFailed__=true;try{var u=new URL(location.href);if(u.searchParams.has("h")){u.searchParams.delete("h");history.replaceState(null,"",u.pathname+u.search+u.hash)}}catch(e){}})();';
144268
144563
  }
144269
- function indexHtml(asset, pathname, creds, handoverAttempted = false) {
144564
+ function indexHtml(asset, pathname, creds, handoverAttempted = false, allowWasm = false) {
144270
144565
  void pathname;
144271
144566
  const nonce = scriptNonce();
144272
144567
  const raw = new TextDecoder().decode(assetBytes(asset));
@@ -144291,7 +144586,7 @@ function indexHtml(asset, pathname, creds, handoverAttempted = false) {
144291
144586
  headers: {
144292
144587
  "content-type": asset.contentType || "text/html; charset=utf-8",
144293
144588
  "cache-control": creds || handoverAttempted ? "no-store" : "public, max-age=60, stale-while-revalidate=600",
144294
- "content-security-policy": previewCsp(nonce),
144589
+ "content-security-policy": previewCsp(nonce, allowWasm),
144295
144590
  // This document's URL can name a credential: `?pvt=` (still accepted from an embedder such
144296
144591
  // as the dashboard frame) or a `?h=` code before the inline script strips it. The browser
144297
144592
  // default sends the FULL URL as `Referer` on same-origin requests, so every `/v1/*` read,
@@ -144307,7 +144602,7 @@ function previewResponse(pathname, assets, mount = "/preview", creds, handoverAt
144307
144602
  if (key2 === "embed.json") return embedManifest(assets);
144308
144603
  const hit = assets.get(key2);
144309
144604
  if (hit) {
144310
- if (key2 === "index.html") return indexHtml(hit, pathname, creds, handoverAttempted);
144605
+ if (key2 === "index.html") return indexHtml(hit, pathname, creds, handoverAttempted, [...assets.keys()].some((key3) => /(?:^|\/)rive[^/]*\.wasm$/.test(key3)));
144311
144606
  if (key2 === "t5-frame.html") {
144312
144607
  return new Response(assetBytes(hit), {
144313
144608
  status: 200,
@@ -144331,7 +144626,7 @@ function previewResponse(pathname, assets, mount = "/preview", creds, handoverAt
144331
144626
  });
144332
144627
  }
144333
144628
  const index = assets.get("index.html");
144334
- if (index) return indexHtml(index, pathname, creds, handoverAttempted);
144629
+ if (index) return indexHtml(index, pathname, creds, handoverAttempted, [...assets.keys()].some((key3) => /(?:^|\/)rive[^/]*\.wasm$/.test(key3)));
144335
144630
  return new Response(JSON.stringify({ error: "preview_not_built" }), {
144336
144631
  status: 503,
144337
144632
  headers: { "content-type": "application/json; charset=utf-8" }
@@ -144650,23 +144945,25 @@ var init_preview_assets_generated = __esm({
144650
144945
  "../../packages/serve/src/preview-assets.generated.ts"() {
144651
144946
  init_preview_assets_format();
144652
144947
  PREVIEW_ASSET_MANIFEST = [
144653
- { key: "assets/index-6QYFsdBr.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1221516, sha256: "87df05780a31d531d42f703e1da7801d6ab7869bd69245956259b62184242b5a" },
144654
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset: 1221524, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
144655
- { key: "assets/pdfDocument-hYjVMwI5.js", contentType: "application/javascript; charset=utf-8", offset: 2538558, length: 489166, sha256: "6ec7133d47c316a2b175ae38ce8c4a6d0fa3c3eade37532bf019cd709794902f" },
144656
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3027724, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
144657
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3032334, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
144658
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3520918, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
144659
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3611842, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
144660
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3702826, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
144661
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3793806, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
144662
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3884678, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
144663
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3975658, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
144664
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4084294, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
144665
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4193378, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
144666
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4302426, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
144667
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4410126, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
144668
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4498234, length: 4947, sha256: "304cce8116234dea09801f4db916f899dd1d634efeacd208723e9c2d5bcd7ed5" },
144669
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4503181, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
144948
+ { key: "assets/index-BETCY0X4.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1231276, sha256: "a3cb16dd0afee9fc92ca62f337f4f846c707071ee3ac638046e289a3c64de8f7" },
144949
+ { key: "assets/pdf-B9jNxKSL.js", contentType: "application/javascript; charset=utf-8", offset: 1231284, length: 488199, sha256: "d35f61f14258ab246ed387df8d9347f83336a83d2b3758170ff01498ce5fe70b" },
144950
+ { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1719483, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
144951
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1719556, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
144952
+ { key: "assets/pdfDocument-BaLKkKBY.js", contentType: "application/javascript; charset=utf-8", offset: 3036590, length: 2858, sha256: "a46738a375260daed6643afd74d9d69d0c3d7c6a824561009bd43e7967d5cd8f" },
144953
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3039448, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
144954
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3044058, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
144955
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3532642, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
144956
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3623566, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
144957
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3714550, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
144958
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3805530, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
144959
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3896402, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
144960
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3987382, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
144961
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4096018, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
144962
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4205102, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
144963
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4314150, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
144964
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4421850, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
144965
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4509958, length: 4947, sha256: "435406e4f87783748706110ad6cd45c3e1b56649f237478f2b287f90fa810878" },
144966
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4514905, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
144670
144967
  ];
144671
144968
  }
144672
144969
  });
Binary file
@@ -787,6 +787,15 @@
787
787
  "valuesPath"
788
788
  ],
789
789
  "dispatches": [
790
+ {
791
+ "callback": "onAdd",
792
+ "key": "value",
793
+ "encoding": "string",
794
+ "platforms": [
795
+ "web"
796
+ ],
797
+ "note": "On web, Enter dispatches the trimmed new chip value. Native onAdd remains listed as not implemented in the component reference."
798
+ },
790
799
  {
791
800
  "callback": "onRemove",
792
801
  "key": "value",
@@ -797,8 +806,9 @@
797
806
  "arms": [
798
807
  "web"
799
808
  ],
800
- "kind": "no-payload",
801
- "actual": "dispatches the bare action — the renderer's own code — with no injected value."
809
+ "kind": "additive",
810
+ "actual": "Removal carries args.value and the zero-based args.index.",
811
+ "reason": "The schema allows removed value/index; web provides the index to distinguish duplicate chip labels. Other arms currently send only value."
802
812
  }
803
813
  ]
804
814
  }
@@ -809,8 +819,7 @@
809
819
  ],
810
820
  "platforms": [
811
821
  "ios",
812
- "android",
813
- "web"
822
+ "android"
814
823
  ],
815
824
  "severity": "category",
816
825
  "note": "`onAdd` never dispatches."
@@ -882,7 +891,6 @@
882
891
  "divergences": [
883
892
  {
884
893
  "arms": [
885
- "web",
886
894
  "rn"
887
895
  ],
888
896
  "kind": "params-only",
@@ -894,7 +902,8 @@
894
902
  "ios"
895
903
  ],
896
904
  "kind": "encoding",
897
- "actual": "sends `value` as .double where the contract says int."
905
+ "actual": "sends `value` as .double where the contract says int.",
906
+ "reason": "Narrowed to iOS: Android and web send integer args. Listing conforming arms prevents the exemption from shrinking."
898
907
  },
899
908
  {
900
909
  "arms": [
@@ -1060,14 +1069,6 @@
1060
1069
  "kind": "params-wrong-key",
1061
1070
  "actual": "writes `params.value = String(id)` but `args.selectedId = id` — a different key in each map.",
1062
1071
  "reason": "Conforms on `args` (rule 1) but the params mirror uses the wrong key, so a params-reading consumer sees a key no other arm sends."
1063
- },
1064
- {
1065
- "arms": [
1066
- "web"
1067
- ],
1068
- "kind": "no-payload",
1069
- "actual": "renders a static window of options and never dispatches — the case has no onAction.",
1070
- "reason": "Unimplemented on web rather than divergent. Surfaced by the missing-site assertion; the other four it reported were blind spots in the scan, now fixed."
1071
1072
  }
1072
1073
  ]
1073
1074
  }
@@ -1090,7 +1091,6 @@
1090
1091
  "divergences": [
1091
1092
  {
1092
1093
  "arms": [
1093
- "web",
1094
1094
  "rn"
1095
1095
  ],
1096
1096
  "kind": "params-only",
@@ -133,7 +133,7 @@ These props are accepted by the schema and pass validation, but the named platfo
133
133
  | `Menu` | `style`, `itemsPath` | android, web | category | `style` is ignored — `context`/`action_sheet` render as a dropdown. `itemsPath` does not bind items. |
134
134
  | `Tooltip` | `edge`, `trigger`, `onDismiss` | ios, android, web | category | Not an overlay — renders always-expanded inline; `edge`, `trigger` and dismissal are inert. |
135
135
  | `Popover` | `edge` | ios | category | The bubble is drawn in flow under its anchor; `edge` placement is not implemented. |
136
- | `ChipsInput` | `onAdd` | ios, android, web | category | `onAdd` never dispatches. |
136
+ | `ChipsInput` | `onAdd` | ios, android | category | `onAdd` never dispatches. |
137
137
  | `OtpInput` | `onComplete`, `onChange` | ios, android, web | category | Neither `onChange` nor `onComplete` dispatches. |
138
138
  | `Video` | `poster` | ios | styling | `poster` is not shown. |
139
139
  | `PdfView` | `showPageControls`, `startPage` | android | styling | No page controls. `startPage` is ignored. |
@@ -1398,17 +1398,20 @@ export interface ChipsInputProps {
1398
1398
  }
1399
1399
  ```
1400
1400
 
1401
- > ⚠️ **Not implemented on ios, android, web:** `onAdd` — `onAdd` never dispatches.
1401
+ > ⚠️ **Not implemented on ios, android:** `onAdd` — `onAdd` never dispatches.
1402
1402
 
1403
1403
  **Dispatches** — see [What a control sends](#what-a-control-sends-action-payloads):
1404
1404
 
1405
1405
  | callback | key | type |
1406
1406
  |---|---|---|
1407
+ | `onAdd` | `value` | string |
1407
1408
  | `onRemove` | `value` | string |
1408
1409
 
1410
+ > `onAdd` — On web, Enter dispatches the trimmed new chip value. Native onAdd remains listed as not implemented in the component reference.
1411
+
1409
1412
  > `onRemove` — The removed chip's value.
1410
1413
 
1411
- > ⚠️ **`onRemove` on web — DIVERGES:** dispatches the bare action — the renderer's own code — with no injected value.
1414
+ > ⚠️ **`onRemove` on web — ALSO sends:** Removal carries args.value and the zero-based args.index. The schema allows removed value/index; web provides the index to distinguish duplicate chip labels. Other arms currently send only value.
1412
1415
 
1413
1416
  ### Structure & disclosure
1414
1417
 
@@ -1521,9 +1524,9 @@ export interface RatingProps {
1521
1524
 
1522
1525
  > `onChange` — 1-based star index.
1523
1526
 
1524
- > ⚠️ **`onChange` on web + rn — DIVERGES:** writes the value into `params` ONLY, never `args`. Survives only because the Tier-5 hosts merge params into args. Any consumer reading `args` — which rule 1 says is the payload map — gets nothing.
1527
+ > ⚠️ **`onChange` on rn — DIVERGES:** writes the value into `params` ONLY, never `args`. Survives only because the Tier-5 hosts merge params into args. Any consumer reading `args` — which rule 1 says is the payload map — gets nothing.
1525
1528
 
1526
- > ⚠️ **`onChange` on ios — DIVERGES:** sends `value` as .double where the contract says int.
1529
+ > ⚠️ **`onChange` on ios — DIVERGES:** sends `value` as .double where the contract says int. Narrowed to iOS: Android and web send integer args. Listing conforming arms prevents the exemption from shrinking.
1527
1530
 
1528
1531
  > ⚠️ **`onChange` on web + rn — DIVERGES:** stringifies the 1-based index into `params` (`String(i + 1)`) for a control the contract declares `int`. Rule 2 permits a params mirror only for string-encoded values, and Rating is int. The earlier expression heuristic missed it because `String(i + 1)` does not look like a literal — it surfaced only once rule 2 keyed off the declared encoding.
1529
1532
 
@@ -1793,8 +1796,6 @@ export interface WheelPickerProps {
1793
1796
 
1794
1797
  > ⚠️ **`onChange` on rn — DIVERGES:** writes `params.value = String(id)` but `args.selectedId = id` — a different key in each map. Conforms on `args` (rule 1) but the params mirror uses the wrong key, so a params-reading consumer sees a key no other arm sends.
1795
1798
 
1796
- > ⚠️ **`onChange` on web — DIVERGES:** renders a static window of options and never dispatches — the case has no onAction. Unimplemented on web rather than divergent. Surfaced by the missing-site assertion; the other four it reported were blind spots in the scan, now fixed.
1797
-
1798
1799
  #### ColorPicker
1799
1800
 
1800
1801
  ```ts
@@ -1815,7 +1816,7 @@ export interface ColorPickerProps {
1815
1816
 
1816
1817
  > `onChange` — Hex, including the leading '#'.
1817
1818
 
1818
- > ⚠️ **`onChange` on web + rn — DIVERGES:** writes the value into `params` ONLY, never `args`. Survives only because the Tier-5 hosts merge params into args. Any consumer reading `args` — which rule 1 says is the payload map — gets nothing.
1819
+ > ⚠️ **`onChange` on rn — DIVERGES:** writes the value into `params` ONLY, never `args`. Survives only because the Tier-5 hosts merge params into args. Any consumer reading `args` — which rule 1 says is the payload map — gets nothing.
1819
1820
 
1820
1821
  #### OtpInput
1821
1822
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1267.0",
3
+ "version": "0.1269.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -67,5 +67,5 @@
67
67
  "artifactId": "himalaya-cli"
68
68
  }
69
69
  },
70
- "falconPackageHash": "7272323ac031fcdf8b4e99371f184dddc3dc299bb72c5d61c568d704"
70
+ "falconPackageHash": "3da0d64844994775559f6e49c46c7ad1033dbedda682740c09b7224f"
71
71
  }