@nizza/core 0.4.0-alpha.1 → 0.4.0-alpha.2

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.
@@ -0,0 +1,6 @@
1
+ export declare enum NizzaEventStatus {
2
+ CREATED = "CREATED",
3
+ STARTING = "STARTING",
4
+ LIVE = "LIVE",
5
+ FINALIZED = "FINALIZED"
6
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Enumeration of common event wildcards used in the EventBus.
3
+ * This enumeration provides predefined wildcards for different
4
+ * event categories, facilitating event subscription and management.
5
+ *
6
+ * Each wildcard represents a specific category or group of events
7
+ * in the EventBus and is used as a pattern to match multiple events.
8
+ *
9
+ */
10
+ export declare const EventBusWildcards: {
11
+ ALL: string;
12
+ CORE: string;
13
+ LIVE_STREAMING_EVENT: string;
14
+ EVENT_CHAT: string;
15
+ EVENT_PRODUCTS: string;
16
+ CUSTOMIZE_LIVE: string;
17
+ PLAYER: string;
18
+ SNACK_SIZE_VIDEO: string;
19
+ SNACK_SIZE_VIDEO_ADMIN: string;
20
+ UI: string;
21
+ UTILS: string;
22
+ };
23
+ /**
24
+ * Enumeration that defines the names of events used in the application.
25
+ * This enumeration provides a list of event names used throughout
26
+ * the application to facilitate event communication and management.
27
+ *
28
+ * Each event name should be unique and represent a specific action that
29
+ * has occurred in the application.
30
+ *
31
+ */
32
+ export declare const EventNames: {
33
+ EVENT_STATUS_CHANGED: string;
34
+ };
@@ -1,3 +1,4 @@
1
- export * from './eventBusWildcards';
1
+ export * from './event';
2
+ export * from './eventBus';
2
3
  export * from './i18n';
3
4
  export * from './products';
@@ -1,7 +1,7 @@
1
- import { EventBus, EBListener, EBSubscription } from '../types';
1
+ import { EventBus, EventBusListener, EventBusSubscription } from '../types';
2
2
  export declare class DefaultEventBus implements EventBus {
3
3
  private emitter;
4
4
  constructor();
5
- on(event: string, listener: EBListener): EBSubscription;
5
+ on(event: string, listener: EventBusListener): EventBusSubscription;
6
6
  emit(event: string, data: any): void;
7
7
  }
@@ -1,15 +1,15 @@
1
- export interface EBPayload {
1
+ export interface EventBusPayload {
2
2
  name: string;
3
3
  wildcard: string;
4
4
  data: any;
5
5
  attrs: Record<string, any>;
6
6
  }
7
- export interface EBSubscription {
7
+ export interface EventBusSubscription {
8
8
  off: () => void;
9
9
  event: string;
10
10
  }
11
- export type EBListener = (event: EBPayload) => void;
11
+ export type EventBusListener = (event: EventBusPayload) => void;
12
12
  export interface EventBus {
13
- on(event: string, listener: EBListener): EBSubscription;
13
+ on(event: string, listener: EventBusListener): EventBusSubscription;
14
14
  emit(event: string, data: any): void;
15
15
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.4.0-alpha.1",
3
+ "version": "0.4.0-alpha.2",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.4.0-alpha.1",
3
+ "version": "0.4.0-alpha.2",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",
@@ -1,16 +0,0 @@
1
- /**
2
- * Enumeration of common shortcuts for event wildcards.
3
- */
4
- export declare const EventBusWildcards: {
5
- ALL: string;
6
- CORE: string;
7
- CUSTOMIZE_LIVE: string;
8
- EVENT_CHAT: string;
9
- EVENT_PRODUCTS: string;
10
- LIVE_STREAMING_EVENT: string;
11
- PLAYER: string;
12
- SNACK_SIZE_VIDEO: string;
13
- SNACK_SIZE_VIDEO_ADMIN: string;
14
- UI: string;
15
- UTILS: string;
16
- };