@ssgoi/core 6.6.3 → 6.6.4
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/README.md +5 -5
- package/dist/index.cjs +9 -9
- package/dist/index.js +771 -693
- package/dist/transitions/sheet/index.d.ts +7 -1
- package/dist/transitions/sheet/index.d.ts.map +1 -1
- package/dist/transitions/sheet/provider/blur.d.ts +14 -0
- package/dist/transitions/sheet/provider/blur.d.ts.map +1 -0
- package/dist/transitions/sheet/provider/index.d.ts.map +1 -1
- package/dist/transitions/sheet/transition.d.ts +5 -1
- package/dist/transitions/sheet/transition.d.ts.map +1 -1
- package/dist/transitions/sheet/types.d.ts +16 -1
- package/dist/transitions/sheet/types.d.ts.map +1 -1
- package/dist/transitions/zoom/provider/blur.d.ts.map +1 -1
- package/dist/transitions/zoom/transition.d.ts.map +1 -1
- package/dist/transitions/zoom/types.d.ts +6 -1
- package/dist/transitions/zoom/types.d.ts.map +1 -1
- package/dist/utils/get-viewport-rect.d.ts +18 -0
- package/dist/utils/get-viewport-rect.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,10 @@ import { DirectionalTransitionPaths } from '../utils';
|
|
|
7
7
|
* - `"scale"` — the background scales down slightly behind the rising sheet.
|
|
8
8
|
* This is the new name for the legacy `"background-scale"` value; the
|
|
9
9
|
* underlying behavior is unchanged.
|
|
10
|
+
* - `"blur"` — the background blurs and recedes (subtle scale + dim) behind the
|
|
11
|
+
* rising sheet, the way a modal pushes the page underneath out of focus.
|
|
10
12
|
*/
|
|
11
|
-
export type SheetType = "static" | "scale";
|
|
13
|
+
export type SheetType = "static" | "scale" | "blur";
|
|
12
14
|
/**
|
|
13
15
|
* Legacy public `type` value, kept for source compatibility only.
|
|
14
16
|
*
|
|
@@ -26,6 +28,10 @@ export type SheetConfig = DirectionalTransitionPaths & ({
|
|
|
26
28
|
type: "scale";
|
|
27
29
|
variant?: "default";
|
|
28
30
|
options?: Record<string, never>;
|
|
31
|
+
} | {
|
|
32
|
+
type: "blur";
|
|
33
|
+
variant?: "default";
|
|
34
|
+
options?: Record<string, never>;
|
|
29
35
|
} | {
|
|
30
36
|
/**
|
|
31
37
|
* @deprecated Do not use in new code. v6 only supports `{ type, variant, options }`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/sheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAIlB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/sheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAIlB;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,0BAA0B,GAClD,CACI;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GACzE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GACvE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GACtE;IACE;;;;;OAKG;IACH,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACjC,CACJ,CAAC;AAiBJ,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAUhE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SheetProvider } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* `blur` sheet tone — the background page blurs and recedes behind the rising
|
|
4
|
+
* sheet, the way a modal pushes the page underneath out of focus.
|
|
5
|
+
*
|
|
6
|
+
* The blur lives on a *separate* overlay layer (a `backdrop-filter` between the
|
|
7
|
+
* background and the sheet) rather than on the background element itself. That
|
|
8
|
+
* keeps the frost uniform and decoupled from the background's clip + scale —
|
|
9
|
+
* applying `filter: blur` directly to the clipped/scaled page would hard-cut
|
|
10
|
+
* the blur halo at the clip edge and ride the scale transform. The background
|
|
11
|
+
* only carries the recede (a small scale + dim); the overlay owns the blur.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createBlurProvider(): SheetProvider;
|
|
14
|
+
//# sourceMappingURL=blur.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/sheet/provider/blur.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA8B9C;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,IAAI,aAAa,CAwClD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/sheet/provider/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/sheet/provider/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,CAI5D,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { TransitionConfig } from '../../types/index.ts';
|
|
2
2
|
import { SheetOptions } from './types';
|
|
3
3
|
export type { SheetOptions, SheetType } from './types';
|
|
4
|
-
|
|
4
|
+
/** Prepare → animation hand-off: the optional backdrop-filter overlay layer. */
|
|
5
|
+
interface SheetExtras {
|
|
6
|
+
overlay?: HTMLElement;
|
|
7
|
+
}
|
|
8
|
+
export declare const sheet: (options?: SheetOptions) => TransitionConfig<SheetExtras>;
|
|
5
9
|
//# sourceMappingURL=transition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/sheet/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAS/C,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,SAAS,CAAC;AAEvD,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKvD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/sheet/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAS/C,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,SAAS,CAAC;AAEvD,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKvD,gFAAgF;AAChF,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,eAAO,MAAM,KAAK,GAChB,UAAS,YAAiB,KACzB,gBAAgB,CAAC,WAAW,CA+O9B,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { PhysicsOptions } from '../../types/index.ts';
|
|
|
9
9
|
*
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
|
-
export type SheetType = "static" | "background-scale";
|
|
12
|
+
export type SheetType = "static" | "background-scale" | "blur";
|
|
13
13
|
export type SheetDirection = "enter" | "exit";
|
|
14
14
|
export interface SheetOptions {
|
|
15
15
|
type?: SheetType;
|
|
@@ -21,9 +21,24 @@ export interface SheetBackgroundConfig {
|
|
|
21
21
|
enterStyle: (t: number, u: number) => SheetStyle;
|
|
22
22
|
exitStyle: (t: number) => SheetStyle;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* A separate full-viewport layer that sits *between* the background page and
|
|
26
|
+
* the foreground sheet (at `Z_OVERLAY`). Used by the `blur` tone to drive a
|
|
27
|
+
* `backdrop-filter` independently of the background's own clip + scale — the
|
|
28
|
+
* background recedes (clipped, scaled) while this layer frosts it uniformly,
|
|
29
|
+
* the way the zoom `blur` tone separates its blur overlay from the tile.
|
|
30
|
+
*/
|
|
31
|
+
export interface SheetOverlayConfig {
|
|
32
|
+
willChange: string;
|
|
33
|
+
initialStyle: Record<string, string>;
|
|
34
|
+
/** `progress` is the raw animation t (0 → 1) for the active direction. */
|
|
35
|
+
style: (direction: SheetDirection, progress: number) => SheetStyle;
|
|
36
|
+
}
|
|
24
37
|
export interface SheetProvider {
|
|
25
38
|
enterPhysics: PhysicsOptions;
|
|
26
39
|
exitPhysics: PhysicsOptions;
|
|
27
40
|
background: SheetBackgroundConfig;
|
|
41
|
+
/** Only set by tones that need a backdrop-filter layer (currently `blur`). */
|
|
42
|
+
overlay?: SheetOverlayConfig;
|
|
28
43
|
}
|
|
29
44
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/sheet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C,EAAE,kBAAkB,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/zoom/provider/blur.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAEV,iBAAiB,EACjB,UAAU,EAEV,cAAc,EACd,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,SAAS,EAGV,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/zoom/provider/blur.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAEV,iBAAiB,EACjB,UAAU,EAEV,cAAc,EACd,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,SAAS,EAGV,MAAM,oBAAoB,CAAC;AAK5B,eAAO,MAAM,YAAY,EAAE,cAM1B,CAAC;AAqEF,qBAAa,sBAAuB,YAAW,YAAY;IACzD,QAAQ,CAAC,OAAO,iBAAgB;IAEhC,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,EAAE;CAkBhD;AAQD,qBAAa,eAAgB,YAAW,YAAY;IAClD,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAQjD,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,EAAE;CA2BhD;AAMD,wBAAgB,kBAAkB,IAAI,YAAY,CASjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAW/D,OAAO,KAAK,EACV,qBAAqB,EAGrB,UAAU,EAKX,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAsT5E,eAAO,MAAM,IAAI,GACf,SAAS,qBAAqB,KAC7B,gBAAgB,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAW/D,OAAO,KAAK,EACV,qBAAqB,EAGrB,UAAU,EAKX,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAsT5E,eAAO,MAAM,IAAI,GACf,SAAS,qBAAqB,KAC7B,gBAAgB,CAAC,UAAU,CAsG7B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhysicsOptions } from '../../types/index.ts';
|
|
1
|
+
import { PhysicsOptions, SsgoiTransitionContext } from '../../types/index.ts';
|
|
2
2
|
import { Animation } from '../../animation';
|
|
3
3
|
export type ZoomType = "expand" | "static" | "blur";
|
|
4
4
|
export type ZoomVariant = "default" | "fade";
|
|
@@ -82,6 +82,11 @@ export interface ZoomContributeCtx {
|
|
|
82
82
|
input: ZoomAnimationInput;
|
|
83
83
|
physics: PhysicsOptions;
|
|
84
84
|
extras: ZoomExtras;
|
|
85
|
+
/**
|
|
86
|
+
* Full transition context — strategies that stage viewport-aligned layers
|
|
87
|
+
* (the blur overlay) need the live scroll position + scrolling element.
|
|
88
|
+
*/
|
|
89
|
+
context: SsgoiTransitionContext;
|
|
85
90
|
/**
|
|
86
91
|
* Mutation registry. Strategies push restore callbacks here; the
|
|
87
92
|
* dispatcher fires them on completion. Keeps cleanup local to each
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAMjD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AACpD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAS7C,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;CACtB;AAMD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACrD,MAAM,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,eAAe,CAAC;AAEtE,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,KAAK,EAAE,CACL,IAAI,EAAE,OAAO,GAA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GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,OAAO,EAAE,sBAAsB,CAAC;IAChC;;;;OAIG;IACH,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;IAE9D;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,SAAS,EAAE,CAAC;CACtD"}
|
|
@@ -14,4 +14,22 @@ export declare function getViewportRect(context: SsgoiTransitionContext, side: "
|
|
|
14
14
|
width: number;
|
|
15
15
|
height: number;
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Vertical placement for an absolute backdrop-filter overlay that lives inside
|
|
19
|
+
* `positionedParent` but must cover the scrolling element's visible viewport
|
|
20
|
+
* regardless of scroll (the blur tone of sheet / zoom).
|
|
21
|
+
*
|
|
22
|
+
* Unlike {@link getViewportRect} — which sizes a page element's own clipped
|
|
23
|
+
* slice in its own box — the overlay is a separate layer whose absolute
|
|
24
|
+
* coordinates are relative to `positionedParent`. During a transition the
|
|
25
|
+
* container is scrolled to the chosen side's position, so an `inset: 0` overlay
|
|
26
|
+
* would ride that scroll and leave the bottom `scroll.y` px unblurred. To land
|
|
27
|
+
* the overlay at the live viewport top instead, its content-space `top` backs
|
|
28
|
+
* out both the scroll (`scroll.y`) and `positionedParent`'s own offset within
|
|
29
|
+
* the scroller (`offsetTop`); its height is the full viewport (`clientHeight`).
|
|
30
|
+
*/
|
|
31
|
+
export declare function getOverlayRect(context: SsgoiTransitionContext, side: "from" | "to"): {
|
|
32
|
+
top: number;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
17
35
|
//# sourceMappingURL=get-viewport-rect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-viewport-rect.d.ts","sourceRoot":"","sources":["../../src/lib/utils/get-viewport-rect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAGrD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,sBAAsB,EAC/B,IAAI,EAAE,MAAM,GAAG,IAAI;;;;;EAcpB"}
|
|
1
|
+
{"version":3,"file":"get-viewport-rect.d.ts","sourceRoot":"","sources":["../../src/lib/utils/get-viewport-rect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAGrD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,sBAAsB,EAC/B,IAAI,EAAE,MAAM,GAAG,IAAI;;;;;EAcpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,sBAAsB,EAC/B,IAAI,EAAE,MAAM,GAAG,IAAI;;;EAYpB"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { getPositionedParent } from './get-positioned-parent';
|
|
|
4
4
|
export { sleep } from './sleep';
|
|
5
5
|
export { getRect } from './get-rect';
|
|
6
6
|
export { getClientRect } from './get-client-rect';
|
|
7
|
-
export { getViewportRect } from './get-viewport-rect';
|
|
7
|
+
export { getViewportRect, getOverlayRect } from './get-viewport-rect';
|
|
8
8
|
export { round, floor, ceil, toFixed } from './number';
|
|
9
9
|
export { withResolvers } from './with-resolvers';
|
|
10
10
|
export { waitPaint } from './wait-paint';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC"}
|