@fias/create-fias-plugin 1.4.2 → 1.4.3
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
|
@@ -528,22 +528,6 @@ const { entities, isLoading } = useImageEntities({
|
|
|
528
528
|
|
|
529
529
|
Each entry is scrubbed — only fields a UI legitimately needs (no provider model strings, no endpoints, no execution config).
|
|
530
530
|
|
|
531
|
-
### `useBackgroundRemoval()` — Client-side background removal
|
|
532
|
-
|
|
533
|
-
**Permission:** `entities:image_remove_background`
|
|
534
|
-
**Returns:** `BackgroundRemovalApi`
|
|
535
|
-
|
|
536
|
-
Runs the imgly WASM model inside the host page — bytes never leave the user's device. Returns a transparent PNG.
|
|
537
|
-
|
|
538
|
-
```tsx
|
|
539
|
-
import { useBackgroundRemoval } from '@fias/arche-sdk';
|
|
540
|
-
|
|
541
|
-
const { removeBackground, isLoading } = useBackgroundRemoval();
|
|
542
|
-
const transparentPng = await removeBackground(jpegBlob);
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
**Limits:** input ≤ 25 MiB, PNG/JPEG only, rate-limited to 10/min per arche per user. Throws on size violation rather than returning a result.
|
|
546
|
-
|
|
547
531
|
### Image-editing capability hooks (auto-generated)
|
|
548
532
|
|
|
549
533
|
**Permission:** `entities:image_edit`
|
|
@@ -1002,7 +986,7 @@ The SDK also exports the following for advanced use cases. Most plugins don't ne
|
|
|
1002
986
|
|
|
1003
987
|
Other optional sub-fields: `currency: "usd"` (only USD supported today), `platformFeePercent` (override the default platform cut — non-standard).
|
|
1004
988
|
|
|
1005
|
-
**Permissions:** `theme:read`, `user:profile:read`, `storage:sandbox`, `data:store`, `data:search`, `entities:invoke`, `entities:client_invoke`, `entities:image_generate`, `entities:image_edit`, `entities:
|
|
989
|
+
**Permissions:** `theme:read`, `user:profile:read`, `storage:sandbox`, `data:store`, `data:search`, `entities:invoke`, `entities:client_invoke`, `entities:image_generate`, `entities:image_edit`, `entities:audio_generate`, `entities:web_search`, `store:purchase`, `vault:documents:read`, `vault:documents:write`, `assets:read`, `navigation:open_arche`, `sandbox:vendored-libraries`
|
|
1006
990
|
|
|
1007
991
|
**Using AI:** Add `"entities:invoke"` to permissions, then use `useEntityInvocation()` with a model entity ID and your own `systemPrompt`. Browse available models with `npx fias-dev entities`.
|
|
1008
992
|
|
|
@@ -1053,6 +1037,7 @@ When you hit a constraint, say so AND tell the user: file an Entity request on t
|
|
|
1053
1037
|
### Sandboxing
|
|
1054
1038
|
|
|
1055
1039
|
- Plugins run in an iframe with `sandbox="allow-scripts allow-forms allow-downloads allow-popups allow-popups-to-escape-sandbox"` (note: **no** `allow-same-origin` — the plugin has an opaque origin)
|
|
1040
|
+
- **`window.alert()` / `confirm()` / `prompt()` do nothing** (no `allow-modals`): they don't throw — `confirm()` silently returns `false`, so gated actions never run. Build confirmation into your UI (a two-step button or an inline dialog) instead
|
|
1056
1041
|
- **No `fetch()` or `XMLHttpRequest`** — all network access is blocked
|
|
1057
1042
|
- **You _can_ open external links in a new tab** (e.g. `window.open('https://…', '_blank')`) — see "Opening external links" above
|
|
1058
1043
|
- **No access** to parent DOM, cookies, or localStorage
|
|
@@ -528,22 +528,6 @@ const { entities, isLoading } = useImageEntities({
|
|
|
528
528
|
|
|
529
529
|
Each entry is scrubbed — only fields a UI legitimately needs (no provider model strings, no endpoints, no execution config).
|
|
530
530
|
|
|
531
|
-
### `useBackgroundRemoval()` — Client-side background removal
|
|
532
|
-
|
|
533
|
-
**Permission:** `entities:image_remove_background`
|
|
534
|
-
**Returns:** `BackgroundRemovalApi`
|
|
535
|
-
|
|
536
|
-
Runs the imgly WASM model inside the host page — bytes never leave the user's device. Returns a transparent PNG.
|
|
537
|
-
|
|
538
|
-
```tsx
|
|
539
|
-
import { useBackgroundRemoval } from '@fias/arche-sdk';
|
|
540
|
-
|
|
541
|
-
const { removeBackground, isLoading } = useBackgroundRemoval();
|
|
542
|
-
const transparentPng = await removeBackground(jpegBlob);
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
**Limits:** input ≤ 25 MiB, PNG/JPEG only, rate-limited to 10/min per arche per user. Throws on size violation rather than returning a result.
|
|
546
|
-
|
|
547
531
|
### Image-editing capability hooks (auto-generated)
|
|
548
532
|
|
|
549
533
|
**Permission:** `entities:image_edit`
|
|
@@ -1002,7 +986,7 @@ The SDK also exports the following for advanced use cases. Most plugins don't ne
|
|
|
1002
986
|
|
|
1003
987
|
Other optional sub-fields: `currency: "usd"` (only USD supported today), `platformFeePercent` (override the default platform cut — non-standard).
|
|
1004
988
|
|
|
1005
|
-
**Permissions:** `theme:read`, `user:profile:read`, `storage:sandbox`, `data:store`, `data:search`, `entities:invoke`, `entities:client_invoke`, `entities:image_generate`, `entities:image_edit`, `entities:
|
|
989
|
+
**Permissions:** `theme:read`, `user:profile:read`, `storage:sandbox`, `data:store`, `data:search`, `entities:invoke`, `entities:client_invoke`, `entities:image_generate`, `entities:image_edit`, `entities:audio_generate`, `entities:web_search`, `store:purchase`, `vault:documents:read`, `vault:documents:write`, `assets:read`, `navigation:open_arche`, `sandbox:vendored-libraries`
|
|
1006
990
|
|
|
1007
991
|
**Using AI:** Add `"entities:invoke"` to permissions, then use `useEntityInvocation()` with a model entity ID and your own `systemPrompt`. Browse available models with `npx fias-dev entities`.
|
|
1008
992
|
|
|
@@ -1053,6 +1037,7 @@ When you hit a constraint, say so AND tell the user: file an Entity request on t
|
|
|
1053
1037
|
### Sandboxing
|
|
1054
1038
|
|
|
1055
1039
|
- Plugins run in an iframe with `sandbox="allow-scripts allow-forms allow-downloads allow-popups allow-popups-to-escape-sandbox"` (note: **no** `allow-same-origin` — the plugin has an opaque origin)
|
|
1040
|
+
- **`window.alert()` / `confirm()` / `prompt()` do nothing** (no `allow-modals`): they don't throw — `confirm()` silently returns `false`, so gated actions never run. Build confirmation into your UI (a two-step button or an inline dialog) instead
|
|
1056
1041
|
- **No `fetch()` or `XMLHttpRequest`** — all network access is blocked
|
|
1057
1042
|
- **You _can_ open external links in a new tab** (e.g. `window.open('https://…', '_blank')`) — see "Opening external links" above
|
|
1058
1043
|
- **No access** to parent DOM, cookies, or localStorage
|