New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

duoyun-ui

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duoyun-ui - npm Package Compare versions

Comparing version 0.0.39 to 0.0.40

1

elements/carousel.js

@@ -195,3 +195,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

const { currentIndex, direction } = this.state;
debugger;
return html `

@@ -198,0 +197,0 @@ <ul class="list" role="region">

11

elements/tabs.js

@@ -125,3 +125,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

></dy-divider>
<dy-compartment .content=${currentContent}></dy-compartment>
<dy-compartment
.content=${html `
<style>
dy-tab-panel::-webkit-scrollbar {
width: 0;
}
</style>
${currentContent}
`}
></dy-compartment>
`;

@@ -128,0 +137,0 @@ };

export declare function b64ToUtf8(str: string): string;
export declare function base64ToArrayBuffer(str: string): ArrayBufferLike;
export declare function utf8ToB64(str: string): string;
export declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
export declare function base64ToArrayBuffer(s: string): ArrayBufferLike;
export declare function hash(strOrAb: string | ArrayBuffer, options?: 'string'): Promise<string>;
export declare function hash(strOrAb: string | ArrayBuffer, output: 'arrayBuffer'): Promise<ArrayBuffer>;
//# sourceMappingURL=encode.d.ts.map

@@ -0,7 +1,8 @@

function safaUrlToBase64Str(str) {
return str.replaceAll('-', '+').replaceAll('_', '/');
}
// https://developer.mozilla.org/en-US/docs/Glossary/Base64#solution_1_%E2%80%93_escaping_the_string_before_encoding_it
export function b64ToUtf8(str) {
return decodeURIComponent(window
.atob(
// Compatible with jwt
str.replace(/-/g, '+').replace(/_/g, '/'))
.atob(safaUrlToBase64Str(str))
.split('')

@@ -11,12 +12,15 @@ .map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))

}
export function base64ToArrayBuffer(str) {
return new Uint8Array([...window.atob(safaUrlToBase64Str(str))].map((char) => char.charCodeAt(0))).buffer;
}
function base64ToSafeUrl(str) {
return str.replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', '');
}
export function utf8ToB64(str) {
return window.btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (_, p1) => String.fromCharCode(Number(`0x${p1}`))));
return base64ToSafeUrl(window.btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (_, p1) => String.fromCharCode(Number(`0x${p1}`)))));
}
// https://github.com/tc39/proposal-arraybuffer-base64
export function arrayBufferToBase64(arrayBuffer) {
return window.btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)));
return base64ToSafeUrl(window.btoa(String.fromCharCode(...new Uint8Array(arrayBuffer))));
}
export function base64ToArrayBuffer(s) {
return new Uint8Array([...window.atob(s)].map((char) => char.charCodeAt(0))).buffer;
}
export async function hash(strOrAb, output = 'string') {

@@ -23,0 +27,0 @@ const ab = typeof strOrAb === 'string' ? new TextEncoder().encode(strOrAb) : strOrAb;

{
"name": "duoyun-ui",
"version": "0.0.39",
"version": "0.0.40",
"description": "WebComponts UI",

@@ -5,0 +5,0 @@ "exports": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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