@gradio/annotatedimage 0.11.7 → 0.12.0

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,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,44 @@
1
1
  # @gradio/annotatedimage
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Features
6
+
7
+ - [#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!
8
+
9
+ ### Fixes
10
+
11
+ - [#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!
12
+
13
+ ### Dependency updates
14
+
15
+ - @gradio/atoms@0.25.0
16
+ - @gradio/statustracker@0.15.0
17
+ - @gradio/utils@0.13.0
18
+ - @gradio/client@2.3.0
19
+ - @gradio/upload@0.18.0
20
+
21
+ ## 0.11.8
22
+
23
+ ### Dependency updates
24
+
25
+ - @gradio/client@2.2.2
26
+
27
+ ## 0.11.8
28
+
29
+ ### Dependency updates
30
+
31
+ - @gradio/client@2.2.1
32
+ - @gradio/upload@0.17.10
33
+
34
+ ## 0.11.8
35
+
36
+ ### Dependency updates
37
+
38
+ - @gradio/atoms@0.24.0
39
+ - @gradio/statustracker@0.14.1
40
+ - @gradio/upload@0.17.9
41
+
3
42
  ## 0.11.7
4
43
 
5
44
  ### Features
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
- on:fullscreen={({ detail }) => {
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
- on:fullscreen={({ detail }) => {
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.11.7",
3
+ "version": "0.12.0",
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.23.1",
26
- "@gradio/statustracker": "^0.14.0",
27
25
  "@gradio/icons": "^0.15.1",
28
- "@gradio/upload": "^0.17.8",
29
- "@gradio/utils": "^0.12.2",
30
- "@gradio/client": "^2.2.0"
26
+ "@gradio/atoms": "^0.25.0",
27
+ "@gradio/statustracker": "^0.15.0",
28
+ "@gradio/upload": "^0.18.0",
29
+ "@gradio/utils": "^0.13.0",
30
+ "@gradio/client": "^2.3.0"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",