@tempots/dom 5.0.0 → 5.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.
Files changed (191) hide show
  1. package/dist/clean.d.ts +2 -0
  2. package/dist/clean.js +1 -0
  3. package/dist/components/Attribute.d.ts +15 -0
  4. package/dist/components/Attribute.js +16 -0
  5. package/dist/components/BooleanAttribute.d.ts +15 -0
  6. package/dist/components/BooleanAttribute.js +16 -0
  7. package/dist/components/ClassName.d.ts +13 -0
  8. package/dist/components/ClassName.js +14 -0
  9. package/dist/components/El.d.ts +15 -0
  10. package/dist/components/El.js +21 -0
  11. package/dist/components/FadeIn.d.ts +18 -0
  12. package/dist/components/FadeIn.js +52 -0
  13. package/dist/components/FadeOut.d.ts +16 -0
  14. package/dist/components/FadeOut.js +39 -0
  15. package/dist/components/For.d.ts +7 -0
  16. package/dist/components/For.js +15 -0
  17. package/dist/components/Fragment.d.ts +12 -0
  18. package/dist/components/Fragment.js +16 -0
  19. package/dist/components/HiddenWhenEmpty.d.ts +7 -0
  20. package/dist/components/HiddenWhenEmpty.js +12 -0
  21. package/dist/components/If.d.ts +14 -0
  22. package/dist/components/If.js +19 -0
  23. package/dist/components/InnerHTML.d.ts +13 -0
  24. package/dist/components/InnerHTML.js +23 -0
  25. package/dist/components/Lifecycle.d.ts +14 -0
  26. package/dist/components/Lifecycle.js +18 -0
  27. package/dist/components/Match.d.ts +33 -0
  28. package/dist/components/Match.js +44 -0
  29. package/dist/components/NotEmpty.d.ts +10 -0
  30. package/dist/components/NotEmpty.js +11 -0
  31. package/dist/components/On.d.ts +15 -0
  32. package/dist/components/On.js +14 -0
  33. package/dist/components/OnRemove.d.ts +11 -0
  34. package/dist/components/OnRemove.js +14 -0
  35. package/dist/components/OneOf.d.ts +20 -0
  36. package/dist/components/OneOf.js +45 -0
  37. package/dist/components/Portal.d.ts +15 -0
  38. package/dist/components/Portal.js +20 -0
  39. package/dist/components/Property.d.ts +15 -0
  40. package/dist/components/Property.js +16 -0
  41. package/dist/components/Provider.d.ts +28 -0
  42. package/dist/components/Provider.js +44 -0
  43. package/dist/components/Repeat.d.ts +15 -0
  44. package/dist/components/Repeat.js +33 -0
  45. package/dist/components/Shadow.d.ts +0 -0
  46. package/dist/components/Shadow.js +1 -0
  47. package/dist/components/Show.d.ts +20 -0
  48. package/dist/components/Show.js +22 -0
  49. package/dist/components/Text.d.ts +15 -0
  50. package/dist/components/Text.js +33 -0
  51. package/dist/components/TextContent.d.ts +13 -0
  52. package/dist/components/TextContent.js +23 -0
  53. package/dist/components/Tween.d.ts +75 -0
  54. package/dist/components/Tween.js +242 -0
  55. package/dist/components/animatable.d.ts +53 -0
  56. package/dist/components/animatable.js +156 -0
  57. package/dist/dom-context.d.ts +38 -0
  58. package/dist/dom-context.js +260 -0
  59. package/dist/helpers/handle-anchor-click.d.ts +4 -0
  60. package/dist/helpers/handle-anchor-click.js +43 -0
  61. package/dist/helpers/handle-text-input.d.ts +1 -0
  62. package/dist/helpers/handle-text-input.js +4 -0
  63. package/dist/helpers/is-empty-element.d.ts +2 -0
  64. package/dist/helpers/is-empty-element.js +8 -0
  65. package/dist/index.d.ts +36 -0
  66. package/dist/jsx-dev-runtime.d.ts +1 -0
  67. package/dist/jsx-dev-runtime.js +1 -0
  68. package/dist/jsx-runtime.d.ts +9 -0
  69. package/dist/jsx-runtime.js +157 -0
  70. package/dist/jsx.d.ts +806 -0
  71. package/dist/jsx.js +1 -0
  72. package/dist/prop.d.ts +43 -0
  73. package/dist/prop.js +174 -0
  74. package/dist/render.d.ts +3 -0
  75. package/dist/render.js +7 -0
  76. package/dist/renderable.d.ts +5 -0
  77. package/dist/renderable.js +1 -0
  78. package/dist/types/clean.d.ts +2 -0
  79. package/dist/types/clean.js +1 -0
  80. package/dist/types/idom-context.d.ts +27 -0
  81. package/dist/types/idom-context.js +3 -0
  82. package/dist/types/renderable.d.ts +5 -0
  83. package/dist/types/renderable.js +1 -0
  84. package/package.json +5 -1
  85. package/.eslintignore +0 -10
  86. package/.eslintrc.cjs +0 -28
  87. package/coverage/clover.xml +0 -39
  88. package/coverage/coverage-final.json +0 -2
  89. package/coverage/lcov-report/OneOf.ts.html +0 -256
  90. package/coverage/lcov-report/base.css +0 -224
  91. package/coverage/lcov-report/block-navigation.js +0 -87
  92. package/coverage/lcov-report/dom-context.ts.html +0 -928
  93. package/coverage/lcov-report/favicon.png +0 -0
  94. package/coverage/lcov-report/index.html +0 -116
  95. package/coverage/lcov-report/prettify.css +0 -1
  96. package/coverage/lcov-report/prettify.js +0 -2
  97. package/coverage/lcov-report/prop.ts.html +0 -691
  98. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  99. package/coverage/lcov-report/sorter.js +0 -196
  100. package/coverage/lcov-report/src/components/Attribute.ts.html +0 -154
  101. package/coverage/lcov-report/src/components/BooleanAttribute.ts.html +0 -154
  102. package/coverage/lcov-report/src/components/ClassName.ts.html +0 -151
  103. package/coverage/lcov-report/src/components/El.ts.html +0 -166
  104. package/coverage/lcov-report/src/components/FadeIn.ts.html +0 -262
  105. package/coverage/lcov-report/src/components/FadeOut.ts.html +0 -226
  106. package/coverage/lcov-report/src/components/For.ts.html +0 -151
  107. package/coverage/lcov-report/src/components/Fragment.ts.html +0 -142
  108. package/coverage/lcov-report/src/components/HiddenWhenEmpty.ts.html +0 -133
  109. package/coverage/lcov-report/src/components/If.ts.html +0 -217
  110. package/coverage/lcov-report/src/components/InnerHTML.ts.html +0 -178
  111. package/coverage/lcov-report/src/components/Lifecycle.ts.html +0 -157
  112. package/coverage/lcov-report/src/components/Match.ts.html +0 -286
  113. package/coverage/lcov-report/src/components/NotEmpty.tsx.html +0 -184
  114. package/coverage/lcov-report/src/components/On.ts.html +0 -151
  115. package/coverage/lcov-report/src/components/OnRemove.ts.html +0 -145
  116. package/coverage/lcov-report/src/components/OneOf.ts.html +0 -256
  117. package/coverage/lcov-report/src/components/Portal.ts.html +0 -175
  118. package/coverage/lcov-report/src/components/Property.ts.html +0 -154
  119. package/coverage/lcov-report/src/components/Provider.ts.html +0 -244
  120. package/coverage/lcov-report/src/components/Repeat.ts.html +0 -223
  121. package/coverage/lcov-report/src/components/Show.tsx.html +0 -190
  122. package/coverage/lcov-report/src/components/Text.ts.html +0 -229
  123. package/coverage/lcov-report/src/components/TextContent.ts.html +0 -178
  124. package/coverage/lcov-report/src/components/Tween.tsx.html +0 -943
  125. package/coverage/lcov-report/src/components/animatable.ts.html +0 -619
  126. package/coverage/lcov-report/src/components/index.html +0 -476
  127. package/coverage/lcov-report/src/dom-context.ts.html +0 -928
  128. package/coverage/lcov-report/src/helpers/handle-anchor-click.ts.html +0 -277
  129. package/coverage/lcov-report/src/helpers/handle-text-input.ts.html +0 -100
  130. package/coverage/lcov-report/src/helpers/index.html +0 -146
  131. package/coverage/lcov-report/src/helpers/is-empty-element.ts.html +0 -112
  132. package/coverage/lcov-report/src/index.html +0 -176
  133. package/coverage/lcov-report/src/index.ts.html +0 -412
  134. package/coverage/lcov-report/src/jsx-runtime.ts.html +0 -601
  135. package/coverage/lcov-report/src/prop.ts.html +0 -691
  136. package/coverage/lcov-report/src/render.ts.html +0 -112
  137. package/coverage/lcov-report/src/types/idom-context.ts.html +0 -184
  138. package/coverage/lcov-report/src/types/index.html +0 -116
  139. package/coverage/lcov-report/test/common.ts.html +0 -112
  140. package/coverage/lcov-report/test/index.html +0 -116
  141. package/coverage/lcov.info +0 -57
  142. package/jest.config.js +0 -5
  143. package/src/clean.ts +0 -2
  144. package/src/components/Attribute.ts +0 -23
  145. package/src/components/BooleanAttribute.ts +0 -23
  146. package/src/components/ClassName.ts +0 -22
  147. package/src/components/El.ts +0 -27
  148. package/src/components/FadeIn.ts +0 -59
  149. package/src/components/FadeOut.ts +0 -47
  150. package/src/components/For.ts +0 -22
  151. package/src/components/Fragment.ts +0 -19
  152. package/src/components/HiddenWhenEmpty.ts +0 -16
  153. package/src/components/If.ts +0 -44
  154. package/src/components/InnerHTML.ts +0 -31
  155. package/src/components/Lifecycle.ts +0 -24
  156. package/src/components/Match.ts +0 -67
  157. package/src/components/NotEmpty.tsx +0 -33
  158. package/src/components/On.ts +0 -22
  159. package/src/components/OnRemove.ts +0 -20
  160. package/src/components/OneOf.ts +0 -57
  161. package/src/components/Portal.ts +0 -30
  162. package/src/components/Property.ts +0 -23
  163. package/src/components/Provider.ts +0 -53
  164. package/src/components/Repeat.ts +0 -46
  165. package/src/components/Show.tsx +0 -35
  166. package/src/components/Text.ts +0 -48
  167. package/src/components/TextContent.ts +0 -31
  168. package/src/components/animatable.ts +0 -178
  169. package/src/dom-context.ts +0 -281
  170. package/src/helpers/handle-anchor-click.ts +0 -64
  171. package/src/helpers/handle-text-input.ts +0 -5
  172. package/src/helpers/is-empty-element.ts +0 -9
  173. package/src/index.ts +0 -109
  174. package/src/jsx-dev-runtime.ts +0 -8
  175. package/src/jsx-runtime.ts +0 -172
  176. package/src/jsx.ts +0 -1046
  177. package/src/prop.ts +0 -202
  178. package/src/render.ts +0 -9
  179. package/src/renderable.ts +0 -6
  180. package/test/common.ts +0 -9
  181. package/test/component.spec.tsx +0 -27
  182. package/test/domcontext.spec.ts +0 -36
  183. package/test/fadein.spec.tsx +0 -36
  184. package/test/fadeout.spec.tsx +0 -41
  185. package/test/if.spec.tsx +0 -30
  186. package/test/innerhtml.spec.tsx +0 -45
  187. package/test/prop.spec.ts +0 -10
  188. package/test/render.spec.tsx +0 -19
  189. package/test/textcontent.spec.tsx +0 -45
  190. package/test/when.spec.tsx +0 -30
  191. package/tsconfig.json +0 -21
