Skip to content

Commit

Permalink
Use bundled Lit package rather than importing from HA (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
benct committed Dec 17, 2021
1 parent dcc079b commit c685725
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"author": "benct <ben@tomlin.no>",
"license": "MIT",
"dependencies": {
"custom-card-helpers": "^1.8.0"
"custom-card-helpers": "^1.8.0",
"lit": "^2.0.2"
},
"devDependencies": {
"@babel/core": "^7.16.5",
Expand Down
7 changes: 2 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { LitElement, html, css } from 'lit';
import { handleClick, secondsToDuration, formatNumber } from 'custom-card-helpers';

import { checkEntity, entityName, entityStateDisplay, entityStyles, entityUnit, entityValue } from './entity';
import { getEntityIds, hasConfigOrEntitiesChanged, hasGenericSecondaryInfo, isObject, hideUnavailable } from './util';
import { style } from './styles';

const LitElement =
window.LitElement ||
Object.getPrototypeOf(customElements.get('hui-masonry-view') || customElements.get('hui-view'));
const { html, css } = LitElement.prototype;

console.info(
'%c MULTIPLE-ENTITY-ROW %c 4.2.0 ',
'color: cyan; background: black; font-weight: bold;',
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,7 @@ lit-html@^2.0.0:
dependencies:
"@types/trusted-types" "^2.0.2"

lit@^2.0.0-rc.3:
lit@^2.0.0-rc.3, lit@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/lit/-/lit-2.0.2.tgz#5e6f422924e0732258629fb379556b6d23f7179c"
integrity sha512-hKA/1YaSB+P+DvKWuR2q1Xzy/iayhNrJ3aveD0OQ9CKn6wUjsdnF/7LavDOJsKP/K5jzW/kXsuduPgRvTFrFJw==
Expand Down

0 comments on commit c685725

Please sign in to comment.