@scaleflex/asset-picker 0.2.17 → 0.2.18
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 +4 -1
- package/README.md +41 -0
- package/dist/{asset-picker-Ds-pHAuU.cjs → asset-picker-B9yttjwn.cjs} +236 -180
- package/dist/{asset-picker-DCrMsQ4p.js → asset-picker-zrcWs929.js} +1365 -1247
- 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 +4 -0
- 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
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
"Bash(git commit:*)",
|
|
14
14
|
"Bash(grep:*)",
|
|
15
15
|
"Bash(node:*)",
|
|
16
|
-
"Bash(node -p \"require\\(''./package.json''\\).version\")"
|
|
16
|
+
"Bash(node -p \"require\\(''./package.json''\\).version\")",
|
|
17
|
+
"Bash(git push:*)",
|
|
18
|
+
"Bash(find /Users/dmitry_stremous/scaleflex/plugins/scaleflex/asset-picker/demo -name *ai-search* -o -name *configuration*)",
|
|
19
|
+
"Bash(npm whoami:*)"
|
|
17
20
|
]
|
|
18
21
|
}
|
|
19
22
|
}
|
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
|