@oscarpalmer/abydon 0.13.0 → 0.14.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.
@@ -1,108 +0,0 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
- /**
4
- * A generic key type
5
- */
6
- export type Key = number | string;
7
- export type GenericCallback = (...args: any[]) => any;
8
- declare class Effect {
9
- private readonly $mora;
10
- private readonly state;
11
- constructor(callback: GenericCallback);
12
- }
13
- declare class Computed<Value> extends Reactive<Value> {
14
- private readonly effect;
15
- constructor(callback: () => Value, options?: ReactiveOptions<Value>);
16
- /**
17
- * @inheritdoc
18
- */
19
- get(): Value;
20
- }
21
- declare abstract class Reactive<Value, Equal = Value> {
22
- protected readonly state: ReactiveState<Value, Equal>;
23
- constructor(name: string, value: Value, options?: ReactiveOptions<Equal>);
24
- /**
25
- * Get the value
26
- */
27
- abstract get(): Value;
28
- /**
29
- * Get the value _(without reactivity)_
30
- */
31
- peek(): Value;
32
- /**
33
- * Subscribe to changes
34
- */
35
- subscribe(callback: (value: Value) => void): Unsubscribe;
36
- /**
37
- * JSON representation of the value
38
- */
39
- toJSON(): Value;
40
- /**
41
- * String representation of the value
42
- */
43
- toString(): string;
44
- /**
45
- * Unsubscribe from changes
46
- */
47
- unsubscribe(callback: (value: Value) => void): void;
48
- }
49
- export type ReactiveOptions<Value> = {
50
- /**
51
- * Method to compare values for equality
52
- */
53
- equal?: (first: Value, second: Value) => boolean;
54
- };
55
- export type ReactiveState<Value, Equal> = {
56
- computeds: Set<Computed<unknown>>;
57
- effects: Set<Effect>;
58
- equal: (first: Equal, second: Equal) => boolean;
59
- subscriptions: Map<GenericCallback, Subscription>;
60
- value: Value;
61
- };
62
- declare class Subscription {
63
- state: ReactiveState<unknown, never>;
64
- callback: GenericCallback;
65
- constructor(state: ReactiveState<unknown, never>, callback: GenericCallback);
66
- }
67
- /**
68
- * Unsubscribe from changes
69
- */
70
- export type Unsubscribe = () => void;
71
- declare class Fragment {
72
- private readonly $fragment;
73
- private readonly data;
74
- get identifier(): Key | undefined;
75
- constructor(strings: TemplateStringsArray, expressions: unknown[]);
76
- /**
77
- * Appends the fragment to the given element
78
- */
79
- appendTo(element: Element): void;
80
- /**
81
- * Gets a list of the fragment's nodes
82
- */
83
- get(): ChildNode[];
84
- identify(identifier: Key): Fragment;
85
- /**
86
- * Removes the fragment from the DOM
87
- */
88
- remove(): void;
89
- }
90
- export type FragmentData = {
91
- expressions: unknown[];
92
- identifier?: Key;
93
- items: FragmentItem[];
94
- mora: MoraData;
95
- strings: TemplateStringsArray;
96
- values: unknown[];
97
- };
98
- export type FragmentItem = {
99
- fragments?: Fragment[];
100
- nodes: ChildNode[];
101
- };
102
- export type MoraData = {
103
- subscribers: Set<() => void>;
104
- values: Set<Reactive<unknown>>;
105
- };
106
- export declare function mapNodes(data: FragmentData, nodes: ChildNode[]): void;
107
-
108
- export {};
@@ -1,108 +0,0 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
- /**
4
- * A generic key type
5
- */
6
- export type Key = number | string;
7
- export type GenericCallback = (...args: any[]) => any;
8
- declare class Effect {
9
- private readonly $mora;
10
- private readonly state;
11
- constructor(callback: GenericCallback);
12
- }
13
- declare class Computed<Value> extends Reactive<Value> {
14
- private readonly effect;
15
- constructor(callback: () => Value, options?: ReactiveOptions<Value>);
16
- /**
17
- * @inheritdoc
18
- */
19
- get(): Value;
20
- }
21
- declare abstract class Reactive<Value, Equal = Value> {
22
- protected readonly state: ReactiveState<Value, Equal>;
23
- constructor(name: string, value: Value, options?: ReactiveOptions<Equal>);
24
- /**
25
- * Get the value
26
- */
27
- abstract get(): Value;
28
- /**
29
- * Get the value _(without reactivity)_
30
- */
31
- peek(): Value;
32
- /**
33
- * Subscribe to changes
34
- */
35
- subscribe(callback: (value: Value) => void): Unsubscribe;
36
- /**
37
- * JSON representation of the value
38
- */
39
- toJSON(): Value;
40
- /**
41
- * String representation of the value
42
- */
43
- toString(): string;
44
- /**
45
- * Unsubscribe from changes
46
- */
47
- unsubscribe(callback: (value: Value) => void): void;
48
- }
49
- export type ReactiveOptions<Value> = {
50
- /**
51
- * Method to compare values for equality
52
- */
53
- equal?: (first: Value, second: Value) => boolean;
54
- };
55
- export type ReactiveState<Value, Equal> = {
56
- computeds: Set<Computed<unknown>>;
57
- effects: Set<Effect>;
58
- equal: (first: Equal, second: Equal) => boolean;
59
- subscriptions: Map<GenericCallback, Subscription>;
60
- value: Value;
61
- };
62
- declare class Subscription {
63
- state: ReactiveState<unknown, never>;
64
- callback: GenericCallback;
65
- constructor(state: ReactiveState<unknown, never>, callback: GenericCallback);
66
- }
67
- /**
68
- * Unsubscribe from changes
69
- */
70
- export type Unsubscribe = () => void;
71
- declare class Fragment {
72
- private readonly $fragment;
73
- private readonly data;
74
- get identifier(): Key | undefined;
75
- constructor(strings: TemplateStringsArray, expressions: unknown[]);
76
- /**
77
- * Appends the fragment to the given element
78
- */
79
- appendTo(element: Element): void;
80
- /**
81
- * Gets a list of the fragment's nodes
82
- */
83
- get(): ChildNode[];
84
- identify(identifier: Key): Fragment;
85
- /**
86
- * Removes the fragment from the DOM
87
- */
88
- remove(): void;
89
- }
90
- export type FragmentData = {
91
- expressions: unknown[];
92
- identifier?: Key;
93
- items: FragmentItem[];
94
- mora: MoraData;
95
- strings: TemplateStringsArray;
96
- values: unknown[];
97
- };
98
- export type FragmentItem = {
99
- fragments?: Fragment[];
100
- nodes: ChildNode[];
101
- };
102
- export type MoraData = {
103
- subscribers: Set<() => void>;
104
- values: Set<Reactive<unknown>>;
105
- };
106
- export declare function setReactiveValue(data: FragmentData, comment: Comment, reactive: Reactive<unknown>): void;
107
-
108
- export {};
package/types/parse.d.cts DELETED
@@ -1,108 +0,0 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
- /**
4
- * A generic key type
5
- */
6
- export type Key = number | string;
7
- export type GenericCallback = (...args: any[]) => any;
8
- declare class Effect {
9
- private readonly $mora;
10
- private readonly state;
11
- constructor(callback: GenericCallback);
12
- }
13
- declare class Computed<Value> extends Reactive<Value> {
14
- private readonly effect;
15
- constructor(callback: () => Value, options?: ReactiveOptions<Value>);
16
- /**
17
- * @inheritdoc
18
- */
19
- get(): Value;
20
- }
21
- declare abstract class Reactive<Value, Equal = Value> {
22
- protected readonly state: ReactiveState<Value, Equal>;
23
- constructor(name: string, value: Value, options?: ReactiveOptions<Equal>);
24
- /**
25
- * Get the value
26
- */
27
- abstract get(): Value;
28
- /**
29
- * Get the value _(without reactivity)_
30
- */
31
- peek(): Value;
32
- /**
33
- * Subscribe to changes
34
- */
35
- subscribe(callback: (value: Value) => void): Unsubscribe;
36
- /**
37
- * JSON representation of the value
38
- */
39
- toJSON(): Value;
40
- /**
41
- * String representation of the value
42
- */
43
- toString(): string;
44
- /**
45
- * Unsubscribe from changes
46
- */
47
- unsubscribe(callback: (value: Value) => void): void;
48
- }
49
- export type ReactiveOptions<Value> = {
50
- /**
51
- * Method to compare values for equality
52
- */
53
- equal?: (first: Value, second: Value) => boolean;
54
- };
55
- export type ReactiveState<Value, Equal> = {
56
- computeds: Set<Computed<unknown>>;
57
- effects: Set<Effect>;
58
- equal: (first: Equal, second: Equal) => boolean;
59
- subscriptions: Map<GenericCallback, Subscription>;
60
- value: Value;
61
- };
62
- declare class Subscription {
63
- state: ReactiveState<unknown, never>;
64
- callback: GenericCallback;
65
- constructor(state: ReactiveState<unknown, never>, callback: GenericCallback);
66
- }
67
- /**
68
- * Unsubscribe from changes
69
- */
70
- export type Unsubscribe = () => void;
71
- declare class Fragment {
72
- private readonly $fragment;
73
- private readonly data;
74
- get identifier(): Key | undefined;
75
- constructor(strings: TemplateStringsArray, expressions: unknown[]);
76
- /**
77
- * Appends the fragment to the given element
78
- */
79
- appendTo(element: Element): void;
80
- /**
81
- * Gets a list of the fragment's nodes
82
- */
83
- get(): ChildNode[];
84
- identify(identifier: Key): Fragment;
85
- /**
86
- * Removes the fragment from the DOM
87
- */
88
- remove(): void;
89
- }
90
- export type FragmentData = {
91
- expressions: unknown[];
92
- identifier?: Key;
93
- items: FragmentItem[];
94
- mora: MoraData;
95
- strings: TemplateStringsArray;
96
- values: unknown[];
97
- };
98
- export type FragmentItem = {
99
- fragments?: Fragment[];
100
- nodes: ChildNode[];
101
- };
102
- export type MoraData = {
103
- subscribers: Set<() => void>;
104
- values: Set<Reactive<unknown>>;
105
- };
106
- export declare function parse(data: FragmentData): string;
107
-
108
- export {};