@vertexvis/doc-viewer 1.1.1-testing.6 → 1.1.2-alpha.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/cjs/doc-viewer.cjs.js +2 -2
- package/dist/cjs/{index-C-7-MmT-.js → index-BfdIynGw.js} +73 -34
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/vertex-document-viewer.cjs.entry.js +1 -1
- package/dist/collection/__mocks__/pdfjs-mock.js +8 -8
- package/dist/collection/__setup__/polyfills.js +16 -8
- package/dist/collection/__setup__/resize-observer.js +4 -4
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/testing/mock-document-api.js +5 -5
- package/dist/components/index.js +1 -1
- package/dist/components/p-C3QDySKE.js +4 -0
- package/dist/components/vertex-document-viewer.js +1 -1
- package/dist/doc-viewer/doc-viewer.esm.js +1 -1
- package/dist/doc-viewer/p-Dv4hbCka.js +6 -0
- package/dist/doc-viewer/{p-49c08e34.entry.js → p-ca7f166b.entry.js} +1 -1
- package/dist/esm/doc-viewer.js +3 -3
- package/dist/esm/{index-Y59A72pl.js → index-Dv4hbCka.js} +73 -34
- package/dist/esm/loader.js +2 -2
- package/dist/esm/vertex-document-viewer.entry.js +1 -1
- package/dist/types/__mocks__/pdfjs-mock.d.ts +16 -16
- package/dist/types/__setup__/polyfills.d.ts +0 -1
- package/dist/types/__setup__/resize-observer.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +73 -55
- package/dist/types/testing/mock-document-api.d.ts +10 -10
- package/loader/index.d.ts +1 -1
- package/package.json +17 -18
- package/dist/components/p-jUMoJLks.js +0 -4
- package/dist/doc-viewer/p-Y59A72pl.js +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as e,h as i,H as s,a as n}from"./p-
|
|
4
|
+
import{r as t,c as e,h as i,H as s,a as n}from"./p-Dv4hbCka.js";function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function o(t,e,i){return(i=Math.max(0,Math.min(1,i)))*(e-t)+t}function h(t=0,e=0){return{x:t,y:e}}function a(t,e){return{x:t.x-e.x,y:t.y-e.y}}function c(t,e){return{x:t.x*e,y:t.y*e}}function l(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function u(t){const e=l(t);return 0===e?h(0,0):c(t,1/e)}function d(t,e){return u(a(e,t))}var f=Object.freeze({__proto__:null,add:function(t,e){return{x:t.x+e.x,y:t.y+e.y}},create:h,distance:function(t,e){const i=a(t,e);return Math.sqrt(i.x*i.x+i.y*i.y)},fromJson:function(t){const e=JSON.parse(t);if(Array.isArray(e)){const[t,i]=e;return h(t,i)}{const{x:t,y:i}=e;return h(t,i)}},isEqual:function(t,e){return t.x===e.x&&t.y===e.y},lerp:function(t,e,i){return{x:o(t.x,e.x,i),y:o(t.y,e.y,i)}},magnitude:l,negate:function(t){return h(-t.x,-t.y)},normalDirectionVector:d,normalizeVector:u,orthogonalVector:function(t,e){const i=d(t,e);return 0===i.x||0===i.y?h(-1*i.y,i.x):Math.abs(i.x)>Math.abs(i.y)?u(h(1-Math.pow(i.x,2),-1*i.x*i.y)):u(h(-1*i.x*i.y,1-Math.pow(i.y,2)))},polar:function(t,e){return h(Math.cos(e)*t,Math.sin(e)*t)},scale:function(t,e,i){return{x:t.x*e,y:t.y*i}},scaleProportional:c,subtract:a});function p(t,e){return{x:t.x,y:t.y,width:e.width,height:e.height}}function g(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}const m=(t,e)=>({width:t,height:e}),w=(t,e,i)=>({width:i.width*t,height:i.height*e}),A=(t,e)=>w(t,t,e),v=t=>({width:Math.floor(t.width),height:Math.floor(t.height)}),b=t=>({x:t.width/2,y:t.height/2});function y(t,e=h()){return p(e,t)}var x,M,S=Object.freeze({__proto__:null,area:({width:t,height:e})=>t*e,aspectRatio:({width:t,height:e})=>t/e,center:b,containFit:(t,e)=>{const{width:i,height:s}=function(t,e){const i=Math.min(t.width/e.width,t.height/e.height),s=A(i,e);return p(a(g(t),b(s)),s)}(y(t),y(e));return{width:i,height:s}},create:m,cropFit:(t,e)=>{const{width:i,height:s}=function(t,e){const i=Math.max(t.width/e.width,t.height/e.height),s=A(i,e);return p(a(g(t),b(s)),s)}(y(t),y(e));return{width:i,height:s}},fitToRatio:(t,e)=>e.width>=e.height*t?m(e.height*t,e.height):m(e.width,e.width/t),floor:v,isEqual:(t,e)=>t.width===e.width&&t.height===e.height,proportionalScale:A,round:t=>({width:Math.round(t.width),height:Math.round(t.height)}),scale:w,scaleFit:(t,e)=>{const{width:i,height:s}=function(t,e){const i=Math.min(Math.sqrt(t/function(t){return t.width*t.height}(e)),1),s=v(A(i,e));return p(a(g(e),b(s)),s)}(t,y(e));return{width:i,height:s}},square:t=>m(t,t),toRectangle:y,trim:(t,e)=>({width:Math.min(t.width,e.width),height:Math.min(t.height,e.height)})}),C={exports:{}},k=(x||(x=1,M=C,function(){var t={}.hasOwnProperty;function e(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=s(t,i(n)))}return t}function i(i){if("string"==typeof i||"number"==typeof i)return i;if("object"!=typeof i)return"";if(Array.isArray(i))return e.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var n="";for(var r in i)t.call(i,r)&&i[r]&&(n=s(n,r));return n}function s(t,e){return e?t?t+" "+e:t+e:t}M.exports?(e.default=e,M.exports=e):window.classNames=e}()),C.exports),E=r(k);class T{constructor(t){this.apiSupportsLayers=!1,null!=t&&this.setApi(t)}setApi(t){!function(t){return null!=t&&"function"==typeof t.getLayers&&"function"==typeof t.setLayerVisibility}(t)?this.clear():(this.apiSupportsLayers=!0,this.api=t)}clear(){this.apiSupportsLayers=!1,this.api=void 0}get enabled(){return this.apiSupportsLayers}async getLayers(){return this.getApi().getLayers()}async setLayerVisibility(t,e){return this.getApi().setLayerVisibility(t,e)}getApi(){if(null==this.api)throw new Error("The current document does not support layers.");return this.api}}function P(t){return Array.from(t.querySelectorAll("*"))}class D{constructor(t,e,i){this.element=t,this.hostElement=e,this.api=i,this.isDragging=!1,this.handlePointerDown=this.handlePointerDown.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleWheel=this.handleWheel.bind(this),this.element.addEventListener("pointerdown",this.handlePointerDown),this.element.addEventListener("wheel",this.handleWheel),this.hostElement.addEventListener("wheel",this.handleWheel)}dispose(){this.element.removeEventListener("pointerdown",this.handlePointerDown),this.element.removeEventListener("wheel",this.handleWheel),this.hostElement.removeEventListener("wheel",this.handleWheel),this.removeWindowListeners()}handleWheel(t){t.preventDefault();const e=-t.deltaX/2,i=-t.deltaY/2;0===e&&0===i||this.api.panByDelta(f.create(e,i))}handlePointerDown(t){2===t.button&&(t.preventDefault(),this.downPosition=f.create(t.clientX,t.clientY),this.lastPosition=this.downPosition,this.isDragging=!1,window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp))}handlePointerMove(t){if(null==this.lastPosition||null==this.downPosition)return;const e=f.create(t.clientX,t.clientY);if(!this.isDragging&&f.distance(e,this.downPosition)<2)return;this.isDragging=!0;const i=f.subtract(e,this.lastPosition);this.lastPosition=e,this.api.panByDelta(i)}handlePointerUp(){this.lastPosition=void 0,this.downPosition=void 0,this.isDragging=!1,this.removeWindowListeners()}removeWindowListeners(){window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp)}}
|
|
5
5
|
/**
|
|
6
6
|
* @licstart The following is the entire license notice for the
|
|
7
7
|
* JavaScript code in this page
|
package/dist/esm/doc-viewer.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-
|
|
5
|
-
export { s as setNonce } from './index-
|
|
4
|
+
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-Dv4hbCka.js';
|
|
5
|
+
export { s as setNonce } from './index-Dv4hbCka.js';
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.45.2 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var patchBrowser = () => {
|
|
@@ -309,7 +309,7 @@ const globalScripts = appGlobalScript;
|
|
|
309
309
|
const globalStyles = ":root{--white:#ffffff;--black:#000000}:root{--neutral-050:#fafafa;--neutral-100:#f5f5f5;--neutral-200:#eeeeee;--neutral-300:#e0e0e0;--neutral-400:#bdbdbd;--neutral-500:#9e9e9e;--neutral-600:#757575;--neutral-700:#616161;--neutral-800:#444444;--neutral-900:#212121}:root{--red-050:#fff7f7;--red-100:#ffefef;--red-200:#ffe0e0;--red-300:#ffb3b3;--red-400:#ff4d4d;--red-500:#ff0000;--red-600:#eb0000;--red-700:#d90000;--red-800:#c40000;--red-900:#990000}:root{--orange-050:#fffcf7;--orange-100:#fff9ef;--orange-200:#fff3e0;--orange-300:#ffe0b3;--orange-400:#ffb84d;--orange-500:#ff9900;--orange-600:#ff8400;--orange-700:#ff7300;--orange-800:#e05d00;--orange-900:#993b00}:root{--yellow-050:#fffef7;--yellow-100:#fffdef;--yellow-200:#fffbe0;--yellow-300:#fff5b3;--yellow-400:#ffee6e;--yellow-500:#ffe600;--yellow-600:#ffd300;--yellow-700:#ffc500;--yellow-800:#cc8f00;--yellow-900:#995c00}:root{--green-050:#f7fdf7;--green-100:#effcef;--green-200:#e0f9e0;--green-300:#b3f0b3;--green-400:#4ddb4d;--green-500:#00cc00;--green-600:#00c000;--green-700:#00ad00;--green-800:#008000;--green-900:#004d00}:root{--teal-050:#f8fdfc;--teal-100:#f1fbfa;--teal-200:#e4f7f5;--teal-300:#bcece7;--teal-400:#62d2c7;--teal-500:#1fbeaf;--teal-600:#17af9f;--teal-700:#0a9986;--teal-800:#07705f;--teal-900:#054d43}:root{--blue-050:#f7fcfd;--blue-100:#eff9fc;--blue-200:#e0f3f9;--blue-300:#b3e0f0;--blue-400:#4db8db;--blue-500:#0099cc;--blue-600:#0086c0;--blue-700:#006bad;--blue-800:#004f80;--blue-900:#002f4d}:root{--purple-050:#fdf9fc;--purple-100:#faf2f8;--purple-200:#f6e6f2;--purple-300:#e9c2e0;--purple-400:#cb70b6;--purple-500:#b43296;--purple-600:#a42683;--purple-700:#8c1368;--purple-800:#66124b;--purple-900:#4d0b39}:root{--x-axis-color:#ea3324;--y-axis-color:#4faf32;--z-axis-color:#0000ff;--two-axes-color:#e0e0e0}:root{--padding-1:0.25em;--padding-2:0.5em;--padding-3:0.75em;--padding-4:1em;--padding-5:1.25em;--padding-6:1.5em;--padding-7:1.75em;--padding-8:2em;--abs-padding-1:0.25rem;--abs-padding-2:0.5rem;--abs-padding-3:0.75rem;--abs-padding-4:1rem;--abs-padding-5:1.25rem;--abs-padding-6:1.5rem;--abs-padding-7:1.75rem;--abs-padding-8:2rem}";
|
|
310
310
|
|
|
311
311
|
/*
|
|
312
|
-
Stencil Client Platform v4.
|
|
312
|
+
Stencil Client Platform v4.45.2 | MIT Licensed | https://stenciljs.com
|
|
313
313
|
*/
|
|
314
314
|
|
|
315
315
|
|
|
@@ -397,7 +397,9 @@ var consoleError = (e, el) => (0, console.error)(e, el);
|
|
|
397
397
|
|
|
398
398
|
// src/client/client-load-module.ts
|
|
399
399
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
400
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
400
401
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
402
|
+
var _a;
|
|
401
403
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
402
404
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
403
405
|
if (!bundleId) {
|
|
@@ -407,6 +409,11 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
407
409
|
if (module) {
|
|
408
410
|
return module[exportName];
|
|
409
411
|
}
|
|
412
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
413
|
+
const cacheBustParams = [
|
|
414
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
415
|
+
""
|
|
416
|
+
].filter(Boolean).join("&");
|
|
410
417
|
|
|
411
418
|
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
412
419
|
const processMod = importedModule => {
|
|
@@ -426,15 +433,17 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
426
433
|
/* webpackInclude: /\.entry\.js$/ */
|
|
427
434
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
428
435
|
/* webpackMode: "lazy" */
|
|
429
|
-
`./${bundleId}.entry.js${""}`
|
|
436
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
430
437
|
).then(
|
|
431
438
|
(importedModule) => {
|
|
432
439
|
{
|
|
440
|
+
failedLoadAttempts.delete(bundleId);
|
|
433
441
|
cmpModules.set(bundleId, importedModule);
|
|
434
442
|
}
|
|
435
443
|
return importedModule[exportName];
|
|
436
444
|
},
|
|
437
445
|
(e) => {
|
|
446
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
438
447
|
consoleError(e, hostRef.$hostElement$);
|
|
439
448
|
}
|
|
440
449
|
);
|
|
@@ -444,6 +453,8 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
444
453
|
var styles = /* @__PURE__ */ new Map();
|
|
445
454
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
446
455
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
456
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
457
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
447
458
|
var win = typeof window !== "undefined" ? window : {};
|
|
448
459
|
var plt = {
|
|
449
460
|
$flags$: 0,
|
|
@@ -470,6 +481,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
|
|
|
470
481
|
var queuePending = false;
|
|
471
482
|
var queueDomReads = [];
|
|
472
483
|
var queueDomWrites = [];
|
|
484
|
+
var scheduleFlush = () => {
|
|
485
|
+
var _a;
|
|
486
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? setTimeout(flush, 16) : plt.raf(flush);
|
|
487
|
+
};
|
|
473
488
|
var queueTask = (queue, write) => (cb) => {
|
|
474
489
|
queue.push(cb);
|
|
475
490
|
if (!queuePending) {
|
|
@@ -477,7 +492,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
477
492
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
478
493
|
nextTick(flush);
|
|
479
494
|
} else {
|
|
480
|
-
|
|
495
|
+
scheduleFlush();
|
|
481
496
|
}
|
|
482
497
|
}
|
|
483
498
|
};
|
|
@@ -496,7 +511,7 @@ var flush = () => {
|
|
|
496
511
|
{
|
|
497
512
|
consume(queueDomWrites);
|
|
498
513
|
if (queuePending = queueDomReads.length > 0) {
|
|
499
|
-
|
|
514
|
+
scheduleFlush();
|
|
500
515
|
}
|
|
501
516
|
}
|
|
502
517
|
};
|
|
@@ -695,6 +710,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
695
710
|
} else if (child != null && typeof child !== "boolean") {
|
|
696
711
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
697
712
|
child = String(child);
|
|
713
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
714
|
+
{
|
|
715
|
+
consoleError("Invalid vNode child");
|
|
716
|
+
}
|
|
717
|
+
continue;
|
|
698
718
|
}
|
|
699
719
|
if (simple && lastSimple) {
|
|
700
720
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -820,7 +840,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
820
840
|
const oldClasses = parseClassList(oldValue);
|
|
821
841
|
let newClasses = parseClassList(newValue);
|
|
822
842
|
{
|
|
823
|
-
|
|
843
|
+
let removedClasses = oldClasses.filter((c) => c && !newClasses.includes(c));
|
|
844
|
+
classList.remove(...removedClasses);
|
|
824
845
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
825
846
|
}
|
|
826
847
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
@@ -897,7 +918,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
897
918
|
}
|
|
898
919
|
}
|
|
899
920
|
if (newValue == null || newValue === false) {
|
|
900
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
921
|
+
if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
|
|
901
922
|
{
|
|
902
923
|
elm.removeAttribute(memberName);
|
|
903
924
|
}
|
|
@@ -910,6 +931,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
910
931
|
}
|
|
911
932
|
}
|
|
912
933
|
};
|
|
934
|
+
var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
|
|
935
|
+
var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
|
|
913
936
|
var parseClassListRegex = /\s/;
|
|
914
937
|
var parseClassList = (value) => {
|
|
915
938
|
if (typeof value === "object" && value && "baseVal" in value) {
|
|
@@ -1097,7 +1120,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1097
1120
|
if (idxInOld >= 0) {
|
|
1098
1121
|
elmToMove = oldCh[idxInOld];
|
|
1099
1122
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1100
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2,
|
|
1123
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
1101
1124
|
} else {
|
|
1102
1125
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1103
1126
|
oldCh[idxInOld] = void 0;
|
|
@@ -1189,9 +1212,7 @@ var flushQueuedRefCallbacks = () => {
|
|
|
1189
1212
|
}
|
|
1190
1213
|
};
|
|
1191
1214
|
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
1192
|
-
|
|
1193
|
-
return parent.__insertBefore(newNode, reference);
|
|
1194
|
-
} else {
|
|
1215
|
+
{
|
|
1195
1216
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1196
1217
|
}
|
|
1197
1218
|
};
|
|
@@ -1452,6 +1473,20 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1452
1473
|
};
|
|
1453
1474
|
|
|
1454
1475
|
// src/runtime/proxy-component.ts
|
|
1476
|
+
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
1477
|
+
var replayPendingSetterValues = (hostRef, cmpMeta) => {
|
|
1478
|
+
var _a;
|
|
1479
|
+
const instance = hostRef.$lazyInstance$;
|
|
1480
|
+
if (!instance) return;
|
|
1481
|
+
for (const [memberName, [memberFlags]] of Object.entries((_a = cmpMeta.$members$) != null ? _a : {})) {
|
|
1482
|
+
if (memberFlags & 4096 /* Setter */ && hostRef.$instanceValues$.has(memberName)) {
|
|
1483
|
+
const pendingValue = hostRef.$instanceValues$.get(memberName);
|
|
1484
|
+
if (instance[memberName] !== pendingValue) {
|
|
1485
|
+
instance[memberName] = pendingValue;
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
1455
1490
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1456
1491
|
var _a, _b;
|
|
1457
1492
|
const prototype = Cstr.prototype;
|
|
@@ -1481,9 +1516,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1481
1516
|
return getValue(this, memberName);
|
|
1482
1517
|
}
|
|
1483
1518
|
const ref = getHostRef(this);
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
return instance[memberName];
|
|
1519
|
+
if (!ref) return prototype[memberName];
|
|
1520
|
+
return ref.$lazyInstance$ ? ref.$lazyInstance$[memberName] : getValue(this, memberName);
|
|
1487
1521
|
}
|
|
1488
1522
|
},
|
|
1489
1523
|
configurable: true,
|
|
@@ -1513,31 +1547,20 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1513
1547
|
{
|
|
1514
1548
|
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1515
1549
|
setValue(this, memberName, newValue, cmpMeta);
|
|
1516
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1517
|
-
ref.$fetchedCbList$.push(() => {
|
|
1518
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1519
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1520
|
-
}
|
|
1521
|
-
});
|
|
1522
|
-
}
|
|
1523
1550
|
return;
|
|
1524
1551
|
}
|
|
1525
|
-
const
|
|
1552
|
+
const parsedValue = parsePropertyValue(
|
|
1553
|
+
newValue,
|
|
1554
|
+
memberFlags);
|
|
1555
|
+
if (ref.$lazyInstance$) {
|
|
1526
1556
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
1527
1557
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1528
1558
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1529
1559
|
}
|
|
1530
|
-
ref.$lazyInstance$[memberName] =
|
|
1531
|
-
newValue,
|
|
1532
|
-
memberFlags);
|
|
1560
|
+
ref.$lazyInstance$[memberName] = parsedValue;
|
|
1533
1561
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1534
|
-
};
|
|
1535
|
-
if (ref.$lazyInstance$) {
|
|
1536
|
-
setterSetVal();
|
|
1537
1562
|
} else {
|
|
1538
|
-
ref.$
|
|
1539
|
-
setterSetVal();
|
|
1540
|
-
});
|
|
1563
|
+
ref.$instanceValues$.set(memberName, parsedValue);
|
|
1541
1564
|
}
|
|
1542
1565
|
}
|
|
1543
1566
|
}
|
|
@@ -1584,10 +1607,16 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1584
1607
|
return;
|
|
1585
1608
|
}
|
|
1586
1609
|
const propFlags = members.find(([m]) => m === propName);
|
|
1587
|
-
const
|
|
1610
|
+
const propMemberFlags = propFlags ? propFlags[1][0] : 0;
|
|
1611
|
+
const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
|
|
1612
|
+
if (propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
|
|
1613
|
+
// one is always external
|
|
1614
|
+
!isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1588
1617
|
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1589
1618
|
if (isBooleanTarget) {
|
|
1590
|
-
newValue = newValue === null || newValue === "false" ? false : true;
|
|
1619
|
+
newValue = newValue === null || newValue === "false" && true ? false : true;
|
|
1591
1620
|
}
|
|
1592
1621
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1593
1622
|
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
@@ -1616,10 +1645,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1616
1645
|
|
|
1617
1646
|
// src/runtime/initialize-component.ts
|
|
1618
1647
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1648
|
+
var _a;
|
|
1619
1649
|
let Cstr;
|
|
1620
1650
|
try {
|
|
1621
1651
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1622
1652
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1653
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
1623
1654
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1624
1655
|
if (bundleId) {
|
|
1625
1656
|
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
@@ -1631,6 +1662,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1631
1662
|
Cstr = CstrImport;
|
|
1632
1663
|
}
|
|
1633
1664
|
if (!Cstr) {
|
|
1665
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
1666
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
1667
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
1668
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
1669
|
+
}
|
|
1634
1670
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1635
1671
|
}
|
|
1636
1672
|
if (!Cstr.isProxied) {
|
|
@@ -1653,6 +1689,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1653
1689
|
}
|
|
1654
1690
|
{
|
|
1655
1691
|
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1692
|
+
replayPendingSetterValues(hostRef, cmpMeta);
|
|
1656
1693
|
}
|
|
1657
1694
|
{
|
|
1658
1695
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
@@ -1692,7 +1729,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1692
1729
|
hostRef.$onRenderResolve$();
|
|
1693
1730
|
hostRef.$onRenderResolve$ = void 0;
|
|
1694
1731
|
}
|
|
1695
|
-
if (hostRef.$onReadyResolve$) {
|
|
1732
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
1696
1733
|
hostRef.$onReadyResolve$(elm);
|
|
1697
1734
|
}
|
|
1698
1735
|
}
|
|
@@ -1738,6 +1775,8 @@ var connectedCallback = (elm) => {
|
|
|
1738
1775
|
} else {
|
|
1739
1776
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1740
1777
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1778
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
1779
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
1741
1780
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1742
1781
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1743
1782
|
}
|
|
@@ -1850,7 +1889,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1850
1889
|
}
|
|
1851
1890
|
disconnectedCallback() {
|
|
1852
1891
|
plt.jmp(() => disconnectedCallback(this));
|
|
1853
|
-
|
|
1892
|
+
nextTick(() => {
|
|
1854
1893
|
var _a3;
|
|
1855
1894
|
const hostRef = getHostRef(this);
|
|
1856
1895
|
if (!hostRef) {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { g as globalScripts, b as bootstrapLazy } from './index-
|
|
5
|
-
export { s as setNonce } from './index-
|
|
4
|
+
import { g as globalScripts, b as bootstrapLazy } from './index-Dv4hbCka.js';
|
|
5
|
+
export { s as setNonce } from './index-Dv4hbCka.js';
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = async (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-Dv4hbCka.js';
|
|
5
5
|
|
|
6
6
|
function getDefaultExportFromCjs (x) {
|
|
7
7
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import type { PDFDocumentProxy } from 'pdfjs-dist/legacy/build/pdf.mjs';
|
|
2
2
|
export declare class MockOptionalContentConfig extends Map {
|
|
3
|
-
setVisibility:
|
|
3
|
+
setVisibility: import("vitest").Mock<import("@vitest/spy").Procedure>;
|
|
4
4
|
}
|
|
5
|
-
export declare const mockGetViewport:
|
|
5
|
+
export declare const mockGetViewport: import("vitest").Mock<() => {
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
|
-
}
|
|
9
|
-
export declare const mockPageRender:
|
|
8
|
+
}>;
|
|
9
|
+
export declare const mockPageRender: import("vitest").Mock<(args: any) => {
|
|
10
10
|
promise: Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
export declare const mockGetPage:
|
|
13
|
-
getTextContent:
|
|
11
|
+
}>;
|
|
12
|
+
export declare const mockGetPage: import("vitest").Mock<() => {
|
|
13
|
+
getTextContent: import("vitest").Mock<() => {
|
|
14
14
|
items: never[];
|
|
15
|
-
}
|
|
16
|
-
render:
|
|
15
|
+
}>;
|
|
16
|
+
render: import("vitest").Mock<(args: any) => {
|
|
17
17
|
promise: Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
getViewport:
|
|
18
|
+
}>;
|
|
19
|
+
getViewport: import("vitest").Mock<() => {
|
|
20
20
|
width: number;
|
|
21
21
|
height: number;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export declare const mockDestroy:
|
|
25
|
-
export declare const mockGetDocument:
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const mockDestroy: import("vitest").Mock<import("@vitest/spy").Procedure>;
|
|
25
|
+
export declare const mockGetDocument: import("vitest").Mock<() => any>;
|
|
26
26
|
export declare const mockPdfDocument: PDFDocumentProxy;
|
|
27
27
|
export declare const GlobalWorkerOptions: {
|
|
28
28
|
workerSrc: string;
|
|
29
29
|
};
|
|
30
|
-
export declare const getDocument:
|
|
30
|
+
export declare const getDocument: import("vitest").Mock<() => any>;
|
|
31
31
|
//# sourceMappingURL=pdfjs-mock.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const triggerResizeObserver:
|
|
1
|
+
export declare const triggerResizeObserver: import("vitest").Mock<import("@vitest/spy").Procedure>;
|
|
2
2
|
//# sourceMappingURL=resize-observer.d.ts.map
|