Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bnqkl/web-component

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bnqkl/web-component - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

dist/bnqkl-web-component/p-04db44bb.entry.js

130

dist/bnqkl-web-component/bnqkl-web-component.esm.js

@@ -5,130 +5,2 @@ /*!

*/
import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './p-4e48da31.js';
import { g as globalScripts } from './p-a4865f19.js';
/*
Stencil Client Patch Browser v2.17.4 | MIT Licensed | https://stenciljs.com
*/
const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
const patchBrowser = () => {
// NOTE!! This fn cannot use async/await!
if (BUILD.isDev && !BUILD.isTesting) {
consoleDevInfo('Running in development mode.');
}
if (BUILD.cssVarShim) {
// shim css vars
plt.$cssShim$ = win.__cssshim;
}
if (BUILD.cloneNodeFix) {
// opted-in to polyfill cloneNode() for slot polyfilled components
patchCloneNodeFix(H.prototype);
}
if (BUILD.profile && !performance.mark) {
// not all browsers support performance.mark/measure (Safari 10)
// because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,
// simply stub the implementations out.
// TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)
// @ts-ignore
performance.mark = performance.measure = () => {
/*noop*/
};
performance.getEntriesByName = () => [];
}
// @ts-ignore
const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
s.getAttribute('data-stencil-namespace') === NAMESPACE)
: null;
const importMeta = import.meta.url;
const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
// Safari < v11 support: This IF is true if it's Safari below v11.
// This fn cannot use async/await since Safari didn't support it until v11,
// however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
// so both the ESM file and nomodule file would get downloaded. Only Safari
// has 'onbeforeload' in the script, and "history.scrollRestoration" was added
// to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
// IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
return {
then() {
/* promise noop */
},
};
}
if (!BUILD.safari10 && importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;
}
else if (BUILD.dynamicImportShim || BUILD.safari10) {
opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
if (BUILD.dynamicImportShim) {
patchDynamicImport(opts.resourcesUrl, scriptElm);
}
if (BUILD.dynamicImportShim && !win.customElements) {
// module support, but no custom elements support (Old Edge)
// @ts-ignore
return import(/* webpackChunkName: "polyfills-dom" */ './p-a1907d7e.js').then(() => opts);
}
}
return promiseResolve(opts);
};
const patchDynamicImport = (base, orgScriptElm) => {
const importFunctionName = getDynamicImportFunction(NAMESPACE);
try {
// test if this browser supports dynamic imports
// There is a caching issue in V8, that breaks using import() in Function
// By generating a random string, we can workaround it
// Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
}
catch (e) {
// this shim is specifically for browsers that do support "esm" imports
// however, they do NOT support "dynamic" imports
// basically this code is for old Edge, v18 and below
const moduleMap = new Map();
win[importFunctionName] = (src) => {
const url = new URL(src, base).href;
let mod = moduleMap.get(url);
if (!mod) {
const script = doc.createElement('script');
script.type = 'module';
script.crossOrigin = orgScriptElm.crossOrigin;
script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
type: 'application/javascript',
}));
mod = new Promise((resolve) => {
script.onload = () => {
resolve(win[importFunctionName].m);
script.remove();
};
});
moduleMap.set(url, mod);
doc.head.appendChild(script);
}
return mod;
};
}
};
const patchCloneNodeFix = (HTMLElementPrototype) => {
const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
HTMLElementPrototype.cloneNode = function (deep) {
if (this.nodeName === 'TEMPLATE') {
return nativeCloneNodeFn.call(this, deep);
}
const clonedNode = nativeCloneNodeFn.call(this, false);
const srcChildNodes = this.childNodes;
if (deep) {
for (let i = 0; i < srcChildNodes.length; i++) {
// Node.ATTRIBUTE_NODE === 2, and checking because IE11
if (srcChildNodes[i].nodeType !== 2) {
clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
}
}
}
return clonedNode;
};
};
patchBrowser().then(options => {
globalScripts();
return bootstrapLazy([["p-73c7889c",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["p-564c7899",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["p-b7f37127",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["p-edf20bf1",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["p-8a6d8a62",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["p-899988d3",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["p-2366ddcb",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32]}]]],["p-bfe6b75e",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["p-6c443cf9",[[1,"bn-image",{"errorSrc":[513,"error-src"],"src":[513],"alt":[513],"width":[514],"height":[514],"_errorSrc":[32],"_src":[32],"_showError":[32],"_isErrorError":[32]}]]],["p-821bd914",[[1,"bn-image-imaginary-provider",{"origin":[513]}]]],["p-b2f193d5",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[4,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["p-ae9a6644",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"autoRotate":[516,"auto-rotate"],"_model_src":[32]}]]],["p-56bb1416",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["p-736e212e",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["p-a2318982",[[1,"bn-stacking-util",{"text":[1]}]]],["p-59dc7b9c",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["p-f053075e",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["p-650d6ce1",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["p-355afff8",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["p-40310cbc",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["p-38c36100",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["p-2263afb7",[[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]],["p-f4c3980c",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}]]]], options);
});
import{p as e,b as t}from"./p-f38e2c8b.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-356d2ff8",[[1,"bn-collect-button",{color:[513],disabled:[516],icononly:[516],checkLabel:[1,"check-label"],unCheckLabel:[1,"un-check-label"],checked:[1540],direction:[1]}]]],["p-6eb878a6",[[1,"bn-dislike-button",{color:[513],disabled:[516],icononly:[516],count:[1026],checked:[1540],direction:[1],count_uncheck:[32],count_checked:[32]}]]],["p-2330a022",[[1,"bn-like-button",{color:[513],disabled:[516],icononly:[516],count:[1026],checked:[1540],direction:[1],count_uncheck:[32],count_checked:[32]}]]],["p-2bb0b06f",[[1,"bn-top-tabs-menu",{forSlider:[1,"for-slider"],bindSliderElement:[64]}]]],["p-b6ecdd7a",[[1,"bn-sub-tabs-menu",{forSlider:[1,"for-slider"],enableMask:[32],enableStartMask:[32],enableEndMask:[32],bindSliderElement:[64]}]]],["p-9c9a74a9",[[1,"bn-config-util",{assetPath:[1537,"asset-path"],setAssetPath:[64],getAssetPath:[64]}]]],["p-75b75333",[[1,"bn-has-more-text",{clampLine:[514,"clamp-line"],text:[1],open:[1540],lineHeight:[1026,"line-height"],_has_more:[32],_has_more_btn_height:[32]}]]],["p-b367f96c",[[1,"bn-icon",{name:[513],thin:[516],label:[513],direction:[513],paths:[32]}]]],["p-191d4299",[[1,"bn-image",{errorSrc:[513,"error-src"],src:[513],alt:[513],width:[514],height:[514],_errorSrc:[32],_src:[32],_showError:[32],_isErrorError:[32]}]]],["p-2437bc0a",[[1,"bn-image-imaginary-provider",{origin:[513],transform:[64],transformFromElement:[64]}]]],["p-ae3e55d5",[[1,"bn-lazy",{lazyState:[1537,"lazy-state"],autoSleep:[4,"auto-sleep"],debounce:[2],weakup:[64],sleep:[64]}]]],["p-dd160388",[[1,"bn-picture-model-viewer",{src:[513],alt:[513],gltfSrc:[1,"gltf-src"],skyboxImage:[513,"skybox-image"],environmentImage:[513,"environment-image"],withCredentials:[516,"with-credentials"],autoRotate:[516,"auto-rotate"],_model_src:[32]}]]],["p-9f82427d",[[1,"bn-reply-comment-button",{commentInfo:[8,"comment-info"]}]]],["p-04db44bb",[[1,"bn-slider",{defaultActivedIndex:[2,"default-actived-index"],activedIndex:[2,"actived-index"],getLayoutInfo:[64],getScrollProgress:[64],getActivedIndex:[64],slideTo:[64],update:[64],getReason:[64]}]]],["p-5eeb122d",[[1,"bn-stacking-util",{text:[1]}]]],["p-77b4c39d",[[1,"bn-template",{count:[1538],inc:[64]}]]],["p-08f3a7cb",[[1,"bn-user-comment-card",{replyContent:[1,"reply-content"],userAvator:[1,"user-avator"],userName:[1,"user-name"],userFlag:[1,"user-flag"],time:[1],text:[1],lineClamp:[2,"line-clamp"],isAuthor:[4,"is-author"],canFlod:[32],isFlod:[32]}]]],["p-3c0b0ce4",[[1,"bn-slider-scrollbar",{forSlider:[1,"for-slider"],forLayout:[1,"for-layout"],duration:[2],bindSliderElement:[64],bindLayoutElement:[64],update:[64]}]]],["p-ebef3e95",[[1,"bn-lottie-web",{defaultActivedColor:[1025,"default-actived-color"],actived:[4],renderer:[1],loop:[4],autoplay:[4],name:[1],direction:[1538],src:[1],data:[16],getInstance:[64],play:[64],pause:[64],togglePause:[64],goToAndPlay:[64],goToAndStop:[64],getDuration:[64],getPrimaryColor:[64]}]]],["p-ca2b4de5",[[1,"bn-lottie-web-toggle-button",{disabled:[516],icononly:[516],label:[1],labelColor:[1537,"label-color"],name:[513],direction:[513],animationData:[16],checked:[1540]}]]],["p-4c1721e0",[[1,"bn-slider-tabs",{forSlider:[1,"for-slider"],forTabs:[1,"for-tabs"],defaultActivedIndex:[2,"default-actived-index"],activedIndex:[2,"actived-index"],bindSliderElement:[64],getLayoutInfo:[64],slideTo:[64],getScrollProgress:[64],getActivedIndex:[64],getReason:[64]}]]],["p-bba9755e",[[1,"bn-image-toggle-button",{src:[1],frames:[2],duration:[1],color:[513],disabled:[516],icononly:[516],label:[1],checkedColor:[1537,"checked-color"],direction:[513],checked:[1540]}],[1,"bn-animation-icon",{src:[1],frames:[2],duration:[1],width:[1],height:[1],ratio:[2],direction:[1],actived:[1028],play:[64],pause:[64],finish:[64],reset:[64]}]]]],e)));

@@ -5,25 +5,2 @@ /*!

*/
const isBnSlider = (ele) => {
return ele instanceof HTMLElement && typeof ele.slideTo === "function";
};
const isBnLayout = (ele) => {
return ele instanceof HTMLElement && typeof ele.getLayoutInfo === "function";
};
const isBnLayoutEqual = (layout1, layout2) => {
if (layout1 === layout2) {
return true;
}
if (layout1.box.viewSize !== layout2.box.viewSize || layout1.box.scrolledSize !== layout2.box.scrolledSize) {
return false;
}
if (layout1.blockList.length !== layout2.blockList.length) {
return false;
}
if (layout1.blockList.some((block1, index) => layout2.blockList[index].size !== block1.size)) {
return false;
}
return true;
};
//#endregion
export { isBnLayout as a, isBnLayoutEqual as b, isBnSlider as i };
const n=n=>n instanceof HTMLElement&&"function"==typeof n.slideTo,t=n=>n instanceof HTMLElement&&"function"==typeof n.getLayoutInfo,e=(n,t)=>n===t||n.box.viewSize===t.box.viewSize&&n.box.scrolledSize===t.box.scrolledSize&&n.blockList.length===t.blockList.length&&!n.blockList.some(((n,e)=>t.blockList[e].size!==n.size));export{t as a,e as b,n as i}
module.exports = require("./index-53f2604e.js");
/* SOURCE-START *//* SOURCE-END */
/* SOURCE-START *//*!
* Copyright (c) BFChain
* License CC-BY-NC-SA-4.0
*/
'use strict';
/* SOURCE-END */
export * from "./loader.js";
/* SOURCE-START *//* SOURCE-END */
/* SOURCE-START *//*!
* Copyright (c) BFChain
* License CC-BY-NC-SA-4.0
*/
/* SOURCE-END */

@@ -1,2 +0,1 @@

import "./bnqkl-web-component/bnqkl-web-component.esm.js";
export const defineCustomElements = () => {};
export * from './esm/index.js';

@@ -106,2 +106,4 @@ /* eslint-disable */

"origin": string;
"transform": (src: string, params: { [key: string]: unknown; }) => Promise<string>;
"transformFromElement": (src: string, ele: HTMLElement) => Promise<string>;
}

@@ -108,0 +110,0 @@ interface BnImageToggleButton {

@@ -10,4 +10,6 @@ import { ImageTransform } from "../../utils/imageProvider";

constructor(config: ImaginaryTransform.Config);
transform(source_url: string, ele: HTMLElement): string;
transform(source_url: string, dataset: {
[key: string]: unknown;
}): string;
}
export {};

@@ -7,5 +7,11 @@ import { ComponentInterface } from "../../stencil-public-runtime";

readonly origin: string;
private _transform?;
private _getTransform;
connectedCallback(): void;
disconnectedCallback(): void;
transform(src: string, params: {
[key: string]: unknown;
}): Promise<string>;
transformFromElement(src: string, ele: HTMLElement): Promise<string>;
render(): any;
}

@@ -100,4 +100,4 @@ import { ComponentInterface, EventEmitter } from "../../stencil-public-runtime";

getActivedIndex(): Promise<number>;
getReason(): Promise<"user" | "auto">;
getReason(): Promise<"auto" | "user">;
render(): any;
}
export declare abstract class ImageTransform {
abstract transform(source_url: string, ele: HTMLElement): /* dest_url */ string | PromiseLike<string>;
abstract transform(source_url: string, params: {
[key: string]: unknown;
}): /* dest_url */ string | PromiseLike<string>;
transformFromElement(source_url: string, ele: HTMLElement): string | PromiseLike<string>;
}

@@ -12,3 +15,5 @@ declare class NoImageTransform extends ImageTransform {

declare class ImageProvider extends ImageTransform {
transform(source_url: string, ele: HTMLElement): string | PromiseLike<string>;
transform(source_url: string, params: {
[key: string]: unknown;
}): string | PromiseLike<string>;
private _rtsMap;

@@ -15,0 +20,0 @@ private _dtf;

{
"name": "@bnqkl/web-component",
"version": "1.5.0",
"version": "1.6.0",
"description": "Bnqkl Web Component",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc