@janarendvw/spotlight
Advanced tools
Comparing version 2.0.1 to 2.1.0
# @janaredvw/spotlight | ||
## 2.1.0 | ||
### Minor Changes | ||
- 0ddab9d: Added basic Spotlight class for later integration | ||
## 2.0.1 | ||
@@ -4,0 +10,0 @@ |
"use strict"; | ||
// index.ts | ||
console.log("Hello World"); | ||
// src/spotlight.ts | ||
var Spotlight = class { | ||
constructor() { | ||
this.spotlightArray = []; | ||
this.spotlightBox = null; | ||
this.spotlightDescription = null; | ||
this.createSpotlightBox(); | ||
this.createSpotlightDescription(); | ||
this.gatherSpotlights(); | ||
} | ||
createSpotlightBox() { | ||
this.spotlightBox = document.createElement("div"); | ||
this.spotlightBox.classList.add("spotlight-box"); | ||
document.body.appendChild(this.spotlightBox); | ||
} | ||
createSpotlightDescription() { | ||
var _a; | ||
this.spotlightDescription = document.createElement("div"); | ||
this.spotlightDescription.classList.add("spotlight-description"); | ||
(_a = this.spotlightBox) == null ? void 0 : _a.appendChild(this.spotlightDescription); | ||
} | ||
gatherSpotlights() { | ||
this.spotlightArray = Array.from( | ||
document.querySelectorAll("[data-spotlight]") | ||
); | ||
} | ||
static start() { | ||
} | ||
}; | ||
// src/index.ts | ||
module.exports = { | ||
Spotlight | ||
}; |
{ | ||
"name": "@janarendvw/spotlight", | ||
"license": "MIT", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "A simple spotlight effect for your web app", | ||
@@ -35,2 +35,3 @@ "keywords": [ | ||
"@changesets/cli": "^2.27.1", | ||
"@types/node": "^20.10.4", | ||
"tsup": "^8.0.1", | ||
@@ -40,3 +41,3 @@ "typescript": "^5.3.3" | ||
"scripts": { | ||
"build": "tsup index.ts --format cjs,esm --dts", | ||
"build": "tsup src/index.ts --format cjs,esm --dts", | ||
"lint": "tsc", | ||
@@ -43,0 +44,0 @@ "release": "pnpm run lint && pnpm run build && changeset publish" |
@@ -108,3 +108,6 @@ { | ||
"skipLibCheck": true /* Skip type checking all .d.ts files. */ | ||
} | ||
}, | ||
"include": ["src/**/*"], | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54063
15
231
4