@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.
@@ -1,19 +1,54 @@
1
1
  {
2
2
  "permissions": {
3
3
  "allow": [
4
- "Bash(npm run:*)",
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
- "Bash(node -p \"require\\(''./package.json''\\).version\")"
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
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Fixed
11
+
12
+ - Uploader not opening when loaded via CDN script tags
13
+
10
14
  ## [0.2.0] - 2026-03-22
11
15
 
12
16
  ### Added
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