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

hy-pattern-lib

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hy-pattern-lib - npm Package Compare versions

Comparing version 1.6.1 to 1.6.2

dist/hy-components-f8042089a71c64a18d6cf0194c5b103a.js

2

dist/manifest.json

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

{"happy-yoga.svg":"./dist/images/happy-yoga-17249743358378d3bc23666e5ad0d13f.svg","hy-components.js":"./dist/hy-components-35713d5e2365f1aea993df6353e576b8.js","hy-pattern-lib.css":"./dist/hy-pattern-lib-fc906ae29c401e51489e0b375d3058b1.css"}
{"happy-yoga.svg":"./dist/images/happy-yoga-17249743358378d3bc23666e5ad0d13f.svg","hy-components.js":"./dist/hy-components-f8042089a71c64a18d6cf0194c5b103a.js","hy-pattern-lib.css":"./dist/hy-pattern-lib-3ac5db2af0e90c0173daa2f37e16fb75.css"}
import './wandering-teaser-image.js'
import './scroll-foam.js'
import './nav-button.js'
// import './top-page-menu.js'
import './top-page-menu.js'

@@ -1,7 +0,36 @@

// /* global HTMLElement, customElements */
// export class TopPageMenu extends HTMLElement {
// async connectedCallback () {
// }
// }
/* global HTMLElement, customElements, IntersectionObserver */
export class TopPageMenu extends HTMLElement {
constructor () {
super()
// customElements.define('top-page-menu', TopPageMenu)
const options = {
root: null,
// rootMargin: '0px',
threshold: 0.2
}
if (('IntersectionObserver' in window)) {
this.observer = new IntersectionObserver((entries) => this.isVisible(entries), options)
console.log(this.observer)
}
}
async connectedCallback () {
const firstMeaningfulContent = document.querySelector('scroll-foam main')
this.observer?.observe(firstMeaningfulContent)
}
disconnectedCallback () {
this.observer?.disconnect()
}
isVisible (entries) {
if (entries[0].intersectionRatio < 0.2) {
document.body?.classList.remove('main-content-visible')
} else {
document.body?.classList.add('main-content-visible')
}
}
}
customElements.define('top-page-menu', TopPageMenu)
{
"name": "hy-pattern-lib",
"version": "1.6.1",
"version": "1.6.2",
"description": "",

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

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