@getflip/swirl-components 0.325.0 → 0.325.1
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/components.json +1 -1
- package/dist/cjs/swirl-file-viewer_8.cjs.entry.js +19 -3
- package/dist/cjs/swirl-popover_2.cjs.entry.js +4 -4
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-menu/swirl-menu.spec.js +1 -1
- package/dist/collection/components/swirl-popover/swirl-popover.css +0 -1
- package/dist/collection/components/swirl-popover/swirl-popover.js +3 -3
- package/dist/collection/components/swirl-popover/swirl-popover.spec.js +2 -2
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-file-viewer-pdf2.js +19 -3
- package/dist/components/swirl-popover2.js +4 -4
- package/dist/esm/swirl-file-viewer_8.entry.js +19 -3
- package/dist/esm/swirl-popover_2.entry.js +4 -4
- package/dist/swirl-components/p-64fb1271.entry.js +42 -0
- package/dist/swirl-components/p-a22cfa00.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/swirl-components/p-742fdce6.entry.js +0 -1
- package/dist/swirl-components/p-778f7bd3.entry.js +0 -41
package/components.json
CHANGED
|
@@ -6325,7 +6325,12 @@ function isLittleEndian() {
|
|
|
6325
6325
|
}
|
|
6326
6326
|
|
|
6327
6327
|
function isEvalSupported() {
|
|
6328
|
-
|
|
6328
|
+
try {
|
|
6329
|
+
new Function("");
|
|
6330
|
+
return true;
|
|
6331
|
+
} catch (e) {
|
|
6332
|
+
return false;
|
|
6333
|
+
}
|
|
6329
6334
|
}
|
|
6330
6335
|
|
|
6331
6336
|
class FeatureTest {
|
|
@@ -6844,7 +6849,7 @@ var check = function (it) {
|
|
|
6844
6849
|
};
|
|
6845
6850
|
module.exports = check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof _commonjsHelpers.commonjsGlobal == 'object' && _commonjsHelpers.commonjsGlobal) || (function () {
|
|
6846
6851
|
return this;
|
|
6847
|
-
}());
|
|
6852
|
+
}()) || Function('return this')();
|
|
6848
6853
|
|
|
6849
6854
|
/***/ }),
|
|
6850
6855
|
/* 8 */
|
|
@@ -11528,7 +11533,7 @@ class PDFWorker {
|
|
|
11528
11533
|
}
|
|
11529
11534
|
|
|
11530
11535
|
if (_is_node.isNodeJS && typeof _commonjsHelpers.commonjsRequire === "function") {
|
|
11531
|
-
const worker =
|
|
11536
|
+
const worker = eval("require")(this.workerSrc);
|
|
11532
11537
|
return worker.WorkerMessageHandler;
|
|
11533
11538
|
}
|
|
11534
11539
|
|
|
@@ -15471,6 +15476,17 @@ class FontFaceObject {
|
|
|
15471
15476
|
return this.compiledGlyphs[character] = function (c, size) {};
|
|
15472
15477
|
}
|
|
15473
15478
|
|
|
15479
|
+
if (this.isEvalSupported && _util.FeatureTest.isEvalSupported) {
|
|
15480
|
+
const jsBuf = [];
|
|
15481
|
+
|
|
15482
|
+
for (const current of cmds) {
|
|
15483
|
+
const args = current.args !== undefined ? current.args.join(",") : "";
|
|
15484
|
+
jsBuf.push("c.", current.cmd, "(", args, ");\n");
|
|
15485
|
+
}
|
|
15486
|
+
|
|
15487
|
+
return this.compiledGlyphs[character] = new Function("c", "size", jsBuf.join(""));
|
|
15488
|
+
}
|
|
15489
|
+
|
|
15474
15490
|
return this.compiledGlyphs[character] = function (c, size) {
|
|
15475
15491
|
for (const current of cmds) {
|
|
15476
15492
|
if (current.cmd === "scale") {
|
|
@@ -8,7 +8,7 @@ const bodyScrollLock_esm = require('./bodyScrollLock.esm-f29f1a77.js');
|
|
|
8
8
|
const index$1 = require('./index-9f94303c.js');
|
|
9
9
|
const utils = require('./utils-1a1dd8d3.js');
|
|
10
10
|
|
|
11
|
-
const swirlPopoverCss = ":host{position:relative;z-index:var(--s-z-40)
|
|
11
|
+
const swirlPopoverCss = ":host{position:relative;z-index:var(--s-z-40)}:host *{box-sizing:border-box}:host{--swirl-resource-list-item-background-default:var(\n --s-surface-overlay-default\n );--swirl-resource-list-item-background-hovered:var(\n --s-surface-overlay-hovered\n );--swirl-resource-list-item-background-pressed:var(\n --s-surface-overlay-pressed\n )}.popover--active:not(.popover--closing) .popover__backdrop{animation:0.15s popover-fade-in}@media (prefers-reduced-motion){.popover--active:not(.popover--closing) .popover__backdrop{animation:none}}.popover--active:not(.popover--closing) .popover__content{animation:0.15s popover-slide-in}@media (min-width: 768px){.popover--active:not(.popover--closing) .popover__content{transform-origin:top left;animation:0.15s popover-fade-scale-in-xy}}@media (prefers-reduced-motion){.popover--active:not(.popover--closing) .popover__content{animation:none}}.popover--closing .popover__backdrop{animation:0.15s popover-fade-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.popover--closing .popover__backdrop{animation:none}}.popover--closing .popover__content{animation:0.15s popover-slide-out;animation-fill-mode:forwards}@media (min-width: 768px){.popover--closing .popover__content{animation:0.15s popover-fade-out}}@media (prefers-reduced-motion){.popover--closing .popover__content{animation:none}}.popover--inactive .popover__content{display:none}@media (max-width: 767px){.popover--fullscreen-bottom-sheet.popover--active:not(.popover--closing) .popover__content{animation:0.15s popover-fade-in}@media (prefers-reduced-motion){.popover--fullscreen-bottom-sheet.popover--active:not(.popover--closing) .popover__content{animation:none}}.popover--fullscreen-bottom-sheet.popover--closing .popover__content{animation:0.15s popover-fade-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.popover--fullscreen-bottom-sheet.popover--closing .popover__content{animation:none}}.popover--fullscreen-bottom-sheet .popover__backdrop{display:none}.popover--fullscreen-bottom-sheet .popover__content{top:0;border-top-left-radius:0;border-top-right-radius:0}.popover--fullscreen-bottom-sheet .popover__scroll-container{height:100%;max-height:none;padding-top:0;padding-bottom:0}.popover--fullscreen-bottom-sheet .popover__handle{display:none}}@media (min-width: 768px){.popover--animation-scale-in-y.popover--active:not(.popover--closing) .popover__content{animation:0.15s popover-fade-scale-in-y}}@media (prefers-reduced-motion){.popover--animation-scale-in-y.popover--active:not(.popover--closing) .popover__content{animation:none}}@media (min-width: 768px){.popover--animation-fade-in.popover--active:not(.popover--closing) .popover__content{animation:0.15s popover-fade-in}}@media (prefers-reduced-motion){.popover--animation-fade-in.popover--active:not(.popover--closing) .popover__content{animation:none}}@media (min-width: 768px){.popover--transparent .popover__content{background-color:transparent;box-shadow:none}}@media (min-width: 768px){.popover--transparent .popover__scroll-container{padding:0}}.popover__backdrop{position:fixed;z-index:0;background-color:rgba(0, 0, 0, 0.2);animation:0.15s popover-backdrop-fade-in;inset:0}@media (prefers-reduced-motion){.popover__backdrop{animation:none}}@media (min-width: 768px){.popover__backdrop{display:none}}.popover__content{position:fixed;z-index:2;right:0;bottom:0;left:0;overflow:hidden;border-top-left-radius:var(--s-border-radius-xl);border-top-right-radius:var(--s-border-radius-xl);background-color:var(--s-surface-overlay-default)}@media (min-width: 768px){.popover__content{right:unset;bottom:unset;left:unset;max-width:22.5rem;border-radius:var(--s-border-radius-base);animation:none;box-shadow:var(--s-shadow-level-2)}}.popover__scroll-container{overflow-x:hidden;overflow-y:auto;width:100%;max-height:90vh;padding-top:var(--s-space-24);padding-bottom:var(--s-space-24);overscroll-behavior:contain}@media (min-width: 768px){.popover__scroll-container{max-height:22rem;padding-top:0;padding-bottom:0}}@media (min-width: 768px){.popover--padded .popover__scroll-container{padding:var(--s-space-4)}}.popover__handle{position:absolute;top:var(--s-space-8);left:50%;width:2.5rem;height:0.375rem;border-radius:0.1875rem;background-color:var(--s-border-default);transform:translatex(-50%)}@media (min-width: 768px){.popover__handle{display:none}}@keyframes popover-slide-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes popover-slide-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes popover-fade-in{from{opacity:0}to{opacity:1}}@keyframes popover-fade-out{from{opacity:1}to{opacity:0}}@keyframes popover-fade-scale-in-xy{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes popover-fade-scale-in-y{from{transform:scaleY(0);opacity:0}to{transform:scaleY(1);opacity:1}}";
|
|
12
12
|
const SwirlPopoverStyle0 = swirlPopoverCss;
|
|
13
13
|
|
|
14
14
|
const SwirlPopover = class {
|
|
@@ -269,14 +269,14 @@ const SwirlPopover = class {
|
|
|
269
269
|
"popover--transparent": this.transparent,
|
|
270
270
|
"popover--padded": this.padded,
|
|
271
271
|
});
|
|
272
|
-
return (index.h(index.Host, { key: '
|
|
272
|
+
return (index.h(index.Host, { key: '175ced51f2a06af65a7e1a846cf2fd3e8a981ea0', style: { display: this.active ? "inline-flex" : "none" } }, index.h("div", { key: 'adaee9f29294b5561d16ae2f4ef532c0bfc7c038', class: className, onKeyDown: this.onKeydown }, index.h("div", { key: '4c917a176ec55e2f9c8a61024e85059de1fee2e9', "aria-hidden": !this.active ? "true" : "false", "aria-label": this.label, class: "popover__content", id: this.popoverId, part: "popover__content", role: "dialog", ref: (el) => (this.contentContainer = el), style: {
|
|
273
273
|
top: Boolean(this.position) ? `${this.position?.y}px` : "",
|
|
274
274
|
left: Boolean(this.position) ? `${this.position?.x}px` : "",
|
|
275
|
-
}, tabindex: "-1" }, index.h("span", { key: '
|
|
275
|
+
}, tabindex: "-1" }, index.h("span", { key: 'bc92d0c351914716a5048423a35381da87cc5082', class: "popover__handle" }), index.h("div", { key: '3435afc9cfc9dc0e81e2e57f65dfc345098ba481', class: "popover__scroll-container", part: "popover__scroll-container", ref: (el) => (this.scrollContainer = el), style: {
|
|
276
276
|
maxHeight: !mobile && Boolean(this.maxHeight)
|
|
277
277
|
? this.maxHeight
|
|
278
278
|
: undefined,
|
|
279
|
-
} }, index.h("slot", { key: '
|
|
279
|
+
} }, index.h("slot", { key: '4e58a63669e879fd43b15f796ab22664b328f2f4' }))), this.active && (index.h("div", { key: '6318303b68d6c8edf51ad6637b484c712bf8ce4b', class: "popover__backdrop", onClick: this.onCloseButtonClick })))));
|
|
280
280
|
}
|
|
281
281
|
get el() { return index.getElement(this); }
|
|
282
282
|
};
|