@overlastic/svelte 0.5.1 → 0.6.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.
- package/README.md +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.global.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://overlastic.vercel.app/" target="blank">
|
|
3
|
-
<img src="https://github.com/hairyf/overlastic/raw/master/docs/public/
|
|
3
|
+
<img src="https://github.com/hairyf/overlastic/raw/master/docs/public/logo.svg" width="120" alt="Nest Logo" />
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -26,4 +26,4 @@ $ npm install --save @overlastic/svelte
|
|
|
26
26
|
|
|
27
27
|
## Quick Start
|
|
28
28
|
|
|
29
|
-
[Overview & Tutorial](https://overlastic.vercel.app/
|
|
29
|
+
[Overview & Tutorial](https://overlastic.vercel.app/svelte/)
|
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ __export(src_exports, {
|
|
|
23
23
|
Overlay: () => Overlay,
|
|
24
24
|
defineOverlay: () => defineOverlay,
|
|
25
25
|
renderOverlay: () => renderOverlay,
|
|
26
|
-
|
|
26
|
+
useDefineOverlay: () => useDefineOverlay
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(src_exports);
|
|
29
29
|
|
|
@@ -62,7 +62,7 @@ var renderOverlay = constructor.render;
|
|
|
62
62
|
|
|
63
63
|
// src/composable/define.ts
|
|
64
64
|
var import_svelte = require("svelte");
|
|
65
|
-
function
|
|
65
|
+
function useDefineOverlay(options = {}) {
|
|
66
66
|
(0, import_svelte.setContext)(injectOptionsKey, options);
|
|
67
67
|
return (0, import_svelte.getContext)(injectOverlayKey);
|
|
68
68
|
}
|
|
@@ -226,5 +226,5 @@ var Overlay = class extends import_internal3.SvelteComponentTyped {
|
|
|
226
226
|
Overlay,
|
|
227
227
|
defineOverlay,
|
|
228
228
|
renderOverlay,
|
|
229
|
-
|
|
229
|
+
useDefineOverlay
|
|
230
230
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -11,25 +11,25 @@ interface SMountOptions {
|
|
|
11
11
|
declare const defineOverlay: <Props, Resolved = void>(instance: any, options?: _overlastic_core.MountOptions<SMountOptions> | undefined) => _overlastic_core.ImperativeOverlay<Props, Resolved, SMountOptions>;
|
|
12
12
|
declare const renderOverlay: <Props, Resolved = void>(instance: any, props?: Props | undefined, options?: _overlastic_core.MountOptions<SMountOptions> | undefined) => Promise<Resolved>;
|
|
13
13
|
|
|
14
|
-
interface
|
|
14
|
+
interface DefineOverlayReturn {
|
|
15
15
|
/** the notification reject, modify visible, and destroy it after the duration ends */
|
|
16
|
-
reject:
|
|
16
|
+
reject: (reason?: any) => void;
|
|
17
17
|
/** the notification resolve, modify visible, and destroy it after the duration ends */
|
|
18
|
-
resolve:
|
|
18
|
+
resolve: (value?: any) => void;
|
|
19
19
|
/** destroy the current instance (immediately) */
|
|
20
|
-
vanish:
|
|
20
|
+
vanish: () => void;
|
|
21
21
|
/** visible control popup display and hide */
|
|
22
22
|
/** current deferred */
|
|
23
23
|
deferred?: Deferred<any>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
interface
|
|
26
|
+
interface DefineOverlayOptions {
|
|
27
27
|
/** animation duration to avoid premature destruction of components */
|
|
28
28
|
duration?: number;
|
|
29
29
|
/** whether to set visible to true immediately */
|
|
30
30
|
immediate?: boolean;
|
|
31
31
|
}
|
|
32
|
-
declare function
|
|
32
|
+
declare function useDefineOverlay(options?: DefineOverlayOptions): DefineOverlayReturn;
|
|
33
33
|
|
|
34
34
|
declare class Overlay extends SvelteComponentTyped<{
|
|
35
35
|
visible?: boolean;
|
|
@@ -37,4 +37,4 @@ declare class Overlay extends SvelteComponentTyped<{
|
|
|
37
37
|
constructor(options: ComponentConstructorOptions);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export {
|
|
40
|
+
export { type DefineOverlayOptions, type DefineOverlayReturn, Overlay, defineOverlay, renderOverlay, useDefineOverlay };
|
package/dist/index.d.ts
CHANGED
|
@@ -11,25 +11,25 @@ interface SMountOptions {
|
|
|
11
11
|
declare const defineOverlay: <Props, Resolved = void>(instance: any, options?: _overlastic_core.MountOptions<SMountOptions> | undefined) => _overlastic_core.ImperativeOverlay<Props, Resolved, SMountOptions>;
|
|
12
12
|
declare const renderOverlay: <Props, Resolved = void>(instance: any, props?: Props | undefined, options?: _overlastic_core.MountOptions<SMountOptions> | undefined) => Promise<Resolved>;
|
|
13
13
|
|
|
14
|
-
interface
|
|
14
|
+
interface DefineOverlayReturn {
|
|
15
15
|
/** the notification reject, modify visible, and destroy it after the duration ends */
|
|
16
|
-
reject:
|
|
16
|
+
reject: (reason?: any) => void;
|
|
17
17
|
/** the notification resolve, modify visible, and destroy it after the duration ends */
|
|
18
|
-
resolve:
|
|
18
|
+
resolve: (value?: any) => void;
|
|
19
19
|
/** destroy the current instance (immediately) */
|
|
20
|
-
vanish:
|
|
20
|
+
vanish: () => void;
|
|
21
21
|
/** visible control popup display and hide */
|
|
22
22
|
/** current deferred */
|
|
23
23
|
deferred?: Deferred<any>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
interface
|
|
26
|
+
interface DefineOverlayOptions {
|
|
27
27
|
/** animation duration to avoid premature destruction of components */
|
|
28
28
|
duration?: number;
|
|
29
29
|
/** whether to set visible to true immediately */
|
|
30
30
|
immediate?: boolean;
|
|
31
31
|
}
|
|
32
|
-
declare function
|
|
32
|
+
declare function useDefineOverlay(options?: DefineOverlayOptions): DefineOverlayReturn;
|
|
33
33
|
|
|
34
34
|
declare class Overlay extends SvelteComponentTyped<{
|
|
35
35
|
visible?: boolean;
|
|
@@ -37,4 +37,4 @@ declare class Overlay extends SvelteComponentTyped<{
|
|
|
37
37
|
constructor(options: ComponentConstructorOptions);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export {
|
|
40
|
+
export { type DefineOverlayOptions, type DefineOverlayReturn, Overlay, defineOverlay, renderOverlay, useDefineOverlay };
|
package/dist/index.global.js
CHANGED
|
@@ -24,7 +24,7 @@ var OverlaysSvelte = (() => {
|
|
|
24
24
|
Overlay: () => Overlay,
|
|
25
25
|
defineOverlay: () => defineOverlay,
|
|
26
26
|
renderOverlay: () => renderOverlay,
|
|
27
|
-
|
|
27
|
+
useDefineOverlay: () => useDefineOverlay
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
// ../@core/src/define/global.ts
|
|
@@ -607,7 +607,7 @@ var OverlaysSvelte = (() => {
|
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
// src/composable/define.ts
|
|
610
|
-
function
|
|
610
|
+
function useDefineOverlay(options = {}) {
|
|
611
611
|
setContext(injectOptionsKey, options);
|
|
612
612
|
return getContext(injectOverlayKey);
|
|
613
613
|
}
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var renderOverlay = constructor.render;
|
|
|
33
33
|
|
|
34
34
|
// src/composable/define.ts
|
|
35
35
|
import { getContext, setContext } from "svelte";
|
|
36
|
-
function
|
|
36
|
+
function useDefineOverlay(options = {}) {
|
|
37
37
|
setContext(injectOptionsKey, options);
|
|
38
38
|
return getContext(injectOverlayKey);
|
|
39
39
|
}
|
|
@@ -212,5 +212,5 @@ export {
|
|
|
212
212
|
Overlay,
|
|
213
213
|
defineOverlay,
|
|
214
214
|
renderOverlay,
|
|
215
|
-
|
|
215
|
+
useDefineOverlay
|
|
216
216
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overlastic/svelte",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/hairyf/overlastic#readme",
|
|
7
7
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"svelte": "^3.57.0",
|
|
29
|
-
"@overlastic/core": "^0.
|
|
29
|
+
"@overlastic/core": "^0.6.1"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsup src/index.ts",
|