Skip to content

Commit

Permalink
Changed code instances of ‘Sorcery’ to ‘Duomo’
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaydek Michels-Gualtieri committed Nov 10, 2020
1 parent e373ede commit 13b0e3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions src/runtime/Sorcery.ts → src/runtime/Duomo.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
interface ISorcery {
interface IDuomo {
__deferers: (() => void)[]
init(): void
defer(): void
toggleDebugMode(): void
toggleDarkMode(): void
}

const Sorcery: ISorcery = {
const Duomo: IDuomo = {
__deferers: [],

init() {
Expand All @@ -26,24 +26,24 @@ const Sorcery: ISorcery = {
//
// https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener
const handleMedia = () => {
Sorcery.toggleDarkMode()
Duomo.toggleDarkMode()
}
media.addListener(handleMedia)
Sorcery.__deferers.push(() => media.removeListener(handleMedia))
Duomo.__deferers.push(() => media.removeListener(handleMedia))
}
const handleKeyDown = (e: KeyboardEvent) => {
if (!e.ctrlKey && e.key.toLowerCase() === "d") {
Sorcery.toggleDarkMode()
Duomo.toggleDarkMode()
} else if (e.ctrlKey && e.key.toLowerCase() === "d") {
Sorcery.toggleDebugMode()
Duomo.toggleDebugMode()
}
}
document.addEventListener("keydown", handleKeyDown)
Sorcery.__deferers.push(() => document.removeEventListener("keydown", handleKeyDown))
Duomo.__deferers.push(() => document.removeEventListener("keydown", handleKeyDown))
},
defer() {
for (let x = 0; x < Sorcery.__deferers.length; x++) {
Sorcery.__deferers[x]()
for (let x = 0; x < Duomo.__deferers.length; x++) {
Duomo.__deferers[x]()
}
},
toggleDebugMode() {
Expand All @@ -64,4 +64,4 @@ const Sorcery: ISorcery = {
},
}

export default Sorcery
export default Duomo
2 changes: 1 addition & 1 deletion src/runtime/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./utils"
export { default as AspectRatio } from "./AspectRatio"
export { default as Sorcery } from "./Sorcery"
export { default as Duomo } from "./Duomo"
2 changes: 1 addition & 1 deletion src/sass/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ $separator: "\\:";
@at-root {
@include preflight;

/*! @zaydek/sorcery | MIT License | https://github.com/zaydek/sorcery */
/*! @zaydek/duomo | MIT License | https://github.com/zaydek/duomo */
@include props;
@each $key, $value in $breakpoint-map {
@media (min-width: px($value)) {
Expand Down

0 comments on commit 13b0e3e

Please sign in to comment.