@emailmaker/filemanager 0.0.8 → 0.0.9

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,30 +1,30 @@
1
- {
2
- "name": "@emailmaker/filemanager",
3
- "version": "0.0.8",
4
- "main": "./file-manager.js",
5
- "module": "./file-manager.esm.js",
6
- "types": "./index.d.ts",
7
- "style": "./file-manager.css",
8
- "license": "MIT",
9
- "peerDependencies": {
10
- "react": "^18.2.0 || ^19.0.0",
11
- "react-dom": "^18.2.0 || ^19.0.0"
12
- },
13
- "browserslist": {
14
- "production": [
15
- "last 2 chrome version",
16
- "last 2 firefox version",
17
- "last 2 safari version"
18
- ],
19
- "development": [
20
- "last 1 chrome version",
21
- "last 1 firefox version",
22
- "last 1 safari version"
23
- ]
24
- },
25
- "msw": {
26
- "workerDirectory": [
27
- "public"
28
- ]
29
- }
30
- }
1
+ {
2
+ "name": "@emailmaker/filemanager",
3
+ "version": "0.0.9",
4
+ "main": "./file-manager.js",
5
+ "module": "./file-manager.esm.js",
6
+ "types": "./index.d.ts",
7
+ "style": "./file-manager.css",
8
+ "license": "MIT",
9
+ "peerDependencies": {
10
+ "react": "^18.2.0 || ^19.0.0",
11
+ "react-dom": "^18.2.0 || ^19.0.0"
12
+ },
13
+ "browserslist": {
14
+ "production": [
15
+ "last 2 chrome version",
16
+ "last 2 firefox version",
17
+ "last 2 safari version"
18
+ ],
19
+ "development": [
20
+ "last 1 chrome version",
21
+ "last 1 firefox version",
22
+ "last 1 safari version"
23
+ ]
24
+ },
25
+ "msw": {
26
+ "workerDirectory": [
27
+ "public"
28
+ ]
29
+ }
30
+ }
package/sample-files.json CHANGED
@@ -1,105 +1,105 @@
1
- {
2
- "files": [
3
- {
4
- "id": "sample-1",
5
- "name": "Красивый закат.jpg",
6
- "size": "2845",
7
- "date": "2024-01-15T10:30:00Z",
8
- "folderId": "",
9
- "type": "image",
10
- "url": "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400&h=300&fit=crop",
11
- "thumbnailUrl": "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=150&h=100&fit=crop",
12
- "extension": "jpg",
13
- "isFolder": false,
14
- "selected": false,
15
- "dimensions": "1920x1080",
16
- "aspectRatio": "16:9"
17
- },
18
- {
19
- "id": "sample-2",
20
- "name": "Горы и озеро.jpg",
21
- "size": "3200",
22
- "date": "2024-01-10T14:20:00Z",
23
- "folderId": "nature-folder",
24
- "type": "image",
25
- "url": "https://images.unsplash.com/photo-1464822759380-8ed769e99d5c?w=400&h=300&fit=crop",
26
- "thumbnailUrl": "https://images.unsplash.com/photo-1464822759380-8ed769e99d5c?w=150&h=100&fit=crop",
27
- "extension": "jpg",
28
- "isFolder": false,
29
- "selected": false,
30
- "dimensions": "1920x1280",
31
- "aspectRatio": "3:2"
32
- },
33
- {
34
- "id": "sample-3",
35
- "name": "Отчет_2024.pdf",
36
- "size": "1250",
37
- "date": "2024-01-12T09:15:00Z",
38
- "folderId": "documents-folder",
39
- "type": "document",
40
- "url": "https://via.placeholder.com/400x300/2196F3/white?text=PDF+Document",
41
- "thumbnailUrl": "https://via.placeholder.com/150x100/2196F3/white?text=PDF",
42
- "extension": "pdf",
43
- "isFolder": false,
44
- "selected": false
45
- },
46
- {
47
- "id": "sample-4",
48
- "name": "Презентация.pptx",
49
- "size": "4500",
50
- "date": "2024-01-08T16:45:00Z",
51
- "folderId": "documents-folder",
52
- "type": "document",
53
- "url": "https://via.placeholder.com/400x300/FF9800/white?text=PowerPoint",
54
- "thumbnailUrl": "https://via.placeholder.com/150x100/FF9800/white?text=PPT",
55
- "extension": "pptx",
56
- "isFolder": false,
57
- "selected": false
58
- },
59
- {
60
- "id": "sample-5",
61
- "name": "Лес в тумане.jpg",
62
- "size": "2100",
63
- "date": "2024-01-05T11:30:00Z",
64
- "folderId": "nature-folder",
65
- "type": "image",
66
- "url": "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=400&h=300&fit=crop",
67
- "thumbnailUrl": "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=150&h=100&fit=crop",
68
- "extension": "jpg",
69
- "isFolder": false,
70
- "selected": false,
71
- "dimensions": "1920x1280",
72
- "aspectRatio": "3:2"
73
- },
74
- {
75
- "id": "sample-6",
76
- "name": "Архивные_данные.zip",
77
- "size": "15600",
78
- "date": "2024-01-01T08:00:00Z",
79
- "folderId": "",
80
- "type": "archive",
81
- "url": "https://via.placeholder.com/400x300/795548/white?text=ZIP+Archive",
82
- "thumbnailUrl": "https://via.placeholder.com/150x100/795548/white?text=ZIP",
83
- "extension": "zip",
84
- "isFolder": false,
85
- "selected": false
86
- }
87
- ],
88
- "folders": [
89
- {
90
- "id": "nature-folder",
91
- "name": "🌲 Природа",
92
- "parentId": null
93
- },
94
- {
95
- "id": "documents-folder",
96
- "name": "📄 Документы",
97
- "parentId": null
98
- },
99
- {
100
- "id": "photos-subfolder",
101
- "name": "📷 Фотографии",
102
- "parentId": "nature-folder"
103
- }
104
- ]
1
+ {
2
+ "files": [
3
+ {
4
+ "id": "sample-1",
5
+ "name": "Красивый закат.jpg",
6
+ "size": "2845",
7
+ "date": "2024-01-15T10:30:00Z",
8
+ "folderId": "",
9
+ "type": "image",
10
+ "url": "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400&h=300&fit=crop",
11
+ "thumbnailUrl": "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=150&h=100&fit=crop",
12
+ "extension": "jpg",
13
+ "isFolder": false,
14
+ "selected": false,
15
+ "dimensions": "1920x1080",
16
+ "aspectRatio": "16:9"
17
+ },
18
+ {
19
+ "id": "sample-2",
20
+ "name": "Горы и озеро.jpg",
21
+ "size": "3200",
22
+ "date": "2024-01-10T14:20:00Z",
23
+ "folderId": "nature-folder",
24
+ "type": "image",
25
+ "url": "https://images.unsplash.com/photo-1464822759380-8ed769e99d5c?w=400&h=300&fit=crop",
26
+ "thumbnailUrl": "https://images.unsplash.com/photo-1464822759380-8ed769e99d5c?w=150&h=100&fit=crop",
27
+ "extension": "jpg",
28
+ "isFolder": false,
29
+ "selected": false,
30
+ "dimensions": "1920x1280",
31
+ "aspectRatio": "3:2"
32
+ },
33
+ {
34
+ "id": "sample-3",
35
+ "name": "Отчет_2024.pdf",
36
+ "size": "1250",
37
+ "date": "2024-01-12T09:15:00Z",
38
+ "folderId": "documents-folder",
39
+ "type": "document",
40
+ "url": "https://via.placeholder.com/400x300/2196F3/white?text=PDF+Document",
41
+ "thumbnailUrl": "https://via.placeholder.com/150x100/2196F3/white?text=PDF",
42
+ "extension": "pdf",
43
+ "isFolder": false,
44
+ "selected": false
45
+ },
46
+ {
47
+ "id": "sample-4",
48
+ "name": "Презентация.pptx",
49
+ "size": "4500",
50
+ "date": "2024-01-08T16:45:00Z",
51
+ "folderId": "documents-folder",
52
+ "type": "document",
53
+ "url": "https://via.placeholder.com/400x300/FF9800/white?text=PowerPoint",
54
+ "thumbnailUrl": "https://via.placeholder.com/150x100/FF9800/white?text=PPT",
55
+ "extension": "pptx",
56
+ "isFolder": false,
57
+ "selected": false
58
+ },
59
+ {
60
+ "id": "sample-5",
61
+ "name": "Лес в тумане.jpg",
62
+ "size": "2100",
63
+ "date": "2024-01-05T11:30:00Z",
64
+ "folderId": "nature-folder",
65
+ "type": "image",
66
+ "url": "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=400&h=300&fit=crop",
67
+ "thumbnailUrl": "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=150&h=100&fit=crop",
68
+ "extension": "jpg",
69
+ "isFolder": false,
70
+ "selected": false,
71
+ "dimensions": "1920x1280",
72
+ "aspectRatio": "3:2"
73
+ },
74
+ {
75
+ "id": "sample-6",
76
+ "name": "Архивные_данные.zip",
77
+ "size": "15600",
78
+ "date": "2024-01-01T08:00:00Z",
79
+ "folderId": "",
80
+ "type": "archive",
81
+ "url": "https://via.placeholder.com/400x300/795548/white?text=ZIP+Archive",
82
+ "thumbnailUrl": "https://via.placeholder.com/150x100/795548/white?text=ZIP",
83
+ "extension": "zip",
84
+ "isFolder": false,
85
+ "selected": false
86
+ }
87
+ ],
88
+ "folders": [
89
+ {
90
+ "id": "nature-folder",
91
+ "name": "🌲 Природа",
92
+ "parentId": null
93
+ },
94
+ {
95
+ "id": "documents-folder",
96
+ "name": "📄 Документы",
97
+ "parentId": null
98
+ },
99
+ {
100
+ "id": "photos-subfolder",
101
+ "name": "📷 Фотографии",
102
+ "parentId": "nature-folder"
103
+ }
104
+ ]
105
105
  }
@@ -1,108 +1,108 @@
1
- <!DOCTYPE html>
2
- <html lang="ru">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Тест загрузки Pixie</title>
7
- <style>
8
- body {
9
- font-family: Arial, sans-serif;
10
- margin: 20px;
11
- background: #f5f5f5;
12
- }
13
- .status {
14
- padding: 10px;
15
- margin: 10px 0;
16
- border-radius: 4px;
17
- }
18
- .success {
19
- background: #d4edda;
20
- color: #155724;
21
- border: 1px solid #c3e6cb;
22
- }
23
- .error {
24
- background: #f8d7da;
25
- color: #721c24;
26
- border: 1px solid #f5c6cb;
27
- }
28
- .loading {
29
- background: #fff3cd;
30
- color: #856404;
31
- border: 1px solid #ffeaa7;
32
- }
33
- #pixie-container {
34
- width: 800px;
35
- height: 600px;
36
- border: 1px solid #ccc;
37
- margin: 20px 0;
38
- background: white;
39
- }
40
- </style>
41
- </head>
42
- <body>
43
- <h1>Тест загрузки Pixie Editor</h1>
44
-
45
- <div id="status" class="status loading">Проверка загрузки...</div>
46
-
47
- <div id="details">
48
- <h3>Проверки:</h3>
49
- <ul id="checks">
50
- <li id="script-check">Загрузка скрипта Pixie...</li>
51
- <li id="pixie-check">Проверка объекта Pixie...</li>
52
- <li id="assets-check">Проверка ассетов...</li>
53
- </ul>
54
- </div>
55
-
56
- <div id="pixie-container"></div>
57
-
58
- <script src="/loacal_module/pixie/dist/pixie.umd.js"></script>
59
- <script>
60
- function updateCheck(id, text, success = true) {
61
- const element = document.getElementById(id);
62
- element.textContent = text;
63
- element.style.color = success ? 'green' : 'red';
64
- element.style.fontWeight = success ? 'bold' : 'normal';
65
- }
66
-
67
- function updateStatus(text, type = 'loading') {
68
- const status = document.getElementById('status');
69
- status.textContent = text;
70
- status.className = `status ${type}`;
71
- }
72
-
73
- // Проверка загрузки скрипта
74
- updateCheck('script-check', '✓ Скрипт Pixie успешно загружен', true);
75
-
76
- // Проверка объекта Pixie
77
- setTimeout(() => {
78
- if (typeof window.Pixie !== 'undefined') {
79
- updateCheck('pixie-check', '✓ Объект Pixie доступен', true);
80
-
81
- // Попытка инициализации
82
- try {
83
- const pixie = new window.Pixie({
84
- selector: '#pixie-container',
85
- baseUrl: '/loacal_module/pixie/assets',
86
- ui: {
87
- visible: true,
88
- mode: 'inline'
89
- }
90
- });
91
-
92
- updateCheck('assets-check', '✓ Ассеты успешно загружены', true);
93
- updateStatus('✓ Pixie Editor успешно инициализирован!', 'success');
94
-
95
- } catch (error) {
96
- updateCheck('assets-check', `✗ Ошибка инициализации: ${error.message}`, false);
97
- updateStatus('✗ Ошибка инициализации Pixie', 'error');
98
- console.error('Ошибка Pixie:', error);
99
- }
100
- } else {
101
- updateCheck('pixie-check', '✗ Объект Pixie не найден', false);
102
- updateStatus('✗ Pixie не загружен', 'error');
103
- }
104
- }, 1000);
105
-
106
- </script>
107
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="ru">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Тест загрузки Pixie</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ margin: 20px;
11
+ background: #f5f5f5;
12
+ }
13
+ .status {
14
+ padding: 10px;
15
+ margin: 10px 0;
16
+ border-radius: 4px;
17
+ }
18
+ .success {
19
+ background: #d4edda;
20
+ color: #155724;
21
+ border: 1px solid #c3e6cb;
22
+ }
23
+ .error {
24
+ background: #f8d7da;
25
+ color: #721c24;
26
+ border: 1px solid #f5c6cb;
27
+ }
28
+ .loading {
29
+ background: #fff3cd;
30
+ color: #856404;
31
+ border: 1px solid #ffeaa7;
32
+ }
33
+ #pixie-container {
34
+ width: 800px;
35
+ height: 600px;
36
+ border: 1px solid #ccc;
37
+ margin: 20px 0;
38
+ background: white;
39
+ }
40
+ </style>
41
+ </head>
42
+ <body>
43
+ <h1>Тест загрузки Pixie Editor</h1>
44
+
45
+ <div id="status" class="status loading">Проверка загрузки...</div>
46
+
47
+ <div id="details">
48
+ <h3>Проверки:</h3>
49
+ <ul id="checks">
50
+ <li id="script-check">Загрузка скрипта Pixie...</li>
51
+ <li id="pixie-check">Проверка объекта Pixie...</li>
52
+ <li id="assets-check">Проверка ассетов...</li>
53
+ </ul>
54
+ </div>
55
+
56
+ <div id="pixie-container"></div>
57
+
58
+ <script src="/loacal_module/pixie/dist/pixie.umd.js"></script>
59
+ <script>
60
+ function updateCheck(id, text, success = true) {
61
+ const element = document.getElementById(id);
62
+ element.textContent = text;
63
+ element.style.color = success ? 'green' : 'red';
64
+ element.style.fontWeight = success ? 'bold' : 'normal';
65
+ }
66
+
67
+ function updateStatus(text, type = 'loading') {
68
+ const status = document.getElementById('status');
69
+ status.textContent = text;
70
+ status.className = `status ${type}`;
71
+ }
72
+
73
+ // Проверка загрузки скрипта
74
+ updateCheck('script-check', '✓ Скрипт Pixie успешно загружен', true);
75
+
76
+ // Проверка объекта Pixie
77
+ setTimeout(() => {
78
+ if (typeof window.Pixie !== 'undefined') {
79
+ updateCheck('pixie-check', '✓ Объект Pixie доступен', true);
80
+
81
+ // Попытка инициализации
82
+ try {
83
+ const pixie = new window.Pixie({
84
+ selector: '#pixie-container',
85
+ baseUrl: '/loacal_module/pixie/assets',
86
+ ui: {
87
+ visible: true,
88
+ mode: 'inline'
89
+ }
90
+ });
91
+
92
+ updateCheck('assets-check', '✓ Ассеты успешно загружены', true);
93
+ updateStatus('✓ Pixie Editor успешно инициализирован!', 'success');
94
+
95
+ } catch (error) {
96
+ updateCheck('assets-check', `✗ Ошибка инициализации: ${error.message}`, false);
97
+ updateStatus('✗ Ошибка инициализации Pixie', 'error');
98
+ console.error('Ошибка Pixie:', error);
99
+ }
100
+ } else {
101
+ updateCheck('pixie-check', '✗ Объект Pixie не найден', false);
102
+ updateStatus('✗ Pixie не загружен', 'error');
103
+ }
104
+ }, 1000);
105
+
106
+ </script>
107
+ </body>
108
108
  </html>