@scaleflex/asset-picker 0.2.17 → 0.2.19
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/.claude/settings.local.json +46 -11
- package/CHANGELOG.md +4 -0
- package/README.md +41 -0
- package/dist/{asset-picker-Ds-pHAuU.cjs → asset-picker-BaTCfu6i.cjs} +236 -180
- package/dist/{asset-picker-DCrMsQ4p.js → asset-picker-Cz_clBDB.js} +1367 -1249
- package/dist/asset-picker.d.ts +1 -0
- package/dist/asset-picker.d.ts.map +1 -1
- package/dist/components/header/ap-header.d.ts +3 -0
- package/dist/components/header/ap-header.d.ts.map +1 -1
- package/dist/components/shared/ap-icon.d.ts.map +1 -1
- package/dist/define.cjs +1 -1
- package/dist/define.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/services/files.service.d.ts +3 -0
- package/dist/services/files.service.d.ts.map +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/store.types.d.ts +1 -0
- package/dist/store/store.types.d.ts.map +1 -1
- package/dist/types/api.types.d.ts +3 -0
- package/dist/types/api.types.d.ts.map +1 -1
- package/dist/types/config.types.d.ts +10 -5
- package/dist/types/config.types.d.ts.map +1 -1
- package/dist/types/events.types.d.ts +4 -0
- package/dist/types/events.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"Bash(
|
|
5
|
-
"Bash(npm view:*)",
|
|
6
|
-
"Bash(git ls-tree:*)",
|
|
7
|
-
"Bash(find . -maxdepth 1 -name .env* -o -name *release* -o -name .git*)",
|
|
8
|
-
"Bash(ls -la vite*.config.ts)",
|
|
9
|
-
"Bash(./scripts/publish-github.sh)",
|
|
10
|
-
"Bash(bash scripts/publish-github.sh 2>&1)",
|
|
11
|
-
"Bash(git remote:*)",
|
|
12
|
-
"Bash(git add:*)",
|
|
13
|
-
"Bash(git commit:*)",
|
|
4
|
+
"Bash(ls:*)",
|
|
14
5
|
"Bash(grep:*)",
|
|
6
|
+
"Bash(npm install:*)",
|
|
7
|
+
"Bash(npx tsc:*)",
|
|
8
|
+
"Bash(npx vite:*)",
|
|
9
|
+
"WebFetch(domain:localhost)",
|
|
10
|
+
"Bash(curl:*)",
|
|
15
11
|
"Bash(node:*)",
|
|
16
|
-
"
|
|
12
|
+
"WebSearch",
|
|
13
|
+
"Bash(npm run:*)",
|
|
14
|
+
"Bash(wc:*)",
|
|
15
|
+
"WebFetch(domain:unpkg.com)",
|
|
16
|
+
"Bash(git:*)",
|
|
17
|
+
"Bash(find /Users/dmitrystremous/scaleflex -maxdepth 3 -type d -name \"*admin*\" 2>/dev/null | grep -i filerobot)",
|
|
18
|
+
"Bash(gh run:*)",
|
|
19
|
+
"Bash(gh workflow:*)",
|
|
20
|
+
"Bash(find:*)",
|
|
21
|
+
"Bash(npx playwright:*)",
|
|
22
|
+
"Bash(npm ls:*)",
|
|
23
|
+
"Read(//Users/dmitrystremous/**)",
|
|
24
|
+
"Bash(npx:*)",
|
|
25
|
+
"Bash(rm:*)",
|
|
26
|
+
"Bash(tail:*)",
|
|
27
|
+
"WebFetch(domain:raw.githubusercontent.com)",
|
|
28
|
+
"Bash(gh api:*)",
|
|
29
|
+
"WebFetch(domain:www.scaleflex.com)",
|
|
30
|
+
"WebFetch(domain:scaleflex.github.io)",
|
|
31
|
+
"WebFetch(domain:github.com)",
|
|
32
|
+
"WebFetch(domain:portals.scaleflex.com)",
|
|
33
|
+
"Bash(for f:*)",
|
|
34
|
+
"Bash(do echo:*)",
|
|
35
|
+
"Read(//Users/dmitrystremous/scaleflex/asset-picker/**)",
|
|
36
|
+
"Bash(done)",
|
|
37
|
+
"Bash(cd:*)",
|
|
38
|
+
"Bash(chmod:*)",
|
|
39
|
+
"Bash(./scripts/publish-github.sh \"v0.1.0 — initial release\" 2>&1)",
|
|
40
|
+
"Bash(npm whoami:*)",
|
|
41
|
+
"Bash(npm publish:*)",
|
|
42
|
+
"Bash(gh repo:*)",
|
|
43
|
+
"Bash(./scripts/publish-github.sh \"Update README with demo and docs links\" 2>&1)",
|
|
44
|
+
"Bash(lsof:*)",
|
|
45
|
+
"Bash(kill:*)",
|
|
46
|
+
"Bash(npm view:*)",
|
|
47
|
+
"Bash(find ~/.claude -type f \\\\\\(-name *release* -o -name *.mdc -o -name *.md \\\\\\))",
|
|
48
|
+
"Bash(node -e \"console.log\\(require\\(''./node_modules/@scaleflex/uploader/package.json''\\).version\\)\")",
|
|
49
|
+
"Bash(node -e \"console.log\\(require\\(''../uploader/package.json''\\).version\\)\")",
|
|
50
|
+
"Bash(./scripts/publish-github.sh \"Update demo with latest uploader\")",
|
|
51
|
+
"Bash(python3 -c \"import sys,json; d=json.load\\(sys.stdin\\); print\\('peerDeps:', json.dumps\\(d.get\\('peerDependencies',{}\\), indent=2\\)\\); print\\('optionalPeerDeps:', json.dumps\\(d.get\\('peerDependenciesMeta',{}\\), indent=2\\)\\); print\\('deps:', json.dumps\\(d.get\\('dependencies',{}\\), indent=2\\)\\)\")"
|
|
17
52
|
]
|
|
18
53
|
}
|
|
19
54
|
}
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -96,6 +96,8 @@ The npm package contains **only pre-built, minified production files** (`dist/`)
|
|
|
96
96
|
|
|
97
97
|
## Installation
|
|
98
98
|
|
|
99
|
+
### npm / yarn / pnpm
|
|
100
|
+
|
|
99
101
|
```bash
|
|
100
102
|
npm install @scaleflex/asset-picker
|
|
101
103
|
```
|
|
@@ -110,6 +112,16 @@ pnpm add @scaleflex/asset-picker
|
|
|
110
112
|
|
|
111
113
|
`lit` is bundled with the package. For React usage, you also need `react` and `react-dom` (v18+) as peer dependencies.
|
|
112
114
|
|
|
115
|
+
### CDN
|
|
116
|
+
|
|
117
|
+
No bundler? Add a single script tag:
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<script src="https://cdn.scaleflex.com/asset-picker/0.2.18/asset-picker.min.js"></script>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This auto-registers `<sfx-asset-picker>` — no imports needed. See the [CDN quick start](#cdn-1) below.
|
|
124
|
+
|
|
113
125
|
### Package exports
|
|
114
126
|
|
|
115
127
|
| Export path | Description |
|
|
@@ -191,6 +203,35 @@ function App() {
|
|
|
191
203
|
}
|
|
192
204
|
```
|
|
193
205
|
|
|
206
|
+
### CDN
|
|
207
|
+
|
|
208
|
+
```html
|
|
209
|
+
<!DOCTYPE html>
|
|
210
|
+
<html>
|
|
211
|
+
<head>
|
|
212
|
+
<script src="https://cdn.scaleflex.com/asset-picker/0.2.18/asset-picker.min.js"></script>
|
|
213
|
+
</head>
|
|
214
|
+
<body>
|
|
215
|
+
<sfx-asset-picker></sfx-asset-picker>
|
|
216
|
+
<button onclick="document.querySelector('sfx-asset-picker').open()">Open Picker</button>
|
|
217
|
+
|
|
218
|
+
<script>
|
|
219
|
+
const picker = document.querySelector('sfx-asset-picker');
|
|
220
|
+
picker.config = {
|
|
221
|
+
auth: {
|
|
222
|
+
mode: 'securityTemplate',
|
|
223
|
+
securityTemplateKey: 'YOUR_KEY',
|
|
224
|
+
projectToken: 'YOUR_TOKEN',
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
picker.addEventListener('ap-select', (e) => {
|
|
228
|
+
console.log('Selected:', e.detail.assets);
|
|
229
|
+
});
|
|
230
|
+
</script>
|
|
231
|
+
</body>
|
|
232
|
+
</html>
|
|
233
|
+
```
|
|
234
|
+
|
|
194
235
|
---
|
|
195
236
|
|
|
196
237
|
## Configuration
|