@neovici/cosmoz-utils 5.20.0 → 5.22.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.
package/dist/array.d.ts CHANGED
@@ -3,4 +3,4 @@ export declare function array(arr: null): [];
3
3
  export declare function array<T>(arr?: T | T[]): T[];
4
4
  export declare function array<T>(arr: Iterable<T>): T[];
5
5
  export declare function array<T = unknown>(arr: T): T[];
6
- export declare const without: (exclude: unknown, predicate?: <T>(obj: T) => T) => (list: unknown) => unknown[];
6
+ export declare const without: <E, L>(exclude: E[], predicate?: <T extends E | L>(value: T) => unknown) => (list: L[]) => L[];
package/dist/array.js CHANGED
@@ -17,7 +17,6 @@ export function array(arr) {
17
17
  }
18
18
  return [arr];
19
19
  }
20
- // TODO: Improve definition
21
20
  export const without = (exclude, predicate = identity) => (list) => {
22
21
  const excludes = array(exclude).map(predicate);
23
22
  return array(list).filter((value) => !excludes.includes(predicate(value)));
@@ -84,8 +84,10 @@ export declare const hauntedPolymer: (outputPath: string | Hook, hook?: Hook) =>
84
84
  slot: string;
85
85
  readonly tagName: string;
86
86
  attachShadow(init: ShadowRootInit): ShadowRoot;
87
+ checkVisibility(options?: CheckVisibilityOptions | undefined): boolean;
87
88
  closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
88
89
  closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
90
+ closest<K_4 extends keyof MathMLElementTagNameMap>(selector: K_4): MathMLElementTagNameMap[K_4] | null;
89
91
  closest<E extends Element = Element>(selectors: string): E | null;
90
92
  getAttribute(qualifiedName: string): string | null;
91
93
  getAttributeNS(namespace: string | null, localName: string): string | null;
@@ -95,11 +97,14 @@ export declare const hauntedPolymer: (outputPath: string | Hook, hook?: Hook) =>
95
97
  getBoundingClientRect(): DOMRect;
96
98
  getClientRects(): DOMRectList;
97
99
  getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
98
- getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
99
- getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
100
+ getElementsByTagName<K_5 extends keyof HTMLElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<HTMLElementTagNameMap[K_5]>;
101
+ getElementsByTagName<K_6 extends keyof SVGElementTagNameMap>(qualifiedName: K_6): HTMLCollectionOf<SVGElementTagNameMap[K_6]>;
102
+ getElementsByTagName<K_7 extends keyof MathMLElementTagNameMap>(qualifiedName: K_7): HTMLCollectionOf<MathMLElementTagNameMap[K_7]>;
103
+ getElementsByTagName<K_8 extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K_8): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K_8]>;
100
104
  getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
101
105
  getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
102
106
  getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
107
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
103
108
  getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
104
109
  hasAttribute(qualifiedName: string): boolean;
105
110
  hasAttributeNS(namespace: string | null, localName: string): boolean;
@@ -157,24 +162,24 @@ export declare const hauntedPolymer: (outputPath: string | Hook, hook?: Hook) =>
157
162
  normalize(): void;
158
163
  removeChild<T_4 extends Node>(child: T_4): T_4;
159
164
  replaceChild<T_5 extends Node>(node: Node, child: T_5): T_5;
160
- readonly ATTRIBUTE_NODE: number;
161
- readonly CDATA_SECTION_NODE: number;
162
- readonly COMMENT_NODE: number;
163
- readonly DOCUMENT_FRAGMENT_NODE: number;
164
- readonly DOCUMENT_NODE: number;
165
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
166
- readonly DOCUMENT_POSITION_CONTAINS: number;
167
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
168
- readonly DOCUMENT_POSITION_FOLLOWING: number;
169
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
170
- readonly DOCUMENT_POSITION_PRECEDING: number;
171
- readonly DOCUMENT_TYPE_NODE: number;
172
- readonly ELEMENT_NODE: number;
173
- readonly ENTITY_NODE: number;
174
- readonly ENTITY_REFERENCE_NODE: number;
175
- readonly NOTATION_NODE: number;
176
- readonly PROCESSING_INSTRUCTION_NODE: number;
177
- readonly TEXT_NODE: number;
165
+ readonly ELEMENT_NODE: 1;
166
+ readonly ATTRIBUTE_NODE: 2;
167
+ readonly TEXT_NODE: 3;
168
+ readonly CDATA_SECTION_NODE: 4;
169
+ readonly ENTITY_REFERENCE_NODE: 5;
170
+ readonly ENTITY_NODE: 6;
171
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
172
+ readonly COMMENT_NODE: 8;
173
+ readonly DOCUMENT_NODE: 9;
174
+ readonly DOCUMENT_TYPE_NODE: 10;
175
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
176
+ readonly NOTATION_NODE: 12;
177
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
178
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
179
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
180
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
181
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
182
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
178
183
  dispatchEvent(event: Event): boolean;
