@tinycloud/web-sdk 3.8.0-beta.10 → 3.8.0-beta.12
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/README.md +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modules/tcw.d.ts +18 -1
- package/dist/panel.cjs +1 -1
- package/dist/panel.mjs +1 -1
- package/dist/ui/api.d.ts +8 -0
- package/dist/ui/host.d.ts +2 -0
- package/dist/ui/panel-styles.d.ts +1 -1
- package/dist/ui/pending.d.ts +1 -1
- package/dist/ui/slots.d.ts +2 -0
- package/dist/ui/styles.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -290,6 +290,7 @@ const tc = new TinyCloudWeb({
|
|
|
290
290
|
});
|
|
291
291
|
|
|
292
292
|
tc.ui.open();
|
|
293
|
+
tc.ui.setButtonVisible(true); // show or hide the floating button at runtime
|
|
293
294
|
tc.ui.close();
|
|
294
295
|
tc.ui.toggle();
|
|
295
296
|
tc.ui.isOpen; // boolean
|
|
@@ -298,6 +299,8 @@ tc.ui.available; // false in iframes, opaque origins, SSR, or when ui is false
|
|
|
298
299
|
|
|
299
300
|
`open()` also clears the user's hidden flag for the button. The hidden flag is stored per origin and app id under `tinycloud:ui:button-hidden:v1:`. The panel shows sections only for capabilities the client exposes.
|
|
300
301
|
|
|
302
|
+
`ui.button` sets the initial state of the floating button, and `tc.ui.setButtonVisible(visible)` changes it at runtime: `true` shows the button now (even under `ui.button: false`) and clears the stored hidden flag, `false` hides it without writing that flag. The SDK does not store this choice; call it on load from your own setting. `open()`, `openPage()` and `toggle()` work whether the button is shown or not. On a phone the panel keeps its header inside the device safe areas, and a downward swipe on the header closes it.
|
|
303
|
+
|
|
301
304
|
### Storage section and storage-full toast
|
|
302
305
|
|
|
303
306
|
When the client exposes `storage.status()`, the panel shows a Storage section with the account's usage: "Room left", "Nearly full", "Storage is full", or "No limit", plus a bar and a "Manage storage" link. The link uses the status `manageUrl` only when it is https; otherwise it falls back to `https://account.tinycloud.xyz/storage`. When the storage needs permission, the section shows a neutral note with no numbers.
|