@inglorious/logo 2.1.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,7 +27,7 @@ import "@inglorious/logo/style.css"
27
27
 
28
28
  const entities = {
29
29
  logo: {
30
- type: "logo",
30
+ type: "Logo",
31
31
  size: 256,
32
32
  faces: [
33
33
  { image: "I", reverse: false, eye: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/logo",
3
- "version": "2.1.2",
3
+ "version": "3.0.0",
4
4
  "description": "The Inglorious Coderz logo, remade to be compatible with Inglorious Web.",
5
5
  "author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "**/*.css"
45
45
  ],
46
46
  "dependencies": {
47
- "@inglorious/web": "4.5.1"
47
+ "@inglorious/web": "5.0.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "prettier": "^3.6.2",
package/src/handlers.js CHANGED
@@ -15,7 +15,7 @@ const FIRST_ITEM = 0
15
15
  const eventType = isTouchDevice() ? "touchmove" : "mousemove"
16
16
  let moveListener = null
17
17
 
18
- export const logo = {
18
+ export const Logo = {
19
19
  /**
20
20
  * Initialize interactivity for the given entity.
21
21
  * @param {LogoEntity} entity
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { logo as handlers } from "./handlers.js"
2
- import { render } from "./template.js"
1
+ import { Logo as handlers } from "./handlers.js"
2
+ import * as renderers from "./template.js"
3
3
 
4
- export const logo = { ...handlers, render }
4
+ export const Logo = { ...handlers, ...renderers }
5
5
 
6
6
  export { startInteraction, stopInteraction } from "./handlers.js"
package/types/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { Api, TemplateResult } from "@inglorious/web"
2
+
1
3
  export interface Face {
2
4
  /** name of the svg */
3
5
  image:
@@ -43,3 +45,12 @@ export interface LogoEntity {
43
45
  isInteractive?: boolean
44
46
  isScrollPrevented?: boolean
45
47
  }
48
+
49
+ export interface LogoType {
50
+ render(entity: LogoEntity, api: Api): TemplateResult
51
+ create(entity: LogoEntity, payload: unknown, api: Api): void
52
+ coordsChange(entity: LogoEntity, payload: { x: number; y: number }): void
53
+ destroy(entity: LogoEntity, payload: unknown, api: Api): void
54
+ }
55
+
56
+ export declare const Logo: LogoType