@gradio/annotatedimage 0.11.8 → 0.12.1
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/AnnotatedImage.test.ts +19 -1
- package/CHANGELOG.md +41 -0
- package/Index.svelte +1 -3
- package/dist/Index.svelte +1 -3
- package/package.json +7 -7
package/AnnotatedImage.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test, describe, afterEach, expect } from "vitest";
|
|
2
|
-
import { cleanup, render, fireEvent } from "@self/tootils/render";
|
|
2
|
+
import { cleanup, render, fireEvent, waitFor } from "@self/tootils/render";
|
|
3
3
|
import { run_shared_prop_tests } from "@self/tootils/shared-prop-tests";
|
|
4
4
|
|
|
5
5
|
import AnnotatedImage from "./Index.svelte";
|
|
@@ -233,6 +233,24 @@ describe("Props: buttons", () => {
|
|
|
233
233
|
expect(getByLabelText("Fullscreen")).toBeVisible();
|
|
234
234
|
});
|
|
235
235
|
|
|
236
|
+
test("clicking the fullscreen button toggles fullscreen mode", async () => {
|
|
237
|
+
const { getByLabelText } = await render(AnnotatedImage, {
|
|
238
|
+
...default_props,
|
|
239
|
+
value: fake_value,
|
|
240
|
+
buttons: ["fullscreen"]
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
await fireEvent.click(getByLabelText("Fullscreen"));
|
|
244
|
+
await waitFor(() => {
|
|
245
|
+
expect(getByLabelText("Exit fullscreen mode")).toBeVisible();
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
await fireEvent.click(getByLabelText("Exit fullscreen mode"));
|
|
249
|
+
await waitFor(() => {
|
|
250
|
+
expect(getByLabelText("Fullscreen")).toBeVisible();
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
|
|
236
254
|
test("empty buttons array shows no fullscreen button", async () => {
|
|
237
255
|
const { queryByLabelText } = await render(AnnotatedImage, {
|
|
238
256
|
...default_props,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @gradio/annotatedimage
|
|
2
2
|
|
|
3
|
+
## 0.12.1
|
|
4
|
+
|
|
5
|
+
### Dependency updates
|
|
6
|
+
|
|
7
|
+
- @gradio/statustracker@0.15.1
|
|
8
|
+
- @gradio/icons@0.16.0
|
|
9
|
+
- @gradio/atoms@0.26.0
|
|
10
|
+
- @gradio/client@2.3.1
|
|
11
|
+
- @gradio/upload@0.18.1
|
|
12
|
+
|
|
13
|
+
## 0.12.0
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- [#13526](https://github.com/gradio-app/gradio/pull/13526) [`53cb4ca`](https://github.com/gradio-app/gradio/commit/53cb4cae1ec3521e9170d12867253516413ba37a) - Run `pnpm lint` and `pnpm ts:check` on CI. Thanks @abidlabs!
|
|
18
|
+
|
|
19
|
+
### Fixes
|
|
20
|
+
|
|
21
|
+
- [#13533](https://github.com/gradio-app/gradio/pull/13533) [`e5ec1ca`](https://github.com/gradio-app/gradio/commit/e5ec1ca66c45e7e3a057b75ac2b8b86660b2827b) - Fix fullscreen button not working in ImageSlider, interactive Image, native plots, and AnnotatedImage. Thanks @hysts!
|
|
22
|
+
|
|
23
|
+
### Dependency updates
|
|
24
|
+
|
|
25
|
+
- @gradio/atoms@0.25.0
|
|
26
|
+
- @gradio/statustracker@0.15.0
|
|
27
|
+
- @gradio/utils@0.13.0
|
|
28
|
+
- @gradio/client@2.3.0
|
|
29
|
+
- @gradio/upload@0.18.0
|
|
30
|
+
|
|
31
|
+
## 0.11.8
|
|
32
|
+
|
|
33
|
+
### Dependency updates
|
|
34
|
+
|
|
35
|
+
- @gradio/client@2.2.2
|
|
36
|
+
|
|
37
|
+
## 0.11.8
|
|
38
|
+
|
|
39
|
+
### Dependency updates
|
|
40
|
+
|
|
41
|
+
- @gradio/client@2.2.1
|
|
42
|
+
- @gradio/upload@0.17.10
|
|
43
|
+
|
|
3
44
|
## 0.11.8
|
|
4
45
|
|
|
5
46
|
### Dependency updates
|
package/Index.svelte
CHANGED
|
@@ -74,9 +74,7 @@
|
|
|
74
74
|
{#if (gradio.props.buttons || []).some((btn) => typeof btn === "string" && btn === "fullscreen")}
|
|
75
75
|
<FullscreenButton
|
|
76
76
|
{fullscreen}
|
|
77
|
-
|
|
78
|
-
fullscreen = detail;
|
|
79
|
-
}}
|
|
77
|
+
onclick={(fs) => (fullscreen = fs)}
|
|
80
78
|
/>
|
|
81
79
|
{/if}
|
|
82
80
|
</IconButtonWrapper>
|
package/dist/Index.svelte
CHANGED
|
@@ -74,9 +74,7 @@
|
|
|
74
74
|
{#if (gradio.props.buttons || []).some((btn) => typeof btn === "string" && btn === "fullscreen")}
|
|
75
75
|
<FullscreenButton
|
|
76
76
|
{fullscreen}
|
|
77
|
-
|
|
78
|
-
fullscreen = detail;
|
|
79
|
-
}}
|
|
77
|
+
onclick={(fs) => (fullscreen = fs)}
|
|
80
78
|
/>
|
|
81
79
|
{/if}
|
|
82
80
|
</IconButtonWrapper>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/annotatedimage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"svelte": "^5.48.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@gradio/atoms": "^0.
|
|
26
|
-
"@gradio/icons": "^0.
|
|
27
|
-
"@gradio/
|
|
28
|
-
"@gradio/
|
|
29
|
-
"@gradio/utils": "^0.
|
|
30
|
-
"@gradio/client": "^2.
|
|
25
|
+
"@gradio/atoms": "^0.26.0",
|
|
26
|
+
"@gradio/icons": "^0.16.0",
|
|
27
|
+
"@gradio/statustracker": "^0.15.1",
|
|
28
|
+
"@gradio/upload": "^0.18.1",
|
|
29
|
+
"@gradio/utils": "^0.13.0",
|
|
30
|
+
"@gradio/client": "^2.3.1"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|