Socket
Socket
Sign inDemoInstall

@spectrum-web-components/base

Package Overview
Dependencies
Maintainers
7
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spectrum-web-components/base - npm Package Compare versions

Comparing version 0.38.0 to 0.39.0

src/directive.d.ts

13

package.json
{
"name": "@spectrum-web-components/base",
"version": "0.38.0",
"version": "0.39.0",
"publishConfig": {

@@ -44,2 +44,6 @@ "access": "public"

},
"./src/directive.js": {
"development": "./src/directive.dev.js",
"default": "./src/directive.js"
},
"./src/directives.js": {

@@ -65,2 +69,3 @@ "development": "./src/directives.dev.js",

},
"./src/version.js": "./src/version.js",
"./condition-attribute-with-id.js": {

@@ -78,2 +83,6 @@ "development": "./condition-attribute-with-id.dev.js",

},
"./directive.js": {
"development": "./directive.dev.js",
"default": "./directive.js"
},
"./html.js": {

@@ -113,3 +122,3 @@ "development": "./html.dev.js",

],
"gitHead": "9a099b7543672f2fd4030833ab813b16c2cad62e"
"gitHead": "2acc8390ef0ac6cc940958d4da705c9859155c0d"
}

@@ -15,3 +15,4 @@ import { LitElement, ReactiveElement } from 'lit';

export declare class SpectrumElement extends SpectrumElement_base {
static VERSION: string;
}
export {};
"use strict";
var _a, _b, _c;
import { LitElement } from "lit";
import { version } from "@spectrum-web-components/base/src/version.js";
const observedForElements = /* @__PURE__ */ new Set();

@@ -101,2 +102,3 @@ const updateRTL = () => {

}
SpectrumElement.VERSION = version;
if (true) {

@@ -103,0 +105,0 @@ const ignoreWarningTypes = {

2

src/Base.js

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

"use strict";import{LitElement as u}from"lit";const c=new Set,g=()=>{const s=document.documentElement.dir==="rtl"?document.documentElement.dir:"ltr";c.forEach(o=>{o.setAttribute("dir",s)})},w=new MutationObserver(g);w.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const p=s=>typeof s.startManagingContentDirection!="undefined"||s.tagName==="SP-THEME";export function SpectrumMixin(s){class o extends s{get isLTR(){return this.dir==="ltr"}hasVisibleFocusInTree(){const n=((r=document)=>{var l;let t=r.activeElement;for(;t!=null&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;const a=t?[t]:[];for(;t;){const i=t.assignedSlot||t.parentElement||((l=t.getRootNode())==null?void 0:l.host);i&&a.push(i),t=i}return a})(this.getRootNode())[0];if(!n)return!1;try{return n.matches(":focus-visible")||n.matches(".focus-visible")}catch(r){return n.matches(".focus-visible")}}connectedCallback(){if(!this.hasAttribute("dir")){let e=this.assignedSlot||this.parentNode;for(;e!==document.documentElement&&!p(e);)e=e.assignedSlot||e.parentNode||e.host;if(this.dir=e.dir==="rtl"?e.dir:this.dir||"ltr",e===document.documentElement)c.add(this);else{const{localName:n}=e;n.search("-")>-1&&!customElements.get(n)?customElements.whenDefined(n).then(()=>{e.startManagingContentDirection(this)}):e.startManagingContentDirection(this)}this._dirParent=e}super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._dirParent&&(this._dirParent===document.documentElement?c.delete(this):this._dirParent.stopManagingContentDirection(this),this.removeAttribute("dir"))}}return o}export class SpectrumElement extends SpectrumMixin(u){}
"use strict";import{LitElement as u}from"lit";import{version as g}from"@spectrum-web-components/base/src/version.js";const c=new Set,w=()=>{const s=document.documentElement.dir==="rtl"?document.documentElement.dir:"ltr";c.forEach(o=>{o.setAttribute("dir",s)})},p=new MutationObserver(w);p.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const h=s=>typeof s.startManagingContentDirection!="undefined"||s.tagName==="SP-THEME";export function SpectrumMixin(s){class o extends s{get isLTR(){return this.dir==="ltr"}hasVisibleFocusInTree(){const n=((r=document)=>{var l;let t=r.activeElement;for(;t!=null&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;const a=t?[t]:[];for(;t;){const i=t.assignedSlot||t.parentElement||((l=t.getRootNode())==null?void 0:l.host);i&&a.push(i),t=i}return a})(this.getRootNode())[0];if(!n)return!1;try{return n.matches(":focus-visible")||n.matches(".focus-visible")}catch(r){return n.matches(".focus-visible")}}connectedCallback(){if(!this.hasAttribute("dir")){let e=this.assignedSlot||this.parentNode;for(;e!==document.documentElement&&!h(e);)e=e.assignedSlot||e.parentNode||e.host;if(this.dir=e.dir==="rtl"?e.dir:this.dir||"ltr",e===document.documentElement)c.add(this);else{const{localName:n}=e;n.search("-")>-1&&!customElements.get(n)?customElements.whenDefined(n).then(()=>{e.startManagingContentDirection(this)}):e.startManagingContentDirection(this)}this._dirParent=e}super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._dirParent&&(this._dirParent===document.documentElement?c.delete(this):this._dirParent.stopManagingContentDirection(this),this.removeAttribute("dir"))}}return o}export class SpectrumElement extends SpectrumMixin(u){}SpectrumElement.VERSION=g;
//# sourceMappingURL=Base.js.map
"use strict";
import { SpectrumElement } from "@spectrum-web-components/base";
import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
import { version } from "@spectrum-web-components/base/src/version.js";
class DirElement extends SpectrumElement {

@@ -22,3 +23,6 @@ }

});
it("has a static VERSION property", () => {
expect(DirElement.VERSION).to.equal(version);
});
});
//# sourceMappingURL=base.test.js.map

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