@usecapsule/core-components 3.4.0 → 3.4.1-dev.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/p-286db996.js +2 -0
- package/dist/capsule/p-286db996.js.map +1 -0
- package/dist/capsule/p-9e64a60e.entry.js +2 -0
- package/dist/capsule/p-9e64a60e.entry.js.map +1 -0
- package/dist/capsule/{p-32cdf894.entry.js → p-b96e357a.entry.js} +2 -2
- package/dist/capsule/p-b96e357a.entry.js.map +1 -0
- package/dist/capsule/p-c33942ad.entry.js +2 -0
- package/dist/capsule/p-c33942ad.entry.js.map +1 -0
- package/dist/capsule/p-cfc382c0.entry.js +2 -0
- package/dist/capsule/{p-de2a16e4.entry.js → p-d165df27.entry.js} +2 -2
- package/dist/capsule/p-d4ea4244.entry.js +20 -0
- package/dist/capsule/p-d4ea4244.entry.js.map +1 -0
- package/dist/capsule/{p-41bc3c58.entry.js → p-f0cd0482.entry.js} +2 -2
- package/dist/cjs/capsule.cjs.js +1 -1
- package/dist/cjs/cpsl-alert_34.cjs.entry.js +115 -65
- package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-col.cjs.entry.js +1 -1
- package/dist/cjs/cpsl-grid.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-hero.cjs.entry.js +4 -3
- package/dist/cjs/cpsl-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-identicon.cjs.entry.js +76 -30
- package/dist/cjs/cpsl-identicon.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-nav-button.cjs.entry.js +40 -0
- package/dist/cjs/cpsl-nav-button.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-row.cjs.entry.js +1 -1
- package/dist/cjs/index-65f57499.js +4 -4
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/prand-a35ea6b2.js +209 -0
- package/dist/cjs/prand-a35ea6b2.js.map +1 -0
- package/dist/collection/assets/icons/cosmos.svg +12 -0
- package/dist/collection/assets/icons/ethereum.svg +4 -0
- package/dist/collection/assets/icons/folder.svg +5 -0
- package/dist/collection/assets/icons/hero-plus-circle-capsule.svg +14 -0
- package/dist/collection/assets/icons/hero-plus-circle.svg +7 -0
- package/dist/collection/assets/icons/index.js +7 -1
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/assets/icons/plus-circle.svg +1 -1
- package/dist/collection/assets/icons/solana.svg +19 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +44 -104
- package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -1
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +3 -3
- package/dist/collection/components/cpsl-auth-modal/cpsl-auth-modal.css +2 -1
- package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.css +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.js +2 -2
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
- package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
- package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
- package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +2 -2
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +1 -1
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
- package/dist/collection/components/cpsl-hero/cpsl-hero.css +29 -2
- package/dist/collection/components/cpsl-hero/cpsl-hero.js +6 -5
- package/dist/collection/components/cpsl-hero/cpsl-hero.js.map +1 -1
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.css +17 -10
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.js +101 -36
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.js.map +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js.map +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js +1 -1
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.css +107 -0
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.js +175 -0
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.js.map +1 -0
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.css +0 -42
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +2 -50
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js.map +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-popover/cpsl-popover.js +2 -2
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
- package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.js +2 -2
- package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +1 -1
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
- package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-table/cpsl-table.js +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.js +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/lib/prando.js +187 -0
- package/dist/collection/lib/prando.js.map +1 -0
- package/dist/collection/utils/prand.js +16 -0
- package/dist/collection/utils/prand.js.map +1 -0
- package/dist/esm/capsule.js +1 -1
- package/dist/esm/cpsl-alert_34.entry.js +115 -65
- package/dist/esm/cpsl-alert_34.entry.js.map +1 -1
- package/dist/esm/cpsl-col.entry.js +1 -1
- package/dist/esm/cpsl-grid.entry.js +2 -2
- package/dist/esm/cpsl-hero.entry.js +4 -3
- package/dist/esm/cpsl-hero.entry.js.map +1 -1
- package/dist/esm/cpsl-identicon.entry.js +76 -30
- package/dist/esm/cpsl-identicon.entry.js.map +1 -1
- package/dist/esm/cpsl-nav-button.entry.js +36 -0
- package/dist/esm/cpsl-nav-button.entry.js.map +1 -0
- package/dist/esm/cpsl-row.entry.js +1 -1
- package/dist/esm/index-91db3414.js +4 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/prand-c8323494.js +205 -0
- package/dist/esm/prand-c8323494.js.map +1 -0
- package/dist/types/assets/icons/index.d.ts +6 -0
- package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +0 -15
- package/dist/types/components/cpsl-hero/cpsl-hero.d.ts +2 -2
- package/dist/types/components/cpsl-identicon/cpsl-identicon.d.ts +5 -4
- package/dist/types/components/cpsl-nav-button/cpsl-nav-button.d.ts +43 -0
- package/dist/types/components/cpsl-nav-button-group/cpsl-nav-button-group.d.ts +0 -6
- package/dist/types/components.d.ts +93 -39
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/prando.d.ts +92 -0
- package/dist/types/utils/prand.d.ts +3 -0
- package/package.json +2 -4
- package/dist/capsule/p-0e558c7f.entry.js +0 -10
- package/dist/capsule/p-0e558c7f.entry.js.map +0 -1
- package/dist/capsule/p-0e6007ae.entry.js +0 -20
- package/dist/capsule/p-0e6007ae.entry.js.map +0 -1
- package/dist/capsule/p-32cdf894.entry.js.map +0 -1
- package/dist/capsule/p-3b042fd1.entry.js +0 -2
- package/dist/capsule/p-5d62e610.entry.js +0 -2
- package/dist/capsule/p-5d62e610.entry.js.map +0 -1
- package/dist/cjs/cpsl-animation.cjs.entry.js +0 -20133
- package/dist/cjs/cpsl-animation.cjs.entry.js.map +0 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.css +0 -17
- package/dist/esm/cpsl-animation.entry.js +0 -20129
- package/dist/esm/cpsl-animation.entry.js.map +0 -1
- /package/dist/capsule/{p-3b042fd1.entry.js.map → p-cfc382c0.entry.js.map} +0 -0
- /package/dist/capsule/{p-de2a16e4.entry.js.map → p-d165df27.entry.js.map} +0 -0
- /package/dist/capsule/{p-41bc3c58.entry.js.map → p-f0cd0482.entry.js.map} +0 -0
- /package/dist/types/Users/{norwood/capsule-repos → taylorbosch/Documents/GitHub/Capsule}/web-sdk/packages/core-components/.stencil/scripts/buildAssets.d.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"prand-c8323494.js","mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAqB,MAAM;;;;;;;;IAezB,YAAY,IAAsB;QAV1B,WAAM,GAAG,GAAG,CAAC;QAWnB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;;YAE5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAClC;aAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;;YAEnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC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utils/prand.ts"],"sourcesContent":["/*\n * This file contains code from prando, which is licensed under the MIT License:\n *\n * Copyright (c) 2016 Zeh Fernando\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport default class Prando {\n private static readonly MIN: number = -2147483648; // Int32 min\n private static readonly MAX: number = 2147483647; // Int32 max\n\n private _seed: number;\n private _value = NaN;\n\n // ================================================================================================================\n // CONSTRUCTOR ----------------------------------------------------------------------------------------------------\n\n /**\n * Generate a new Prando pseudo-random number generator.\n *\n * @param seed - A number or string seed that determines which pseudo-random number sequence will be created. Defaults to a random seed based on `Math.random()`.\n */\n constructor(seed?: number | string) {\n if (typeof seed === 'string') {\n // String seed\n this._seed = this.hashCode(seed);\n } else if (typeof seed === 'number') {\n // Numeric seed\n this._seed = this.getSafeSeed(seed);\n } else {\n // Pseudo-random seed\n this._seed = this.getSafeSeed(Prando.MIN + Math.floor((Prando.MAX - Prando.MIN) * Math.random()));\n }\n this.reset();\n }\n\n // ================================================================================================================\n // PUBLIC INTERFACE -----------------------------------------------------------------------------------------------\n\n /**\n * Generates a pseudo-random number between a lower (inclusive) and a higher (exclusive) bounds.\n *\n * @param min - The minimum number that can be randomly generated.\n * @param pseudoMax - The maximum number that can be randomly generated (exclusive).\n * @return The generated pseudo-random number.\n */\n public next(min = 0, pseudoMax = 1): number {\n this.recalculate();\n return this.map(this._value, Prando.MIN, Prando.MAX, min, pseudoMax);\n }\n\n /**\n * Generates a pseudo-random integer number in a range (inclusive).\n *\n * @param min - The minimum number that can be randomly generated.\n * @param max - The maximum number that can be randomly generated.\n * @return The generated pseudo-random number.\n */\n public nextInt(min = 10, max = 100): number {\n this.recalculate();\n return Math.floor(this.map(this._value, Prando.MIN, Prando.MAX, min, max + 1));\n }\n\n /**\n * Generates a pseudo-random string sequence of a particular length from a specific character range.\n *\n * Note: keep in mind that creating a random string sequence does not guarantee uniqueness; there is always a\n * 1 in (char_length^string_length) chance of collision. For real unique string ids, always check for\n * pre-existing ids, or employ a robust GUID/UUID generator.\n *\n * @param length - Length of the string to be generated.\n * @param chars - Characters that are used when creating the random string. Defaults to all alphanumeric chars (A-Z, a-z, 0-9).\n * @return The generated string sequence.\n */\n public nextString(length = 16, chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'): string {\n let str = '';\n while (str.length < length) {\n str += this.nextChar(chars);\n }\n return str;\n }\n\n /**\n * Generates a pseudo-random string of 1 character specific character range.\n *\n * @param chars - Characters that are used when creating the random string. Defaults to all alphanumeric chars (A-Z, a-z, 0-9).\n * @return The generated character.\n */\n public nextChar(chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'): string {\n return chars.substr(this.nextInt(0, chars.length - 1), 1);\n }\n\n /**\n * Picks a pseudo-random item from an array. The array is left unmodified.\n *\n * Note: keep in mind that while the returned item will be random enough, picking one item from the array at a time\n * does not guarantee nor imply that a sequence of random non-repeating items will be picked. If you want to\n * *pick items in a random order* from an array, instead of *pick one random item from an array*, it's best to\n * apply a *shuffle* transformation to the array instead, then read it linearly.\n *\n * @param array - Array of any type containing one or more candidates for random picking.\n * @return An item from the array.\n */\n public nextArrayItem<T>(array: T[]): T {\n return array[this.nextInt(0, array.length - 1)];\n }\n\n /**\n * Generates a pseudo-random boolean.\n *\n * @return A value of true or false.\n */\n public nextBoolean(): boolean {\n this.recalculate();\n return this._value > 0.5;\n }\n\n /**\n * Skips ahead in the sequence of numbers that are being generated. This is equivalent to\n * calling next() a specified number of times, but faster since it doesn't need to map the\n * new random numbers to a range and return it.\n *\n * @param iterations - The number of items to skip ahead.\n */\n public skip(iterations = 1): void {\n while (iterations-- > 0) {\n this.recalculate();\n }\n }\n\n /**\n * Reset the pseudo-random number sequence back to its starting seed. Further calls to next()\n * will then produce the same sequence of numbers it had produced before. This is equivalent to\n * creating a new Prando instance with the same seed as another Prando instance.\n *\n * Example:\n * let rng = new Prando(12345678);\n * console.log(rng.next()); // 0.6177754114889017\n * console.log(rng.next()); // 0.5784605181725837\n * rng.reset();\n * console.log(rng.next()); // 0.6177754114889017 again\n * console.log(rng.next()); // 0.5784605181725837 again\n */\n public reset(): void {\n this._value = this._seed;\n }\n\n // ================================================================================================================\n // PRIVATE INTERFACE ----------------------------------------------------------------------------------------------\n\n private recalculate(): void {\n this._value = this.xorshift(this._value);\n }\n\n private xorshift(value: number): number {\n // Xorshift*32\n // Based on George Marsaglia's work: http://www.jstatsoft.org/v08/i14/paper\n value ^= value << 13;\n value ^= value >> 17;\n value ^= value << 5;\n return value;\n }\n\n private map(val: number, minFrom: number, maxFrom: number, minTo: number, maxTo: number): number {\n return ((val - minFrom) / (maxFrom - minFrom)) * (maxTo - minTo) + minTo;\n }\n\n private hashCode(str: string): number {\n let hash = 0;\n if (str) {\n const l = str.length;\n for (let i = 0; i < l; i++) {\n hash = (hash << 5) - hash + str.charCodeAt(i);\n hash |= 0;\n hash = this.xorshift(hash);\n }\n }\n return this.getSafeSeed(hash);\n }\n\n private getSafeSeed(seed: number): number {\n if (seed === 0) return 1;\n return seed;\n }\n}\n","import Prando from '../lib/prando';\n\nexport type Color = 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple';\n\nexport const COLORS: Color[] = ['red', 'orange', 'yellow', 'green', 'blue', 'purple'];\n\nconst GRADIENTS = {\n red: ['#FF4270', '#FF7C7C'],\n orange: ['#F45532', '#FF9B63'],\n yellow: ['#FFA756', '#FBFF47'],\n green: ['#0CAE60', '#7BFFD0'],\n blue: ['#476FFF', '#47C8FF'],\n purple: ['#9747FF', '#DA47FF'],\n};\n\nexport function getPseudoRandomBackground(seed: string): string {\n const rng = new Prando(seed);\n\n const [start, stop] = GRADIENTS[COLORS[rng.nextInt(0, COLORS.length - 1)]];\n\n return `linear-gradient(136deg, ${start} 6.86%, ${stop} 93.78%)`;\n}\n"],"version":3}
|
@@ -22,6 +22,7 @@ export declare const Icons: {
|
|
22
22
|
clubhouseBrand: string;
|
23
23
|
clubhouse: string;
|
24
24
|
copy: string;
|
25
|
+
cosmos: string;
|
25
26
|
creditCard: string;
|
26
27
|
cube: string;
|
27
28
|
decentBrand: string;
|
@@ -34,6 +35,7 @@ export declare const Icons: {
|
|
34
35
|
dribbbleBrand: string;
|
35
36
|
dribbble: string;
|
36
37
|
earth: string;
|
38
|
+
ethereum: string;
|
37
39
|
eyeOff: string;
|
38
40
|
eye: string;
|
39
41
|
facebookBrand: string;
|
@@ -43,6 +45,7 @@ export declare const Icons: {
|
|
43
45
|
figmaBrand: string;
|
44
46
|
figma: string;
|
45
47
|
file: string;
|
48
|
+
folder: string;
|
46
49
|
githubBrand: string;
|
47
50
|
github: string;
|
48
51
|
globe: string;
|
@@ -57,6 +60,8 @@ export declare const Icons: {
|
|
57
60
|
heroLock: string;
|
58
61
|
heroPasskey: string;
|
59
62
|
heroPhone: string;
|
63
|
+
heroPlusCircleCapsule: string;
|
64
|
+
heroPlusCircle: string;
|
60
65
|
heroWallet: string;
|
61
66
|
home: string;
|
62
67
|
image: string;
|
@@ -94,6 +99,7 @@ export declare const Icons: {
|
|
94
99
|
signal: string;
|
95
100
|
snapchatBrand: string;
|
96
101
|
snapchat: string;
|
102
|
+
solana: string;
|
97
103
|
stars: string;
|
98
104
|
stripeBrand: string;
|
99
105
|
telegramBrand: string;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
export declare class CpslAnimation {
|
2
|
-
private animation;
|
3
|
-
el: HTMLCpslAnimationElement;
|
4
|
-
/**
|
5
|
-
* Source of the Lottie animation file.
|
6
|
-
*/
|
7
|
-
src: string;
|
8
|
-
/**
|
9
|
-
* Will replay the animation
|
10
|
-
*/
|
11
|
-
replayAnimation(): Promise<void>;
|
12
|
-
componentDidLoad(): void;
|
13
|
-
private get animationContainerEl();
|
14
|
-
render(): any;
|
15
|
-
}
|
@@ -11,10 +11,10 @@ export declare class CpslHero {
|
|
11
11
|
hideFadeOut?: boolean;
|
12
12
|
/**
|
13
13
|
* The variant of the button.
|
14
|
-
* Options are: `"customContent"`, `"connection"`, `"externalWalletConnection"`, `"pending", `"approved", `"failed".
|
14
|
+
* Options are: `"customContent"`, `"connection"`, `"externalWalletConnection"`, `"pending", `"approved",`"add", `"failed".
|
15
15
|
* Default is: `"connection"`.
|
16
16
|
*/
|
17
|
-
variant?: 'customContent' | 'connection' | 'externalWalletConnection' | 'pending' | 'approved' | 'failed';
|
17
|
+
variant?: 'customContent' | 'connection' | 'externalWalletConnection' | 'pending' | 'approved' | 'add' | 'failed';
|
18
18
|
title: string;
|
19
19
|
subtitle?: string;
|
20
20
|
/**
|
@@ -1,9 +1,10 @@
|
|
1
1
|
export declare class CpslIdenticon {
|
2
|
-
hash
|
2
|
+
hash?: string | undefined;
|
3
3
|
/**
|
4
|
-
* The
|
5
|
-
* Default is:
|
4
|
+
* The CSS width and height of the identicon.
|
5
|
+
* Default is: 40px.
|
6
6
|
*/
|
7
|
-
size:
|
7
|
+
size: string;
|
8
|
+
variant: 'default' | 'avatar';
|
8
9
|
render(): any;
|
9
10
|
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
2
|
+
export declare class CpslNavButton {
|
3
|
+
el: HTMLCpslNavButtonElement;
|
4
|
+
/**
|
5
|
+
* If the button is disabled.
|
6
|
+
* Default is: false.
|
7
|
+
*/
|
8
|
+
disabled?: boolean;
|
9
|
+
/**
|
10
|
+
* Whether or not to use exact matching for the selected main route.
|
11
|
+
*/
|
12
|
+
exactMainRouteMatch?: boolean;
|
13
|
+
/**
|
14
|
+
* Whether or not to use exact matching for the selected sub route.
|
15
|
+
*/
|
16
|
+
exactSubRouteMatch?: boolean;
|
17
|
+
/**
|
18
|
+
* The route for the button.
|
19
|
+
*/
|
20
|
+
route: string;
|
21
|
+
/**
|
22
|
+
* The id of the selected button.
|
23
|
+
*/
|
24
|
+
subRoutes?: {
|
25
|
+
label: string;
|
26
|
+
value: string;
|
27
|
+
}[];
|
28
|
+
/**
|
29
|
+
* Path used to determine what button is selected
|
30
|
+
*/
|
31
|
+
path?: string;
|
32
|
+
/**
|
33
|
+
* Called when the nav button is clicked.
|
34
|
+
*/
|
35
|
+
cpslNavButtonClick: EventEmitter<string>;
|
36
|
+
private handleNavButtonClick;
|
37
|
+
/**
|
38
|
+
* Called when a nav button sub route is clicked.
|
39
|
+
*/
|
40
|
+
cpslNavButtonSubRouteClick: EventEmitter<string>;
|
41
|
+
private handleSubRouteClick;
|
42
|
+
render(): any;
|
43
|
+
}
|
@@ -1,12 +1,6 @@
|
|
1
1
|
export declare class CpslNavButtonGroup {
|
2
2
|
el: HTMLCpslNavButtonGroupElement;
|
3
|
-
/**
|
4
|
-
* The id of the selected button.
|
5
|
-
*/
|
6
|
-
selectedId?: string;
|
7
|
-
selectItem(): void;
|
8
3
|
componentWillRender(): void;
|
9
|
-
private get buttonSlots();
|
10
4
|
private get otherSlots();
|
11
5
|
render(): any;
|
12
6
|
}
|
@@ -28,16 +28,6 @@ export namespace Components {
|
|
28
28
|
*/
|
29
29
|
"variant"?: 'error' | 'warning' | 'success' | 'custom';
|
30
30
|
}
|
31
|
-
interface CpslAnimation {
|
32
|
-
/**
|
33
|
-
* Will replay the animation
|
34
|
-
*/
|
35
|
-
"replayAnimation": () => Promise<void>;
|
36
|
-
/**
|
37
|
-
* Source of the Lottie animation file.
|
38
|
-
*/
|
39
|
-
"src": string;
|
40
|
-
}
|
41
31
|
interface CpslAppBar {
|
42
32
|
/**
|
43
33
|
* Height of the app bar.
|
@@ -366,9 +356,9 @@ export namespace Components {
|
|
366
356
|
"subtitle"?: string;
|
367
357
|
"title": string;
|
368
358
|
/**
|
369
|
-
* The variant of the button. Options are: `"customContent"`, `"connection"`, `"externalWalletConnection"`, `"pending", `"approved", `"failed". Default is: `"connection"`.
|
359
|
+
* The variant of the button. Options are: `"customContent"`, `"connection"`, `"externalWalletConnection"`, `"pending", `"approved",`"add", `"failed". Default is: `"connection"`.
|
370
360
|
*/
|
371
|
-
"variant"?: 'customContent' | 'connection' | 'externalWalletConnection' | 'pending' | 'approved' | 'failed';
|
361
|
+
"variant"?: 'customContent' | 'connection' | 'externalWalletConnection' | 'pending' | 'approved' | 'add' | 'failed';
|
372
362
|
/**
|
373
363
|
* Whether to use the Capsule custom theming or use the provided theme Default is: `false`.
|
374
364
|
*/
|
@@ -399,11 +389,12 @@ export namespace Components {
|
|
399
389
|
"icons": (IconType | string)[];
|
400
390
|
}
|
401
391
|
interface CpslIdenticon {
|
402
|
-
"hash"
|
392
|
+
"hash"?: string | undefined;
|
403
393
|
/**
|
404
|
-
* The
|
394
|
+
* The CSS width and height of the identicon. Default is: 40px.
|
405
395
|
*/
|
406
|
-
"size":
|
396
|
+
"size": string;
|
397
|
+
"variant": 'default' | 'avatar';
|
407
398
|
}
|
408
399
|
interface CpslInfoBox {
|
409
400
|
}
|
@@ -555,11 +546,33 @@ export namespace Components {
|
|
555
546
|
*/
|
556
547
|
"zIndexOverride"?: number;
|
557
548
|
}
|
558
|
-
interface
|
549
|
+
interface CpslNavButton {
|
550
|
+
/**
|
551
|
+
* If the button is disabled. Default is: false.
|
552
|
+
*/
|
553
|
+
"disabled"?: boolean;
|
554
|
+
/**
|
555
|
+
* Whether or not to use exact matching for the selected main route.
|
556
|
+
*/
|
557
|
+
"exactMainRouteMatch"?: boolean;
|
558
|
+
/**
|
559
|
+
* Whether or not to use exact matching for the selected sub route.
|
560
|
+
*/
|
561
|
+
"exactSubRouteMatch"?: boolean;
|
562
|
+
/**
|
563
|
+
* Path used to determine what button is selected
|
564
|
+
*/
|
565
|
+
"path"?: string;
|
566
|
+
/**
|
567
|
+
* The route for the button.
|
568
|
+
*/
|
569
|
+
"route": string;
|
559
570
|
/**
|
560
571
|
* The id of the selected button.
|
561
572
|
*/
|
562
|
-
"
|
573
|
+
"subRoutes"?: { label: string; value: string }[];
|
574
|
+
}
|
575
|
+
interface CpslNavButtonGroup {
|
563
576
|
}
|
564
577
|
interface CpslOverlay {
|
565
578
|
/**
|
@@ -870,6 +883,10 @@ export interface CpslModalV2CustomEvent<T> extends CustomEvent<T> {
|
|
870
883
|
detail: T;
|
871
884
|
target: HTMLCpslModalV2Element;
|
872
885
|
}
|
886
|
+
export interface CpslNavButtonCustomEvent<T> extends CustomEvent<T> {
|
887
|
+
detail: T;
|
888
|
+
target: HTMLCpslNavButtonElement;
|
889
|
+
}
|
873
890
|
export interface CpslPaginationCustomEvent<T> extends CustomEvent<T> {
|
874
891
|
detail: T;
|
875
892
|
target: HTMLCpslPaginationElement;
|
@@ -913,12 +930,6 @@ declare global {
|
|
913
930
|
prototype: HTMLCpslAlertElement;
|
914
931
|
new (): HTMLCpslAlertElement;
|
915
932
|
};
|
916
|
-
interface HTMLCpslAnimationElement extends Components.CpslAnimation, HTMLStencilElement {
|
917
|
-
}
|
918
|
-
var HTMLCpslAnimationElement: {
|
919
|
-
prototype: HTMLCpslAnimationElement;
|
920
|
-
new (): HTMLCpslAnimationElement;
|
921
|
-
};
|
922
933
|
interface HTMLCpslAppBarElement extends Components.CpslAppBar, HTMLStencilElement {
|
923
934
|
}
|
924
935
|
var HTMLCpslAppBarElement: {
|
@@ -1137,6 +1148,24 @@ declare global {
|
|
1137
1148
|
prototype: HTMLCpslModalV2Element;
|
1138
1149
|
new (): HTMLCpslModalV2Element;
|
1139
1150
|
};
|
1151
|
+
interface HTMLCpslNavButtonElementEventMap {
|
1152
|
+
"cpslNavButtonClick": string;
|
1153
|
+
"cpslNavButtonSubRouteClick": string;
|
1154
|
+
}
|
1155
|
+
interface HTMLCpslNavButtonElement extends Components.CpslNavButton, HTMLStencilElement {
|
1156
|
+
addEventListener<K extends keyof HTMLCpslNavButtonElementEventMap>(type: K, listener: (this: HTMLCpslNavButtonElement, ev: CpslNavButtonCustomEvent<HTMLCpslNavButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
1157
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
1158
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
1159
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
1160
|
+
removeEventListener<K extends keyof HTMLCpslNavButtonElementEventMap>(type: K, listener: (this: HTMLCpslNavButtonElement, ev: CpslNavButtonCustomEvent<HTMLCpslNavButtonElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
1161
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
1162
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
1163
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
1164
|
+
}
|
1165
|
+
var HTMLCpslNavButtonElement: {
|
1166
|
+
prototype: HTMLCpslNavButtonElement;
|
1167
|
+
new (): HTMLCpslNavButtonElement;
|
1168
|
+
};
|
1140
1169
|
interface HTMLCpslNavButtonGroupElement extends Components.CpslNavButtonGroup, HTMLStencilElement {
|
1141
1170
|
}
|
1142
1171
|
var HTMLCpslNavButtonGroupElement: {
|
@@ -1357,7 +1386,6 @@ declare global {
|
|
1357
1386
|
};
|
1358
1387
|
interface HTMLElementTagNameMap {
|
1359
1388
|
"cpsl-alert": HTMLCpslAlertElement;
|
1360
|
-
"cpsl-animation": HTMLCpslAnimationElement;
|
1361
1389
|
"cpsl-app-bar": HTMLCpslAppBarElement;
|
1362
1390
|
"cpsl-auth-modal": HTMLCpslAuthModalElement;
|
1363
1391
|
"cpsl-avatar": HTMLCpslAvatarElement;
|
@@ -1379,6 +1407,7 @@ declare global {
|
|
1379
1407
|
"cpsl-info-box": HTMLCpslInfoBoxElement;
|
1380
1408
|
"cpsl-input": HTMLCpslInputElement;
|
1381
1409
|
"cpsl-modal-v2": HTMLCpslModalV2Element;
|
1410
|
+
"cpsl-nav-button": HTMLCpslNavButtonElement;
|
1382
1411
|
"cpsl-nav-button-group": HTMLCpslNavButtonGroupElement;
|
1383
1412
|
"cpsl-overlay": HTMLCpslOverlayElement;
|
1384
1413
|
"cpsl-pagination": HTMLCpslPaginationElement;
|
@@ -1411,12 +1440,6 @@ declare namespace LocalJSX {
|
|
1411
1440
|
*/
|
1412
1441
|
"variant"?: 'error' | 'warning' | 'success' | 'custom';
|
1413
1442
|
}
|
1414
|
-
interface CpslAnimation {
|
1415
|
-
/**
|
1416
|
-
* Source of the Lottie animation file.
|
1417
|
-
*/
|
1418
|
-
"src"?: string;
|
1419
|
-
}
|
1420
1443
|
interface CpslAppBar {
|
1421
1444
|
/**
|
1422
1445
|
* Height of the app bar.
|
@@ -1797,9 +1820,9 @@ declare namespace LocalJSX {
|
|
1797
1820
|
"subtitle"?: string;
|
1798
1821
|
"title"?: string;
|
1799
1822
|
/**
|
1800
|
-
* The variant of the button. Options are: `"customContent"`, `"connection"`, `"externalWalletConnection"`, `"pending", `"approved", `"failed". Default is: `"connection"`.
|
1823
|
+
* The variant of the button. Options are: `"customContent"`, `"connection"`, `"externalWalletConnection"`, `"pending", `"approved",`"add", `"failed". Default is: `"connection"`.
|
1801
1824
|
*/
|
1802
|
-
"variant"?: 'customContent' | 'connection' | 'externalWalletConnection' | 'pending' | 'approved' | 'failed';
|
1825
|
+
"variant"?: 'customContent' | 'connection' | 'externalWalletConnection' | 'pending' | 'approved' | 'add' | 'failed';
|
1803
1826
|
/**
|
1804
1827
|
* Whether to use the Capsule custom theming or use the provided theme Default is: `false`.
|
1805
1828
|
*/
|
@@ -1830,11 +1853,12 @@ declare namespace LocalJSX {
|
|
1830
1853
|
"icons"?: (IconType | string)[];
|
1831
1854
|
}
|
1832
1855
|
interface CpslIdenticon {
|
1833
|
-
"hash"?: string;
|
1856
|
+
"hash"?: string | undefined;
|
1834
1857
|
/**
|
1835
|
-
* The
|
1858
|
+
* The CSS width and height of the identicon. Default is: 40px.
|
1836
1859
|
*/
|
1837
|
-
"size"?:
|
1860
|
+
"size"?: string;
|
1861
|
+
"variant"?: 'default' | 'avatar';
|
1838
1862
|
}
|
1839
1863
|
interface CpslInfoBox {
|
1840
1864
|
}
|
@@ -2022,11 +2046,41 @@ declare namespace LocalJSX {
|
|
2022
2046
|
*/
|
2023
2047
|
"zIndexOverride"?: number;
|
2024
2048
|
}
|
2025
|
-
interface
|
2049
|
+
interface CpslNavButton {
|
2050
|
+
/**
|
2051
|
+
* If the button is disabled. Default is: false.
|
2052
|
+
*/
|
2053
|
+
"disabled"?: boolean;
|
2054
|
+
/**
|
2055
|
+
* Whether or not to use exact matching for the selected main route.
|
2056
|
+
*/
|
2057
|
+
"exactMainRouteMatch"?: boolean;
|
2058
|
+
/**
|
2059
|
+
* Whether or not to use exact matching for the selected sub route.
|
2060
|
+
*/
|
2061
|
+
"exactSubRouteMatch"?: boolean;
|
2062
|
+
/**
|
2063
|
+
* Called when the nav button is clicked.
|
2064
|
+
*/
|
2065
|
+
"onCpslNavButtonClick"?: (event: CpslNavButtonCustomEvent<string>) => void;
|
2066
|
+
/**
|
2067
|
+
* Called when a nav button sub route is clicked.
|
2068
|
+
*/
|
2069
|
+
"onCpslNavButtonSubRouteClick"?: (event: CpslNavButtonCustomEvent<string>) => void;
|
2070
|
+
/**
|
2071
|
+
* Path used to determine what button is selected
|
2072
|
+
*/
|
2073
|
+
"path"?: string;
|
2074
|
+
/**
|
2075
|
+
* The route for the button.
|
2076
|
+
*/
|
2077
|
+
"route"?: string;
|
2026
2078
|
/**
|
2027
2079
|
* The id of the selected button.
|
2028
2080
|
*/
|
2029
|
-
"
|
2081
|
+
"subRoutes"?: { label: string; value: string }[];
|
2082
|
+
}
|
2083
|
+
interface CpslNavButtonGroup {
|
2030
2084
|
}
|
2031
2085
|
interface CpslOverlay {
|
2032
2086
|
/**
|
@@ -2350,7 +2404,6 @@ declare namespace LocalJSX {
|
|
2350
2404
|
}
|
2351
2405
|
interface IntrinsicElements {
|
2352
2406
|
"cpsl-alert": CpslAlert;
|
2353
|
-
"cpsl-animation": CpslAnimation;
|
2354
2407
|
"cpsl-app-bar": CpslAppBar;
|
2355
2408
|
"cpsl-auth-modal": CpslAuthModal;
|
2356
2409
|
"cpsl-avatar": CpslAvatar;
|
@@ -2372,6 +2425,7 @@ declare namespace LocalJSX {
|
|
2372
2425
|
"cpsl-info-box": CpslInfoBox;
|
2373
2426
|
"cpsl-input": CpslInput;
|
2374
2427
|
"cpsl-modal-v2": CpslModalV2;
|
2428
|
+
"cpsl-nav-button": CpslNavButton;
|
2375
2429
|
"cpsl-nav-button-group": CpslNavButtonGroup;
|
2376
2430
|
"cpsl-overlay": CpslOverlay;
|
2377
2431
|
"cpsl-pagination": CpslPagination;
|
@@ -2398,7 +2452,6 @@ declare module "@stencil/core" {
|
|
2398
2452
|
export namespace JSX {
|
2399
2453
|
interface IntrinsicElements {
|
2400
2454
|
"cpsl-alert": LocalJSX.CpslAlert & JSXBase.HTMLAttributes<HTMLCpslAlertElement>;
|
2401
|
-
"cpsl-animation": LocalJSX.CpslAnimation & JSXBase.HTMLAttributes<HTMLCpslAnimationElement>;
|
2402
2455
|
"cpsl-app-bar": LocalJSX.CpslAppBar & JSXBase.HTMLAttributes<HTMLCpslAppBarElement>;
|
2403
2456
|
"cpsl-auth-modal": LocalJSX.CpslAuthModal & JSXBase.HTMLAttributes<HTMLCpslAuthModalElement>;
|
2404
2457
|
"cpsl-avatar": LocalJSX.CpslAvatar & JSXBase.HTMLAttributes<HTMLCpslAvatarElement>;
|
@@ -2420,6 +2473,7 @@ declare module "@stencil/core" {
|
|
2420
2473
|
"cpsl-info-box": LocalJSX.CpslInfoBox & JSXBase.HTMLAttributes<HTMLCpslInfoBoxElement>;
|
2421
2474
|
"cpsl-input": LocalJSX.CpslInput & JSXBase.HTMLAttributes<HTMLCpslInputElement>;
|
2422
2475
|
"cpsl-modal-v2": LocalJSX.CpslModalV2 & JSXBase.HTMLAttributes<HTMLCpslModalV2Element>;
|
2476
|
+
"cpsl-nav-button": LocalJSX.CpslNavButton & JSXBase.HTMLAttributes<HTMLCpslNavButtonElement>;
|
2423
2477
|
"cpsl-nav-button-group": LocalJSX.CpslNavButtonGroup & JSXBase.HTMLAttributes<HTMLCpslNavButtonGroupElement>;
|
2424
2478
|
"cpsl-overlay": LocalJSX.CpslOverlay & JSXBase.HTMLAttributes<HTMLCpslOverlayElement>;
|
2425
2479
|
"cpsl-pagination": LocalJSX.CpslPagination & JSXBase.HTMLAttributes<HTMLCpslPaginationElement>;
|
package/dist/types/index.d.ts
CHANGED
@@ -0,0 +1,92 @@
|
|
1
|
+
export default class Prando {
|
2
|
+
private static readonly MIN;
|
3
|
+
private static readonly MAX;
|
4
|
+
private _seed;
|
5
|
+
private _value;
|
6
|
+
/**
|
7
|
+
* Generate a new Prando pseudo-random number generator.
|
8
|
+
*
|
9
|
+
* @param seed - A number or string seed that determines which pseudo-random number sequence will be created. Defaults to a random seed based on `Math.random()`.
|
10
|
+
*/
|
11
|
+
constructor(seed?: number | string);
|
12
|
+
/**
|
13
|
+
* Generates a pseudo-random number between a lower (inclusive) and a higher (exclusive) bounds.
|
14
|
+
*
|
15
|
+
* @param min - The minimum number that can be randomly generated.
|
16
|
+
* @param pseudoMax - The maximum number that can be randomly generated (exclusive).
|
17
|
+
* @return The generated pseudo-random number.
|
18
|
+
*/
|
19
|
+
next(min?: number, pseudoMax?: number): number;
|
20
|
+
/**
|
21
|
+
* Generates a pseudo-random integer number in a range (inclusive).
|
22
|
+
*
|
23
|
+
* @param min - The minimum number that can be randomly generated.
|
24
|
+
* @param max - The maximum number that can be randomly generated.
|
25
|
+
* @return The generated pseudo-random number.
|
26
|
+
*/
|
27
|
+
nextInt(min?: number, max?: number): number;
|
28
|
+
/**
|
29
|
+
* Generates a pseudo-random string sequence of a particular length from a specific character range.
|
30
|
+
*
|
31
|
+
* Note: keep in mind that creating a random string sequence does not guarantee uniqueness; there is always a
|
32
|
+
* 1 in (char_length^string_length) chance of collision. For real unique string ids, always check for
|
33
|
+
* pre-existing ids, or employ a robust GUID/UUID generator.
|
34
|
+
*
|
35
|
+
* @param length - Length of the string to be generated.
|
36
|
+
* @param chars - Characters that are used when creating the random string. Defaults to all alphanumeric chars (A-Z, a-z, 0-9).
|
37
|
+
* @return The generated string sequence.
|
38
|
+
*/
|
39
|
+
nextString(length?: number, chars?: string): string;
|
40
|
+
/**
|
41
|
+
* Generates a pseudo-random string of 1 character specific character range.
|
42
|
+
*
|
43
|
+
* @param chars - Characters that are used when creating the random string. Defaults to all alphanumeric chars (A-Z, a-z, 0-9).
|
44
|
+
* @return The generated character.
|
45
|
+
*/
|
46
|
+
nextChar(chars?: string): string;
|
47
|
+
/**
|
48
|
+
* Picks a pseudo-random item from an array. The array is left unmodified.
|
49
|
+
*
|
50
|
+
* Note: keep in mind that while the returned item will be random enough, picking one item from the array at a time
|
51
|
+
* does not guarantee nor imply that a sequence of random non-repeating items will be picked. If you want to
|
52
|
+
* *pick items in a random order* from an array, instead of *pick one random item from an array*, it's best to
|
53
|
+
* apply a *shuffle* transformation to the array instead, then read it linearly.
|
54
|
+
*
|
55
|
+
* @param array - Array of any type containing one or more candidates for random picking.
|
56
|
+
* @return An item from the array.
|
57
|
+
*/
|
58
|
+
nextArrayItem<T>(array: T[]): T;
|
59
|
+
/**
|
60
|
+
* Generates a pseudo-random boolean.
|
61
|
+
*
|
62
|
+
* @return A value of true or false.
|
63
|
+
*/
|
64
|
+
nextBoolean(): boolean;
|
65
|
+
/**
|
66
|
+
* Skips ahead in the sequence of numbers that are being generated. This is equivalent to
|
67
|
+
* calling next() a specified number of times, but faster since it doesn't need to map the
|
68
|
+
* new random numbers to a range and return it.
|
69
|
+
*
|
70
|
+
* @param iterations - The number of items to skip ahead.
|
71
|
+
*/
|
72
|
+
skip(iterations?: number): void;
|
73
|
+
/**
|
74
|
+
* Reset the pseudo-random number sequence back to its starting seed. Further calls to next()
|
75
|
+
* will then produce the same sequence of numbers it had produced before. This is equivalent to
|
76
|
+
* creating a new Prando instance with the same seed as another Prando instance.
|
77
|
+
*
|
78
|
+
* Example:
|
79
|
+
* let rng = new Prando(12345678);
|
80
|
+
* console.log(rng.next()); // 0.6177754114889017
|
81
|
+
* console.log(rng.next()); // 0.5784605181725837
|
82
|
+
* rng.reset();
|
83
|
+
* console.log(rng.next()); // 0.6177754114889017 again
|
84
|
+
* console.log(rng.next()); // 0.5784605181725837 again
|
85
|
+
*/
|
86
|
+
reset(): void;
|
87
|
+
private recalculate;
|
88
|
+
private xorshift;
|
89
|
+
private map;
|
90
|
+
private hashCode;
|
91
|
+
private getSafeSeed;
|
92
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@usecapsule/core-components",
|
3
|
-
"version": "3.4.
|
3
|
+
"version": "3.4.1-dev.1",
|
4
4
|
"description": "Capsule Core Components",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -32,7 +32,6 @@
|
|
32
32
|
"color2k": "^2.0.3",
|
33
33
|
"gsap": "^3.12.5",
|
34
34
|
"imask": "7.6.1",
|
35
|
-
"lottie-web": "^5.12.2",
|
36
35
|
"qrcode-with-logos": "1.1.1"
|
37
36
|
},
|
38
37
|
"devDependencies": {
|
@@ -60,6 +59,5 @@
|
|
60
59
|
"storybook": "^8.1.11",
|
61
60
|
"storybook-addon-stencil": "^0.2.1",
|
62
61
|
"ts-node": "^10.9.2"
|
63
|
-
}
|
64
|
-
"gitHead": "18a42040b855e15ddb01993fc1a0ee93dd608e52"
|
62
|
+
}
|
65
63
|
}
|