@seshuk/payload-media-preview 1.0.0
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/LICENSE +21 -0
- package/README.md +507 -0
- package/dist/components/Cell/Cell.client.d.ts +18 -0
- package/dist/components/Cell/Cell.client.js +131 -0
- package/dist/components/Cell/Cell.scss +43 -0
- package/dist/components/Cell/Cell.server.d.ts +11 -0
- package/dist/components/Cell/Cell.server.js +33 -0
- package/dist/components/ExternalLinkIcon/ExternalLinkIcon.d.ts +5 -0
- package/dist/components/ExternalLinkIcon/ExternalLinkIcon.js +17 -0
- package/dist/components/ExternalLinkIcon/ExternalLinkIcon.scss +19 -0
- package/dist/components/Field/Field.d.ts +18 -0
- package/dist/components/Field/Field.js +107 -0
- package/dist/components/Field/Field.scss +14 -0
- package/dist/components/MediaPreview.constants.d.ts +4 -0
- package/dist/components/MediaPreview.constants.js +28 -0
- package/dist/components/MediaPreview.d.ts +10 -0
- package/dist/components/MediaPreview.js +57 -0
- package/dist/components/MediaPreview.types.d.ts +2 -0
- package/dist/components/MediaPreview.types.js +1 -0
- package/dist/components/MediaPreview.utils.d.ts +6 -0
- package/dist/components/MediaPreview.utils.js +38 -0
- package/dist/components/Modal/Modal.constants.d.ts +16 -0
- package/dist/components/Modal/Modal.constants.js +16 -0
- package/dist/components/Modal/Modal.d.ts +19 -0
- package/dist/components/Modal/Modal.js +277 -0
- package/dist/components/Modal/Modal.scss +173 -0
- package/dist/components/Viewer/AudioViewer.d.ts +3 -0
- package/dist/components/Viewer/AudioViewer.js +24 -0
- package/dist/components/Viewer/IframeViewer.d.ts +3 -0
- package/dist/components/Viewer/IframeViewer.js +14 -0
- package/dist/components/Viewer/ImageViewer.d.ts +3 -0
- package/dist/components/Viewer/ImageViewer.js +10 -0
- package/dist/components/Viewer/VideoViewer.d.ts +3 -0
- package/dist/components/Viewer/VideoViewer.js +25 -0
- package/dist/components/Viewer/Viewer.d.ts +12 -0
- package/dist/components/Viewer/Viewer.js +50 -0
- package/dist/components/adapterResolver.d.ts +13 -0
- package/dist/components/adapterResolver.js +43 -0
- package/dist/exports/client.d.ts +5 -0
- package/dist/exports/client.js +5 -0
- package/dist/exports/rsc.d.ts +2 -0
- package/dist/exports/rsc.js +2 -0
- package/dist/field.d.ts +18 -0
- package/dist/field.js +36 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +90 -0
- package/dist/translations/index.d.ts +8 -0
- package/dist/translations/index.js +90 -0
- package/dist/translations/locales/ar.d.ts +2 -0
- package/dist/translations/locales/ar.js +11 -0
- package/dist/translations/locales/az.d.ts +2 -0
- package/dist/translations/locales/az.js +11 -0
- package/dist/translations/locales/bg.d.ts +2 -0
- package/dist/translations/locales/bg.js +11 -0
- package/dist/translations/locales/bnBd.d.ts +2 -0
- package/dist/translations/locales/bnBd.js +11 -0
- package/dist/translations/locales/bnIn.d.ts +2 -0
- package/dist/translations/locales/bnIn.js +11 -0
- package/dist/translations/locales/ca.d.ts +2 -0
- package/dist/translations/locales/ca.js +11 -0
- package/dist/translations/locales/cs.d.ts +2 -0
- package/dist/translations/locales/cs.js +11 -0
- package/dist/translations/locales/da.d.ts +2 -0
- package/dist/translations/locales/da.js +11 -0
- package/dist/translations/locales/de.d.ts +2 -0
- package/dist/translations/locales/de.js +11 -0
- package/dist/translations/locales/en.d.ts +2 -0
- package/dist/translations/locales/en.js +11 -0
- package/dist/translations/locales/es.d.ts +2 -0
- package/dist/translations/locales/es.js +11 -0
- package/dist/translations/locales/et.d.ts +2 -0
- package/dist/translations/locales/et.js +11 -0
- package/dist/translations/locales/fa.d.ts +2 -0
- package/dist/translations/locales/fa.js +11 -0
- package/dist/translations/locales/fr.d.ts +2 -0
- package/dist/translations/locales/fr.js +11 -0
- package/dist/translations/locales/he.d.ts +2 -0
- package/dist/translations/locales/he.js +11 -0
- package/dist/translations/locales/hr.d.ts +2 -0
- package/dist/translations/locales/hr.js +11 -0
- package/dist/translations/locales/hu.d.ts +2 -0
- package/dist/translations/locales/hu.js +11 -0
- package/dist/translations/locales/hy.d.ts +2 -0
- package/dist/translations/locales/hy.js +11 -0
- package/dist/translations/locales/id.d.ts +2 -0
- package/dist/translations/locales/id.js +11 -0
- package/dist/translations/locales/is.d.ts +2 -0
- package/dist/translations/locales/is.js +11 -0
- package/dist/translations/locales/it.d.ts +2 -0
- package/dist/translations/locales/it.js +11 -0
- package/dist/translations/locales/ja.d.ts +2 -0
- package/dist/translations/locales/ja.js +11 -0
- package/dist/translations/locales/ko.d.ts +2 -0
- package/dist/translations/locales/ko.js +11 -0
- package/dist/translations/locales/lt.d.ts +2 -0
- package/dist/translations/locales/lt.js +11 -0
- package/dist/translations/locales/lv.d.ts +2 -0
- package/dist/translations/locales/lv.js +11 -0
- package/dist/translations/locales/my.d.ts +2 -0
- package/dist/translations/locales/my.js +11 -0
- package/dist/translations/locales/nb.d.ts +2 -0
- package/dist/translations/locales/nb.js +11 -0
- package/dist/translations/locales/nl.d.ts +2 -0
- package/dist/translations/locales/nl.js +11 -0
- package/dist/translations/locales/pl.d.ts +2 -0
- package/dist/translations/locales/pl.js +11 -0
- package/dist/translations/locales/pt.d.ts +2 -0
- package/dist/translations/locales/pt.js +11 -0
- package/dist/translations/locales/ro.d.ts +2 -0
- package/dist/translations/locales/ro.js +11 -0
- package/dist/translations/locales/rs.d.ts +2 -0
- package/dist/translations/locales/rs.js +11 -0
- package/dist/translations/locales/rsLatin.d.ts +2 -0
- package/dist/translations/locales/rsLatin.js +11 -0
- package/dist/translations/locales/ru.d.ts +2 -0
- package/dist/translations/locales/ru.js +11 -0
- package/dist/translations/locales/sk.d.ts +2 -0
- package/dist/translations/locales/sk.js +11 -0
- package/dist/translations/locales/sl.d.ts +2 -0
- package/dist/translations/locales/sl.js +11 -0
- package/dist/translations/locales/sv.d.ts +2 -0
- package/dist/translations/locales/sv.js +11 -0
- package/dist/translations/locales/ta.d.ts +2 -0
- package/dist/translations/locales/ta.js +11 -0
- package/dist/translations/locales/th.d.ts +2 -0
- package/dist/translations/locales/th.js +11 -0
- package/dist/translations/locales/tr.d.ts +2 -0
- package/dist/translations/locales/tr.js +11 -0
- package/dist/translations/locales/uk.d.ts +2 -0
- package/dist/translations/locales/uk.js +11 -0
- package/dist/translations/locales/vi.d.ts +2 -0
- package/dist/translations/locales/vi.js +11 -0
- package/dist/translations/locales/zh.d.ts +2 -0
- package/dist/translations/locales/zh.js +11 -0
- package/dist/translations/locales/zhTw.d.ts +2 -0
- package/dist/translations/locales/zhTw.js +11 -0
- package/dist/translations/types.d.ts +11 -0
- package/dist/translations/types.js +1 -0
- package/dist/types.d.ts +130 -0
- package/dist/types.js +2 -0
- package/dist/utils/insertField.d.ts +3 -0
- package/dist/utils/insertField.js +97 -0
- package/package.json +121 -0
package/package.json
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@seshuk/payload-media-preview",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Payload plugin for previewing images, videos, audio, and documents in the admin panel",
|
|
5
|
+
"author": "Maxim Seshuk",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./src/index.ts",
|
|
9
|
+
"types": "./src/index.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./src/index.ts",
|
|
13
|
+
"types": "./src/index.ts",
|
|
14
|
+
"default": "./src/index.ts"
|
|
15
|
+
},
|
|
16
|
+
"./client": {
|
|
17
|
+
"import": "./src/exports/client.ts",
|
|
18
|
+
"types": "./src/exports/client.ts",
|
|
19
|
+
"default": "./src/exports/client.ts"
|
|
20
|
+
},
|
|
21
|
+
"./rsc": {
|
|
22
|
+
"import": "./src/exports/rsc.ts",
|
|
23
|
+
"types": "./src/exports/rsc.ts",
|
|
24
|
+
"default": "./src/exports/rsc.ts"
|
|
25
|
+
},
|
|
26
|
+
"./*": "./*"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
33
|
+
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
|
|
34
|
+
"build:types": "tsc --project tsconfig.build.json",
|
|
35
|
+
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
36
|
+
"build": "pnpm clean && pnpm copyfiles && pnpm build:types && pnpm build:swc",
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"lint": "eslint",
|
|
39
|
+
"lint:fix": "eslint ./src --fix",
|
|
40
|
+
"format": "prettier --write .",
|
|
41
|
+
"format:check": "prettier --check .",
|
|
42
|
+
"dev": "cross-env PAYLOAD_CONFIG_PATH=./tests/payload.config.ts next dev tests --turbo",
|
|
43
|
+
"dev:generate-importmap": "cd tests && cross-env PAYLOAD_CONFIG_PATH=./payload.config.ts payload generate:importmap",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"test:watch": "vitest",
|
|
46
|
+
"test:e2e": "playwright test",
|
|
47
|
+
"test:e2e:ui": "playwright test --ui",
|
|
48
|
+
"prepublishOnly": "pnpm clean && pnpm build"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@next/env": "^16.1.6",
|
|
52
|
+
"@payloadcms/db-mongodb": "^3.79.0",
|
|
53
|
+
"@payloadcms/eslint-config": "^3.28.0",
|
|
54
|
+
"@payloadcms/next": "^3.79.0",
|
|
55
|
+
"@payloadcms/translations": "^3.79.0",
|
|
56
|
+
"@payloadcms/ui": "^3.79.0",
|
|
57
|
+
"@playwright/test": "^1.58.2",
|
|
58
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
59
|
+
"@swc/cli": "^0.8.0",
|
|
60
|
+
"@swc/core": "^1.15.18",
|
|
61
|
+
"@types/node": "^25.4.0",
|
|
62
|
+
"@types/react": "19.2.14",
|
|
63
|
+
"@types/react-dom": "19.2.3",
|
|
64
|
+
"copyfiles": "2.4.1",
|
|
65
|
+
"cross-env": "^10.1.0",
|
|
66
|
+
"eslint": "^10.0.3",
|
|
67
|
+
"mongodb-memory-server": "^11.0.1",
|
|
68
|
+
"next": "16.1.6",
|
|
69
|
+
"payload": "^3.79.0",
|
|
70
|
+
"prettier": "^3.8.1",
|
|
71
|
+
"react": "19.2.4",
|
|
72
|
+
"react-dom": "19.2.4",
|
|
73
|
+
"rimraf": "6.1.3",
|
|
74
|
+
"sharp": "0.34.5",
|
|
75
|
+
"typescript": "5.9.3",
|
|
76
|
+
"typescript-eslint": "^8.57.0",
|
|
77
|
+
"vite-tsconfig-paths": "^6.1.1",
|
|
78
|
+
"vitest": "^4.1.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"@payloadcms/translations": "^3.53.0",
|
|
82
|
+
"@payloadcms/ui": "^3.53.0",
|
|
83
|
+
"payload": "^3.53.0"
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": "^18.20.2 || >=20.9.0"
|
|
87
|
+
},
|
|
88
|
+
"publishConfig": {
|
|
89
|
+
"exports": {
|
|
90
|
+
".": {
|
|
91
|
+
"import": "./dist/index.js",
|
|
92
|
+
"types": "./dist/index.d.ts",
|
|
93
|
+
"default": "./dist/index.js"
|
|
94
|
+
},
|
|
95
|
+
"./client": {
|
|
96
|
+
"import": "./dist/exports/client.js",
|
|
97
|
+
"types": "./dist/exports/client.d.ts",
|
|
98
|
+
"default": "./dist/exports/client.js"
|
|
99
|
+
},
|
|
100
|
+
"./rsc": {
|
|
101
|
+
"import": "./dist/exports/rsc.js",
|
|
102
|
+
"types": "./dist/exports/rsc.d.ts",
|
|
103
|
+
"default": "./dist/exports/rsc.js"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"main": "./dist/index.js",
|
|
107
|
+
"registry": "https://registry.npmjs.org/",
|
|
108
|
+
"types": "./dist/index.d.ts"
|
|
109
|
+
},
|
|
110
|
+
"packageManager": "pnpm@10.32.1",
|
|
111
|
+
"pnpm": {
|
|
112
|
+
"overrides": {
|
|
113
|
+
"typescript-eslint": "^8.57.0",
|
|
114
|
+
"@typescript-eslint/eslint-plugin": "^8.57.0",
|
|
115
|
+
"@typescript-eslint/parser": "^8.57.0",
|
|
116
|
+
"@typescript-eslint/utils": "^8.57.0",
|
|
117
|
+
"@typescript-eslint/typescript-estree": "^8.57.0",
|
|
118
|
+
"@typescript-eslint/type-utils": "^8.57.0"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|