179
184
  ariaAtomic: string | null;
180
185
  ariaAutoComplete: string | null;
@@ -182,7 +187,6 @@ export declare const hauntedPolymer: (outputPath: string | Hook, hook?: Hook) =>
182
187
  ariaChecked: string | null;
183
188
  ariaColCount: string | null;
184
189
  ariaColIndex: string | null;
185
- ariaColIndexText: string | null;
186
190
  ariaColSpan: string | null;
187
191
  ariaCurrent: string | null;
188
192
  ariaDisabled: string | null;
@@ -206,7 +210,6 @@ export declare const hauntedPolymer: (outputPath: string | Hook, hook?: Hook) =>
206
210
  ariaRoleDescription: string | null;
207
211
  ariaRowCount: string | null;
208
212
  ariaRowIndex: string | null;
209
- ariaRowIndexText: string | null;
210
213
  ariaRowSpan: string | null;
211
214
  ariaSelected: string | null;
212
215
  ariaSetSize: string | null;
@@ -231,17 +234,18 @@ export declare const hauntedPolymer: (outputPath: string | Hook, hook?: Hook) =>
231
234
  readonly lastElementChild: Element | null;
232
235
  append(...nodes: (string | Node)[]): void;
233
236
  prepend(...nodes: (string | Node)[]): void;
234
- querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
235
- querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
237
+ querySelector<K_9 extends keyof HTMLElementTagNameMap>(selectors: K_9): HTMLElementTagNameMap[K_9] | null;
238
+ querySelector<K_10 extends keyof SVGElementTagNameMap>(selectors: K_10): SVGElementTagNameMap[K_10] | null;
239
+ querySelector<K_11 extends keyof MathMLElementTagNameMap>(selectors: K_11): MathMLElementTagNameMap[K_11] | null;
240
+ querySelector<K_12 extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K_12): HTMLElementDeprecatedTagNameMap[K_12] | null;
236
241
  querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
237
- querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
238
- querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
242
+ querySelectorAll<K_13 extends keyof HTMLElementTagNameMap>(selectors: K_13): NodeListOf<HTMLElementTagNameMap[K_13]>;
243
+ querySelectorAll<K_14 extends keyof SVGElementTagNameMap>(selectors: K_14): NodeListOf<SVGElementTagNameMap[K_14]>;
244
+ querySelectorAll<K_15 extends keyof MathMLElementTagNameMap>(selectors: K_15): NodeListOf<MathMLElementTagNameMap[K_15]>;
245
+ querySelectorAll<K_16 extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K_16): NodeListOf<HTMLElementDeprecatedTagNameMap[K_16]>;
239
246
  querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
240
247
  replaceChildren(...nodes: (string | Node)[]): void;
241
248
  readonly assignedSlot: HTMLSlotElement | null;
242
- oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
243
- oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
244
- onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
245
249
  readonly style: CSSStyleDeclaration;
246
250
  contentEditable: string;
247
251
  enterKeyHint: string;
@@ -262,7 +266,9 @@ export declare const hauntedPolymer: (outputPath: string | Hook, hook?: Hook) =>
262
266
  onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
263
267
  onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
264
268
  oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
269
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
265
270
  oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
266
272
  ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
267
273
  ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
268
274
  ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
@@ -295,6 +301,7 @@ export declare const hauntedPolymer: (outputPath: string | Hook, hook?: Hook) =>
295
301
  onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
296
302
  onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
297
303
  onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
304
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
298
305
  onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
299
306
  onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
307
  onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -6,4 +6,4 @@ import { Rec } from '../object';
6
6
  * @param {Object} meta - The source object
7
7
  * @returns {Object} The memoized object.
8
8
  */
9
- export declare const useMeta: <T extends Rec<PropertyKey, any>>(meta: T) => T;
9
+ export declare const useMeta: <T extends Rec>(meta: T) => T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-utils",
3
- "version": "5.20.0",
3
+ "version": "5.22.0",
4
4
  "description": "Date, money and template management functions commonly needed in Cosmoz views.",
5
5
  "keywords": [
6
6
  "polymer",
@@ -81,10 +81,9 @@
81
81
  "@polymer/polymer": "^3.3.1",
82
82
  "@semantic-release/changelog": "^6.0.0",
83
83
  "@semantic-release/git": "^10.0.0",
84
- "@web/test-runner": "^0.15.0",
85
84
  "husky": "^8.0.0",
86
85
  "lit-html": "^2.0.0",
87
- "semantic-release": "^20.0.0",
86
+ "semantic-release": "^21.0.0",
88
87
  "sinon": "^15.0.0"
89
88
  }
90
89
  }