@betorigami/games 0.5.2 → 0.6.1

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.
@@ -1,6 +1,6 @@
1
1
  import { CSSResult, LitElement } from 'lit';
2
- type EventTypeRequiresDetail<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? never : Partial<GlobalEventHandlersEventMap[T]["detail"]> extends GlobalEventHandlersEventMap[T]["detail"] ? never : T : never : never;
3
- type EventTypeDoesNotRequireDetail<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? T : Partial<GlobalEventHandlersEventMap[T]["detail"]> extends GlobalEventHandlersEventMap[T]["detail"] ? T : never : T : T;
2
+ type EventTypeRequiresDetail<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? never : Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail'] ? never : T : never : never;
3
+ type EventTypeDoesNotRequireDetail<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? T : Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail'] ? T : never : T : T;
4
4
  type EventTypesWithRequiredDetail = {
5
5
  [EventType in keyof GlobalEventHandlersEventMap as EventTypeRequiresDetail<EventType>]: true;
6
6
  };
@@ -10,7 +10,7 @@ type EventTypesWithoutRequiredDetail = {
10
10
  type WithRequired<T, K extends keyof T> = T & {
11
11
  [P in K]-?: T[P];
12
12
  };
13
- type SlEventInit<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? CustomEventInit<GlobalEventHandlersEventMap[T]["detail"]> : Partial<GlobalEventHandlersEventMap[T]["detail"]> extends GlobalEventHandlersEventMap[T]["detail"] ? CustomEventInit<GlobalEventHandlersEventMap[T]["detail"]> : WithRequired<CustomEventInit<GlobalEventHandlersEventMap[T]["detail"]>, "detail"> : CustomEventInit : CustomEventInit;
13
+ type SlEventInit<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? CustomEventInit<GlobalEventHandlersEventMap[T]['detail']> : Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail'] ? CustomEventInit<GlobalEventHandlersEventMap[T]['detail']> : WithRequired<CustomEventInit<GlobalEventHandlersEventMap[T]['detail']>, 'detail'> : CustomEventInit : CustomEventInit;
14
14
  type GetCustomEventType<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<unknown> ? GlobalEventHandlersEventMap[T] : CustomEvent<unknown> : CustomEvent<unknown>;
15
15
  export default class OrigamiElement extends LitElement {
16
16
  static componentStyles: CSSResult[];
@@ -19,4 +19,4 @@ export declare function lockBodyScrolling(lockingEl: HTMLElement): void;
19
19
  */
20
20
  export declare function unlockBodyScrolling(lockingEl: HTMLElement): void;
21
21
  /** Scrolls an element into view of its container. If the element is already in view, nothing will happen. */
22
- export declare function scrollIntoView(element: HTMLElement, container: HTMLElement, direction?: "horizontal" | "vertical" | "both", behavior?: "smooth" | "auto"): void;
22
+ export declare function scrollIntoView(element: HTMLElement, container: HTMLElement, direction?: 'horizontal' | 'vertical' | 'both', behavior?: 'smooth' | 'auto'): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betorigami/games",
3
- "version": "0.5.2",
3
+ "version": "0.6.1",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",
@@ -13,11 +13,14 @@
13
13
  "types": "./dist/index.d.ts"
14
14
  }
15
15
  },
16
- "unpkg": "dist/index.umd.js",
17
- "jsdelivr": "dist/index.umd.js",
16
+ "unpkg": "dist/index.mjs",
17
+ "jsdelivr": "dist/index.mjs",
18
18
  "files": [
19
19
  "dist"
20
20
  ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
21
24
  "dependencies": {
22
25
  "@betorigami/calculations": "^0.1.0",
23
26
  "@lit/context": "^1.1.5",
@@ -28,18 +31,16 @@
28
31
  "devDependencies": {
29
32
  "@rollup/plugin-babel": "^6.0.4",
30
33
  "@rollup/plugin-terser": "^0.4.4",
31
- "@storybook/test": "^8.6.14",
32
- "@storybook/web-components": "^8.6.14",
34
+ "@storybook/web-components-vite": "^9.0.4",
35
+ "@storybook/web-components": "^9.0.4",
33
36
  "rollup": "^4.41.1",
34
- "rollup-plugin-html-literals": "^1.1.8",
35
- "storybook": "^8.6.14",
37
+ "storybook": "^9.0.4",
36
38
  "typescript": "^5.8.3",
37
39
  "vite": "^6.3.5",
38
40
  "vite-plugin-dts": "^4.5.4"
39
41
  },
40
42
  "scripts": {
41
43
  "build": "tsc && vite build",
42
- "watch": "vite",
43
- "preview": "vite preview"
44
+ "watch": "vite"
44
45
  }
45
46
  }