@neovici/cosmoz-utils 6.0.0 → 6.2.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.
|
@@ -11,5 +11,5 @@ declare class PortalDirective extends AsyncDirective {
|
|
|
11
11
|
disconnected(): void;
|
|
12
12
|
reconnected(): void;
|
|
13
13
|
}
|
|
14
|
-
export declare const portal: (content: unknown, outlet?: HTMLElement | undefined) => import("lit-html/directive").DirectiveResult<typeof PortalDirective>;
|
|
14
|
+
export declare const portal: (content: unknown, outlet?: HTMLElement | undefined) => import("lit-html/directive.js").DirectiveResult<typeof PortalDirective>;
|
|
15
15
|
export {};
|
package/dist/elements/cz-icon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, svg } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
import { component } from '@pionjs/pion';
|
|
4
4
|
export const arrowDropDown = svg `<path d="M7 10l5 5 5-5z"></path>`, cancel = svg `<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"></path>`, check = svg `<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path>`, clear = svg `<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>`, warning = svg `<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" fill="currentColor"></path>`, undo = svg `<path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path>`, edit = svg `<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path>`, rightArrow = svg `<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" fill="currentColor"></path>`, leftArrow = svg `<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" fill="currentColor"></path>`, download = svg `<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" fill="currentColor"></path>`, print = svg `<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z" fill="currentColor"></path>`, renderIcon = ({ icon, width = 24, height } = {}) => html `<svg
|
|
5
5
|
viewBox="0 0 24 24"
|
package/dist/function.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ type OrFn<T> = (...args: T[]) => boolean;
|
|
|
2
2
|
type Arr = any[];
|
|
3
3
|
type OnceFn<A extends Arr, R> = (...args: A) => R;
|
|
4
4
|
type OnceCheckFn<A extends Arr> = (args: A) => boolean | undefined;
|
|
5
|
-
export declare
|
|
5
|
+
export declare function constant(): () => undefined;
|
|
6
|
+
export declare function constant<T>(v: T): () => T;
|
|
7
|
+
export declare const constTrue: () => true, constUndefined: () => undefined, noop: () => undefined, identity: <T>(obj: T) => T, or: <A, F extends OrFn<A>>(...fns: F[]) => (...args: A[]) => boolean;
|
|
6
8
|
export declare const once: <A extends Arr, R, F extends OnceFn<A, R> = OnceFn<A, R>>(fn: F, check?: OnceCheckFn<A>) => (...args: A) => any;
|
|
7
9
|
export declare function invoke<A, R, F extends (...args: A[]) => R>(fn: F, ...args: A[]): ReturnType<F>;
|
|
8
10
|
export declare function invoke<F>(fn: F, ...args: unknown[]): F;
|
package/dist/function.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function constant(v) {
|
|
2
|
+
return () => v;
|
|
3
|
+
}
|
|
4
|
+
export const constTrue = constant(true), constUndefined = constant(), noop = constUndefined, identity = (obj) => obj, or = (...fns) => (...args) => fns.reduce((res, fn) => res || fn(...args), false);
|
|
2
5
|
export const once = (fn, check = constTrue) => {
|
|
3
6
|
let result;
|
|
4
7
|
return (...args) => (result ??= check(args) ? fn(...args) : undefined);
|