layerpro 1.5.1 → 2.0.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/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "layerpro",
3
- "version": "1.5.1",
3
+ "version": "2.0.1",
4
4
  "description": "Custom modals, alert, confirm, prompt... by Dario Passariello",
5
- "company": {},
5
+ "main": "./index.cjs",
6
6
  "copyright": "Dario Passariello",
7
7
  "support": {
8
8
  "name": "Dario Passariello",
9
9
  "url": "https://dario.passariello.ca/",
10
10
  "email": "dariopassariello@gmail.com"
11
11
  },
12
- "target": "web",
12
+ "types": "./index.d.ts",
13
13
  "typing": [
14
14
  "types/*"
15
15
  ],
16
+ "typings": "./index.d.ts",
16
17
  "keywords": [
17
18
  "layer",
18
19
  "popup",
19
20
  "modal",
20
- "passariello",
21
21
  "layerpro",
22
22
  "alert",
23
23
  "confirmation",
@@ -45,39 +45,22 @@
45
45
  "email": "valeriacalascaglitta@gmail.com"
46
46
  }
47
47
  ],
48
- "main": "./index.js",
49
- "types": "./index.d.ts",
50
- "typings": "./types/*",
51
- "scripts": {
52
- "build": "webpack --progress --color --mode production --config webpack.ts",
53
- "watch": "webpack --watch --progress --color --mode production --config webpack.ts",
54
- "npm publish": "npm run build && cd dist && ls -al && npm publish"
55
- },
56
- "dependencies": {
57
- "react": "^19.2.4",
58
- "react-dom": "^19.2.4"
59
- },
60
- "devDependencies": {
61
- "@types/node": "^25.3.1",
62
- "@types/webpack-env": "1.18.8",
63
- "@typescript-eslint/eslint-plugin": "8.56.1",
64
- "@typescript-eslint/parser": "8.56.1",
65
- "copy-webpack-plugin": "^13.0.1",
66
- "css-loader": "7.1.4",
67
- "file-loader": "6.2.0",
68
- "sass": "^1.97.3",
69
- "sass-loader": "^16.0.7",
70
- "style-loader": "^4.0.0",
71
- "terser-webpack-plugin": "^5.3.16",
72
- "ts-loader": "^9.5.4",
73
- "ts-node": "10.9.2",
74
- "tslib": "^2.8.1",
75
- "typescript": "5.9.3",
76
- "webpack": "^5.105.2",
77
- "webpack-cli": "6.0.1",
78
- "webpack-dev-server": "^5.2.3"
48
+ "peerDependenciesMeta": {
49
+ "react": {
50
+ "optional": false
51
+ },
52
+ "react-dom": {
53
+ "optional": false
54
+ }
79
55
  },
80
- "optionalDependencies": {
81
- "jquery": "4.0.0"
56
+ "module": "./index.js",
57
+ "exports": {
58
+ ".": {
59
+ "import": "./index.js",
60
+ "require": "./index.cjs",
61
+ "types": "./index.d.ts"
62
+ },
63
+ "./css": "./index.css",
64
+ "./types/*": "./types/*"
82
65
  }
83
66
  }
@@ -0,0 +1,42 @@
1
+ /*
2
+ Copyright: © 2019 Dario Passariello <dariopassariello@gmail.com>
3
+ */
4
+
5
+ declare module '*.js' {
6
+ const value: any
7
+ export default value
8
+ }
9
+
10
+ ///
11
+
12
+ declare module "*.svg" {
13
+ const value: any
14
+ export default value
15
+ }
16
+
17
+ ///
18
+
19
+ declare module '*.css'
20
+
21
+ declare module '*.scss' {
22
+ const resource: { [key: string]: string }
23
+ export = resource
24
+ }
25
+
26
+ declare module '*.module.scss' {
27
+ const classes: { [key: string]: string }
28
+ export default classes
29
+ }
30
+
31
+ declare module '*.sass' {
32
+ const resource: { [key: string]: string }
33
+ export = resource
34
+ }
35
+
36
+ ///
37
+
38
+ declare module '*.htm'
39
+ declare module '*.html'
40
+ declare module '*.mp3'
41
+ declare module '*.ogg'
42
+ declare module '*.mp3'
package/types/jquery.d.ts CHANGED
@@ -1,9 +1,4 @@
1
- /*!
2
- layerpro
3
- Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
4
- Licensed under MIT License, see
5
- https://dario.passariello.ca
6
- */
1
+
7
2
 
8
3
 
9
4
  declare module 'jquery'
@@ -1,11 +1,8 @@
1
- /*!
2
- layerpro
3
- Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
4
- Licensed under MIT License, see
5
- https://dario.passariello.ca
6
- */
7
1
 
8
2
 
3
+
4
+ /// <reference types="react" />
5
+
9
6
  /** Generate custom alert using alert([text]) */
10
7
  declare function alert(f1?: string): any
11
8
 
@@ -23,7 +20,7 @@ declare function prompt(f1?: string, func1?: Function): any
23
20
  interface GenLayerProps {
24
21
 
25
22
  id: string
26
- body?: any
23
+ body?: React.ReactElement | string | HTMLElement
27
24
  name?: string
28
25
  style?: any
29
26
  class?: string
@@ -83,21 +80,27 @@ interface _layerpro {
83
80
  readonly confirm: (txt: string, yesCallback: () => void, noCallback: () => void) => void
84
81
  readonly purge: (document: Document) => void
85
82
  readonly credits: (txt: string) => void
83
+
86
84
  setProps: (obj, options?) => void
87
85
 
88
86
  readonly popup: {
89
- readonly open: (props: GenLayerProps) => GenLayerProps
90
- readonly center: (props: any) => void
91
- readonly maximize: (props: any) => void
92
- readonly iconize: (props: any) => void
93
- readonly raised: (props: any) => void
94
- readonly movable: (props: any) => void
95
- readonly resizable: (props: any) => void
96
- readonly dockable: (props: any) => void
97
- readonly store: (props: any) => void
98
- readonly index: (props: any) => void
99
- readonly zIndex: (props: any) => number
100
- readonly close: (props: any) => any
87
+ open: (props: GenLayerProps) => GenLayerProps
88
+ center: (props: any) => void
89
+ maximize: (props: any) => void
90
+ iconize: (props: any) => void
91
+ raised: (props: any) => void
92
+ movable: (props: any) => void
93
+ resizable: (props: any) => void
94
+ dockable: (props: any) => void
95
+ store: (props: any) => void
96
+ index: (props: any) => void
97
+ zIndex: (props: any) => number
98
+ close: (props: any) => any
99
+ // React root management for memory cleanup
100
+ unmount: (id: string) => void
101
+ getReactRoot: (id: string) => any
102
+ // Event listener cleanup
103
+ cleanupEvents: (id: string) => void
101
104
  }
102
105
 
103
106
  }