@gradio/utils
Advanced tools
Comparing version 0.7.0-beta.1 to 0.7.0-beta.2
# @gradio/utils | ||
## 0.7.0-beta.2 | ||
### Features | ||
- [#9339](https://github.com/gradio-app/gradio/pull/9339) [`4c8c6f2`](https://github.com/gradio-app/gradio/commit/4c8c6f2fe603081941c5fdc43f48a0632b9f31ad) - Ssr part 2. Thanks @pngwn! | ||
- [#9363](https://github.com/gradio-app/gradio/pull/9363) [`3ad28c7`](https://github.com/gradio-app/gradio/commit/3ad28c7e310e8589e0c53b7efee8031e129bece8) - Prevent HTML and Markdown height changing when status is hidden. Thanks @hannahblair! | ||
## 0.7.0-beta.1 | ||
@@ -13,3 +20,3 @@ | ||
## 0.7.0-beta.0 | ||
## 0.7.0 | ||
@@ -26,3 +33,3 @@ ### Features | ||
- @gradio/theme@0.2.5-beta.0 | ||
- @gradio/theme@0.2.5 | ||
@@ -29,0 +36,0 @@ ## 0.6.0 |
@@ -68,2 +68,3 @@ import type { ActionReturn } from "svelte/action"; | ||
} | ||
export declare const css_units: (dimension_value: string | number) => string; | ||
export {}; |
@@ -150,2 +150,3 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
}; | ||
const is_browser = typeof window !== "undefined"; | ||
export class Gradio { | ||
@@ -168,2 +169,4 @@ constructor(id, el, theme, version, root, autoscroll, max_file_size, i18n = (x) => x, client, virtual_component_loader) { | ||
dispatch(event_name, data) { | ||
if (!is_browser || !__classPrivateFieldGet(this, _Gradio_el, "f")) | ||
return; | ||
const e = new CustomEvent("gradio", { | ||
@@ -184,1 +187,6 @@ bubbles: true, | ||
} | ||
export const css_units = (dimension_value) => { | ||
return typeof dimension_value === "number" | ||
? dimension_value + "px" | ||
: dimension_value; | ||
}; |
{ | ||
"name": "@gradio/utils", | ||
"version": "0.7.0-beta.1", | ||
"version": "0.7.0-beta.2", | ||
"description": "Gradio UI packages", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -217,2 +217,4 @@ import type { ActionReturn } from "svelte/action"; | ||
const is_browser = typeof window !== "undefined"; | ||
export type I18nFormatter = any; | ||
@@ -259,2 +261,3 @@ export class Gradio<T extends Record<string, any> = Record<string, any>> { | ||
dispatch<E extends keyof T>(event_name: E, data?: T[E]): void { | ||
if (!is_browser || !this.#el) return; | ||
const e = new CustomEvent("gradio", { | ||
@@ -279,1 +282,7 @@ bubbles: true, | ||
} | ||
export const css_units = (dimension_value: string | number): string => { | ||
return typeof dimension_value === "number" | ||
? dimension_value + "px" | ||
: dimension_value; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37719
517