package/dist/jsx.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/prop.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ export type ArgsToSignals<T extends [...unknown[]]> = T extends [] ? [] : T extends [infer U, ...infer V] ? [Signal<U>, ...ArgsToSignals<V>] : [];
2
+ declare const $isSignal: unique symbol;
3
+ declare const $isProp: unique symbol;
4
+ export type Value<T> = T | Signal<T>;
5
+ export declare class Signal<T> {
6
+ protected _value: T;
7
+ static of<T>(value: T): Signal<T>;
8
+ static ofValue<T>(value: Value<T> | null | undefined): Signal<T> | undefined;
9
+ static wrap<T>(value: T | Signal<T>): Signal<T>;
10
+ static isSignal<T = unknown>(x: unknown): x is Signal<T>;
11
+ /**
12
+ * Combines many into one using a merging function
13
+ */
14
+ static combine<Args extends [...unknown[]], Out>(others: ArgsToSignals<Args>, f: (...args: Args) => Out): Signal<Out>;
15
+ readonly [$isSignal] = true;
16
+ protected readonly _listeners: Array<(value: T) => void>;
17
+ constructor(_value: T);
18
+ readonly get: () => T;
19
+ readonly subscribe: (listener: (value: T) => void) => () => void;
20
+ readonly map: <V>(f: (value: T) => V) => Signal<V>;
21
+ readonly flatMap: <V>(f: (value: T) => Signal<V>) => Signal<V>;
22
+ readonly tap: (f: (value: T) => void) => this;
23
+ readonly at: <K extends keyof T>(key: K) => Signal<T[K]>;
24
+ readonly filter: (predicate: (value: T) => boolean) => Signal<T>;
25
+ readonly distinct: (equality: (a: T, b: T) => boolean) => Signal<T>;
26
+ readonly mapAsync: <V>(f: (value: T) => Promise<V>, alt: V) => Signal<V>;
27
+ readonly mapMaybe: <V>(f: (value: T) => V | null | undefined, alt: V) => Signal<V>;
28
+ readonly combine: <V, Z>(other: Signal<V>, f: (a: T, b: V) => Z) => Signal<Z>;
29
+ readonly feed: (prop: Prop<T>) => Prop<T>;
30
+ readonly deriveProp: () => Prop<T>;
31
+ readonly clean: () => void;
32
+ }
33
+ export declare class Prop<T> extends Signal<T> {
34
+ static isProp<T = unknown>(x: unknown): x is Prop<T>;
35
+ static of<T>(value: T): Prop<T>;
36
+ readonly [$isProp] = true;
37
+ readonly set: (value: T) => void;
38
+ readonly update: (f: (value: T) => T) => void;
39
+ readonly atLens: <K extends keyof T>(key: K) => Prop<T[K]>;
40
+ readonly reducer: <V>(f: (state: T, action: V) => T) => (action: V) => void;
41
+ readonly iso: <V>(map: (value: T) => V, reverse: (value: V) => T) => Prop<V>;
42
+ }
43
+ export {};
package/dist/prop.js ADDED
@@ -0,0 +1,174 @@
1
+ const $isSignal = Symbol('isSignal');
2
+ const $isProp = Symbol('isProp');
3
+ export class Signal {
4
+ _value;
5
+ static of(value) {
6
+ return new Signal(value);
7
+ }
8
+ static ofValue(value) {
9
+ return value == null ? undefined : Signal.wrap(value);
10
+ }
11
+ static wrap(value) {
12
+ return Signal.isSignal(value) ? value : new Signal(value);
13
+ }
14
+ static isSignal(x) {
15
+ const s = x;
16
+ return s != null && typeof s.get === 'function' && typeof s.subscribe === 'function';
17
+ }
18
+ /**
19
+ * Combines many into one using a merging function
20
+ */
21
+ static combine(others, f) {
22
+ function getValues(others) {
23
+ return others.map(other => other.get());
24
+ }
25
+ const prop = new Prop(f(...getValues(others)));
26
+ others.forEach((other) => {
27
+ other.subscribe(() => {
28
+ prop.set(f(...getValues(others)));
29
+ });
30
+ });
31
+ return prop;
32
+ }
33
+ [$isSignal] = true;
34
+ _listeners = [];
35
+ constructor(_value) {
36
+ this._value = _value;
37
+ }
38
+ get = () => {
39
+ return this._value;
40
+ };
41
+ subscribe = (listener) => {
42
+ this._listeners.push(listener);
43
+ return () => {
44
+ const index = this._listeners.indexOf(listener);
45
+ if (index >= 0) {
46
+ this._listeners.splice(index, 1);
47
+ }
48
+ };
49
+ };
50
+ map = (f) => {
51
+ const prop = new Prop(f(this._value));
52
+ this.subscribe(value => { prop.set(f(value)); });
53
+ return prop;
54
+ };
55
+ flatMap = (f) => {
56
+ let signal = f(this._value);
57
+ const prop = new Prop(signal.get());
58
+ this.subscribe(value => {
59
+ signal.clean();
60
+ signal = f(value);
61
+ signal.subscribe(value => { prop.set(value); });
62
+ });
63
+ return prop;
64
+ };
65
+ tap = (f) => {
66
+ f(this._value);
67
+ this.subscribe(f);
68
+ return this;
69
+ };
70
+ at = (key) => {
71
+ return this.map(value => value[key]);
72
+ };
73
+ filter = (predicate) => {
74
+ const prop = new Prop(this._value);
75
+ this.subscribe(value => {
76
+ if (predicate(value)) {
77
+ prop.set(value);
78
+ }
79
+ });
80
+ return prop;
81
+ };
82
+ distinct = (equality) => {
83
+ let lastValue = this._value;
84
+ return this.filter(value => {
85
+ const result = !equality(value, lastValue);
86
+ lastValue = value;
87
+ return result;
88
+ });
89
+ };
90
+ mapAsync = (f, alt) => {
91
+ let counter = 0;
92
+ const prop = new Prop(alt);
93
+ f(this._value)
94
+ .then(value => {
95
+ if (counter === 0)
96
+ prop.set(value);
97
+ })
98
+ .catch(e => {
99
+ throw e;
100
+ });
101
+ this.subscribe(value => {
102
+ const matchCounter = ++counter;
103
+ f(value)
104
+ .then(value => {
105
+ if (matchCounter === counter) {
106
+ prop.set(value);
107
+ }
108
+ })
109
+ .catch(e => {
110
+ throw e;
111
+ });
112
+ });
113
+ return prop;
114
+ };
115
+ mapMaybe = (f, alt) => {
116
+ const prop = new Prop(f(this._value) ?? alt);
117
+ this.subscribe(value => {
118
+ const newValue = f(value);
119
+ if (newValue != null)
120
+ prop.set(newValue);
121
+ });
122
+ return prop;
123
+ };
124
+ combine = (other, f) => {
125
+ const prop = new Prop(f(this._value, other.get()));
126
+ this.subscribe(value => { prop.set(f(value, other.get())); });
127
+ other.subscribe(value => { prop.set(f(this._value, value)); });
128
+ return prop;
129
+ };
130
+ feed = (prop) => {
131
+ this.subscribe(value => { prop.set(value); });
132
+ return prop;
133
+ };
134
+ deriveProp = () => {
135
+ return new Prop(this._value);
136
+ };
137
+ clean = () => {
138
+ this._listeners.length = 0;
139
+ };
140
+ }
141
+ export class Prop extends Signal {
142
+ static isProp(x) {
143
+ const p = x;
144
+ return Signal.isSignal(x) && typeof p.set === 'function';
145
+ // return x != null && (x as Prop<T>)[$isProp] === true
146
+ }
147
+ static of(value) {
148
+ return new Prop(value);
149
+ }
150
+ [$isProp] = true;
151
+ set = (value) => {
152
+ if (this._value === value)
153
+ return;
154
+ this._value = value;
155
+ this._listeners.forEach(listener => { listener(value); });
156
+ };
157
+ update = (f) => {
158
+ this.set(f(this._value));
159
+ };
160
+ atLens = (key) => {
161
+ return this.iso(value => value[key], value => ({ ...this._value, [key]: value }));
162
+ };
163
+ reducer = (f) => {
164
+ return (action) => {
165
+ this.set(f(this._value, action));
166
+ };
167
+ };
168
+ iso = (map, reverse) => {
169
+ const prop = new Prop(map(this._value));
170
+ this.subscribe(value => { prop.set(map(value)); });
171
+ prop.subscribe(value => { this.set(reverse(value)); });
172
+ return prop;
173
+ };
174
+ }
@@ -0,0 +1,3 @@
1
+ import { type JSX } from './jsx-runtime';
2
+ import { type Clean } from './clean';
3
+ export declare function render(renderable: JSX.DOMNode, element: HTMLElement): Clean;
package/dist/render.js ADDED
@@ -0,0 +1,7 @@
1
+ import { DOMContext } from './dom-context';
2
+ import { makeRenderable } from './jsx-runtime';
3
+ export function render(renderable, element) {
4
+ const ctx = DOMContext.of(element);
5
+ const clear = makeRenderable(renderable).appendTo(ctx);
6
+ return () => { clear(true); };
7
+ }
@@ -0,0 +1,5 @@
1
+ import { type DOMContext } from './dom-context';
2
+ import { type Clear } from './clean';
3
+ export interface Renderable {
4
+ appendTo: (ctx: DOMContext) => Clear;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export type Clear = (removeTree: boolean) => void;
2
+ export type Clean = () => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import { type Clear } from './clean';
2
+ export type ProviderMark<T> = symbol;
3
+ export declare function makeProviderMark<T>(): ProviderMark<T>;
4
+ export interface IDOMContext {
5
+ makeReference: () => IDOMContext;
6
+ makeElement: (tagName: string) => IDOMContext;
7
+ getBooleanAttribute: (name: string) => boolean;
8
+ setBooleanAttribute: (name: string, value: boolean) => void;
9
+ createBooleanAttribute: (name: string, value: boolean) => [(newValue: boolean) => void, Clear];
10
+ getAttribute: (name: string) => string | null;
11
+ setAttribute: (name: string, value: string | null) => void;
12
+ createAttribute: (name: string, value: string) => [(newValue: string) => void, Clear];
13
+ getProperty: <T>(name: string) => T;
14
+ setProperty: <T>(name: string, value: T) => void;
15
+ createProperty: <T>(name: string, value: T) => [(newValue: T) => void, Clear];
16
+ createText: (text: string) => [(newText: string) => void, Clear];
17
+ createClass: (cls: string) => [(newClass: string) => void, Clear];
18
+ createHandler: <T>(name: string, handler: (value: T) => void) => Clear;
19
+ delayClear: (removeTree: boolean, f: (finalize: () => void) => void) => void;
20
+ requestClear: (removeTree: boolean, willClear: () => void) => void;
21
+ getElement: () => HTMLElement;
22
+ getDocument: () => Document;
23
+ withProvider: <T>(mark: ProviderMark<T>, provider: T) => IDOMContext;
24
+ getProvider: <T>(mark: ProviderMark<T>) => T;
25
+ setStyle: (name: string, value: string | undefined | null) => void;
26
+ createStyle: (name: string, value: string | undefined | null) => [(newValue: string) => void, Clear];
27
+ }
@@ -0,0 +1,3 @@
1
+ export function makeProviderMark() {
2
+ return Symbol('providerMark');
3
+ }
@@ -0,0 +1,5 @@
1
+ import { type DOMContext } from '../dom-context';
2
+ import { type Clear } from './clean';
3
+ export interface Renderable {
4
+ appendTo: (ctx: DOMContext) => Clear;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@tempots/dom",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
5
6
  "scripts": {
6
7
  "watch": "tsc --watch",
7
8
  "build": "tsc",
@@ -10,6 +11,9 @@
10
11
  "coverage": "jest --coverage",
11
12
  "npm:publish": "yarn publish --access public"
12
13
  },
14
+ "files": [
15
+ "dist"
16
+ ],
13
17
  "dependencies": {},
14
18
  "devDependencies": {
15
19
  "@happy-dom/jest-environment": "^9.1.7",
package/.eslintignore DELETED
@@ -1,10 +0,0 @@
1
- node_modules
2
- .DS_Store
3
- dist
4
- dist-ssr
5
- *.local
6
- node_modules/*
7
- **/*.js
8
- **/*.cjs
9
- libs/
10
- test
package/.eslintrc.cjs DELETED
@@ -1,28 +0,0 @@
1
- module.exports = {
2
- env: {
3
- browser: true,
4
- es2021: true,
5
- node: true
6
- },
7
- extends: [
8
- 'standard-with-typescript',
9
- ],
10
- overrides: [
11
- ],
12
- parserOptions: {
13
- project: './tsconfig.json',
14
- ecmaVersion: 2020,
15
- sourceType: 'module',
16
- ecmaFeatures: {
17
- jsx: true
18
- }
19
- },
20
- plugins: [
21
-
22
- ],
23
- rules: {
24
- '@typescript-eslint/naming-convention': 'off',
25
- },
26
- settings: {
27
- }
28
- }
@@ -1,39 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1680826768659" clover="3.2.0">
3
- <project timestamp="1680826768659" name="All files">
4
- <metrics statements="30" coveredstatements="24" conditionals="2" coveredconditionals="1" methods="8" coveredmethods="4" elements="40" coveredelements="29" complexity="0" loc="30" ncloc="30" packages="1" files="1" classes="1"/>
5
- <file name="OneOf.ts" path="/Users/franco/projects/tempots/dom/src/components/OneOf.ts">
6
- <metrics statements="30" coveredstatements="24" conditionals="2" coveredconditionals="1" methods="8" coveredmethods="4"/>
7
- <line num="1" count="8" type="stmt"/>
8
- <line num="6" count="8" type="stmt"/>
9
- <line num="9" count="8" type="stmt"/>
10
- <line num="11" count="7" type="stmt"/>
11
- <line num="12" count="7" type="stmt"/>
12
- <line num="16" count="7" type="stmt"/>
13
- <line num="17" count="7" type="stmt"/>
14
- <line num="18" count="7" type="stmt"/>
15
- <line num="19" count="7" type="stmt"/>
16
- <line num="20" count="7" type="stmt"/>
17
- <line num="21" count="7" type="stmt"/>
18
- <line num="22" count="7" type="stmt"/>
19
- <line num="23" count="7" type="stmt"/>
20
- <line num="24" count="7" type="stmt"/>
21
- <line num="25" count="7" type="cond" truecount="1" falsecount="1"/>
22
- <line num="26" count="7" type="stmt"/>
23
- <line num="27" count="7" type="stmt"/>
24
- <line num="28" count="7" type="stmt"/>
25
- <line num="29" count="7" type="stmt"/>
26
- <line num="30" count="7" type="stmt"/>
27
- <line num="31" count="7" type="stmt"/>
28
- <line num="32" count="7" type="stmt"/>
29
- <line num="35" count="0" type="stmt"/>
30
- <line num="38" count="7" type="stmt"/>
31
- <line num="39" count="0" type="stmt"/>
32
- <line num="40" count="0" type="stmt"/>
33
- <line num="41" count="0" type="stmt"/>
34
- <line num="42" count="0" type="stmt"/>
35
- <line num="55" count="8" type="stmt"/>
36
- <line num="56" count="0" type="stmt"/>
37
- </file>
38
- </project>
39
- </coverage>
@@ -1,2 +0,0 @@
1
- {"/Users/franco/projects/tempots/dom/src/components/OneOf.ts": {"path":"/Users/franco/projects/tempots/dom/src/components/OneOf.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":43}},"1":{"start":{"line":6,"column":0},"end":{"line":6,"column":47}},"2":{"start":{"line":11,"column":21},"end":{"line":11,"column":37}},"3":{"start":{"line":12,"column":21},"end":{"line":12,"column":null}},"4":{"start":{"line":16,"column":22},"end":{"line":45,"column":3}},"5":{"start":{"line":17,"column":31},"end":{"line":17,"column":47}},"6":{"start":{"line":18,"column":14},"end":{"line":18,"column":21}},"7":{"start":{"line":19,"column":18},"end":{"line":19,"column":25}},"8":{"start":{"line":20,"column":22},"end":{"line":20,"column":41}},"9":{"start":{"line":21,"column":15},"end":{"line":21,"column":30}},"10":{"start":{"line":22,"column":17},"end":{"line":22,"column":42}},"11":{"start":{"line":23,"column":16},"end":{"line":23,"column":70}},"12":{"start":{"line":24,"column":19},"end":{"line":37,"column":6}},"13":{"start":{"line":25,"column":6},"end":{"line":36,"column":null}},"14":{"start":{"line":26,"column":8},"end":{"line":33,"column":null}},"15":{"start":{"line":27,"column":10},"end":{"line":27,"column":null}},"16":{"start":{"line":28,"column":10},"end":{"line":28,"column":null}},"17":{"start":{"line":29,"column":10},"end":{"line":29,"column":null}},"18":{"start":{"line":30,"column":10},"end":{"line":30,"column":null}},"19":{"start":{"line":31,"column":10},"end":{"line":31,"column":null}},"20":{"start":{"line":32,"column":10},"end":{"line":32,"column":null}},"21":{"start":{"line":35,"column":8},"end":{"line":35,"column":null}},"22":{"start":{"line":38,"column":4},"end":{"line":44,"column":null}},"23":{"start":{"line":39,"column":6},"end":{"line":43,"column":null}},"24":{"start":{"line":40,"column":8},"end":{"line":40,"column":null}},"25":{"start":{"line":41,"column":8},"end":{"line":41,"column":null}},"26":{"start":{"line":42,"column":8},"end":{"line":42,"column":null}},"27":{"start":{"line":9,"column":0},"end":{"line":9,"column":13}},"28":{"start":{"line":56,"column":2},"end":{"line":56,"column":null}},"29":{"start":{"line":55,"column":0},"end":{"line":55,"column":16}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":2},"end":{"line":10,"column":null}},"loc":{"start":{"line":14,"column":5},"end":{"line":14,"column":10}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":16,"column":22},"end":{"line":16,"column":23}},"loc":{"start":{"line":16,"column":49},"end":{"line":45,"column":3}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":24,"column":40},"end":{"line":24,"column":41}},"loc":{"start":{"line":24,"column":63},"end":{"line":37,"column":5}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":26,"column":34},"end":{"line":26,"column":37}},"loc":{"start":{"line":26,"column":39},"end":{"line":33,"column":9}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":38,"column":11},"end":{"line":38,"column":12}},"loc":{"start":{"line":38,"column":35},"end":{"line":44,"column":5}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":39,"column":38},"end":{"line":39,"column":41}},"loc":{"start":{"line":39,"column":43},"end":{"line":43,"column":7}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":42,"column":43},"end":{"line":42,"column":46}},"loc":{"start":{"line":42,"column":48},"end":{"line":42,"column":52}}},"7":{"name":"OneOf","decl":{"start":{"line":55,"column":16},"end":{"line":55,"column":21}},"loc":{"start":{"line":55,"column":72},"end":{"line":57,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":25,"column":6},"end":{"line":36,"column":null}},"type":"if","locations":[{"start":{"line":25,"column":6},"end":{"line":36,"column":null}},{"start":{"line":34,"column":13},"end":{"line":36,"column":null}}]}},"s":{"0":8,"1":8,"2":7,"3":7,"4":7,"5":7,"6":7,"7":7,"8":7,"9":7,"10":7,"11":7,"12":7,"13":7,"14":7,"15":7,"16":7,"17":7,"18":7,"19":7,"20":7,"21":0,"22":7,"23":0,"24":0,"25":0,"26":0,"27":8,"28":0,"29":8},"f":{"0":7,"1":7,"2":7,"3":7,"4":0,"5":0,"6":0,"7":0},"b":{"0":[7,0]}}
2
- }