@wix/himalaya-cli 0.1268.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 +421 -123
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +15 -15
- package/guides/component-reference.md +9 -8
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -31582,6 +31582,22 @@ var init_env = __esm({
|
|
|
31582
31582
|
}
|
|
31583
31583
|
});
|
|
31584
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
|
+
|
|
31585
31601
|
// ../../core/web-renderer/src/modifiers.ts
|
|
31586
31602
|
function padStyle(p2, scale = 1) {
|
|
31587
31603
|
if (p2 == null) return {};
|
|
@@ -33644,8 +33660,17 @@ var init_mediaFieldUpload = __esm({
|
|
|
33644
33660
|
});
|
|
33645
33661
|
|
|
33646
33662
|
// ../../core/web-renderer/src/pdfSource.ts
|
|
33647
|
-
function pdfEmbedPlan(url, pageOrigin = currentOrigin()) {
|
|
33648
|
-
|
|
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);
|
|
33649
33674
|
if (!target) return null;
|
|
33650
33675
|
if (target.protocol === "http:" || target.protocol === "https:") {
|
|
33651
33676
|
if (pageOrigin === null) {
|
|
@@ -35341,7 +35366,107 @@ var init_richContent = __esm({
|
|
|
35341
35366
|
}
|
|
35342
35367
|
});
|
|
35343
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
|
+
|
|
35344
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
|
+
});
|
|
35345
35470
|
function __webpack_require__(moduleId) {
|
|
35346
35471
|
const cachedModule = __webpack_module_cache__[moduleId];
|
|
35347
35472
|
if (cachedModule !== void 0) {
|
|
@@ -67516,6 +67641,10 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
67516
67641
|
});
|
|
67517
67642
|
|
|
67518
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
|
+
});
|
|
67519
67648
|
function __webpack_require__2(n2) {
|
|
67520
67649
|
const a2 = t[n2];
|
|
67521
67650
|
if (void 0 !== a2) return a2.exports;
|
|
@@ -115838,71 +115967,68 @@ var init_pdf_worker_min = __esm({
|
|
|
115838
115967
|
}
|
|
115839
115968
|
});
|
|
115840
115969
|
|
|
115841
|
-
// ../../core/web-renderer/src/pdfPainter.ts
|
|
115842
|
-
async function paintPdfDocument(document2, container, width = container.clientWidth || 600, startPage = 1, zoomPercent = 100, isCurrent = () => true) {
|
|
115843
|
-
if (!isCurrent()) return document2.numPages;
|
|
115844
|
-
container.replaceChildren();
|
|
115845
|
-
const pixelRatio = Math.max(1, Math.min(2, container.ownerDocument.defaultView?.devicePixelRatio || 1));
|
|
115846
|
-
const zoom = Math.max(1, zoomPercent) / 100;
|
|
115847
|
-
for (let pageNumber = 1; pageNumber <= document2.numPages; pageNumber++) {
|
|
115848
|
-
const page = await document2.getPage(pageNumber);
|
|
115849
|
-
if (!isCurrent()) return document2.numPages;
|
|
115850
|
-
const natural = page.getViewport({ scale: 1 });
|
|
115851
|
-
const viewport = page.getViewport({ scale: width / natural.width * zoom * pixelRatio });
|
|
115852
|
-
const canvas = container.ownerDocument.createElement("canvas");
|
|
115853
|
-
canvas.width = Math.ceil(viewport.width);
|
|
115854
|
-
canvas.height = Math.ceil(viewport.height);
|
|
115855
|
-
canvas.setAttribute("aria-label", `Page ${pageNumber} of ${document2.numPages}`);
|
|
115856
|
-
canvas.setAttribute("role", "img");
|
|
115857
|
-
canvas.dataset.pdfPage = String(pageNumber);
|
|
115858
|
-
canvas.style.cssText = `display:block;width:${width * zoom}px;height:auto;background:#fff`;
|
|
115859
|
-
const context = canvas.getContext("2d");
|
|
115860
|
-
if (!context) throw new Error("Canvas 2D is unavailable");
|
|
115861
|
-
container.append(canvas);
|
|
115862
|
-
await page.render({ canvas, canvasContext: context, viewport }).promise;
|
|
115863
|
-
if (!isCurrent()) return document2.numPages;
|
|
115864
|
-
}
|
|
115865
|
-
const requestedPage = Math.min(document2.numPages, Math.max(1, Math.floor(startPage) || 1));
|
|
115866
|
-
if (requestedPage > 1 && isCurrent()) {
|
|
115867
|
-
container.querySelector(`[data-pdf-page="${requestedPage}"]`)?.scrollIntoView?.({ block: "start" });
|
|
115868
|
-
}
|
|
115869
|
-
return document2.numPages;
|
|
115870
|
-
}
|
|
115871
|
-
var init_pdfPainter = __esm({
|
|
115872
|
-
"../../core/web-renderer/src/pdfPainter.ts"() {
|
|
115873
|
-
}
|
|
115874
|
-
});
|
|
115875
|
-
|
|
115876
115970
|
// ../../core/web-renderer/src/pdfDocument.tsx
|
|
115877
115971
|
var pdfDocument_exports = {};
|
|
115878
115972
|
__export(pdfDocument_exports, {
|
|
115879
|
-
PdfDocument: () => PdfDocument
|
|
115973
|
+
PdfDocument: () => PdfDocument,
|
|
115974
|
+
destroyPdfDocumentLoad: () => destroyPdfDocumentLoad
|
|
115880
115975
|
});
|
|
115881
115976
|
import React7 from "react";
|
|
115882
115977
|
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
115883
|
-
function
|
|
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 }) {
|
|
115884
115995
|
const [pages, setPages] = React7.useState(0);
|
|
115885
|
-
const [
|
|
115996
|
+
const [failedRequest, setFailedRequest] = React7.useState(null);
|
|
115997
|
+
const request = JSON.stringify([src, startPage, zoomPercent]);
|
|
115998
|
+
const failed2 = failedRequest === request;
|
|
115886
115999
|
const containerRef = React7.useRef(null);
|
|
115887
116000
|
React7.useEffect(() => {
|
|
115888
116001
|
let live3 = true;
|
|
115889
|
-
|
|
116002
|
+
let loading;
|
|
116003
|
+
const container = containerRef.current;
|
|
116004
|
+
setFailedRequest(null);
|
|
115890
116005
|
setPages(0);
|
|
115891
|
-
|
|
115892
|
-
void loading.promise.then(async (document2) => {
|
|
115893
|
-
const container = containerRef.current;
|
|
116006
|
+
void (async () => {
|
|
115894
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;
|
|
115895
116021
|
const count2 = await paintPdfDocument(document2, container, container.clientWidth || 600, startPage, zoomPercent, () => live3);
|
|
115896
116022
|
if (live3) setPages(count2);
|
|
115897
|
-
}).catch(() => {
|
|
115898
|
-
if (live3)
|
|
116023
|
+
})().catch(() => {
|
|
116024
|
+
if (live3) setFailedRequest(request);
|
|
115899
116025
|
});
|
|
115900
116026
|
return () => {
|
|
115901
116027
|
live3 = false;
|
|
115902
|
-
loading
|
|
115903
|
-
|
|
116028
|
+
if (loading) void destroyPdfDocumentLoad(loading);
|
|
116029
|
+
container?.replaceChildren();
|
|
115904
116030
|
};
|
|
115905
|
-
}, [src, startPage, zoomPercent]);
|
|
116031
|
+
}, [src, startPage, zoomPercent, loadDocument, request]);
|
|
115906
116032
|
const frame = {
|
|
115907
116033
|
width: "100%",
|
|
115908
116034
|
height: height ?? 320,
|
|
@@ -115914,7 +116040,7 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
|
|
|
115914
116040
|
overflow: "auto"
|
|
115915
116041
|
};
|
|
115916
116042
|
if (failed2) {
|
|
115917
|
-
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 });
|
|
115918
116044
|
}
|
|
115919
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: [
|
|
115920
116046
|
/* @__PURE__ */ jsx8("div", { ref: containerRef, "data-himalaya-pdf-pages": "true" }),
|
|
@@ -115927,10 +116053,8 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
|
|
|
115927
116053
|
var init_pdfDocument = __esm({
|
|
115928
116054
|
"../../core/web-renderer/src/pdfDocument.tsx"() {
|
|
115929
116055
|
"use strict";
|
|
115930
|
-
|
|
115931
|
-
init_pdf_worker_min();
|
|
116056
|
+
init_browserAssetUrl();
|
|
115932
116057
|
init_pdfPainter();
|
|
115933
|
-
GlobalWorkerOptions.workerSrc = void 0 ?? "";
|
|
115934
116058
|
}
|
|
115935
116059
|
});
|
|
115936
116060
|
|
|
@@ -116482,7 +116606,11 @@ function ensureRiveRuntime() {
|
|
|
116482
116606
|
if (riveRuntimeInjected || typeof document === "undefined") return;
|
|
116483
116607
|
riveRuntimeInjected = true;
|
|
116484
116608
|
let libP = null;
|
|
116485
|
-
const lib = () => libP ??= import("@rive-app/canvas").then((m2
|
|
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);
|
|
116486
116614
|
const mount = async (host) => {
|
|
116487
116615
|
const el2 = host;
|
|
116488
116616
|
if (el2.dataset.himalayaRiveDone === "1") return;
|
|
@@ -116497,7 +116625,20 @@ function ensureRiveRuntime() {
|
|
|
116497
116625
|
const artboard = el2.getAttribute("data-himalaya-rive-artboard") || void 0;
|
|
116498
116626
|
const sm = el2.getAttribute("data-himalaya-rive-sm") || void 0;
|
|
116499
116627
|
try {
|
|
116500
|
-
new Rive({
|
|
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
|
+
});
|
|
116501
116642
|
} catch {
|
|
116502
116643
|
}
|
|
116503
116644
|
};
|
|
@@ -118304,13 +118445,13 @@ function renderInner(node, ctx) {
|
|
|
118304
118445
|
const badgeLabel = m2?.accessibilityLabel ?? m2?.accessibility_label;
|
|
118305
118446
|
const badgeRole = roleDeclared ? void 0 : liveCount ? "status" : typeof badgeLabel === "string" && badgeLabel.trim() !== "" ? "img" : void 0;
|
|
118306
118447
|
const fg = _bt ? c2 : sevTextColor(ctx, props.style ?? "info");
|
|
118307
|
-
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" });
|
|
118308
118449
|
}
|
|
118309
118450
|
case "Tag": {
|
|
118310
118451
|
const tagToken = boundTokenName(props.tokenPath, props.token, ctx);
|
|
118311
118452
|
const c2 = C2(tagToken ?? "accentPrimary", "#116DFF");
|
|
118312
118453
|
const tagFg = tagToken ? c2 : accentTextColor(ctx);
|
|
118313
|
-
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" });
|
|
118314
118455
|
}
|
|
118315
118456
|
case "ProgressBar":
|
|
118316
118457
|
return /* @__PURE__ */ jsx9(ProgressBarNode, { props, ctx, wrap });
|
|
@@ -118480,7 +118621,7 @@ function renderInner(node, ctx) {
|
|
|
118480
118621
|
const isz = props.size === "small" ? 18 : props.size === "large" ? 28 : 24;
|
|
118481
118622
|
const extended = props.label != null && props.label !== "";
|
|
118482
118623
|
const actionable = Boolean(props.action);
|
|
118483
|
-
const style = { display: "inline-flex", alignItems: "center", justifyContent: "center", gap: extended ? 10 : 0, height: dim, width: extended ?
|
|
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 };
|
|
118484
118625
|
const content = /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
118485
118626
|
props.icon && /* @__PURE__ */ jsx9("span", { style: { display: "inline-grid", placeItems: "center", width: isz, height: isz }, children: iconSvg(props.icon, { size: isz, color: fg }) }),
|
|
118486
118627
|
extended && /* @__PURE__ */ jsx9("span", { style: { fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(15) }, children: txt(props.label, ctx) })
|
|
@@ -118612,12 +118753,7 @@ function renderInner(node, ctx) {
|
|
|
118612
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) }) }) }) });
|
|
118613
118754
|
}
|
|
118614
118755
|
if (type === "Carousel") return /* @__PURE__ */ jsx9(CarouselNode, { props, ctx, wrap });
|
|
118615
|
-
|
|
118616
|
-
const cur = props.currentIndex ?? 0;
|
|
118617
|
-
return /* @__PURE__ */ jsxs6("div", { style: { width: "100%", ...wrap }, children: [
|
|
118618
|
-
/* @__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)) }),
|
|
118619
|
-
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)) })
|
|
118620
|
-
] });
|
|
118756
|
+
return /* @__PURE__ */ jsx9(PagingNode, { props: { ...props, __pager: true }, ctx, wrap });
|
|
118621
118757
|
}
|
|
118622
118758
|
case "StepIndicator": {
|
|
118623
118759
|
const steps = Array.isArray(props.steps) ? props.steps : [];
|
|
@@ -118671,10 +118807,11 @@ function renderInner(node, ctx) {
|
|
|
118671
118807
|
}
|
|
118672
118808
|
}
|
|
118673
118809
|
}
|
|
118674
|
-
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;
|
|
118675
118811
|
var init_renderNode = __esm({
|
|
118676
118812
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
118677
118813
|
"use strict";
|
|
118814
|
+
init_browserAssetUrl();
|
|
118678
118815
|
init_tokens2();
|
|
118679
118816
|
init_idiom_controls();
|
|
118680
118817
|
init_modifiers();
|
|
@@ -119214,6 +119351,7 @@ var init_renderNode = __esm({
|
|
|
119214
119351
|
const focused = React8.useRef(false);
|
|
119215
119352
|
const [touched, setTouched] = React8.useState(false);
|
|
119216
119353
|
const [isFocused, setIsFocused] = React8.useState(false);
|
|
119354
|
+
const pendingEdits = React8.useRef([]);
|
|
119217
119355
|
const previousBoundText = React8.useRef(boundText);
|
|
119218
119356
|
const previousBoundRawText = React8.useRef(boundRawText);
|
|
119219
119357
|
React8.useEffect(() => {
|
|
@@ -119222,6 +119360,12 @@ var init_renderNode = __esm({
|
|
|
119222
119360
|
const boundRawTextChanged = previousBoundRawText.current !== boundRawText;
|
|
119223
119361
|
previousBoundText.current = boundText;
|
|
119224
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
|
+
}
|
|
119225
119369
|
if (boundText === "") {
|
|
119226
119370
|
if (boundTextChanged || serializeRichText && boundRawTextChanged) {
|
|
119227
119371
|
if (local !== "") setLocal("");
|
|
@@ -119260,6 +119404,7 @@ var init_renderNode = __esm({
|
|
|
119260
119404
|
React8.useEffect(() => {
|
|
119261
119405
|
if (previousBinding.current === binding2) return;
|
|
119262
119406
|
previousBinding.current = binding2;
|
|
119407
|
+
pendingEdits.current = [];
|
|
119263
119408
|
if (!serializeRichText) return;
|
|
119264
119409
|
if (fieldId) formBag?.clearValue(fieldId);
|
|
119265
119410
|
const nextPristineValue = isBound ? boundRawText : typeof valueBinding === "string" ? valueBinding : void 0;
|
|
@@ -119302,6 +119447,7 @@ var init_renderNode = __esm({
|
|
|
119302
119447
|
const errorId = revealed ? `${componentId ?? generatedId}__error` : void 0;
|
|
119303
119448
|
const emit = (v2) => {
|
|
119304
119449
|
if (onChangeAction && ctx.onAction) {
|
|
119450
|
+
if (isBound) pendingEdits.current.push({ value: v2, at: Date.now() });
|
|
119305
119451
|
ctx.onAction({
|
|
119306
119452
|
...onChangeAction,
|
|
119307
119453
|
params: { ...onChangeAction.params ?? {}, value: v2 },
|
|
@@ -120084,7 +120230,7 @@ var init_renderNode = __esm({
|
|
|
120084
120230
|
const boundUrl = useResolvedScalar(props.url != null && isBinding(props.url) ? props.url : void 0, ctx);
|
|
120085
120231
|
const url = props.url != null && isBinding(props.url) ? boundUrl : props.url;
|
|
120086
120232
|
const rawUrl = typeof url === "string" && !isBinding(url) ? url : "";
|
|
120087
|
-
const plan = rawUrl ? pdfEmbedPlan(rawUrl) : null;
|
|
120233
|
+
const plan = rawUrl ? pdfEmbedPlan(rawUrl, void 0, typeof document !== "undefined" ? document.baseURI : void 0) : null;
|
|
120088
120234
|
const retypeSrc = plan?.mode === "retype" ? plan.src : null;
|
|
120089
120235
|
const [retyped, setRetyped] = React8.useState(null);
|
|
120090
120236
|
React8.useEffect(() => {
|
|
@@ -121024,11 +121170,11 @@ var init_renderNode = __esm({
|
|
|
121024
121170
|
const C2 = ctx.color;
|
|
121025
121171
|
const bound = useResolvedScalar(props.valuePath, ctx);
|
|
121026
121172
|
const val = props.valuePath != null ? typeof bound === "string" ? bound : typeof bound === "number" ? String(bound) : "" : typeof props.value === "string" ? props.value : "";
|
|
121027
|
-
const len = props.length ?? 6;
|
|
121028
|
-
return /* @__PURE__ */ jsx9("div", { style: { display: "
|
|
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) => {
|
|
121029
121175
|
const ch2 = val[i2];
|
|
121030
121176
|
const active = i2 === val.length;
|
|
121031
|
-
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);
|
|
121032
121178
|
}) });
|
|
121033
121179
|
});
|
|
121034
121180
|
ProgressBarNode = withExtras("ProgressBarNode", ({ props, ctx, wrap }) => {
|
|
@@ -121251,6 +121397,7 @@ var init_renderNode = __esm({
|
|
|
121251
121397
|
});
|
|
121252
121398
|
ChipsInputNode = withExtras("ChipsInputNode", ({ props, ctx, wrap }) => {
|
|
121253
121399
|
const placeholderText = useBoundString(props.placeholder, ctx);
|
|
121400
|
+
const [draft, setDraft] = React8.useState("");
|
|
121254
121401
|
const C2 = ctx.color;
|
|
121255
121402
|
const bound = useResolvedScalar(props.valuesPath, ctx);
|
|
121256
121403
|
const raw = props.valuesPath != null ? bound : props.values;
|
|
@@ -121258,9 +121405,21 @@ var init_renderNode = __esm({
|
|
|
121258
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: [
|
|
121259
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: [
|
|
121260
121407
|
asText2(v2),
|
|
121261
|
-
/* @__PURE__ */ jsx9("
|
|
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" })
|
|
121262
121413
|
] }, i2)),
|
|
121263
|
-
/* @__PURE__ */ jsx9("
|
|
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" })
|
|
121264
121423
|
] });
|
|
121265
121424
|
});
|
|
121266
121425
|
ChipNode = withExtras("ChipNode", ({ props, ctx, wrap }) => {
|
|
@@ -121271,14 +121430,31 @@ var init_renderNode = __esm({
|
|
|
121271
121430
|
const accent = C2(boundTokenName(props.tokenPath, props.token, ctx) ?? "accentPrimary", "#116DFF");
|
|
121272
121431
|
const onClick = ctx.onAction && props.onTap && !props.disabled ? () => ctx.onAction(resolveItemDeep2(props.onTap, ctx)) : void 0;
|
|
121273
121432
|
const fg = selected ? C2("textOnAccent", "#fff") : C2("textPrimary", "#13171e");
|
|
121274
|
-
|
|
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: [
|
|
121275
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" } }),
|
|
121276
121437
|
props.leadingIcon && /* @__PURE__ */ jsx9("span", { style: { display: "inline-grid", placeItems: "center", width: 16, height: 16 }, children: iconSvg(props.leadingIcon, { size: 15, color: fg }) }),
|
|
121277
|
-
/* @__PURE__ */ jsx9("span", { children: txt(props.label, ctx) })
|
|
121278
|
-
|
|
121279
|
-
|
|
121280
|
-
|
|
121281
|
-
|
|
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
|
+
] })
|
|
121282
121458
|
] });
|
|
121283
121459
|
});
|
|
121284
121460
|
TableNode = withExtras("TableNode", ({ props, ctx, wrap }) => {
|
|
@@ -121354,11 +121530,11 @@ var init_renderNode = __esm({
|
|
|
121354
121530
|
const invalidIcon = props.icon != null && typeof props.icon !== "string";
|
|
121355
121531
|
const base = invalidIcon ? ICON_FALLBACK : (typeof props.icon === "string" && props.icon ? props.icon : "star").replace(/_fill$/, "");
|
|
121356
121532
|
const filledCount = Math.round(val);
|
|
121357
|
-
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;
|
|
121358
121534
|
const cv = Number.isFinite(val) ? Math.max(0, Math.min(max, val)) : 0, summary2 = `${Number.isInteger(cv) ? cv : cv.toFixed(1)} of ${max}`;
|
|
121359
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) => {
|
|
121360
121536
|
const filled = i2 < filledCount;
|
|
121361
|
-
return /* @__PURE__ */ jsx9("
|
|
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);
|
|
121362
121538
|
}) });
|
|
121363
121539
|
});
|
|
121364
121540
|
AvatarStripNode = withExtras("AvatarStripNode", ({ props, ctx, wrap }) => {
|
|
@@ -121878,6 +122054,61 @@ var init_renderNode = __esm({
|
|
|
121878
122054
|
] }, i2);
|
|
121879
122055
|
}) });
|
|
121880
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
|
+
});
|
|
121881
122112
|
WheelPickerNode = withExtras("WheelPickerNode", ({ props, ctx, wrap }) => {
|
|
121882
122113
|
const C2 = ctx.color;
|
|
121883
122114
|
const boundOpts = useResolvedScalar(props.optionsPath, ctx);
|
|
@@ -121886,11 +122117,56 @@ var init_renderNode = __esm({
|
|
|
121886
122117
|
const opts = Array.isArray(rawOpts) ? rawOpts : [];
|
|
121887
122118
|
const selectedId = isBinding(props.selectedId) ? boundSel : props.selectedId;
|
|
121888
122119
|
const selIdx = Math.max(0, opts.findIndex((o2) => o2?.id === selectedId));
|
|
121889
|
-
const
|
|
121890
|
-
const
|
|
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), []);
|
|
121891
122133
|
return /* @__PURE__ */ jsxs6("div", { style: { position: "relative", width: "100%", maxWidth: 220, height: 160, overflow: "hidden", background: C2("surfaceSecondary", "#f5f7fa"), borderRadius: 12, ...wrap }, children: [
|
|
121892
|
-
/* @__PURE__ */ jsx9("div", { style: { position: "absolute", top:
|
|
121893
|
-
/* @__PURE__ */ jsx9(
|
|
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
|
+
)
|
|
121894
122170
|
] });
|
|
121895
122171
|
});
|
|
121896
122172
|
ColorPickerNode = withExtras("ColorPickerNode", ({ props, ctx, wrap }) => {
|
|
@@ -121899,14 +122175,14 @@ var init_renderNode = __esm({
|
|
|
121899
122175
|
const raw = props.valuePath != null ? bound : props.value;
|
|
121900
122176
|
const cur = typeof raw === "string" ? raw : "#116DFF";
|
|
121901
122177
|
const swatches = Array.isArray(props.swatches) ? props.swatches : ["#116DFF", "#23924D", "#E89F00", "#E62214", "#8B5CF6", "#111827"];
|
|
121902
|
-
const onPick = (hex2) => ctx.onAction && props.onChange ? () => ctx.onAction({ ...props.onChange,
|
|
122178
|
+
const onPick = (hex2) => ctx.onAction && props.onChange ? () => ctx.onAction({ ...props.onChange, args: { ...props.onChange?.args ?? {}, value: hex2 } }) : void 0;
|
|
121903
122179
|
return /* @__PURE__ */ jsxs6("div", { style: { display: "flex", flexDirection: "column", gap: 8, ...wrap }, children: [
|
|
121904
122180
|
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
|
|
121905
122181
|
/* @__PURE__ */ jsx9("span", { style: { width: 28, height: 28, borderRadius: 8, background: C2(cur, cur), border: `1px solid ${C2("border", "#e3e3e3")}`, flex: "none" } }),
|
|
121906
122182
|
props.label != null && /* @__PURE__ */ jsx9("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(15), color: C2("textPrimary", "#13171e") }, children: txt(props.label, ctx) }),
|
|
121907
122183
|
/* @__PURE__ */ jsx9("span", { style: { marginLeft: "auto", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(13), color: C2("textSecondary", "#636b78") }, children: asText2(cur) })
|
|
121908
122184
|
] }),
|
|
121909
|
-
/* @__PURE__ */ jsx9("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: swatches.map((s2, i2) => /* @__PURE__ */ jsx9("
|
|
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)) })
|
|
121910
122186
|
] });
|
|
121911
122187
|
});
|
|
121912
122188
|
FilterChipsNode = withExtras("FilterChipsNode", ({ props, ctx, wrap }) => {
|
|
@@ -121973,6 +122249,7 @@ var init_renderNode = __esm({
|
|
|
121973
122249
|
const boundCameraRaw = useResolvedScalar(props.cameraPath, ctx);
|
|
121974
122250
|
const commandedCamera = React8.useMemo(() => decodeCamera(boundCameraRaw), [boundCameraRaw]);
|
|
121975
122251
|
const [box, setBox] = React8.useState({ w: 400, h: h2 });
|
|
122252
|
+
const [tileStatus, setTileStatus] = React8.useState({});
|
|
121976
122253
|
const [userCam, setUserCam] = React8.useState(null);
|
|
121977
122254
|
const dragRef = React8.useRef(null);
|
|
121978
122255
|
const dragMovedRef = React8.useRef(false);
|
|
@@ -122116,12 +122393,16 @@ var init_renderNode = __esm({
|
|
|
122116
122393
|
const endDrag = () => {
|
|
122117
122394
|
dragRef.current = null;
|
|
122118
122395
|
};
|
|
122119
|
-
|
|
122120
|
-
if (!interactive) return;
|
|
122121
|
-
|
|
122122
|
-
|
|
122123
|
-
|
|
122124
|
-
|
|
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]);
|
|
122125
122406
|
React8.useEffect(() => {
|
|
122126
122407
|
const action = props.onRegionChange;
|
|
122127
122408
|
const fire = ctx.onAction;
|
|
@@ -122157,6 +122438,7 @@ var init_renderNode = __esm({
|
|
|
122157
122438
|
{
|
|
122158
122439
|
ref: attachBox,
|
|
122159
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",
|
|
122160
122442
|
"data-route-points": route.length,
|
|
122161
122443
|
"data-map-zoom": z4,
|
|
122162
122444
|
onClick: onSurfaceClick,
|
|
@@ -122164,7 +122446,6 @@ var init_renderNode = __esm({
|
|
|
122164
122446
|
onPointerMove,
|
|
122165
122447
|
onPointerUp: endDrag,
|
|
122166
122448
|
onPointerLeave: endDrag,
|
|
122167
|
-
onWheel,
|
|
122168
122449
|
style: {
|
|
122169
122450
|
width: "100%",
|
|
122170
122451
|
boxSizing: "border-box",
|
|
@@ -122179,7 +122460,7 @@ var init_renderNode = __esm({
|
|
|
122179
122460
|
...wrap
|
|
122180
122461
|
},
|
|
122181
122462
|
children: [
|
|
122182
|
-
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)),
|
|
122183
122464
|
/* @__PURE__ */ jsxs6("svg", { viewBox: `0 0 ${W2} ${H2}`, preserveAspectRatio: "none", style: { position: "absolute", inset: 0, width: "100%", height: "100%", pointerEvents: "none" }, children: [
|
|
122184
122465
|
shapes.map((sh, i2) => {
|
|
122185
122466
|
if (sh.kind === "unknown" || sh.points.length < 2) return null;
|
|
@@ -122219,6 +122500,7 @@ var init_renderNode = __esm({
|
|
|
122219
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 })
|
|
122220
122501
|
] }) : null
|
|
122221
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." }),
|
|
122222
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" })
|
|
122223
122505
|
]
|
|
122224
122506
|
}
|
|
@@ -122274,6 +122556,13 @@ var init_renderNode = __esm({
|
|
|
122274
122556
|
if (autoScrollRef.current) clearTimeout(autoScrollRef.current.timer);
|
|
122275
122557
|
autoScrollRef.current = null;
|
|
122276
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]);
|
|
122277
122566
|
React8.useEffect(() => {
|
|
122278
122567
|
const el2 = trackRef.current;
|
|
122279
122568
|
el2?.addEventListener("scrollend", endAutoScroll);
|
|
@@ -122339,8 +122628,15 @@ var init_renderNode = __esm({
|
|
|
122339
122628
|
onBlur: onFocusOut,
|
|
122340
122629
|
style: { width: "100%", ...wrap },
|
|
122341
122630
|
children: [
|
|
122342
|
-
/* @__PURE__ */ jsx9("div", { ref: trackRef,
|
|
122343
|
-
|
|
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)) })
|
|
122344
122640
|
]
|
|
122345
122641
|
}
|
|
122346
122642
|
);
|
|
@@ -122382,7 +122678,7 @@ var init_renderNode = __esm({
|
|
|
122382
122678
|
const resolvedHero = heroSrc ? resolveAssetUrl(heroSrc, ctx.assetBaseUrl) : void 0;
|
|
122383
122679
|
const [failedHero, setFailedHero] = React8.useState(null);
|
|
122384
122680
|
const imageUrl = resolvedHero && resolvedHero !== failedHero ? resolvedHero : void 0;
|
|
122385
|
-
const expanded = Math.
|
|
122681
|
+
const expanded = Math.max(0, typeof props.expandedHeight === "number" && Number.isFinite(props.expandedHeight) ? props.expandedHeight : 280);
|
|
122386
122682
|
const collapsed = Math.max(0, Math.min(expanded, typeof props.collapsedHeight === "number" && props.collapsedHeight > 0 ? props.collapsedHeight : 64));
|
|
122387
122683
|
const parallax = typeof props.parallaxFactor === "number" && Number.isFinite(props.parallaxFactor) ? Math.max(0, Math.min(1, props.parallaxFactor)) : 0.5;
|
|
122388
122684
|
const span = Math.max(1, expanded - collapsed);
|
|
@@ -122395,7 +122691,7 @@ var init_renderNode = __esm({
|
|
|
122395
122691
|
let port = collapsingScrollPort(el2);
|
|
122396
122692
|
const measure2 = () => {
|
|
122397
122693
|
const top = port ? port.getBoundingClientRect().top : 0;
|
|
122398
|
-
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));
|
|
122399
122695
|
setOffset((prev) => prev === next ? prev : next);
|
|
122400
122696
|
};
|
|
122401
122697
|
const onScroll = (e2) => {
|
|
@@ -122415,8 +122711,8 @@ var init_renderNode = __esm({
|
|
|
122415
122711
|
const height = Math.round(expanded - (expanded - collapsed) * progress);
|
|
122416
122712
|
const lost = expanded - height;
|
|
122417
122713
|
const fade = 1 - progress * 0.7;
|
|
122418
|
-
return /* @__PURE__ */ jsxs6("div", { ref: rootRef, ...{ [A11Y_PART]: "root" }, style: { width: "100%", ...wrap }, children: [
|
|
122419
|
-
/* @__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: [
|
|
122420
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)` } : {} } }),
|
|
122421
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 } : {} } }),
|
|
122422
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: [
|
|
@@ -122425,7 +122721,7 @@ var init_renderNode = __esm({
|
|
|
122425
122721
|
] })
|
|
122426
122722
|
] }),
|
|
122427
122723
|
lost > 0 && /* @__PURE__ */ jsx9("div", { "aria-hidden": "true", style: { height: lost } }),
|
|
122428
|
-
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) })
|
|
122429
122725
|
] });
|
|
122430
122726
|
});
|
|
122431
122727
|
UnsupportedOnSurface = ({
|
|
@@ -144253,8 +144549,8 @@ function scriptNonce() {
|
|
|
144253
144549
|
crypto.getRandomValues(raw);
|
|
144254
144550
|
return btoa(String.fromCharCode(...raw));
|
|
144255
144551
|
}
|
|
144256
|
-
function previewCsp(nonce) {
|
|
144257
|
-
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'`;
|
|
144258
144554
|
}
|
|
144259
144555
|
function inlineJson(value) {
|
|
144260
144556
|
return JSON.stringify(value).replace(/</g, "\\u003c");
|
|
@@ -144265,7 +144561,7 @@ function previewCredentialsJs(creds) {
|
|
|
144265
144561
|
function stripHandoverParamJs() {
|
|
144266
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){}})();';
|
|
144267
144563
|
}
|
|
144268
|
-
function indexHtml(asset, pathname, creds, handoverAttempted = false) {
|
|
144564
|
+
function indexHtml(asset, pathname, creds, handoverAttempted = false, allowWasm = false) {
|
|
144269
144565
|
void pathname;
|
|
144270
144566
|
const nonce = scriptNonce();
|
|
144271
144567
|
const raw = new TextDecoder().decode(assetBytes(asset));
|
|
@@ -144290,7 +144586,7 @@ function indexHtml(asset, pathname, creds, handoverAttempted = false) {
|
|
|
144290
144586
|
headers: {
|
|
144291
144587
|
"content-type": asset.contentType || "text/html; charset=utf-8",
|
|
144292
144588
|
"cache-control": creds || handoverAttempted ? "no-store" : "public, max-age=60, stale-while-revalidate=600",
|
|
144293
|
-
"content-security-policy": previewCsp(nonce),
|
|
144589
|
+
"content-security-policy": previewCsp(nonce, allowWasm),
|
|
144294
144590
|
// This document's URL can name a credential: `?pvt=` (still accepted from an embedder such
|
|
144295
144591
|
// as the dashboard frame) or a `?h=` code before the inline script strips it. The browser
|
|
144296
144592
|
// default sends the FULL URL as `Referer` on same-origin requests, so every `/v1/*` read,
|
|
@@ -144306,7 +144602,7 @@ function previewResponse(pathname, assets, mount = "/preview", creds, handoverAt
|
|
|
144306
144602
|
if (key2 === "embed.json") return embedManifest(assets);
|
|
144307
144603
|
const hit = assets.get(key2);
|
|
144308
144604
|
if (hit) {
|
|
144309
|
-
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)));
|
|
144310
144606
|
if (key2 === "t5-frame.html") {
|
|
144311
144607
|
return new Response(assetBytes(hit), {
|
|
144312
144608
|
status: 200,
|
|
@@ -144330,7 +144626,7 @@ function previewResponse(pathname, assets, mount = "/preview", creds, handoverAt
|
|
|
144330
144626
|
});
|
|
144331
144627
|
}
|
|
144332
144628
|
const index = assets.get("index.html");
|
|
144333
|
-
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)));
|
|
144334
144630
|
return new Response(JSON.stringify({ error: "preview_not_built" }), {
|
|
144335
144631
|
status: 503,
|
|
144336
144632
|
headers: { "content-type": "application/json; charset=utf-8" }
|
|
@@ -144649,23 +144945,25 @@ var init_preview_assets_generated = __esm({
|
|
|
144649
144945
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
144650
144946
|
init_preview_assets_format();
|
|
144651
144947
|
PREVIEW_ASSET_MANIFEST = [
|
|
144652
|
-
{ key: "assets/index-
|
|
144653
|
-
{ key: "assets/pdf
|
|
144654
|
-
{ key: "assets/
|
|
144655
|
-
{ key: "
|
|
144656
|
-
{ key: "
|
|
144657
|
-
{ key: "fonts/
|
|
144658
|
-
{ key: "fonts/
|
|
144659
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
144660
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
144661
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
144662
|
-
{ key: "fonts/
|
|
144663
|
-
{ key: "fonts/
|
|
144664
|
-
{ key: "fonts/WixMadeforText-
|
|
144665
|
-
{ key: "fonts/WixMadeforText-
|
|
144666
|
-
{ key: "fonts/WixMadeforText-
|
|
144667
|
-
{ key: "
|
|
144668
|
-
{ key: "
|
|
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" }
|
|
144669
144967
|
];
|
|
144670
144968
|
}
|
|
144671
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": "
|
|
801
|
-
"actual": "
|
|
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
|
|
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
|
|
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 —
|
|
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
|
|
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
|
|
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.
|
|
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": "
|
|
70
|
+
"falconPackageHash": "3da0d64844994775559f6e49c46c7ad1033dbedda682740c09b7224f"
|
|
71
71
|
}
|