rumious 1.0.0 → 1.0.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.
package/dist/app/app.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RumiousModule, RumiousModuleInstance } from './module.js';
2
- interface RumiousAppOptions {
2
+ export interface RumiousAppOptions {
3
3
  }
4
4
  export declare class RumiousApp {
5
5
  private root;
@@ -11,4 +11,3 @@ export declare class RumiousApp {
11
11
  render(template: JSX.Element): void;
12
12
  }
13
13
  export declare function createApp(root: HTMLElement, options?: RumiousAppOptions): RumiousApp;
14
- export {};
@@ -0,0 +1,12 @@
1
+ export declare class RumiousContext<T extends object> {
2
+ events: Record<string, Function[]>;
3
+ values: Partial<T>;
4
+ constructor(initialValues?: Partial<T>);
5
+ has<K extends keyof T>(key: K): boolean;
6
+ set<K extends keyof T>(key: K, value: T[K]): void;
7
+ get<K extends keyof T>(key: K): T[K] | undefined;
8
+ on(event: string, callback: Function): void;
9
+ off(event: string, callback: Function): void;
10
+ emit(event: string, payload: any): void;
11
+ }
12
+ export declare function createContext<T extends object>(values: T, name?: string): RumiousContext<T>;
@@ -0,0 +1 @@
1
+ export * from "./context.js";