@neptune3d/dom 0.0.11 → 0.0.13
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/dist/index.d.ts +437 -338
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -804,6 +804,16 @@ declare abstract class BaseStyle {
|
|
|
804
804
|
* @return This instance for chaining.
|
|
805
805
|
*/
|
|
806
806
|
bbr(value: Property.BorderBottom | Property.BorderRight | undefined): this;
|
|
807
|
+
/**
|
|
808
|
+
* Sets the `border-collapse` style of the element.
|
|
809
|
+
* Controls whether table borders are collapsed or separated.
|
|
810
|
+
* Accepts values like `"collapse"`, `"separate"`, or CSS variables.
|
|
811
|
+
* Passing `undefined` removes the border-collapse style.
|
|
812
|
+
*
|
|
813
|
+
* @param value - The border-collapse behavior to apply, or `undefined` to remove it.
|
|
814
|
+
* @return This instance for chaining.
|
|
815
|
+
*/
|
|
816
|
+
bCollapse(value: Property.BorderCollapse | undefined): this;
|
|
807
817
|
/**
|
|
808
818
|
* Sets the `overflow` style of the element.
|
|
809
819
|
* Controls how content that exceeds the element's bounds is handled on both axes.
|
|
@@ -1249,7 +1259,7 @@ declare abstract class BaseStyle {
|
|
|
1249
1259
|
* @param value - The offset distance to apply, or `undefined` to remove it.
|
|
1250
1260
|
* @return This instance for chaining.
|
|
1251
1261
|
*/
|
|
1252
|
-
outlineOffset(value: Property.OutlineOffset | undefined): this;
|
|
1262
|
+
outlineOffset(value: Property.OutlineOffset | number | undefined): this;
|
|
1253
1263
|
/**
|
|
1254
1264
|
* Sets the `line-height` of the element.
|
|
1255
1265
|
* Controls vertical spacing between lines of text. Accepts unitless numbers, length units, percentages, or CSS variables.
|
|
@@ -1288,6 +1298,36 @@ declare abstract class BaseStyle {
|
|
|
1288
1298
|
* @return This instance for chaining.
|
|
1289
1299
|
*/
|
|
1290
1300
|
resize(value: Property.Resize | undefined): this;
|
|
1301
|
+
/**
|
|
1302
|
+
* Sets the CSS `fill` style of the element.
|
|
1303
|
+
* Controls the paint used to fill the interior of SVG shapes or text.
|
|
1304
|
+
* Accepts values like color strings (`"red"`, `"#000"`, `"currentColor"`), gradients, or CSS variables.
|
|
1305
|
+
* Passing `undefined` removes the fill style.
|
|
1306
|
+
*
|
|
1307
|
+
* @param value - The fill style to apply, or `undefined` to remove it.
|
|
1308
|
+
* @return This instance for chaining.
|
|
1309
|
+
*/
|
|
1310
|
+
fill(value: Property.Fill | undefined): this;
|
|
1311
|
+
/**
|
|
1312
|
+
* Sets the CSS `stroke` style of the element.
|
|
1313
|
+
* Controls the color used to outline SVG shapes or text.
|
|
1314
|
+
* Accepts values like color strings (`"black"`, `"none"`, `"currentColor"`), gradients, or CSS variables.
|
|
1315
|
+
* Passing `undefined` removes the stroke style.
|
|
1316
|
+
*
|
|
1317
|
+
* @param value - The stroke style to apply, or `undefined` to remove it.
|
|
1318
|
+
* @return This instance for chaining.
|
|
1319
|
+
*/
|
|
1320
|
+
stroke(value: Property.Stroke | undefined): this;
|
|
1321
|
+
/**
|
|
1322
|
+
* Sets the CSS `stroke-width` style of the element.
|
|
1323
|
+
* Controls the thickness of the stroke used to outline SVG shapes or text.
|
|
1324
|
+
* Accepts values like `"1px"`, `"0.5em"`, numeric values, or CSS variables.
|
|
1325
|
+
* Passing `undefined` removes the stroke-width style.
|
|
1326
|
+
*
|
|
1327
|
+
* @param value - The stroke-width style to apply, or `undefined` to remove it.
|
|
1328
|
+
* @return This instance for chaining.
|
|
1329
|
+
*/
|
|
1330
|
+
strokeWidth(value: Property.StrokeWidth | number | undefined): this;
|
|
1291
1331
|
/**
|
|
1292
1332
|
* Applies CSS styles to truncate overflowing text with an ellipsis.
|
|
1293
1333
|
* Ensures the text stays on a single line and hides overflow.
|
|
@@ -1503,6 +1543,15 @@ declare abstract class BaseDom<E extends HTMLElement | SVGElement> extends BaseS
|
|
|
1503
1543
|
* @return This DomElement instance for chaining.
|
|
1504
1544
|
*/
|
|
1505
1545
|
className(value: string | undefined): this;
|
|
1546
|
+
/**
|
|
1547
|
+
* Sets the `tabindex` attribute on the element.
|
|
1548
|
+
* Controls whether the element can receive keyboard focus and its order in the tab sequence.
|
|
1549
|
+
* Pass `undefined` to remove the attribute.
|
|
1550
|
+
*
|
|
1551
|
+
* @param value - The tabindex value to apply, or `undefined` to remove it.
|
|
1552
|
+
* @return This instance for chaining.
|
|
1553
|
+
*/
|
|
1554
|
+
tabIndex(value: number | undefined): this;
|
|
1506
1555
|
/**
|
|
1507
1556
|
* Toggles a CSS class on the element.
|
|
1508
1557
|
* Adds the class if it’s not present, removes it if it is.
|
|
@@ -1710,6 +1759,27 @@ declare class DomElement<Tag extends keyof DomElementTagNameMap = keyof DomEleme
|
|
|
1710
1759
|
* @return This DomElement instance for chaining.
|
|
1711
1760
|
*/
|
|
1712
1761
|
enable(): this;
|
|
1762
|
+
/**
|
|
1763
|
+
* Focuses this DOM element, if it supports focus.
|
|
1764
|
+
* For non-focusable elements (like SVG or body), ensure `tabindex` is set if needed.
|
|
1765
|
+
*
|
|
1766
|
+
* @return This instance for chaining.
|
|
1767
|
+
*/
|
|
1768
|
+
focus(): this;
|
|
1769
|
+
/**
|
|
1770
|
+
* Removes focus from this DOM element, if it supports blur.
|
|
1771
|
+
* For non-focusable elements, this is a no-op.
|
|
1772
|
+
*
|
|
1773
|
+
* @return This instance for chaining.
|
|
1774
|
+
*/
|
|
1775
|
+
blur(): this;
|
|
1776
|
+
/**
|
|
1777
|
+
* Programmatically clicks this DOM element, if it supports click.
|
|
1778
|
+
* Useful for triggering buttons, links, or custom handlers.
|
|
1779
|
+
*
|
|
1780
|
+
* @return This instance for chaining.
|
|
1781
|
+
*/
|
|
1782
|
+
click(): this;
|
|
1713
1783
|
/**
|
|
1714
1784
|
* Sets or removes the `popover` attribute on the element.
|
|
1715
1785
|
* Applies to HTML elements that support the Popover API (e.g., `<div popover>`).
|
|
@@ -1751,9 +1821,13 @@ declare class DomElement<Tag extends keyof DomElementTagNameMap = keyof DomEleme
|
|
|
1751
1821
|
* Shows the popover on this element.
|
|
1752
1822
|
* Requires the element to have a `popover="manual"` attribute and be in the DOM.
|
|
1753
1823
|
*
|
|
1824
|
+
* Optionally accepts a `source` HTMLElement that acts as the invoker,
|
|
1825
|
+
* improving accessibility and enabling anchor positioning.
|
|
1826
|
+
*
|
|
1827
|
+
* @param source - An optional HTMLElement to act as the popover's invoker.
|
|
1754
1828
|
* @return This DomElement instance for chaining.
|
|
1755
1829
|
*/
|
|
1756
|
-
showPopover(): this;
|
|
1830
|
+
showPopover(source?: HTMLElement): this;
|
|
1757
1831
|
/**
|
|
1758
1832
|
* Hides the popover on this element.
|
|
1759
1833
|
* Requires the element to have a `popover="manual"` attribute and be in the DOM.
|
|
@@ -1761,6 +1835,15 @@ declare class DomElement<Tag extends keyof DomElementTagNameMap = keyof DomEleme
|
|
|
1761
1835
|
* @return This DomElement instance for chaining.
|
|
1762
1836
|
*/
|
|
1763
1837
|
hidePopover(): this;
|
|
1838
|
+
/**
|
|
1839
|
+
* Toggles the popover visibility on this element.
|
|
1840
|
+
* Requires the element to have a `popover="manual"` attribute and be in the DOM.
|
|
1841
|
+
*
|
|
1842
|
+
* @param force - If true, forces the popover to show; if false, forces it to hide; if undefined, toggles.
|
|
1843
|
+
* @param source - An optional HTMLElement that acts as the invoker, improving accessibility and anchor positioning.
|
|
1844
|
+
* @return This DomElement instance for chaining.
|
|
1845
|
+
*/
|
|
1846
|
+
togglePopover(force?: boolean, source?: HTMLElement): this;
|
|
1764
1847
|
}
|
|
1765
1848
|
/**
|
|
1766
1849
|
* Creates a new DomElement instance for the given tag name.
|
|
@@ -1800,11 +1883,15 @@ declare function $a(): AnchorElement;
|
|
|
1800
1883
|
*/
|
|
1801
1884
|
declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends DomElement<T$1> {
|
|
1802
1885
|
/**
|
|
1803
|
-
* Sets the `fill`
|
|
1804
|
-
*
|
|
1886
|
+
* Sets the `fill` attribute on the SVG element.
|
|
1887
|
+
* Controls the paint used to fill the interior of shapes.
|
|
1888
|
+
* Accepts values like color strings (`"red"`, `"#000"`, `"currentColor"`), gradients, or CSS variables.
|
|
1889
|
+
* Passing `undefined` removes the attribute.
|
|
1890
|
+
*
|
|
1891
|
+
* @param value - The fill value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1805
1892
|
* @return This instance for chaining.
|
|
1806
1893
|
*/
|
|
1807
|
-
|
|
1894
|
+
fill(value: string | undefined): this;
|
|
1808
1895
|
/**
|
|
1809
1896
|
* Sets the `fill-rule` property.
|
|
1810
1897
|
* Determines how the interior of a shape is determined when paths intersect.
|
|
@@ -1814,17 +1901,36 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1814
1901
|
*/
|
|
1815
1902
|
fillRule(rule: "nonzero" | "evenodd"): this;
|
|
1816
1903
|
/**
|
|
1817
|
-
* Sets the `
|
|
1818
|
-
*
|
|
1904
|
+
* Sets the `fill-opacity` attribute on the SVG element.
|
|
1905
|
+
* Controls the transparency of the fill independently from the overall element opacity.
|
|
1906
|
+
* Accepts values from `0` (fully transparent) to `1` (fully opaque), or CSS variables.
|
|
1907
|
+
* Useful for layering visual effects or emphasizing fill contrast without affecting stroke or children.
|
|
1908
|
+
* Passing `undefined` removes the attribute.
|
|
1909
|
+
*
|
|
1910
|
+
* @param value - The fill opacity value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1819
1911
|
* @return This instance for chaining.
|
|
1820
1912
|
*/
|
|
1821
|
-
|
|
1913
|
+
fillOpacity(value: string | number | undefined): this;
|
|
1822
1914
|
/**
|
|
1823
|
-
* Sets the `stroke
|
|
1824
|
-
*
|
|
1915
|
+
* Sets the `stroke` attribute on the SVG element.
|
|
1916
|
+
* Controls the color used to outline shapes.
|
|
1917
|
+
* Accepts values like color strings (`"black"`, `"none"`, `"currentColor"`), gradients, or CSS variables.
|
|
1918
|
+
* Passing `undefined` removes the attribute.
|
|
1919
|
+
*
|
|
1920
|
+
* @param value - The stroke value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1825
1921
|
* @return This instance for chaining.
|
|
1826
1922
|
*/
|
|
1827
|
-
|
|
1923
|
+
stroke(value: string | undefined): this;
|
|
1924
|
+
/**
|
|
1925
|
+
* Sets the `stroke-width` attribute on the SVG element.
|
|
1926
|
+
* Controls the thickness of the stroke used to outline shapes.
|
|
1927
|
+
* Accepts values like `"1"`, `"0.5"`, `"2px"`, or CSS variables.
|
|
1928
|
+
* Passing `undefined` removes the attribute.
|
|
1929
|
+
*
|
|
1930
|
+
* @param value - The stroke-width value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1931
|
+
* @return This instance for chaining.
|
|
1932
|
+
*/
|
|
1933
|
+
strokeWidth(value: string | number | undefined): this;
|
|
1828
1934
|
/**
|
|
1829
1935
|
* Sets the `stroke-linejoin` style.
|
|
1830
1936
|
* Controls how two connected segments in a stroke join.
|
|
@@ -1850,19 +1956,56 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1850
1956
|
*/
|
|
1851
1957
|
strokeMiterlimit(value: number): this;
|
|
1852
1958
|
/**
|
|
1853
|
-
* Sets the `opacity`
|
|
1854
|
-
*
|
|
1959
|
+
* Sets the `stroke-opacity` attribute on the SVG element.
|
|
1960
|
+
* Controls the transparency of the stroke independently from the overall element opacity.
|
|
1961
|
+
* Accepts values from `0` (fully transparent) to `1` (fully opaque), or CSS variables.
|
|
1962
|
+
* Passing `undefined` removes the attribute.
|
|
1963
|
+
*
|
|
1964
|
+
* @param value - The stroke opacity value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1855
1965
|
* @return This instance for chaining.
|
|
1856
1966
|
*/
|
|
1857
|
-
|
|
1967
|
+
strokeOpacity(value: string | number | undefined): this;
|
|
1858
1968
|
/**
|
|
1859
|
-
* Sets the `
|
|
1860
|
-
*
|
|
1969
|
+
* Sets the `stroke-dasharray` attribute on the SVG element.
|
|
1970
|
+
* Defines the pattern of dashes and gaps used to render the stroke.
|
|
1971
|
+
* Accepts a space- or comma-separated list of lengths (e.g. `"5 2"` or `"5,2"`), numeric values, or CSS variables.
|
|
1972
|
+
* Passing `undefined` removes the attribute.
|
|
1861
1973
|
*
|
|
1862
|
-
* @param value -
|
|
1974
|
+
* @param value - The dash pattern to apply as an SVG attribute, or `undefined` to remove it.
|
|
1863
1975
|
* @return This instance for chaining.
|
|
1864
1976
|
*/
|
|
1865
|
-
|
|
1977
|
+
strokeDasharray(value: string | number | undefined): this;
|
|
1978
|
+
/**
|
|
1979
|
+
* Sets the `stroke-dashoffset` attribute on the SVG element.
|
|
1980
|
+
* Specifies how far into the dash pattern the stroke should start.
|
|
1981
|
+
* Useful for animating dashed strokes or offsetting patterns.
|
|
1982
|
+
* Accepts numeric values, length strings (e.g. `"4px"`), or CSS variables.
|
|
1983
|
+
* Passing `undefined` removes the attribute.
|
|
1984
|
+
*
|
|
1985
|
+
* @param value - The dash offset to apply as an SVG attribute, or `undefined` to remove it.
|
|
1986
|
+
* @return This instance for chaining.
|
|
1987
|
+
*/
|
|
1988
|
+
strokeDashoffset(value: string | number | undefined): this;
|
|
1989
|
+
/**
|
|
1990
|
+
* Sets the `opacity` attribute on the SVG element.
|
|
1991
|
+
* Controls the overall transparency of the element.
|
|
1992
|
+
* Accepts values from `0` (fully transparent) to `1` (fully opaque), or CSS variables.
|
|
1993
|
+
* Passing `undefined` removes the attribute.
|
|
1994
|
+
*
|
|
1995
|
+
* @param value - The opacity value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1996
|
+
* @return This instance for chaining.
|
|
1997
|
+
*/
|
|
1998
|
+
opacity(value: string | number | undefined): this;
|
|
1999
|
+
/**
|
|
2000
|
+
* Sets the `transform` attribute on the SVG element.
|
|
2001
|
+
* Controls geometric transformations like translation, rotation, scaling, and skewing.
|
|
2002
|
+
* Accepts values like `"translate(10, 20)"`, `"rotate(45)"`, `"scale(2)"`, or composed transforms.
|
|
2003
|
+
* Passing `undefined` removes the attribute.
|
|
2004
|
+
*
|
|
2005
|
+
* @param value - The transform string to apply as an SVG attribute, or `undefined` to remove it.
|
|
2006
|
+
* @return This instance for chaining.
|
|
2007
|
+
*/
|
|
2008
|
+
transform(value: string | undefined): this;
|
|
1866
2009
|
/**
|
|
1867
2010
|
* Applies a `translate(x, y)` transform to the element.
|
|
1868
2011
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1871,7 +2014,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1871
2014
|
* @param y - Vertical translation in user units.
|
|
1872
2015
|
* @return This instance for chaining.
|
|
1873
2016
|
*/
|
|
1874
|
-
|
|
2017
|
+
translate(x: number, y: number): this;
|
|
1875
2018
|
/**
|
|
1876
2019
|
* Applies a horizontal `translate(x, 0)` transform to the element.
|
|
1877
2020
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1879,7 +2022,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1879
2022
|
* @param x - Horizontal translation in user units.
|
|
1880
2023
|
* @return This instance for chaining.
|
|
1881
2024
|
*/
|
|
1882
|
-
|
|
2025
|
+
translateX(x: number): this;
|
|
1883
2026
|
/**
|
|
1884
2027
|
* Applies a vertical `translate(0, y)` transform to the element.
|
|
1885
2028
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1887,7 +2030,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1887
2030
|
* @param y - Vertical translation in user units.
|
|
1888
2031
|
* @return This instance for chaining.
|
|
1889
2032
|
*/
|
|
1890
|
-
|
|
2033
|
+
translateY(y: number): this;
|
|
1891
2034
|
/**
|
|
1892
2035
|
* Applies a `rotate(angle)` or `rotate(angle, cx, cy)` transform to the element.
|
|
1893
2036
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1897,7 +2040,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1897
2040
|
* @param cy - Optional y coordinate of the rotation center.
|
|
1898
2041
|
* @return This instance for chaining.
|
|
1899
2042
|
*/
|
|
1900
|
-
|
|
2043
|
+
rotate(angle: number, cx?: number, cy?: number): this;
|
|
1901
2044
|
/**
|
|
1902
2045
|
* Applies a uniform `scale(s)` transform to the element.
|
|
1903
2046
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1905,7 +2048,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1905
2048
|
* @param s - Uniform scale factor for both x and y axes.
|
|
1906
2049
|
* @return This instance for chaining.
|
|
1907
2050
|
*/
|
|
1908
|
-
|
|
2051
|
+
scale(s: number): this;
|
|
1909
2052
|
/**
|
|
1910
2053
|
* Applies a horizontal `scale(sx, 1)` transform to the element.
|
|
1911
2054
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1913,7 +2056,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1913
2056
|
* @param sx - Horizontal scale factor.
|
|
1914
2057
|
* @return This instance for chaining.
|
|
1915
2058
|
*/
|
|
1916
|
-
|
|
2059
|
+
scaleX(sx: number): this;
|
|
1917
2060
|
/**
|
|
1918
2061
|
* Applies a vertical `scale(1, sy)` transform to the element.
|
|
1919
2062
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1921,7 +2064,36 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1921
2064
|
* @param sy - Vertical scale factor.
|
|
1922
2065
|
* @return This instance for chaining.
|
|
1923
2066
|
*/
|
|
1924
|
-
|
|
2067
|
+
scaleY(sy: number): this;
|
|
2068
|
+
/**
|
|
2069
|
+
* Applies a horizontal skew transform to the SVG element.
|
|
2070
|
+
* Sets the `transform` attribute to `skewX(angle)`, replacing any existing transform.
|
|
2071
|
+
* Skewing distorts the element along the X-axis by the specified angle.
|
|
2072
|
+
*
|
|
2073
|
+
* @param angle - Skew angle in degrees. Positive values skew right, negative values skew left.
|
|
2074
|
+
* @return This instance for chaining.
|
|
2075
|
+
*/
|
|
2076
|
+
skewX(angle: number): this;
|
|
2077
|
+
/**
|
|
2078
|
+
* Applies a vertical skew transform to the SVG element.
|
|
2079
|
+
* Sets the `transform` attribute to `skewY(angle)`, replacing any existing transform.
|
|
2080
|
+
* Skewing distorts the element along the Y-axis by the specified angle.
|
|
2081
|
+
*
|
|
2082
|
+
* @param angle - Skew angle in degrees. Positive values skew downward, negative values skew upward.
|
|
2083
|
+
* @return This instance for chaining.
|
|
2084
|
+
*/
|
|
2085
|
+
skewY(angle: number): this;
|
|
2086
|
+
/**
|
|
2087
|
+
* Sets the `vector-effect` attribute on the SVG element.
|
|
2088
|
+
* Controls how stroke rendering behaves under geometric transformations.
|
|
2089
|
+
* Commonly used to preserve stroke width when scaling with `transform`.
|
|
2090
|
+
*
|
|
2091
|
+
* @param value - One of:
|
|
2092
|
+
* - `"none"`: Stroke scales with the element.
|
|
2093
|
+
* - `"non-scaling-stroke"`: Stroke width remains constant regardless of scale.
|
|
2094
|
+
* @return This instance for chaining.
|
|
2095
|
+
*/
|
|
2096
|
+
vectorEffect(value: "none" | "non-scaling-stroke"): this;
|
|
1925
2097
|
}
|
|
1926
2098
|
//#endregion
|
|
1927
2099
|
//#region src/Button.d.ts
|
|
@@ -2781,192 +2953,285 @@ declare class OptionElement extends DomElement<"option"> {
|
|
|
2781
2953
|
}
|
|
2782
2954
|
declare function $option(): OptionElement;
|
|
2783
2955
|
//#endregion
|
|
2784
|
-
//#region src/
|
|
2956
|
+
//#region src/ProgressElement.d.ts
|
|
2785
2957
|
/**
|
|
2786
|
-
*
|
|
2787
|
-
* Supports common path commands with type-safe chaining and automatic formatting.
|
|
2958
|
+
* A typed wrapper around the native <progress> HTML element, extending the DomElement base class.
|
|
2788
2959
|
*
|
|
2789
|
-
*
|
|
2790
|
-
*
|
|
2791
|
-
*
|
|
2792
|
-
*
|
|
2793
|
-
* .close()
|
|
2794
|
-
* .toString(); // "M10 10 L100 100 Z"
|
|
2960
|
+
* Provides ergonomic methods for setting and retrieving progress state.
|
|
2961
|
+
*
|
|
2962
|
+
* This class is designed for declarative composition and fluent chaining, and integrates
|
|
2963
|
+
* seamlessly with the DomElement styling and layout system.
|
|
2795
2964
|
*/
|
|
2796
|
-
declare class
|
|
2797
|
-
|
|
2965
|
+
declare class ProgressElement extends DomElement<"progress"> {
|
|
2966
|
+
constructor();
|
|
2798
2967
|
/**
|
|
2799
|
-
*
|
|
2800
|
-
*
|
|
2801
|
-
*
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
*
|
|
2968
|
+
* Sets the current progress value.
|
|
2969
|
+
* @param value - The numeric value to assign to the progress bar.
|
|
2970
|
+
* @return This ProgressElement instance for chaining.
|
|
2971
|
+
*/
|
|
2972
|
+
value(value: number): this;
|
|
2973
|
+
/**
|
|
2974
|
+
* Retrieves the current progress value.
|
|
2975
|
+
* @return The numeric value of the progress bar.
|
|
2976
|
+
*/
|
|
2977
|
+
getValue(): number;
|
|
2978
|
+
/**
|
|
2979
|
+
* Sets the maximum value of the progress bar.
|
|
2980
|
+
* @param value - The numeric maximum value to assign.
|
|
2981
|
+
* @return This ProgressElement instance for chaining.
|
|
2982
|
+
*/
|
|
2983
|
+
max(value: number): this;
|
|
2984
|
+
/**
|
|
2985
|
+
* Retrieves the maximum value of the progress bar.
|
|
2986
|
+
* @return The numeric maximum value.
|
|
2987
|
+
*/
|
|
2988
|
+
getMax(): number;
|
|
2989
|
+
/**
|
|
2990
|
+
* Enables indeterminate mode by removing the value attribute.
|
|
2991
|
+
* @return This ProgressElement instance for chaining.
|
|
2992
|
+
*/
|
|
2993
|
+
indeterminate(): this;
|
|
2994
|
+
}
|
|
2995
|
+
declare function $progress(): ProgressElement;
|
|
2996
|
+
//#endregion
|
|
2997
|
+
//#region src/SelectElement.d.ts
|
|
2998
|
+
declare class SelectElement extends DomElement<"select"> {
|
|
2999
|
+
constructor();
|
|
3000
|
+
name(value: string): this;
|
|
3001
|
+
value(value: string | number): this;
|
|
3002
|
+
getValue(): string;
|
|
3003
|
+
}
|
|
3004
|
+
declare function $select(): SelectElement;
|
|
3005
|
+
//#endregion
|
|
3006
|
+
//#region src/SvgCircle.d.ts
|
|
3007
|
+
/**
|
|
3008
|
+
* Wrapper for the `<circle>` SVG element, extending `BaseSvgElement<"circle">` with circle-specific functionality.
|
|
3009
|
+
*
|
|
3010
|
+
* Provides a fluent API for setting circle geometry via `cx`, `cy`, and `r` attributes.
|
|
3011
|
+
* Inherits common styling and transform methods from `BaseSvgElement`, enabling consistent manipulation across SVG shape elements.
|
|
3012
|
+
*
|
|
3013
|
+
* Ideal for constructing circular shapes, markers, and radial primitives with ergonomic chaining.
|
|
3014
|
+
*/
|
|
3015
|
+
declare class SvgCircle extends BaseSvgElement<"circle"> {
|
|
3016
|
+
constructor();
|
|
3017
|
+
/**
|
|
3018
|
+
* Sets the `cx` (center x) coordinate.
|
|
3019
|
+
* @param cx - Horizontal center position.
|
|
2806
3020
|
* @return This instance for chaining.
|
|
2807
3021
|
*/
|
|
2808
|
-
|
|
3022
|
+
cx(cx: number): this;
|
|
2809
3023
|
/**
|
|
2810
|
-
*
|
|
2811
|
-
*
|
|
2812
|
-
*
|
|
2813
|
-
* Equivalent to the SVG `m` command.
|
|
2814
|
-
*
|
|
2815
|
-
* @param dx - Relative x offset from the current position.
|
|
2816
|
-
* @param dy - Relative y offset from the current position.
|
|
3024
|
+
* Sets the `cy` (center y) coordinate.
|
|
3025
|
+
* @param cy - Vertical center position.
|
|
2817
3026
|
* @return This instance for chaining.
|
|
2818
3027
|
*/
|
|
2819
|
-
|
|
3028
|
+
cy(cy: number): this;
|
|
2820
3029
|
/**
|
|
2821
|
-
*
|
|
2822
|
-
*
|
|
2823
|
-
*
|
|
2824
|
-
* Equivalent to the SVG `L` command.
|
|
2825
|
-
*
|
|
2826
|
-
* @param x - Absolute x coordinate of the line endpoint.
|
|
2827
|
-
* @param y - Absolute y coordinate of the line endpoint.
|
|
3030
|
+
* Sets the `r` (radius) of the circle.
|
|
3031
|
+
* @param r - Radius in user units.
|
|
2828
3032
|
* @return This instance for chaining.
|
|
2829
3033
|
*/
|
|
2830
|
-
|
|
3034
|
+
r(r: number): this;
|
|
3035
|
+
}
|
|
3036
|
+
/**
|
|
3037
|
+
* Creates a new SvgCircle element.
|
|
3038
|
+
*
|
|
3039
|
+
* @return A new SvgCircle instance.
|
|
3040
|
+
*/
|
|
3041
|
+
declare function $circle(): SvgCircle;
|
|
3042
|
+
//#endregion
|
|
3043
|
+
//#region src/SvgElement.d.ts
|
|
3044
|
+
/**
|
|
3045
|
+
* Wrapper for the `<svg>` root element, extending `BaseSvgElement<"svg">` with viewport and layout configuration.
|
|
3046
|
+
*
|
|
3047
|
+
* Provides a fluent API for setting width, height, viewBox, and namespace attributes.
|
|
3048
|
+
* Inherits common styling and transform methods from `BaseSvgElement`, enabling consistent manipulation across the entire SVG tree.
|
|
3049
|
+
*
|
|
3050
|
+
* Ideal for constructing standalone SVG documents or embedding scalable vector graphics in UI components.
|
|
3051
|
+
*/
|
|
3052
|
+
declare class SvgElement extends BaseSvgElement<"svg"> {
|
|
3053
|
+
constructor();
|
|
2831
3054
|
/**
|
|
2832
|
-
*
|
|
2833
|
-
*
|
|
2834
|
-
*
|
|
2835
|
-
* Equivalent to the SVG `l` command.
|
|
2836
|
-
*
|
|
2837
|
-
* @param dx - Relative x offset from the current position.
|
|
2838
|
-
* @param dy - Relative y offset from the current position.
|
|
3055
|
+
* Sets the `width` of the SVG viewport.
|
|
3056
|
+
* @param w - Width in pixels or units.
|
|
2839
3057
|
* @return This instance for chaining.
|
|
2840
3058
|
*/
|
|
2841
|
-
|
|
3059
|
+
width(w: number | string): this;
|
|
2842
3060
|
/**
|
|
2843
|
-
*
|
|
2844
|
-
*
|
|
2845
|
-
*
|
|
2846
|
-
* Equivalent to the SVG `H` command.
|
|
2847
|
-
*
|
|
2848
|
-
* @param x - Absolute x coordinate of the line endpoint.
|
|
3061
|
+
* Sets the `height` of the SVG viewport.
|
|
3062
|
+
* @param h - Height in pixels or units.
|
|
2849
3063
|
* @return This instance for chaining.
|
|
2850
3064
|
*/
|
|
2851
|
-
|
|
3065
|
+
height(h: number | string): this;
|
|
2852
3066
|
/**
|
|
2853
|
-
*
|
|
2854
|
-
*
|
|
2855
|
-
*
|
|
2856
|
-
*
|
|
2857
|
-
*
|
|
2858
|
-
* @param dx - Relative x offset from the current position.
|
|
3067
|
+
* Sets the `viewBox` attribute for scalable layout.
|
|
3068
|
+
* @param x - Minimum x coordinate.
|
|
3069
|
+
* @param y - Minimum y coordinate.
|
|
3070
|
+
* @param w - ViewBox width.
|
|
3071
|
+
* @param h - ViewBox height.
|
|
2859
3072
|
* @return This instance for chaining.
|
|
2860
3073
|
*/
|
|
2861
|
-
|
|
3074
|
+
viewBox(x: number, y: number, w: number, h: number): this;
|
|
3075
|
+
}
|
|
3076
|
+
/**
|
|
3077
|
+
* Creates a new SvgElement root.
|
|
3078
|
+
*
|
|
3079
|
+
* @return A new SvgElement instance.
|
|
3080
|
+
*/
|
|
3081
|
+
declare function $svg(): SvgElement;
|
|
3082
|
+
//#endregion
|
|
3083
|
+
//#region src/SvgGroup.d.ts
|
|
3084
|
+
/**
|
|
3085
|
+
* Wrapper for the `<g>` SVG element, extending `BaseSvgElement<"g">` with group-specific functionality.
|
|
3086
|
+
*
|
|
3087
|
+
* Provides a fluent API for grouping multiple SVG elements under a shared transform or style context.
|
|
3088
|
+
* Inherits common styling and transform methods from `BaseSvgElement`, enabling consistent manipulation across grouped shapes.
|
|
3089
|
+
*
|
|
3090
|
+
* Ideal for structuring reusable components, applying collective transforms, or organizing layered SVG content.
|
|
3091
|
+
*/
|
|
3092
|
+
declare class SvgGroup extends BaseSvgElement<"g"> {
|
|
3093
|
+
constructor();
|
|
3094
|
+
}
|
|
3095
|
+
/**
|
|
3096
|
+
* Creates a new SvgGroup element.
|
|
3097
|
+
*
|
|
3098
|
+
* @return A new SvgGroup instance.
|
|
3099
|
+
*/
|
|
3100
|
+
declare function $group(): SvgGroup;
|
|
3101
|
+
//#endregion
|
|
3102
|
+
//#region src/SvgPathData.d.ts
|
|
3103
|
+
/**
|
|
3104
|
+
* Fluent builder for constructing the `d` attribute of an SVG `<path>` element.
|
|
3105
|
+
* Supports common path commands with type-safe chaining and automatic formatting.
|
|
3106
|
+
*
|
|
3107
|
+
* Example:
|
|
3108
|
+
* new PathData()
|
|
3109
|
+
* .moveTo(10, 10)
|
|
3110
|
+
* .lineTo(100, 100)
|
|
3111
|
+
* .close()
|
|
3112
|
+
* .toString(); // "M10 10 L100 100 Z"
|
|
3113
|
+
*/
|
|
3114
|
+
declare class SvgPathData {
|
|
3115
|
+
protected _segments: string[];
|
|
2862
3116
|
/**
|
|
2863
|
-
*
|
|
2864
|
-
*
|
|
3117
|
+
* Moves the current drawing position to the coordinate (x, y).
|
|
3118
|
+
* Starts a new subpath without drawing a line.
|
|
2865
3119
|
*
|
|
2866
|
-
* Equivalent to the SVG `
|
|
3120
|
+
* Equivalent to the SVG `M` or `m` command.
|
|
2867
3121
|
*
|
|
2868
|
-
* @param
|
|
3122
|
+
* @param x - X coordinate of the new position.
|
|
3123
|
+
* @param y - Y coordinate of the new position.
|
|
3124
|
+
* @param relative - If true, uses relative coordinates (`m`); otherwise absolute (`M`)
|
|
2869
3125
|
* @return This instance for chaining.
|
|
2870
3126
|
*/
|
|
2871
|
-
|
|
3127
|
+
m(x: number, y: number, relative?: boolean): this;
|
|
2872
3128
|
/**
|
|
2873
|
-
* Draws a
|
|
2874
|
-
*
|
|
3129
|
+
* Draws a straight line from the current position to (x, y).
|
|
3130
|
+
* Adds a visible segment to the path.
|
|
2875
3131
|
*
|
|
2876
|
-
* Equivalent to the SVG `
|
|
3132
|
+
* Equivalent to the SVG `L` or `l` command.
|
|
2877
3133
|
*
|
|
2878
|
-
* @param
|
|
3134
|
+
* @param x - X coordinate of the line endpoint.
|
|
3135
|
+
* @param y - Y coordinate of the line endpoint.
|
|
3136
|
+
* @param relative - If true, uses relative coordinates (`l`); otherwise absolute (`L`)
|
|
2879
3137
|
* @return This instance for chaining.
|
|
2880
3138
|
*/
|
|
2881
|
-
|
|
3139
|
+
l(x: number, y: number, relative?: boolean): this;
|
|
2882
3140
|
/**
|
|
2883
|
-
* Draws a
|
|
2884
|
-
*
|
|
3141
|
+
* Draws a horizontal line to the given x coordinate,
|
|
3142
|
+
* keeping the current y position unchanged.
|
|
2885
3143
|
*
|
|
2886
|
-
* Equivalent to the SVG `
|
|
3144
|
+
* Equivalent to the SVG `H` or `h` command.
|
|
2887
3145
|
*
|
|
2888
|
-
* @param
|
|
2889
|
-
* @param
|
|
2890
|
-
* @param cx2 - Absolute x coordinate of the second control point.
|
|
2891
|
-
* @param cy2 - Absolute y coordinate of the second control point.
|
|
2892
|
-
* @param x - Absolute x coordinate of the curve endpoint.
|
|
2893
|
-
* @param y - Absolute y coordinate of the curve endpoint.
|
|
3146
|
+
* @param x - X coordinate of the line endpoint.
|
|
3147
|
+
* @param relative - If true, uses relative coordinates (`h`); otherwise absolute (`H`)
|
|
2894
3148
|
* @return This instance for chaining.
|
|
2895
3149
|
*/
|
|
2896
|
-
|
|
3150
|
+
h(x: number, relative?: boolean): this;
|
|
2897
3151
|
/**
|
|
2898
|
-
* Draws a
|
|
2899
|
-
*
|
|
3152
|
+
* Draws a vertical line to the given y coordinate,
|
|
3153
|
+
* keeping the current x position unchanged.
|
|
2900
3154
|
*
|
|
2901
|
-
* Equivalent to the SVG `
|
|
3155
|
+
* Equivalent to the SVG `V` or `v` command.
|
|
2902
3156
|
*
|
|
2903
|
-
* @param
|
|
2904
|
-
* @param
|
|
2905
|
-
* @param dc2x - Relative x offset of the second control point.
|
|
2906
|
-
* @param dc2y - Relative y offset of the second control point.
|
|
2907
|
-
* @param dx - Relative x offset of the curve endpoint.
|
|
2908
|
-
* @param dy - Relative y offset of the curve endpoint.
|
|
3157
|
+
* @param y - Y coordinate of the line endpoint.
|
|
3158
|
+
* @param relative - If true, uses relative coordinates (`v`); otherwise absolute (`V`)
|
|
2909
3159
|
* @return This instance for chaining.
|
|
2910
3160
|
*/
|
|
2911
|
-
|
|
3161
|
+
v(y: number, relative?: boolean): this;
|
|
2912
3162
|
/**
|
|
2913
|
-
* Draws a
|
|
2914
|
-
* using
|
|
3163
|
+
* Draws a cubic Bézier curve from the current position to (x, y),
|
|
3164
|
+
* using two control points to shape the curve.
|
|
2915
3165
|
*
|
|
2916
|
-
* Equivalent to the SVG `
|
|
3166
|
+
* Equivalent to the SVG `C` or `c` command.
|
|
2917
3167
|
*
|
|
2918
|
-
* @param
|
|
2919
|
-
* @param
|
|
2920
|
-
* @param
|
|
2921
|
-
* @param
|
|
3168
|
+
* @param cx1 - X coordinate of the first control point.
|
|
3169
|
+
* @param cy1 - Y coordinate of the first control point.
|
|
3170
|
+
* @param cx2 - X coordinate of the second control point.
|
|
3171
|
+
* @param cy2 - Y coordinate of the second control point.
|
|
3172
|
+
* @param x - Destination x coordinate.
|
|
3173
|
+
* @param y - Destination y coordinate.
|
|
3174
|
+
* @param relative - If true, uses relative coordinates (`c`); otherwise absolute (`C`)
|
|
2922
3175
|
* @return This instance for chaining.
|
|
2923
3176
|
*/
|
|
2924
|
-
|
|
3177
|
+
c(cx1: number, cy1: number, cx2: number, cy2: number, x: number, y: number, relative?: boolean): this;
|
|
2925
3178
|
/**
|
|
2926
|
-
* Draws a quadratic Bézier curve from the current position
|
|
2927
|
-
* using a single
|
|
3179
|
+
* Draws a quadratic Bézier curve from the current position to (x, y),
|
|
3180
|
+
* using a single control point to shape the curve.
|
|
2928
3181
|
*
|
|
2929
|
-
* Equivalent to the SVG `q` command.
|
|
3182
|
+
* Equivalent to the SVG `Q` or `q` command.
|
|
2930
3183
|
*
|
|
2931
|
-
* @param
|
|
2932
|
-
* @param
|
|
2933
|
-
* @param
|
|
2934
|
-
* @param
|
|
3184
|
+
* @param cx - X coordinate of the control point.
|
|
3185
|
+
* @param cy - Y coordinate of the control point.
|
|
3186
|
+
* @param x - Destination x coordinate.
|
|
3187
|
+
* @param y - Destination y coordinate.
|
|
3188
|
+
* @param relative - If true, uses relative coordinates (`q`); otherwise absolute (`Q`)
|
|
2935
3189
|
* @return This instance for chaining.
|
|
2936
3190
|
*/
|
|
2937
|
-
|
|
3191
|
+
q(cx: number, cy: number, x: number, y: number, relative?: boolean): this;
|
|
2938
3192
|
/**
|
|
2939
|
-
* Draws an elliptical arc from the current position to the
|
|
3193
|
+
* Draws an elliptical arc from the current position to the coordinate (x, y),
|
|
2940
3194
|
* using the specified radii, rotation, and arc/sweep flags.
|
|
2941
3195
|
*
|
|
2942
|
-
* Equivalent to the SVG `A` command.
|
|
3196
|
+
* Equivalent to the SVG `A` or `a` command.
|
|
2943
3197
|
*
|
|
2944
3198
|
* @param rx - Horizontal radius of the ellipse.
|
|
2945
3199
|
* @param ry - Vertical radius of the ellipse.
|
|
2946
|
-
* @param xAxisRotation - Rotation (in degrees) of the ellipse's x-axis
|
|
2947
|
-
* @param largeArc - If true, draws the larger
|
|
2948
|
-
* @param sweep - If true, draws
|
|
2949
|
-
* @param x -
|
|
2950
|
-
* @param y -
|
|
3200
|
+
* @param xAxisRotation - Rotation (in degrees) of the ellipse's x-axis.
|
|
3201
|
+
* @param largeArc - If true, draws the larger arc (≥ 180°).
|
|
3202
|
+
* @param sweep - If true, draws clockwise.
|
|
3203
|
+
* @param x - Destination x coordinate.
|
|
3204
|
+
* @param y - Destination y coordinate.
|
|
3205
|
+
* @param relative - If true, uses relative coordinates (`a`); otherwise absolute (`A`)
|
|
2951
3206
|
* @return This instance for chaining.
|
|
2952
3207
|
*/
|
|
2953
|
-
|
|
3208
|
+
a(rx: number, ry: number, xAxisRotation: number, largeArc: boolean, sweep: boolean, x: number, y: number, relative?: boolean): this;
|
|
2954
3209
|
/**
|
|
2955
|
-
* Draws
|
|
2956
|
-
*
|
|
3210
|
+
* Draws a smooth quadratic Bézier curve to (x, y),
|
|
3211
|
+
* reflecting the previous control point.
|
|
2957
3212
|
*
|
|
2958
|
-
* Equivalent to the SVG `
|
|
3213
|
+
* Equivalent to the SVG `T` or `t` command.
|
|
2959
3214
|
*
|
|
2960
|
-
* @param
|
|
2961
|
-
* @param
|
|
2962
|
-
* @param
|
|
2963
|
-
* @param largeArc - If true, draws the larger of the two possible arcs (sweep angle ≥ 180°).
|
|
2964
|
-
* @param sweep - If true, draws the arc in a "positive-angle" (clockwise) direction.
|
|
2965
|
-
* @param dx - Relative x offset of the arc endpoint.
|
|
2966
|
-
* @param dy - Relative y offset of the arc endpoint.
|
|
3215
|
+
* @param x - Destination x
|
|
3216
|
+
* @param y - Destination y
|
|
3217
|
+
* @param relative - If true, uses relative coordinates (`t`); otherwise absolute (`T`)
|
|
2967
3218
|
* @return This instance for chaining.
|
|
2968
3219
|
*/
|
|
2969
|
-
|
|
3220
|
+
t(x: number, y: number, relative?: boolean): this;
|
|
3221
|
+
/**
|
|
3222
|
+
* Draws a smooth cubic Bézier curve from the current position to (x, y),
|
|
3223
|
+
* using one control point. The first control point is inferred from the previous segment.
|
|
3224
|
+
*
|
|
3225
|
+
* Equivalent to the SVG `S` or `s` command.
|
|
3226
|
+
*
|
|
3227
|
+
* @param cx2 - X coordinate of the second control point.
|
|
3228
|
+
* @param cy2 - Y coordinate of the second control point.
|
|
3229
|
+
* @param x - Destination x coordinate.
|
|
3230
|
+
* @param y - Destination y coordinate.
|
|
3231
|
+
* @param relative - If true, uses relative coordinates (`s`); otherwise absolute (`S`)
|
|
3232
|
+
* @return This instance for chaining.
|
|
3233
|
+
*/
|
|
3234
|
+
s(cx2: number, cy2: number, x: number, y: number, relative?: boolean): this;
|
|
2970
3235
|
/**
|
|
2971
3236
|
* Closes the current subpath by drawing a straight line back to its starting point.
|
|
2972
3237
|
* Ensures the shape is fully enclosed, which is important for fill operations.
|
|
@@ -2984,20 +3249,10 @@ declare class PathData {
|
|
|
2984
3249
|
* @param y - Top-left y coordinate.
|
|
2985
3250
|
* @param width - Width of the rectangle.
|
|
2986
3251
|
* @param height - Height of the rectangle.
|
|
3252
|
+
* @param relative - If true, uses relative coordinates (`m`, `h`, `v`); otherwise absolute (`M`, `H`, `V`)
|
|
2987
3253
|
* @return This instance for chaining.
|
|
2988
3254
|
*/
|
|
2989
|
-
rect(x: number, y: number, width: number, height: number): this;
|
|
2990
|
-
/**
|
|
2991
|
-
* Adds a rectangular path using relative coordinates from the current position.
|
|
2992
|
-
* Uses `moveToRel`, `horizontalRel`, `verticalRel`, and `close` for fluent composition.
|
|
2993
|
-
*
|
|
2994
|
-
* @param dx - Relative x offset from the current position.
|
|
2995
|
-
* @param dy - Relative y offset from the current position.
|
|
2996
|
-
* @param width - Width of the rectangle.
|
|
2997
|
-
* @param height - Height of the rectangle.
|
|
2998
|
-
* @return This instance for chaining.
|
|
2999
|
-
*/
|
|
3000
|
-
rectRel(dx: number, dy: number, width: number, height: number): this;
|
|
3255
|
+
rect(x: number, y: number, width: number, height: number, relative?: boolean): this;
|
|
3001
3256
|
/**
|
|
3002
3257
|
* Adds a rounded rectangle path starting at (x, y) with the given width, height, and corner radius.
|
|
3003
3258
|
* Uses `moveTo`, `arcTo`, `horizontal`, `vertical`, and `close` for fluent composition.
|
|
@@ -3019,21 +3274,10 @@ declare class PathData {
|
|
|
3019
3274
|
* @param cx - Center x coordinate.
|
|
3020
3275
|
* @param cy - Center y coordinate.
|
|
3021
3276
|
* @param r - Radius of the circle.
|
|
3277
|
+
* @param relative - If true, uses relative coordinates (`m`, `a`); otherwise absolute (`M`, `A`)
|
|
3022
3278
|
* @return This instance for chaining.
|
|
3023
3279
|
*/
|
|
3024
|
-
circle(cx: number, cy: number, r: number): this;
|
|
3025
|
-
/**
|
|
3026
|
-
* Adds a circular path using relative coordinates from the current position.
|
|
3027
|
-
* Uses `moveToRel` and two `arcToRel` commands to complete the full circle.
|
|
3028
|
-
*
|
|
3029
|
-
* Starts at (r, 0) relative to the current position.
|
|
3030
|
-
*
|
|
3031
|
-
* @param dx - Relative x offset to the circle center.
|
|
3032
|
-
* @param dy - Relative y offset to the circle center.
|
|
3033
|
-
* @param r - Radius of the circle.
|
|
3034
|
-
* @return This instance for chaining.
|
|
3035
|
-
*/
|
|
3036
|
-
circleRel(dx: number, dy: number, r: number): this;
|
|
3280
|
+
circle(cx: number, cy: number, r: number, relative?: boolean): this;
|
|
3037
3281
|
/**
|
|
3038
3282
|
* Adds an elliptical path centered at (cx, cy) with radii `rx` and `ry`.
|
|
3039
3283
|
* Uses `moveTo` and two `arcTo` commands to complete the full ellipse.
|
|
@@ -3044,9 +3288,10 @@ declare class PathData {
|
|
|
3044
3288
|
* @param cy - Center y coordinate.
|
|
3045
3289
|
* @param rx - Horizontal radius.
|
|
3046
3290
|
* @param ry - Vertical radius.
|
|
3291
|
+
* @param relative - If true, uses relative coordinates (`m`, `a`); otherwise absolute (`M`, `A`)
|
|
3047
3292
|
* @return This instance for chaining.
|
|
3048
3293
|
*/
|
|
3049
|
-
ellipse(cx: number, cy: number, rx: number, ry: number): this;
|
|
3294
|
+
ellipse(cx: number, cy: number, rx: number, ry: number, relative?: boolean): this;
|
|
3050
3295
|
/**
|
|
3051
3296
|
* Adds a regular star shape centered at (cx, cy) with the given number of points and outer radius.
|
|
3052
3297
|
* Uses `moveTo` and `lineTo` to connect alternating outer and inner vertices.
|
|
@@ -3056,52 +3301,48 @@ declare class PathData {
|
|
|
3056
3301
|
* @param points - Number of star points (minimum 2).
|
|
3057
3302
|
* @param radius - Outer radius of the star.
|
|
3058
3303
|
* @param insetRatio - Ratio of inner radius to outer radius (default: 0.5).
|
|
3304
|
+
* @param relative - If true, uses relative coordinates (`m`, `l`); otherwise absolute (`M`, `L`)
|
|
3059
3305
|
* @return This instance for chaining.
|
|
3060
3306
|
*/
|
|
3061
|
-
star(cx: number, cy: number, points: number, radius: number, insetRatio?: number): this;
|
|
3307
|
+
star(cx: number, cy: number, points: number, radius: number, insetRatio?: number, relative?: boolean): this;
|
|
3062
3308
|
/**
|
|
3063
3309
|
* Adds a closed polygon path using the provided list of points.
|
|
3064
3310
|
* Uses `moveTo` and `lineTo` to connect each vertex, then closes the shape.
|
|
3065
3311
|
*
|
|
3066
3312
|
* @param points - Array of [x, y] coordinate pairs.
|
|
3313
|
+
* @param relative - If true, uses relative coordinates (`m`, `l`); otherwise absolute (`M`, `L`)
|
|
3067
3314
|
* @return This instance for chaining.
|
|
3068
3315
|
*/
|
|
3069
|
-
polygon(points: [number, number][]): this;
|
|
3316
|
+
polygon(points: [number, number][], relative?: boolean): this;
|
|
3070
3317
|
/**
|
|
3071
3318
|
* Adds an open polyline path using the provided list of points.
|
|
3072
3319
|
* Uses `moveTo` and `lineTo` to connect each vertex without closing the shape.
|
|
3073
3320
|
*
|
|
3074
3321
|
* @param points - Array of [x, y] coordinate pairs.
|
|
3322
|
+
* @param relative - If true, uses relative coordinates (`m`, `l`); otherwise absolute (`M`, `L`)
|
|
3075
3323
|
* @return This instance for chaining.
|
|
3076
3324
|
*/
|
|
3077
|
-
polyline(points: [number, number][]): this;
|
|
3325
|
+
polyline(points: [number, number][], relative?: boolean): this;
|
|
3078
3326
|
/**
|
|
3079
3327
|
* Adds a smooth spline through the given points using cubic Bézier segments.
|
|
3080
3328
|
* Uses Catmull-Rom to Bézier conversion for natural curvature.
|
|
3081
3329
|
*
|
|
3082
3330
|
* @param points - Array of [x, y] coordinate pairs (minimum 2).
|
|
3083
3331
|
* @param tension - Controls curve tightness (default: 0.5). Lower = looser, higher = tighter.
|
|
3332
|
+
* @param relative - If true, uses relative coordinates (`m`, `c`); otherwise absolute (`M`, `C`)
|
|
3084
3333
|
* @return This instance for chaining.
|
|
3085
3334
|
*/
|
|
3086
|
-
spline(points: [number, number][], tension?: number): this;
|
|
3335
|
+
spline(points: [number, number][], tension?: number, relative?: boolean): this;
|
|
3087
3336
|
/**
|
|
3088
3337
|
* Adds a path from the given list of points.
|
|
3089
3338
|
* Uses `moveTo` and `lineTo` to connect each vertex, optionally closing the shape.
|
|
3090
3339
|
*
|
|
3091
3340
|
* @param points - Array of [x, y] coordinate pairs.
|
|
3092
3341
|
* @param close - Whether to close the path (default: false).
|
|
3342
|
+
* @param relative - If true, uses relative coordinates (`m`, `l`); otherwise absolute (`M`, `L`)
|
|
3093
3343
|
* @return This instance for chaining.
|
|
3094
3344
|
*/
|
|
3095
|
-
pathFrom(points: [number, number][], close?: boolean): this;
|
|
3096
|
-
/**
|
|
3097
|
-
* Adds a path using relative point offsets from the current position.
|
|
3098
|
-
* Uses `moveToRel` and `lineToRel` to connect each vertex, optionally closing the shape.
|
|
3099
|
-
*
|
|
3100
|
-
* @param deltas - Array of [dx, dy] relative coordinate pairs.
|
|
3101
|
-
* @param close - Whether to close the path (default: false).
|
|
3102
|
-
* @return This instance for chaining.
|
|
3103
|
-
*/
|
|
3104
|
-
pathFromRel(deltas: [number, number][], close?: boolean): this;
|
|
3345
|
+
pathFrom(points: [number, number][], close?: boolean, relative?: boolean): this;
|
|
3105
3346
|
/**
|
|
3106
3347
|
* Adds a sequence of cubic Bézier segments using explicit control and end points.
|
|
3107
3348
|
* Each segment is defined by two control points and one endpoint.
|
|
@@ -3111,9 +3352,10 @@ declare class PathData {
|
|
|
3111
3352
|
*
|
|
3112
3353
|
* @param points - Array of [x, y] coordinate pairs: [start, c1, c2, end, c1, c2, end, ...].
|
|
3113
3354
|
* Must contain 1 + 3×N points (N ≥ 1).
|
|
3355
|
+
* @param relative - If true, uses relative coordinates (`m`, `c`); otherwise absolute (`M`, `C`)
|
|
3114
3356
|
* @return This instance for chaining.
|
|
3115
3357
|
*/
|
|
3116
|
-
polyBezier(points: [number, number][]): this;
|
|
3358
|
+
polyBezier(points: [number, number][], relative?: boolean): this;
|
|
3117
3359
|
/**
|
|
3118
3360
|
* Adds a sequence of quadratic Bézier segments using explicit control and end points.
|
|
3119
3361
|
* Each segment is defined by one control point and one endpoint.
|
|
@@ -3123,9 +3365,10 @@ declare class PathData {
|
|
|
3123
3365
|
*
|
|
3124
3366
|
* @param points - Array of [x, y] coordinate pairs: [start, c1, end, c1, end, ...].
|
|
3125
3367
|
* Must contain 1 + 2×N points (N ≥ 1).
|
|
3368
|
+
* @param relative - If true, uses relative coordinates (`m`, `q`); otherwise absolute (`M`, `Q`)
|
|
3126
3369
|
* @return This instance for chaining.
|
|
3127
3370
|
*/
|
|
3128
|
-
polyQuadratic(points: [number, number][]): this;
|
|
3371
|
+
polyQuadratic(points: [number, number][], relative?: boolean): this;
|
|
3129
3372
|
/**
|
|
3130
3373
|
* Adds a sequence of elliptical arc segments.
|
|
3131
3374
|
* Each segment is defined by radii, rotation, arc/sweep flags, and an endpoint.
|
|
@@ -3136,157 +3379,13 @@ declare class PathData {
|
|
|
3136
3379
|
*
|
|
3137
3380
|
* @param segments - Array of arc segments: [start, arc1, arc2, ...].
|
|
3138
3381
|
* Must contain 1 + N×7 points (N ≥ 1).
|
|
3382
|
+
* @param relative - If true, uses relative coordinates (`m`, `a`); otherwise absolute (`M`, `A`)
|
|
3139
3383
|
* @return This instance for chaining.
|
|
3140
3384
|
*/
|
|
3141
|
-
polyArc(segments: (number | boolean)[][]): this;
|
|
3385
|
+
polyArc(segments: (number | boolean)[][], relative?: boolean): this;
|
|
3142
3386
|
toString(): string;
|
|
3143
3387
|
}
|
|
3144
|
-
|
|
3145
|
-
//#region src/ProgressElement.d.ts
|
|
3146
|
-
/**
|
|
3147
|
-
* A typed wrapper around the native <progress> HTML element, extending the DomElement base class.
|
|
3148
|
-
*
|
|
3149
|
-
* Provides ergonomic methods for setting and retrieving progress state.
|
|
3150
|
-
*
|
|
3151
|
-
* This class is designed for declarative composition and fluent chaining, and integrates
|
|
3152
|
-
* seamlessly with the DomElement styling and layout system.
|
|
3153
|
-
*/
|
|
3154
|
-
declare class ProgressElement extends DomElement<"progress"> {
|
|
3155
|
-
constructor();
|
|
3156
|
-
/**
|
|
3157
|
-
* Sets the current progress value.
|
|
3158
|
-
* @param value - The numeric value to assign to the progress bar.
|
|
3159
|
-
* @return This ProgressElement instance for chaining.
|
|
3160
|
-
*/
|
|
3161
|
-
value(value: number): this;
|
|
3162
|
-
/**
|
|
3163
|
-
* Retrieves the current progress value.
|
|
3164
|
-
* @return The numeric value of the progress bar.
|
|
3165
|
-
*/
|
|
3166
|
-
getValue(): number;
|
|
3167
|
-
/**
|
|
3168
|
-
* Sets the maximum value of the progress bar.
|
|
3169
|
-
* @param value - The numeric maximum value to assign.
|
|
3170
|
-
* @return This ProgressElement instance for chaining.
|
|
3171
|
-
*/
|
|
3172
|
-
max(value: number): this;
|
|
3173
|
-
/**
|
|
3174
|
-
* Retrieves the maximum value of the progress bar.
|
|
3175
|
-
* @return The numeric maximum value.
|
|
3176
|
-
*/
|
|
3177
|
-
getMax(): number;
|
|
3178
|
-
/**
|
|
3179
|
-
* Enables indeterminate mode by removing the value attribute.
|
|
3180
|
-
* @return This ProgressElement instance for chaining.
|
|
3181
|
-
*/
|
|
3182
|
-
indeterminate(): this;
|
|
3183
|
-
}
|
|
3184
|
-
declare function $progress(): ProgressElement;
|
|
3185
|
-
//#endregion
|
|
3186
|
-
//#region src/SelectElement.d.ts
|
|
3187
|
-
declare class SelectElement extends DomElement<"select"> {
|
|
3188
|
-
constructor();
|
|
3189
|
-
name(value: string): this;
|
|
3190
|
-
value(value: string | number): this;
|
|
3191
|
-
getValue(): string;
|
|
3192
|
-
}
|
|
3193
|
-
declare function $select(): SelectElement;
|
|
3194
|
-
//#endregion
|
|
3195
|
-
//#region src/SvgCircle.d.ts
|
|
3196
|
-
/**
|
|
3197
|
-
* Wrapper for the `<circle>` SVG element, extending `BaseSvgElement<"circle">` with circle-specific functionality.
|
|
3198
|
-
*
|
|
3199
|
-
* Provides a fluent API for setting circle geometry via `cx`, `cy`, and `r` attributes.
|
|
3200
|
-
* Inherits common styling and transform methods from `BaseSvgElement`, enabling consistent manipulation across SVG shape elements.
|
|
3201
|
-
*
|
|
3202
|
-
* Ideal for constructing circular shapes, markers, and radial primitives with ergonomic chaining.
|
|
3203
|
-
*/
|
|
3204
|
-
declare class SvgCircle extends BaseSvgElement<"circle"> {
|
|
3205
|
-
constructor();
|
|
3206
|
-
/**
|
|
3207
|
-
* Sets the `cx` (center x) coordinate.
|
|
3208
|
-
* @param cx - Horizontal center position.
|
|
3209
|
-
* @return This instance for chaining.
|
|
3210
|
-
*/
|
|
3211
|
-
cx(cx: number): this;
|
|
3212
|
-
/**
|
|
3213
|
-
* Sets the `cy` (center y) coordinate.
|
|
3214
|
-
* @param cy - Vertical center position.
|
|
3215
|
-
* @return This instance for chaining.
|
|
3216
|
-
*/
|
|
3217
|
-
cy(cy: number): this;
|
|
3218
|
-
/**
|
|
3219
|
-
* Sets the `r` (radius) of the circle.
|
|
3220
|
-
* @param r - Radius in user units.
|
|
3221
|
-
* @return This instance for chaining.
|
|
3222
|
-
*/
|
|
3223
|
-
r(r: number): this;
|
|
3224
|
-
}
|
|
3225
|
-
/**
|
|
3226
|
-
* Creates a new SvgCircle element.
|
|
3227
|
-
*
|
|
3228
|
-
* @return A new SvgCircle instance.
|
|
3229
|
-
*/
|
|
3230
|
-
declare function $circle(): SvgCircle;
|
|
3231
|
-
//#endregion
|
|
3232
|
-
//#region src/SvgElement.d.ts
|
|
3233
|
-
/**
|
|
3234
|
-
* Wrapper for the `<svg>` root element, extending `BaseSvgElement<"svg">` with viewport and layout configuration.
|
|
3235
|
-
*
|
|
3236
|
-
* Provides a fluent API for setting width, height, viewBox, and namespace attributes.
|
|
3237
|
-
* Inherits common styling and transform methods from `BaseSvgElement`, enabling consistent manipulation across the entire SVG tree.
|
|
3238
|
-
*
|
|
3239
|
-
* Ideal for constructing standalone SVG documents or embedding scalable vector graphics in UI components.
|
|
3240
|
-
*/
|
|
3241
|
-
declare class SvgElement extends BaseSvgElement<"svg"> {
|
|
3242
|
-
constructor();
|
|
3243
|
-
/**
|
|
3244
|
-
* Sets the `width` of the SVG viewport.
|
|
3245
|
-
* @param w - Width in pixels or units.
|
|
3246
|
-
* @return This instance for chaining.
|
|
3247
|
-
*/
|
|
3248
|
-
width(w: number | string): this;
|
|
3249
|
-
/**
|
|
3250
|
-
* Sets the `height` of the SVG viewport.
|
|
3251
|
-
* @param h - Height in pixels or units.
|
|
3252
|
-
* @return This instance for chaining.
|
|
3253
|
-
*/
|
|
3254
|
-
height(h: number | string): this;
|
|
3255
|
-
/**
|
|
3256
|
-
* Sets the `viewBox` attribute for scalable layout.
|
|
3257
|
-
* @param x - Minimum x coordinate.
|
|
3258
|
-
* @param y - Minimum y coordinate.
|
|
3259
|
-
* @param w - ViewBox width.
|
|
3260
|
-
* @param h - ViewBox height.
|
|
3261
|
-
* @return This instance for chaining.
|
|
3262
|
-
*/
|
|
3263
|
-
viewBox(x: number, y: number, w: number, h: number): this;
|
|
3264
|
-
}
|
|
3265
|
-
/**
|
|
3266
|
-
* Creates a new SvgElement root.
|
|
3267
|
-
*
|
|
3268
|
-
* @return A new SvgElement instance.
|
|
3269
|
-
*/
|
|
3270
|
-
declare function $svg(): SvgElement;
|
|
3271
|
-
//#endregion
|
|
3272
|
-
//#region src/SvgGroup.d.ts
|
|
3273
|
-
/**
|
|
3274
|
-
* Wrapper for the `<g>` SVG element, extending `BaseSvgElement<"g">` with group-specific functionality.
|
|
3275
|
-
*
|
|
3276
|
-
* Provides a fluent API for grouping multiple SVG elements under a shared transform or style context.
|
|
3277
|
-
* Inherits common styling and transform methods from `BaseSvgElement`, enabling consistent manipulation across grouped shapes.
|
|
3278
|
-
*
|
|
3279
|
-
* Ideal for structuring reusable components, applying collective transforms, or organizing layered SVG content.
|
|
3280
|
-
*/
|
|
3281
|
-
declare class SvgGroup extends BaseSvgElement<"g"> {
|
|
3282
|
-
constructor();
|
|
3283
|
-
}
|
|
3284
|
-
/**
|
|
3285
|
-
* Creates a new SvgGroup element.
|
|
3286
|
-
*
|
|
3287
|
-
* @return A new SvgGroup instance.
|
|
3288
|
-
*/
|
|
3289
|
-
declare function $group(): SvgGroup;
|
|
3388
|
+
declare function $d(): SvgPathData;
|
|
3290
3389
|
//#endregion
|
|
3291
3390
|
//#region src/SvgPath.d.ts
|
|
3292
3391
|
/**
|
|
@@ -3304,7 +3403,7 @@ declare class SvgPath extends BaseSvgElement<"path"> {
|
|
|
3304
3403
|
* @param path - Path data string or builder.
|
|
3305
3404
|
* @return This instance for chaining.
|
|
3306
3405
|
*/
|
|
3307
|
-
d(path: string |
|
|
3406
|
+
d(path: string | SvgPathData): this;
|
|
3308
3407
|
}
|
|
3309
3408
|
/**
|
|
3310
3409
|
* Creates a new SvgPath element.
|
|
@@ -3461,4 +3560,4 @@ declare function uniqueId(): string;
|
|
|
3461
3560
|
declare function camelToKebab(prop: string): string;
|
|
3462
3561
|
declare function getStyleValue(name: Autocomplete<keyof CssProperties>, value: string | number): string;
|
|
3463
3562
|
//#endregion
|
|
3464
|
-
export { $, $a, $body, $btn, $canvas, $circle, $document, $group, $head, $iframe, $img, $input, $option, $path, $progress, $query, $rect, $select, $svg, $textarea, $window, AnchorElement, Autocomplete, BaseDom, BaseStyle, BaseSvgElement, Button, Canvas, ContentSecurityPolicy, CssProperties, type CssProperty, CssRule, DomBody, DomDocument, DomElement, DomElementChild, DomElementEventMap, DomElementTagNameMap, DomHead, DomWindow, IFrame, IFrameSandboxFlag, ImageElement, InputCheckbox, InputColor, InputElementMap, InputNumber, InputRange, InputText, LinearGradientDirection, MediaRule, OptionElement,
|
|
3563
|
+
export { $, $a, $body, $btn, $canvas, $circle, $d, $document, $group, $head, $iframe, $img, $input, $option, $path, $progress, $query, $rect, $select, $svg, $textarea, $window, AnchorElement, Autocomplete, BaseDom, BaseStyle, BaseSvgElement, Button, Canvas, ContentSecurityPolicy, CssProperties, type CssProperty, CssRule, DomBody, DomDocument, DomElement, DomElementChild, DomElementEventMap, DomElementTagNameMap, DomHead, DomWindow, IFrame, IFrameSandboxFlag, ImageElement, InputCheckbox, InputColor, InputElementMap, InputNumber, InputRange, InputText, LinearGradientDirection, MediaRule, OptionElement, ProgressElement, SVG_TAGS, SelectElement, StyleSheet, SvgCircle, SvgElement, SvgElementTagNameMap, SvgGroup, SvgPath, SvgPathData, SvgRect, TAG_ALIAS, TagAlias, TextArea, TextAreaWrapMode, UNITLESS_CSS_PROPS, VENDOR_CSS_PROPS, camelToKebab, getStyleValue, uniqueId };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=class{p(e){return this.setStyleProp(`padding`,e)}pt(e){return this.setStyleProp(`paddingTop`,e)}pr(e){return this.setStyleProp(`paddingRight`,e)}pb(e){return this.setStyleProp(`paddingBottom`,e)}pl(e){return this.setStyleProp(`paddingLeft`,e)}px(e){return this.pl(e).pr(e)}py(e){return this.pt(e).pb(e)}m(e){return this.setStyleProp(`margin`,e)}mt(e){return this.setStyleProp(`marginTop`,e)}mr(e){return this.setStyleProp(`marginRight`,e)}mb(e){return this.setStyleProp(`marginBottom`,e)}ml(e){return this.setStyleProp(`marginLeft`,e)}radius(e){return this.setStyleProp(`borderRadius`,e)}radiusTopLeft(e){return this.setStyleProp(`borderTopLeftRadius`,e)}radiusTopRight(e){return this.setStyleProp(`borderTopRightRadius`,e)}radiusBottomLeft(e){return this.setStyleProp(`borderBottomLeftRadius`,e)}radiusBottomRight(e){return this.setStyleProp(`borderBottomRightRadius`,e)}radiusTop(e){return this.radiusTopLeft(e).radiusTopRight(e)}radiusBottom(e){return this.radiusBottomLeft(e).radiusBottomRight(e)}radiusLeft(e){return this.radiusTopLeft(e).radiusBottomLeft(e)}radiusRight(e){return this.radiusTopRight(e).radiusBottomRight(e)}radiusX(e){return this.radiusLeft(e).radiusRight(e)}radiusY(e){return this.radiusTop(e).radiusBottom(e)}display(e){return this.setStyleProp(`display`,e)}flexShrink(e){return this.setStyleProp(`flexShrink`,e)}flex(e){return this.setStyleProp(`flex`,e)}bgColor(e){return this.setStyleProp(`backgroundColor`,e)}color(e){return this.setStyleProp(`color`,e)}w(e){return this.setStyleProp(`width`,e)}h(e){return this.setStyleProp(`height`,e)}minW(e){return this.setStyleProp(`minWidth`,e)}maxW(e){return this.setStyleProp(`maxWidth`,e)}minH(e){return this.setStyleProp(`minHeight`,e)}maxH(e){return this.setStyleProp(`maxHeight`,e)}b(e){return this.setStyleProp(`border`,e)}bWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderWidth`,t)}bStyle(e){return this.setStyleProp(`borderStyle`,e)}bColor(e){return this.setStyleProp(`borderColor`,e)}bt(e){return this.setStyleProp(`borderTop`,e)}btWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderTopWidth`,t)}btStyle(e){return this.setStyleProp(`borderTopStyle`,e)}btColor(e){return this.setStyleProp(`borderTopColor`,e)}br(e){return this.setStyleProp(`borderRight`,e)}brWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderRightWidth`,t)}brStyle(e){return this.setStyleProp(`borderRightStyle`,e)}brColor(e){return this.setStyleProp(`borderRightColor`,e)}bb(e){return this.setStyleProp(`borderBottom`,e)}bbWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderBottomWidth`,t)}bbStyle(e){return this.setStyleProp(`borderBottomStyle`,e)}bbColor(e){return this.setStyleProp(`borderBottomColor`,e)}bl(e){return this.setStyleProp(`borderLeft`,e)}blWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderLeftWidth`,t)}blStyle(e){return this.setStyleProp(`borderLeftStyle`,e)}blColor(e){return this.setStyleProp(`borderLeftColor`,e)}bx(e){return this.setStyleProp(`borderLeft`,e),this.setStyleProp(`borderRight`,e),this}by(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderBottom`,e),this}btl(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderLeft`,e),this}btr(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderRight`,e),this}bbl(e){return this.setStyleProp(`borderBottom`,e),this.setStyleProp(`borderLeft`,e),this}bbr(e){return this.setStyleProp(`borderBottom`,e),this.setStyleProp(`borderRight`,e),this}overflow(e){return this.setStyleProp(`overflow`,e)}overflowY(e){return this.setStyleProp(`overflowY`,e)}overflowX(e){return this.setStyleProp(`overflowX`,e)}fontSize(e){return this.setStyleProp(`fontSize`,e)}fontWeight(e){return this.setStyleProp(`fontWeight`,e)}fontFamily(e){return this.setStyleProp(`fontFamily`,e)}fontStyle(e){return this.setStyleProp(`fontStyle`,e)}textAlign(e){return this.setStyleProp(`textAlign`,e)}textDecoration(e){return this.setStyleProp(`textDecoration`,e)}pos(e){return this.setStyleProp(`position`,e)}top(e){return this.setStyleProp(`top`,e)}bottom(e){return this.setStyleProp(`bottom`,e)}left(e){return this.setStyleProp(`left`,e)}right(e){return this.setStyleProp(`right`,e)}cursor(e){return this.setStyleProp(`cursor`,e)}alignItems(e){return this.setStyleProp(`alignItems`,e)}justifyContent(e){return this.setStyleProp(`justifyContent`,e)}gap(e){return this.setStyleProp(`gap`,e)}flexDirection(e){return this.setStyleProp(`flexDirection`,e)}templateColumns(e){return this.setStyleProp(`gridTemplateColumns`,e)}templateRows(e){return this.setStyleProp(`gridTemplateRows`,e)}appearance(e){return this.setStyleProp(`appearance`,e)}userSelect(e){return this.setStyleProp(`userSelect`,e)}verticalAlign(e){return this.setStyleProp(`verticalAlign`,e)}whiteSpace(e){return this.setStyleProp(`whiteSpace`,e)}textOverflow(e){return this.setStyleProp(`textOverflow`,e)}zIndex(e){return this.setStyleProp(`zIndex`,e)}opacity(e){return this.setStyleProp(`opacity`,e)}transform(e){return this.setStyleProp(`transform`,e)}translate(e,t){let n=typeof e==`number`?`${e}px`:e,r=typeof t==`number`?`${t}px`:t;return this.setStyleProp(`transform`,`translate(${n}, ${r})`)}translateX(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`transform`,`translateX(${t})`)}translateY(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`transform`,`translateY(${t})`)}scale(e,t){let n=typeof e==`number`?e.toString():e,r=typeof t==`number`?t.toString():t;return this.setStyleProp(`transform`,`scale(${n}, ${r})`)}scaleX(e){let t=typeof e==`number`?e.toString():e;return this.setStyleProp(`transform`,`scaleX(${t})`)}scaleY(e){let t=typeof e==`number`?e.toString():e;return this.setStyleProp(`transform`,`scaleY(${t})`)}rotate(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotate(${t})`)}rotateX(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateX(${t})`)}rotateY(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateY(${t})`)}rotateZ(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateZ(${t})`)}transformOrigin(e){return this.setStyleProp(`transformOrigin`,e)}transition(e){return this.setStyleProp(`transition`,e)}willChange(e){return this.setStyleProp(`willChange`,e)}boxShadow(e){return this.setStyleProp(`boxShadow`,e)}boxSizing(e){return this.setStyleProp(`boxSizing`,e)}background(e){return this.setStyleProp(`background`,e)}outline(e){return this.setStyleProp(`outline`,e)}outlineWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`outlineWidth`,t)}outlineStyle(e){return this.setStyleProp(`outlineStyle`,e)}outlineColor(e){return this.setStyleProp(`outlineColor`,e)}outlineOffset(e){return this.setStyleProp(`outlineOffset`,e)}lineHeight(e){return this.setStyleProp(`lineHeight`,e)}wordWrap(e){return this.setStyleProp(`wordWrap`,e)}tabSize(e){return this.setStyleProp(`tabSize`,e)}resize(e){return this.setStyleProp(`resize`,e)}overflowEllipsis(){return this.overflow(`hidden`).whiteSpace(`nowrap`).textOverflow(`ellipsis`)}linearGradient(e,...t){let n=`linear-gradient(${e}, ${t.join(`, `)})`;return this.setStyleProp(`background`,n)}style(e){for(let t of Object.keys(e))this.setStyleProp(t,e[t]);return this}};const t={opacity:1,zIndex:1,fontWeight:1,lineHeight:1,flexGrow:1,flexShrink:1,order:1,zoom:1,scale:1,counterIncrement:1,counterReset:1,tabSize:1,orphans:1,widows:1,columns:1,columnCount:1,gridRow:1,gridColumn:1},n={WebkitAppearance:1},r=`svg.svgA.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`),i={svgA:`a`};function a(){return`${Date.now().toString(36)}-${(o++).toString(36)}`}let o=0;function s(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function c(e,n){return typeof n==`number`?t[e]?String(n):`${n}px`:n}const l=Symbol(`BaseDomIdentity`);var u=class t extends e{[l]=!0;getClientWidth(){return this.dom.clientWidth??0}getClientHeight(){return this.dom.clientHeight??0}getRect(){return this.dom.getBoundingClientRect()}getComputedStyle(){return window.getComputedStyle(this.dom)}getChildAt(e){return this.dom.children.item(e)}getNodeAt(e){return this.dom.childNodes.item(e)}getChildren(){return Array.from(this.dom.children)}getNodes(){return Array.from(this.dom.childNodes)}getText(){return this.dom.textContent}getAttr(e){return this.dom.getAttribute(e)}getProp(e){return this.dom[e]}hasClass(e){return this.dom.classList.contains(e)}text(e){return this.dom.textContent=e==null?``:String(e),this}html(e){return this.dom.innerHTML=e,this}id(e){return this.dom.id=e??``,this}attr(e,t){return t===void 0||t===!1?this.dom.removeAttribute(e):t===!0?this.dom.setAttribute(e,``):this.dom.setAttribute(e,String(t)),this}attrs(e){for(let[t,n]of Object.entries(e))this.attr(t,n);return this}toggleAttr(e,t){return this.dom.toggleAttribute(e,t),this}prop(e,t){return this.dom[e]=t,this}props(e){for(let[t,n]of Object.entries(e))this.prop(t,n);return this}className(e){return e==null?this.dom.removeAttribute(`class`):this.dom.setAttribute(`class`,e),this}toggleClass(e,t){return this.dom.classList.toggle(e,t),this}on(e,t,n){return this.dom.addEventListener(e,t,n),this}off(e,t,n){return this.dom.removeEventListener(e,t,n),this}add(...e){return this.dom.append(...e.map(e=>this.resolveNode(e))),this}insertAtIndex(e,...t){let n=Array.from(this.dom.children),r=Math.max(0,Math.min(e,n.length));for(let e of t){let t=n[r]??null;this.dom.insertBefore(this.resolveNode(e),t),r++}return this}setChildren(...e){return this.clear().add(...e)}setChildrenFromIndex(e,...t){let n=Array.from(this.dom.children),r=n.length,i=Math.max(0,Math.min(e,r));for(let e=i;e<r;e++)this.dom.removeChild(n[e]);let a=this.dom.children[i]??null;for(let e of t)this.dom.insertBefore(this.resolveNode(e),a);return this}clear(){return this.dom.textContent=``,this}clearRange(e,t){let n=Array.from(this.dom.children),r=Math.max(0,e??0),i=Math.min(n.length,t??n.length);for(let e=r;e<i;e++)this.dom.removeChild(n[e]);return this}contains(e){let n=e instanceof t?e.dom:e;return this.dom.contains(n)}query(e){let t=this.dom.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}ref(e){return e(this),this}resolveNode(e){return typeof e==`string`||typeof e==`number`?document.createTextNode(String(e)):t.isBaseDom(e)?e.dom:e}setStyleProp(e,t){return t===void 0?(this.dom.style.removeProperty(s(e)),this):(this.dom.style.setProperty(s(e),c(e,t)),this)}static isBaseDom(e){return typeof e!=`object`||!e?!1:Object.getOwnPropertySymbols(e).includes(l)}},d=class extends u{constructor(e,t){super(),this._tag=i[e]??e,this._isSvg=r.includes(this._tag),this._dom=t??(this._isSvg?document.createElementNS(`http://www.w3.org/2000/svg`,this._tag):document.createElement(this._tag))}_tag;_isSvg;_dom;get tag(){return this._tag}get isSvg(){return this._isSvg}get dom(){return this._dom}remove(){this.dom.remove()}htmlFor(e){return this.tag===`label`&&(this.dom.htmlFor=e??``),this}title(e){return this.attr(`title`,e)}disabled(e){return this.attr(`disabled`,e)}disable(){return this.disabled(!0)}enable(){return this.disabled(!1)}popover(e){return this.attr(`popover`,e)}popoverTarget(e){return this.attr(`popovertarget`,e)}popoverTargetAction(e){return this.attr(`popovertargetaction`,e)}showPopover(){return this.dom.showPopover(),this}hidePopover(){return this.dom.hidePopover(),this}};function f(e){return new d(e)}function p(e){let t=document.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}var m=class extends d{constructor(){super(`a`)}href(e){return this.dom.href=e,this}};function h(){return new m}var g=class extends d{svgFill(e){return this.attr(`fill`,e)}fillRule(e){return this.attr(`fill-rule`,e)}svgStroke(e){return this.attr(`stroke`,e)}svgStrokeWidth(e){return this.attr(`stroke-width`,e.toString())}strokeLinejoin(e){return this.attr(`stroke-linejoin`,e)}strokeLinecap(e){return this.attr(`stroke-linecap`,e)}strokeMiterlimit(e){return this.attr(`stroke-miterlimit`,e.toString())}svgOpacity(e){return this.attr(`opacity`,e.toString())}svgTransform(e){return this.attr(`transform`,e)}svgTranslate(e,t){return this.attr(`transform`,`translate(${e} ${t})`)}svgTranslateX(e){return this.attr(`transform`,`translate(${e} 0)`)}svgTranslateY(e){return this.attr(`transform`,`translate(0 ${e})`)}svgRotate(e,t,n){let r=t!==void 0&&n!==void 0?`rotate(${e} ${t} ${n})`:`rotate(${e})`;return this.attr(`transform`,r)}svgScale(e){return this.attr(`transform`,`scale(${e})`)}svgScaleX(e){return this.attr(`transform`,`scale(${e} 1)`)}svgScaleY(e){return this.attr(`transform`,`scale(1 ${e})`)}},_=class extends d{constructor(){super(`button`)}type(e){return this.dom.type=e,this}};function ee(){return new _}var v=class extends d{constructor(e){super(`canvas`,e)}_size={width:this.dom.width,height:this.dom.height};getWidth(){return this.dom.width}getHeight(){return this.dom.height}width(e){return this.dom.width=e,this}height(e){return this.dom.height=e,this}setSize(e,t){return this.dom.width=e,this.dom.height=t,this}getSize(){return this._size.width=this.dom.width,this._size.height=this.dom.height,this._size}getAspect(){return this.dom.width/this.dom.height}getAspectScale(e){let t=this.dom.width/this.dom.height,n,r,i;return t>=1?(n=1/t,r=1,i=1):(n=1,r=t,i=1),e.x=n,e.y=r,e.z=i,e}};function y(){return new v}var b=class extends e{constructor(e,t,n){super(),this._sheet=e,this._index=t,this._rule=n}_sheet;_index;_rule;get sheet(){return this._sheet}get index(){return this._index}get rule(){return this._rule}get selectorText(){return this._rule.selectorText}remove(){this._sheet.removeRule(this)}extend(e){return this.sheet.cssRule(`${this.selectorText}${e}`)}hover(){return this.extend(`:hover`)}focus(){return this.extend(`:focus`)}focusWithin(){return this.extend(`:focus-within`)}active(){return this.extend(`:active`)}disabled(){return this.extend(`:disabled`)}setStyleProp(e,t){return t===void 0?(this.rule.style.removeProperty(s(e)),this):(this.rule.style.setProperty(s(e),c(e,t)),this)}},x=class extends u{constructor(e){super(),this._body=e}_body;get dom(){return this._body}};function S(e){return new x(e??document.body)}var C=class extends u{constructor(e){super(),this._head=e}_head;get dom(){return this._head}title(e){let t=this.dom.querySelector(`title`);return t||(t=this.dom.ownerDocument.createElement(`title`),this.dom.appendChild(t)),t.textContent=e,this}charset(e){let t=this.dom.querySelector(`meta[charset]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),this.dom.insertBefore(t,this.dom.firstChild)),t.setAttribute(`charset`,e),this}viewport(e){let t=this.dom.querySelector(`meta[name="viewport"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`viewport`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}httpEquiv(e,t){let n=this.dom.querySelector(`meta[http-equiv="${e}"]`);return n||(n=this.dom.ownerDocument.createElement(`meta`),n.setAttribute(`http-equiv`,e),this.dom.appendChild(n)),n.setAttribute(`content`,t),this}csp(e){let t=Object.entries(e).map(([e,t])=>`${e} ${t}`).join(`; `);return this.httpEquiv(`Content-Security-Policy`,t)}description(e){let t=this.dom.querySelector(`meta[name="description"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`description`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}keywords(e){let t=this.dom.querySelector(`meta[name="keywords"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`keywords`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}link(e,t,n={}){let r=this.dom.querySelector(`link[rel="${e}"]`);r||(r=this.dom.ownerDocument.createElement(`link`),r.setAttribute(`rel`,e),this.dom.appendChild(r)),r.setAttribute(`href`,t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return this}};function w(e){return new C(e??document.head)}var T=class{constructor(e=window.document){this._document=e}_document;get dom(){return this._document}getBody(){return new x(this._document.body)}getHead(){return new C(this._document.head)}on(e,t,n){return this._document.addEventListener(e,t,n),this}off(e,t,n){return this._document.removeEventListener(e,t,n),this}dispatch(e){return this._document.dispatchEvent(e),this}query(e){let t=this._document.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}};function E(){return new T}var D=class{constructor(e=window){this._window=e}_window;get dom(){return this._window}getDocument(){return new T(this._window.document)}on(e,t,n){return this._window.addEventListener(e,t,n),this}off(e,t,n){return this._window.removeEventListener(e,t,n),this}dispatch(e){return this._window.dispatchEvent(e),this}postMessage(e,t){return this._window.postMessage(e,t),this}};function O(e){return new D(e)}var k=class extends d{constructor(){super(`iframe`)}getContentWindow(){let e=this.dom.contentWindow;return e?new D(e):null}getContentDocument(){let e=this.dom.contentDocument;return e?new T(e):null}getBody(){let e=this.getContentDocument();return e?e.getBody():null}getHead(){let e=this.getContentDocument();return e?e.getHead():null}isSameOrigin(){try{return this.dom.contentWindow?.location.href,!0}catch{return!1}}src(e){return this.dom.src=e,this}allowFullscreen(e=!0){return this.dom.allowFullscreen=e,this}width(e){return this.dom.width=c(`width`,e),this}height(e){return this.dom.height=c(`height`,e),this}size(e,t){return this.width(e).height(t)}sandbox(e){let t=e?.join(` `);return this.attr(`sandbox`,t)}referrerPolicy(e){return this.dom.referrerPolicy=e,this}loading(e){return this.dom.loading=e,this}reloadViaSrc(){return this.dom.src&&(this.dom.src=this.dom.src),this}reloadViaLocation(){return this.dom.contentWindow?.location.reload(),this}reload(){try{this.dom.contentWindow?.location.reload()}catch{this.dom.src&&(this.dom.src=this.dom.src)}return this}queryInside(e){let t=this.getContentDocument()?.dom.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}postMessage(e,t){let n=this.getContentWindow();return n&&n.postMessage(e,t),this}};function te(){return new k}var A=class extends d{constructor(){super(`img`)}getNaturalWidth(){return this.dom.naturalWidth??0}getNaturalHeight(){return this.dom.naturalHeight??0}src(e){return this.dom.src=e,this}width(e){return this.dom.width=e,this}height(e){return this.dom.height=e,this}setSize(e,t){return this.width(e).height(t)}alt(e){return this.dom.alt=e,this}};function j(){return new A}var M=class extends d{constructor(){super(`input`),this.dom.type=`checkbox`}name(e){return this.dom.name=e,this}checked(e){return this.prop(`checked`,e),this}isChecked(){return this.getProp(`checked`)}},N=class extends d{constructor(){super(`input`),this._dom.type=`color`}_rgb={r:1,g:1,b:1};name(e){return this._dom.name=e,this}value(e){return this._dom.value=e,this}getValue(){return this._dom.value}getRGB(){let e=this._dom.value,t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return this._rgb.r=t,this._rgb.g=n,this._rgb.b=r,this._rgb}getNormalizedRGB(){let e=this._dom.value,t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return this._rgb.r=t/255,this._rgb.g=n/255,this._rgb.b=r/255,this._rgb}},P=class extends d{constructor(){super(`input`),this.dom.type=`number`}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}getValue(){return Number(this.dom.value)}min(e){return this.dom.min=String(e),this}max(e){return this.dom.max=String(e),this}step(e){return this.dom.step=String(e),this}placeholder(e){return this.dom.placeholder=e,this}},F=class extends d{constructor(){super(`input`),this.dom.type=`range`}getValue(){return Number(this.dom.value)}getMin(){return Number(this.dom.min)}getMax(){return Number(this.dom.max)}getStep(){return Number(this.dom.step)}getRatio(){let e=this.getMin(),t=this.getMax(),n=this.getValue(),r=t-e;return r>0?Math.max(0,Math.min(1,(n-e)/r)):0}getPercent(){return this.getRatio()*100}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}min(e){return this.dom.min=String(e),this}max(e){return this.dom.max=String(e),this}step(e){return this.dom.step=String(e),this}bounds(e,t,n){return this.min(e).max(t).step(n)}ratio(e){let t=this.getMin(),n=this.getMax()-t,r=Math.max(0,Math.min(1,e));return this.value(t+r*n)}percent(e){return this.ratio(e/100)}trackFillColors(e,t){let n=this.getPercent();return this.linearGradient(`to right`,`${e} ${n}%`,`${t} ${n}%`)}},I=class extends d{constructor(){super(`input`),this.dom.type=`text`}name(e){return this.dom.name=e,this}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}placeholder(e){return this.dom.placeholder=e,this}};function ne(e){switch(e){case`text`:return new I;case`number`:return new P;case`checkbox`:return new M;case`color`:return new N;case`range`:return new F}}var L=class{constructor(e,t,n){this._sheet=e,this._index=t,this._rule=n}_sheet;_index;_rule;get sheet(){return this._sheet}get index(){return this._index}get rule(){return this._rule}get length(){return this._rule.cssRules.length}get mediaText(){return this._rule.media.mediaText}cssRule(e){let t=this.length;return this.rule.insertRule(`${e}{}`,t),new b(this.sheet,t,this.rule.cssRules.item(t))}remove(){this.sheet.removeRule(this)}removeRule(e){this.rule.deleteRule(e.index)}},R=class extends d{constructor(){super(`option`)}value(e){return this.dom.value=String(e),this}getValue(){return this.dom.value}};function z(){return new R}var B=class{_segments=[];moveTo(e,t){return this._segments.push(`M${e} ${t}`),this}moveToRel(e,t){return this._segments.push(`m${e} ${t}`),this}lineTo(e,t){return this._segments.push(`L${e} ${t}`),this}lineToRel(e,t){return this._segments.push(`l${e} ${t}`),this}horizontal(e){return this._segments.push(`H${e}`),this}horizontalRel(e){return this._segments.push(`h${e}`),this}vertical(e){return this._segments.push(`V${e}`),this}verticalRel(e){return this._segments.push(`v${e}`),this}curveTo(e,t,n,r,i,a){return this._segments.push(`C${e} ${t}, ${n} ${r}, ${i} ${a}`),this}curveToRel(e,t,n,r,i,a){return this._segments.push(`c${e} ${t}, ${n} ${r}, ${i} ${a}`),this}quadraticTo(e,t,n,r){return this._segments.push(`Q${e} ${t}, ${n} ${r}`),this}quadraticToRel(e,t,n,r){return this._segments.push(`q${e} ${t}, ${n} ${r}`),this}arcTo(e,t,n,r,i,a,o){return this._segments.push(`A${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o}`),this}arcToRel(e,t,n,r,i,a,o){return this._segments.push(`a${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o}`),this}close(){return this._segments.push(`Z`),this}rect(e,t,n,r){return this.moveTo(e,t).horizontal(e+n).vertical(t+r).horizontal(e).close()}rectRel(e,t,n,r){return this.moveToRel(e,t).horizontalRel(n).verticalRel(r).horizontalRel(-n).close()}roundedRect(e,t,n,r,i){let a=e+n,o=t+r;return this.moveTo(e+i,t).horizontal(a-i).arcTo(i,i,0,!1,!0,a,t+i).vertical(o-i).arcTo(i,i,0,!1,!0,a-i,o).horizontal(e+i).arcTo(i,i,0,!1,!0,e,o-i).vertical(t+i).arcTo(i,i,0,!1,!0,e+i,t).close()}circle(e,t,n){let r=e+n,i=t;return this.moveTo(r,i).arcTo(n,n,0,!0,!1,e-n,t).arcTo(n,n,0,!0,!1,r,i)}circleRel(e,t,n){return this.moveToRel(e+n,t).arcToRel(n,n,0,!0,!1,-2*n,0).arcToRel(n,n,0,!0,!1,2*n,0)}ellipse(e,t,n,r){let i=e+n,a=t;return this.moveTo(i,a).arcTo(n,r,0,!0,!1,e-n,t).arcTo(n,r,0,!0,!1,i,a)}star(e,t,n,r,i=.5){if(n<2)return this;let a=Math.PI/n,o=r*i;for(let i=0;i<n*2;i++){let n=i%2==0?r:o,s=i*a-Math.PI/2,c=e+n*Math.cos(s),l=t+n*Math.sin(s);i===0?this.moveTo(c,l):this.lineTo(c,l)}return this.close()}polygon(e){if(e.length<2)return this;let[t,n]=e[0];this.moveTo(t,n);for(let t=1;t<e.length;t++){let[n,r]=e[t];this.lineTo(n,r)}return this.close()}polyline(e){if(e.length<2)return this;let[t,n]=e[0];this.moveTo(t,n);for(let t=1;t<e.length;t++){let[n,r]=e[t];this.lineTo(n,r)}return this}spline(e,t=.5){let n=e.length;if(n<2)return this;this.moveTo(e[0][0],e[0][1]);for(let r=0;r<n-1;r++){let[n,i]=e[r-1]??e[r],[a,o]=e[r],[s,c]=e[r+1],[l,u]=e[r+2]??e[r+1],d=(s-n)*t/6,f=(c-i)*t/6,p=(l-a)*t/6,m=(u-o)*t/6;this.curveTo(a+d,o+f,s-p,c-m,s,c)}return this}pathFrom(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.moveTo(n,r);for(let t=1;t<e.length;t++){let[n,r]=e[t];this.lineTo(n,r)}return t&&this.close(),this}pathFromRel(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.moveToRel(n,r);for(let t=1;t<e.length;t++){let[n,r]=e[t];this.lineToRel(n,r)}return t&&this.close(),this}polyBezier(e){if(e.length<4||(e.length-1)%3!=0)return this;let[t,n]=e[0];this.moveTo(t,n);for(let t=1;t<e.length;t+=3){let[n,r]=e[t],[i,a]=e[t+1],[o,s]=e[t+2];this.curveTo(n,r,i,a,o,s)}return this}polyQuadratic(e){if(e.length<3||(e.length-1)%2!=0)return this;let[t,n]=e[0];this.moveTo(t,n);for(let t=1;t<e.length;t+=2){let[n,r]=e[t],[i,a]=e[t+1];this.quadraticTo(n,r,i,a)}return this}polyArc(e){if(e.length<2)return this;let[t,n]=e[0];this.moveTo(t,n);for(let t=1;t<e.length;t++){let[n,r,i,a,o,s,c]=e[t];this.arcTo(n,r,i,a,o,s,c)}return this}toString(){return this._segments.join(` `)}},V=class extends d{constructor(){super(`progress`)}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}max(e){return this.dom.max=e,this}getMax(){return this.dom.max}indeterminate(){return this.dom.removeAttribute(`value`),this}};function H(){return new V}var U=class extends d{constructor(){super(`select`)}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}getValue(){return this.dom.value}};function W(){return new U}var G=class e{constructor(e){this._dom=e}_dom;get dom(){return this._dom}get sheet(){return this.dom.sheet}get length(){return this.sheet.cssRules.length}cssRule(e){let t=this.length;return this.sheet.insertRule(`${e}{}`,t),new b(this,t,this.sheet.cssRules.item(t))}mediaRule(e){let t=this.length;return this.sheet.insertRule(`@media(${e}){}`,t),new L(this,t,this.sheet.cssRules.item(t))}mediaMinWidth(e){return this.mediaRule(`min-width: ${c(`min-width`,e)}`)}mediaMaxWidth(e){return this.mediaRule(`max-width: ${c(`max-width`,e)}`)}removeRule(e){this.sheet.deleteRule(e.index)}static getSheet(t=e.DEFAULT_STYLE_ID){let n=document.head.querySelector(`#${t}`);if(n)return new e(n);{let n=document.createElement(`style`);return n.id=t,n.setAttribute(`type`,`text/css`),document.head.append(n),new e(n)}}static DEFAULT_STYLE_ID=`__neptune-style__`},K=class extends g{constructor(){super(`circle`)}cx(e){return this.attr(`cx`,e.toString())}cy(e){return this.attr(`cy`,e.toString())}r(e){return this.attr(`r`,e.toString())}};function q(){return new K}var J=class extends g{constructor(){super(`svg`)}width(e){return this.attr(`width`,e.toString())}height(e){return this.attr(`height`,e.toString())}viewBox(e,t,n,r){return this.attr(`viewBox`,`${e} ${t} ${n} ${r}`)}};function Y(){return new J}var X=class extends g{constructor(){super(`g`)}};function re(){return new X}var Z=class extends g{constructor(){super(`path`)}d(e){let t=typeof e==`string`?e:e.toString();return this.attr(`d`,t)}};function ie(){return new Z}var Q=class extends g{constructor(){super(`rect`)}x(e){return this.attr(`x`,e.toString())}y(e){return this.attr(`y`,e.toString())}width(e){return this.attr(`width`,e.toString())}height(e){return this.attr(`height`,e.toString())}rx(e){return this.attr(`rx`,e.toString())}ry(e){return this.attr(`ry`,e.toString())}};function ae(){return new Q}var $=class extends d{constructor(){super(`textarea`)}name(e){return this.dom.name=e,this}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}placeholder(e){return this.dom.placeholder=e,this}rows(e){return this.dom.rows=e,this}cols(e){return this.dom.cols=e,this}wrap(e){return this.dom.wrap=e,this}maxLength(e){return this.dom.maxLength=e,this}};function oe(){return new $}export{f as $,h as $a,S as $body,ee as $btn,y as $canvas,q as $circle,E as $document,re as $group,w as $head,te as $iframe,j as $img,ne as $input,z as $option,ie as $path,H as $progress,p as $query,ae as $rect,W as $select,Y as $svg,oe as $textarea,O as $window,m as AnchorElement,u as BaseDom,e as BaseStyle,g as BaseSvgElement,_ as Button,v as Canvas,b as CssRule,x as DomBody,T as DomDocument,d as DomElement,C as DomHead,D as DomWindow,k as IFrame,A as ImageElement,M as InputCheckbox,N as InputColor,P as InputNumber,F as InputRange,I as InputText,L as MediaRule,R as OptionElement,B as PathData,V as ProgressElement,r as SVG_TAGS,U as SelectElement,G as StyleSheet,K as SvgCircle,J as SvgElement,X as SvgGroup,Z as SvgPath,Q as SvgRect,i as TAG_ALIAS,$ as TextArea,t as UNITLESS_CSS_PROPS,n as VENDOR_CSS_PROPS,s as camelToKebab,c as getStyleValue,a as uniqueId};
|
|
1
|
+
var e=class{p(e){return this.setStyleProp(`padding`,e)}pt(e){return this.setStyleProp(`paddingTop`,e)}pr(e){return this.setStyleProp(`paddingRight`,e)}pb(e){return this.setStyleProp(`paddingBottom`,e)}pl(e){return this.setStyleProp(`paddingLeft`,e)}px(e){return this.pl(e).pr(e)}py(e){return this.pt(e).pb(e)}m(e){return this.setStyleProp(`margin`,e)}mt(e){return this.setStyleProp(`marginTop`,e)}mr(e){return this.setStyleProp(`marginRight`,e)}mb(e){return this.setStyleProp(`marginBottom`,e)}ml(e){return this.setStyleProp(`marginLeft`,e)}radius(e){return this.setStyleProp(`borderRadius`,e)}radiusTopLeft(e){return this.setStyleProp(`borderTopLeftRadius`,e)}radiusTopRight(e){return this.setStyleProp(`borderTopRightRadius`,e)}radiusBottomLeft(e){return this.setStyleProp(`borderBottomLeftRadius`,e)}radiusBottomRight(e){return this.setStyleProp(`borderBottomRightRadius`,e)}radiusTop(e){return this.radiusTopLeft(e).radiusTopRight(e)}radiusBottom(e){return this.radiusBottomLeft(e).radiusBottomRight(e)}radiusLeft(e){return this.radiusTopLeft(e).radiusBottomLeft(e)}radiusRight(e){return this.radiusTopRight(e).radiusBottomRight(e)}radiusX(e){return this.radiusLeft(e).radiusRight(e)}radiusY(e){return this.radiusTop(e).radiusBottom(e)}display(e){return this.setStyleProp(`display`,e)}flexShrink(e){return this.setStyleProp(`flexShrink`,e)}flex(e){return this.setStyleProp(`flex`,e)}bgColor(e){return this.setStyleProp(`backgroundColor`,e)}color(e){return this.setStyleProp(`color`,e)}w(e){return this.setStyleProp(`width`,e)}h(e){return this.setStyleProp(`height`,e)}minW(e){return this.setStyleProp(`minWidth`,e)}maxW(e){return this.setStyleProp(`maxWidth`,e)}minH(e){return this.setStyleProp(`minHeight`,e)}maxH(e){return this.setStyleProp(`maxHeight`,e)}b(e){return this.setStyleProp(`border`,e)}bWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderWidth`,t)}bStyle(e){return this.setStyleProp(`borderStyle`,e)}bColor(e){return this.setStyleProp(`borderColor`,e)}bt(e){return this.setStyleProp(`borderTop`,e)}btWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderTopWidth`,t)}btStyle(e){return this.setStyleProp(`borderTopStyle`,e)}btColor(e){return this.setStyleProp(`borderTopColor`,e)}br(e){return this.setStyleProp(`borderRight`,e)}brWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderRightWidth`,t)}brStyle(e){return this.setStyleProp(`borderRightStyle`,e)}brColor(e){return this.setStyleProp(`borderRightColor`,e)}bb(e){return this.setStyleProp(`borderBottom`,e)}bbWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderBottomWidth`,t)}bbStyle(e){return this.setStyleProp(`borderBottomStyle`,e)}bbColor(e){return this.setStyleProp(`borderBottomColor`,e)}bl(e){return this.setStyleProp(`borderLeft`,e)}blWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderLeftWidth`,t)}blStyle(e){return this.setStyleProp(`borderLeftStyle`,e)}blColor(e){return this.setStyleProp(`borderLeftColor`,e)}bx(e){return this.setStyleProp(`borderLeft`,e),this.setStyleProp(`borderRight`,e),this}by(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderBottom`,e),this}btl(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderLeft`,e),this}btr(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderRight`,e),this}bbl(e){return this.setStyleProp(`borderBottom`,e),this.setStyleProp(`borderLeft`,e),this}bbr(e){return this.setStyleProp(`borderBottom`,e),this.setStyleProp(`borderRight`,e),this}bCollapse(e){return this.setStyleProp(`borderCollapse`,e)}overflow(e){return this.setStyleProp(`overflow`,e)}overflowY(e){return this.setStyleProp(`overflowY`,e)}overflowX(e){return this.setStyleProp(`overflowX`,e)}fontSize(e){return this.setStyleProp(`fontSize`,e)}fontWeight(e){return this.setStyleProp(`fontWeight`,e)}fontFamily(e){return this.setStyleProp(`fontFamily`,e)}fontStyle(e){return this.setStyleProp(`fontStyle`,e)}textAlign(e){return this.setStyleProp(`textAlign`,e)}textDecoration(e){return this.setStyleProp(`textDecoration`,e)}pos(e){return this.setStyleProp(`position`,e)}top(e){return this.setStyleProp(`top`,e)}bottom(e){return this.setStyleProp(`bottom`,e)}left(e){return this.setStyleProp(`left`,e)}right(e){return this.setStyleProp(`right`,e)}cursor(e){return this.setStyleProp(`cursor`,e)}alignItems(e){return this.setStyleProp(`alignItems`,e)}justifyContent(e){return this.setStyleProp(`justifyContent`,e)}gap(e){return this.setStyleProp(`gap`,e)}flexDirection(e){return this.setStyleProp(`flexDirection`,e)}templateColumns(e){return this.setStyleProp(`gridTemplateColumns`,e)}templateRows(e){return this.setStyleProp(`gridTemplateRows`,e)}appearance(e){return this.setStyleProp(`appearance`,e)}userSelect(e){return this.setStyleProp(`userSelect`,e)}verticalAlign(e){return this.setStyleProp(`verticalAlign`,e)}whiteSpace(e){return this.setStyleProp(`whiteSpace`,e)}textOverflow(e){return this.setStyleProp(`textOverflow`,e)}zIndex(e){return this.setStyleProp(`zIndex`,e)}opacity(e){return this.setStyleProp(`opacity`,e)}transform(e){return this.setStyleProp(`transform`,e)}translate(e,t){let n=typeof e==`number`?`${e}px`:e,r=typeof t==`number`?`${t}px`:t;return this.setStyleProp(`transform`,`translate(${n}, ${r})`)}translateX(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`transform`,`translateX(${t})`)}translateY(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`transform`,`translateY(${t})`)}scale(e,t){let n=typeof e==`number`?e.toString():e,r=typeof t==`number`?t.toString():t;return this.setStyleProp(`transform`,`scale(${n}, ${r})`)}scaleX(e){let t=typeof e==`number`?e.toString():e;return this.setStyleProp(`transform`,`scaleX(${t})`)}scaleY(e){let t=typeof e==`number`?e.toString():e;return this.setStyleProp(`transform`,`scaleY(${t})`)}rotate(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotate(${t})`)}rotateX(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateX(${t})`)}rotateY(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateY(${t})`)}rotateZ(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateZ(${t})`)}transformOrigin(e){return this.setStyleProp(`transformOrigin`,e)}transition(e){return this.setStyleProp(`transition`,e)}willChange(e){return this.setStyleProp(`willChange`,e)}boxShadow(e){return this.setStyleProp(`boxShadow`,e)}boxSizing(e){return this.setStyleProp(`boxSizing`,e)}background(e){return this.setStyleProp(`background`,e)}outline(e){return this.setStyleProp(`outline`,e)}outlineWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`outlineWidth`,t)}outlineStyle(e){return this.setStyleProp(`outlineStyle`,e)}outlineColor(e){return this.setStyleProp(`outlineColor`,e)}outlineOffset(e){return this.setStyleProp(`outlineOffset`,e)}lineHeight(e){return this.setStyleProp(`lineHeight`,e)}wordWrap(e){return this.setStyleProp(`wordWrap`,e)}tabSize(e){return this.setStyleProp(`tabSize`,e)}resize(e){return this.setStyleProp(`resize`,e)}fill(e){return this.setStyleProp(`fill`,e)}stroke(e){return this.setStyleProp(`stroke`,e)}strokeWidth(e){return this.setStyleProp(`strokeWidth`,e)}overflowEllipsis(){return this.overflow(`hidden`).whiteSpace(`nowrap`).textOverflow(`ellipsis`)}linearGradient(e,...t){let n=`linear-gradient(${e}, ${t.join(`, `)})`;return this.setStyleProp(`background`,n)}style(e){for(let t of Object.keys(e))this.setStyleProp(t,e[t]);return this}};const t={opacity:1,zIndex:1,fontWeight:1,lineHeight:1,flexGrow:1,flexShrink:1,order:1,zoom:1,scale:1,counterIncrement:1,counterReset:1,tabSize:1,orphans:1,widows:1,columns:1,columnCount:1,gridRow:1,gridColumn:1},n={WebkitAppearance:1},r=`svg.svgA.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`),i={svgA:`a`};function a(){return`${Date.now().toString(36)}-${(o++).toString(36)}`}let o=0;function s(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function c(e,n){return typeof n==`number`?t[e]?String(n):`${n}px`:n}const l=Symbol(`BaseDomIdentity`);var u=class t extends e{[l]=!0;getClientWidth(){return this.dom.clientWidth??0}getClientHeight(){return this.dom.clientHeight??0}getRect(){return this.dom.getBoundingClientRect()}getComputedStyle(){return window.getComputedStyle(this.dom)}getChildAt(e){return this.dom.children.item(e)}getNodeAt(e){return this.dom.childNodes.item(e)}getChildren(){return Array.from(this.dom.children)}getNodes(){return Array.from(this.dom.childNodes)}getText(){return this.dom.textContent}getAttr(e){return this.dom.getAttribute(e)}getProp(e){return this.dom[e]}hasClass(e){return this.dom.classList.contains(e)}text(e){return this.dom.textContent=e==null?``:String(e),this}html(e){return this.dom.innerHTML=e,this}id(e){return this.dom.id=e??``,this}attr(e,t){return t===void 0||t===!1?this.dom.removeAttribute(e):t===!0?this.dom.setAttribute(e,``):this.dom.setAttribute(e,String(t)),this}attrs(e){for(let[t,n]of Object.entries(e))this.attr(t,n);return this}toggleAttr(e,t){return this.dom.toggleAttribute(e,t),this}prop(e,t){return this.dom[e]=t,this}props(e){for(let[t,n]of Object.entries(e))this.prop(t,n);return this}className(e){return e==null?this.dom.removeAttribute(`class`):this.dom.setAttribute(`class`,e),this}tabIndex(e){return this.attr(`tabindex`,e)}toggleClass(e,t){return this.dom.classList.toggle(e,t),this}on(e,t,n){return this.dom.addEventListener(e,t,n),this}off(e,t,n){return this.dom.removeEventListener(e,t,n),this}add(...e){return this.dom.append(...e.map(e=>this.resolveNode(e))),this}insertAtIndex(e,...t){let n=Array.from(this.dom.children),r=Math.max(0,Math.min(e,n.length));for(let e of t){let t=n[r]??null;this.dom.insertBefore(this.resolveNode(e),t),r++}return this}setChildren(...e){return this.clear().add(...e)}setChildrenFromIndex(e,...t){let n=Array.from(this.dom.children),r=n.length,i=Math.max(0,Math.min(e,r));for(let e=i;e<r;e++)this.dom.removeChild(n[e]);let a=this.dom.children[i]??null;for(let e of t)this.dom.insertBefore(this.resolveNode(e),a);return this}clear(){return this.dom.textContent=``,this}clearRange(e,t){let n=Array.from(this.dom.children),r=Math.max(0,e??0),i=Math.min(n.length,t??n.length);for(let e=r;e<i;e++)this.dom.removeChild(n[e]);return this}contains(e){let n=e instanceof t?e.dom:e;return this.dom.contains(n)}query(e){let t=this.dom.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}ref(e){return e(this),this}resolveNode(e){return typeof e==`string`||typeof e==`number`?document.createTextNode(String(e)):t.isBaseDom(e)?e.dom:e}setStyleProp(e,t){return t===void 0?(this.dom.style.removeProperty(s(e)),this):(this.dom.style.setProperty(s(e),c(e,t)),this)}static isBaseDom(e){return typeof e!=`object`||!e?!1:Object.getOwnPropertySymbols(e).includes(l)}},d=class extends u{constructor(e,t){super(),this._tag=i[e]??e,this._isSvg=r.includes(this._tag),this._dom=t??(this._isSvg?document.createElementNS(`http://www.w3.org/2000/svg`,this._tag):document.createElement(this._tag))}_tag;_isSvg;_dom;get tag(){return this._tag}get isSvg(){return this._isSvg}get dom(){return this._dom}remove(){this.dom.remove()}htmlFor(e){return this.tag===`label`&&(this.dom.htmlFor=e??``),this}title(e){return this.attr(`title`,e)}disabled(e){return this.attr(`disabled`,e)}disable(){return this.disabled(!0)}enable(){return this.disabled(!1)}focus(){return this.dom.focus(),this}blur(){return this.dom.blur(),this}click(){return this.isSvg||this.dom.click(),this}popover(e){return this.attr(`popover`,e)}popoverTarget(e){return this.attr(`popovertarget`,e)}popoverTargetAction(e){return this.attr(`popovertargetaction`,e)}showPopover(e){return this.dom.showPopover({source:e}),this}hidePopover(){return this.dom.hidePopover(),this}togglePopover(e,t){return this.dom.togglePopover({force:e,source:t}),this}};function f(e){return new d(e)}function p(e){let t=document.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}var m=class extends d{constructor(){super(`a`)}href(e){return this.dom.href=e,this}};function h(){return new m}var g=class extends d{fill(e){return this.attr(`fill`,e)}fillRule(e){return this.attr(`fill-rule`,e)}fillOpacity(e){return this.attr(`fill-opacity`,e)}stroke(e){return this.attr(`stroke`,e)}strokeWidth(e){return this.attr(`stroke-width`,e)}strokeLinejoin(e){return this.attr(`stroke-linejoin`,e)}strokeLinecap(e){return this.attr(`stroke-linecap`,e)}strokeMiterlimit(e){return this.attr(`stroke-miterlimit`,e.toString())}strokeOpacity(e){return this.attr(`stroke-opacity`,e)}strokeDasharray(e){return this.attr(`stroke-dasharray`,e)}strokeDashoffset(e){return this.attr(`stroke-dashoffset`,e)}opacity(e){return this.attr(`opacity`,e)}transform(e){return this.attr(`transform`,e)}translate(e,t){return this.attr(`transform`,`translate(${e} ${t})`)}translateX(e){return this.attr(`transform`,`translate(${e} 0)`)}translateY(e){return this.attr(`transform`,`translate(0 ${e})`)}rotate(e,t,n){let r=t!==void 0&&n!==void 0?`rotate(${e} ${t} ${n})`:`rotate(${e})`;return this.attr(`transform`,r)}scale(e){return this.attr(`transform`,`scale(${e})`)}scaleX(e){return this.attr(`transform`,`scale(${e} 1)`)}scaleY(e){return this.attr(`transform`,`scale(1 ${e})`)}skewX(e){return this.attr(`transform`,`skewX(${e})`)}skewY(e){return this.attr(`transform`,`skewY(${e})`)}vectorEffect(e){return this.attr(`vector-effect`,e)}},_=class extends d{constructor(){super(`button`)}type(e){return this.dom.type=e,this}};function ee(){return new _}var v=class extends d{constructor(e){super(`canvas`,e)}_size={width:this.dom.width,height:this.dom.height};getWidth(){return this.dom.width}getHeight(){return this.dom.height}width(e){return this.dom.width=e,this}height(e){return this.dom.height=e,this}setSize(e,t){return this.dom.width=e,this.dom.height=t,this}getSize(){return this._size.width=this.dom.width,this._size.height=this.dom.height,this._size}getAspect(){return this.dom.width/this.dom.height}getAspectScale(e){let t=this.dom.width/this.dom.height,n,r,i;return t>=1?(n=1/t,r=1,i=1):(n=1,r=t,i=1),e.x=n,e.y=r,e.z=i,e}};function y(){return new v}var b=class extends e{constructor(e,t,n){super(),this._sheet=e,this._index=t,this._rule=n}_sheet;_index;_rule;get sheet(){return this._sheet}get index(){return this._index}get rule(){return this._rule}get selectorText(){return this._rule.selectorText}remove(){this._sheet.removeRule(this)}extend(e){return this.sheet.cssRule(`${this.selectorText}${e}`)}hover(){return this.extend(`:hover`)}focus(){return this.extend(`:focus`)}focusWithin(){return this.extend(`:focus-within`)}active(){return this.extend(`:active`)}disabled(){return this.extend(`:disabled`)}setStyleProp(e,t){return t===void 0?(this.rule.style.removeProperty(s(e)),this):(this.rule.style.setProperty(s(e),c(e,t)),this)}},x=class extends u{constructor(e){super(),this._body=e}_body;get dom(){return this._body}};function S(e){return new x(e??document.body)}var C=class extends u{constructor(e){super(),this._head=e}_head;get dom(){return this._head}title(e){let t=this.dom.querySelector(`title`);return t||(t=this.dom.ownerDocument.createElement(`title`),this.dom.appendChild(t)),t.textContent=e,this}charset(e){let t=this.dom.querySelector(`meta[charset]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),this.dom.insertBefore(t,this.dom.firstChild)),t.setAttribute(`charset`,e),this}viewport(e){let t=this.dom.querySelector(`meta[name="viewport"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`viewport`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}httpEquiv(e,t){let n=this.dom.querySelector(`meta[http-equiv="${e}"]`);return n||(n=this.dom.ownerDocument.createElement(`meta`),n.setAttribute(`http-equiv`,e),this.dom.appendChild(n)),n.setAttribute(`content`,t),this}csp(e){let t=Object.entries(e).map(([e,t])=>`${e} ${t}`).join(`; `);return this.httpEquiv(`Content-Security-Policy`,t)}description(e){let t=this.dom.querySelector(`meta[name="description"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`description`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}keywords(e){let t=this.dom.querySelector(`meta[name="keywords"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`keywords`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}link(e,t,n={}){let r=this.dom.querySelector(`link[rel="${e}"]`);r||(r=this.dom.ownerDocument.createElement(`link`),r.setAttribute(`rel`,e),this.dom.appendChild(r)),r.setAttribute(`href`,t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return this}};function w(e){return new C(e??document.head)}var T=class{constructor(e=window.document){this._document=e}_document;get dom(){return this._document}getBody(){return new x(this._document.body)}getHead(){return new C(this._document.head)}on(e,t,n){return this._document.addEventListener(e,t,n),this}off(e,t,n){return this._document.removeEventListener(e,t,n),this}dispatch(e){return this._document.dispatchEvent(e),this}query(e){let t=this._document.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}};function E(){return new T}var D=class{constructor(e=window){this._window=e}_window;get dom(){return this._window}getDocument(){return new T(this._window.document)}on(e,t,n){return this._window.addEventListener(e,t,n),this}off(e,t,n){return this._window.removeEventListener(e,t,n),this}dispatch(e){return this._window.dispatchEvent(e),this}postMessage(e,t){return this._window.postMessage(e,t),this}};function O(e){return new D(e)}var k=class extends d{constructor(){super(`iframe`)}getContentWindow(){let e=this.dom.contentWindow;return e?new D(e):null}getContentDocument(){let e=this.dom.contentDocument;return e?new T(e):null}getBody(){let e=this.getContentDocument();return e?e.getBody():null}getHead(){let e=this.getContentDocument();return e?e.getHead():null}isSameOrigin(){try{return this.dom.contentWindow?.location.href,!0}catch{return!1}}src(e){return this.dom.src=e,this}allowFullscreen(e=!0){return this.dom.allowFullscreen=e,this}width(e){return this.dom.width=c(`width`,e),this}height(e){return this.dom.height=c(`height`,e),this}size(e,t){return this.width(e).height(t)}sandbox(e){let t=e?.join(` `);return this.attr(`sandbox`,t)}referrerPolicy(e){return this.dom.referrerPolicy=e,this}loading(e){return this.dom.loading=e,this}reloadViaSrc(){return this.dom.src&&(this.dom.src=this.dom.src),this}reloadViaLocation(){return this.dom.contentWindow?.location.reload(),this}reload(){try{this.dom.contentWindow?.location.reload()}catch{this.dom.src&&(this.dom.src=this.dom.src)}return this}queryInside(e){let t=this.getContentDocument()?.dom.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}postMessage(e,t){let n=this.getContentWindow();return n&&n.postMessage(e,t),this}};function A(){return new k}var j=class extends d{constructor(){super(`img`)}getNaturalWidth(){return this.dom.naturalWidth??0}getNaturalHeight(){return this.dom.naturalHeight??0}src(e){return this.dom.src=e,this}width(e){return this.dom.width=e,this}height(e){return this.dom.height=e,this}setSize(e,t){return this.width(e).height(t)}alt(e){return this.dom.alt=e,this}};function te(){return new j}var M=class extends d{constructor(){super(`input`),this.dom.type=`checkbox`}name(e){return this.dom.name=e,this}checked(e){return this.prop(`checked`,e),this}isChecked(){return this.getProp(`checked`)}},N=class extends d{constructor(){super(`input`),this._dom.type=`color`}_rgb={r:1,g:1,b:1};name(e){return this._dom.name=e,this}value(e){return this._dom.value=e,this}getValue(){return this._dom.value}getRGB(){let e=this._dom.value,t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return this._rgb.r=t,this._rgb.g=n,this._rgb.b=r,this._rgb}getNormalizedRGB(){let e=this._dom.value,t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return this._rgb.r=t/255,this._rgb.g=n/255,this._rgb.b=r/255,this._rgb}},P=class extends d{constructor(){super(`input`),this.dom.type=`number`}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}getValue(){return Number(this.dom.value)}min(e){return this.dom.min=String(e),this}max(e){return this.dom.max=String(e),this}step(e){return this.dom.step=String(e),this}placeholder(e){return this.dom.placeholder=e,this}},F=class extends d{constructor(){super(`input`),this.dom.type=`range`}getValue(){return Number(this.dom.value)}getMin(){return Number(this.dom.min)}getMax(){return Number(this.dom.max)}getStep(){return Number(this.dom.step)}getRatio(){let e=this.getMin(),t=this.getMax(),n=this.getValue(),r=t-e;return r>0?Math.max(0,Math.min(1,(n-e)/r)):0}getPercent(){return this.getRatio()*100}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}min(e){return this.dom.min=String(e),this}max(e){return this.dom.max=String(e),this}step(e){return this.dom.step=String(e),this}bounds(e,t,n){return this.min(e).max(t).step(n)}ratio(e){let t=this.getMin(),n=this.getMax()-t,r=Math.max(0,Math.min(1,e));return this.value(t+r*n)}percent(e){return this.ratio(e/100)}trackFillColors(e,t){let n=this.getPercent();return this.linearGradient(`to right`,`${e} ${n}%`,`${t} ${n}%`)}},I=class extends d{constructor(){super(`input`),this.dom.type=`text`}name(e){return this.dom.name=e,this}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}placeholder(e){return this.dom.placeholder=e,this}};function ne(e){switch(e){case`text`:return new I;case`number`:return new P;case`checkbox`:return new M;case`color`:return new N;case`range`:return new F}}var L=class{constructor(e,t,n){this._sheet=e,this._index=t,this._rule=n}_sheet;_index;_rule;get sheet(){return this._sheet}get index(){return this._index}get rule(){return this._rule}get length(){return this._rule.cssRules.length}get mediaText(){return this._rule.media.mediaText}cssRule(e){let t=this.length;return this.rule.insertRule(`${e}{}`,t),new b(this.sheet,t,this.rule.cssRules.item(t))}remove(){this.sheet.removeRule(this)}removeRule(e){this.rule.deleteRule(e.index)}},R=class extends d{constructor(){super(`option`)}value(e){return this.dom.value=String(e),this}getValue(){return this.dom.value}};function re(){return new R}var z=class extends d{constructor(){super(`progress`)}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}max(e){return this.dom.max=e,this}getMax(){return this.dom.max}indeterminate(){return this.dom.removeAttribute(`value`),this}};function B(){return new z}var V=class extends d{constructor(){super(`select`)}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}getValue(){return this.dom.value}};function H(){return new V}var U=class e{constructor(e){this._dom=e}_dom;get dom(){return this._dom}get sheet(){return this.dom.sheet}get length(){return this.sheet.cssRules.length}cssRule(e){let t=this.length;return this.sheet.insertRule(`${e}{}`,t),new b(this,t,this.sheet.cssRules.item(t))}mediaRule(e){let t=this.length;return this.sheet.insertRule(`@media(${e}){}`,t),new L(this,t,this.sheet.cssRules.item(t))}mediaMinWidth(e){return this.mediaRule(`min-width: ${c(`min-width`,e)}`)}mediaMaxWidth(e){return this.mediaRule(`max-width: ${c(`max-width`,e)}`)}removeRule(e){this.sheet.deleteRule(e.index)}static getSheet(t=e.DEFAULT_STYLE_ID){let n=document.head.querySelector(`#${t}`);if(n)return new e(n);{let n=document.createElement(`style`);return n.id=t,n.setAttribute(`type`,`text/css`),document.head.append(n),new e(n)}}static DEFAULT_STYLE_ID=`__neptune-style__`},W=class extends g{constructor(){super(`circle`)}cx(e){return this.attr(`cx`,e.toString())}cy(e){return this.attr(`cy`,e.toString())}r(e){return this.attr(`r`,e.toString())}};function G(){return new W}var K=class extends g{constructor(){super(`svg`)}width(e){return this.attr(`width`,e.toString())}height(e){return this.attr(`height`,e.toString())}viewBox(e,t,n,r){return this.attr(`viewBox`,`${e} ${t} ${n} ${r}`)}};function q(){return new K}var J=class extends g{constructor(){super(`g`)}};function Y(){return new J}var X=class extends g{constructor(){super(`path`)}d(e){let t=typeof e==`string`?e:e.toString();return this.attr(`d`,t)}};function ie(){return new X}var Z=class{_segments=[];m(e,t,n=!1){let r=n?`m`:`M`;return this._segments.push(`${r}${e} ${t}`),this}l(e,t,n=!1){let r=n?`l`:`L`;return this._segments.push(`${r}${e} ${t}`),this}h(e,t=!1){let n=t?`h`:`H`;return this._segments.push(`${n}${e}`),this}v(e,t=!1){let n=t?`v`:`V`;return this._segments.push(`${n}${e}`),this}c(e,t,n,r,i,a,o=!1){let s=o?`c`:`C`;return this._segments.push(`${s}${e} ${t}, ${n} ${r}, ${i} ${a}`),this}q(e,t,n,r,i=!1){let a=i?`q`:`Q`;return this._segments.push(`${a}${e} ${t}, ${n} ${r}`),this}a(e,t,n,r,i,a,o,s=!1){let c=s?`a`:`A`;return this._segments.push(`${c}${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o}`),this}t(e,t,n=!1){let r=n?`t`:`T`;return this._segments.push(`${r}${e} ${t}`),this}s(e,t,n,r,i=!1){let a=i?`s`:`S`;return this._segments.push(`${a}${e} ${t}, ${n} ${r}`),this}close(){return this._segments.push(`Z`),this}rect(e,t,n,r,i=!1){return i?this.m(e,t,!0).h(n,!0).v(r,!0).h(-n,!0).close():this.m(e,t).h(e+n).v(t+r).h(e).close()}roundedRect(e,t,n,r,i){let a=e+n,o=t+r;return this.m(e+i,t).h(a-i).a(i,i,0,!1,!0,a,t+i).v(o-i).a(i,i,0,!1,!0,a-i,o).h(e+i).a(i,i,0,!1,!0,e,o-i).v(t+i).a(i,i,0,!1,!0,e+i,t).close()}circle(e,t,n,r=!1){let i=e+n,a=t;return r?this.m(i,a,!0).a(n,n,0,!0,!1,-2*n,0,!0).a(n,n,0,!0,!1,2*n,0,!0):this.m(i,a).a(n,n,0,!0,!1,e-n,t).a(n,n,0,!0,!1,i,a)}ellipse(e,t,n,r,i=!1){let a=e+n,o=t;return i?this.m(a,o,!0).a(n,r,0,!0,!1,-2*n,0,!0).a(n,r,0,!0,!1,2*n,0,!0):this.m(a,o).a(n,r,0,!0,!1,e-n,t).a(n,r,0,!0,!1,a,o)}star(e,t,n,r,i=.5,a=!1){if(n<2)return this;let o=Math.PI/n,s=r*i;for(let i=0;i<n*2;i++){let n=i%2==0?r:s,c=i*o-Math.PI/2,l=e+n*Math.cos(c),u=t+n*Math.sin(c);if(a){let e=n*Math.cos(c),t=n*Math.sin(c);i===0?this.m(e,t,!0):this.l(e,t,!0)}else i===0?this.m(l,u):this.l(l,u)}return this.close()}polygon(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let n=1,r=e.length;n<r;n++){let[r,i]=e[n];this.l(r,i,t)}return this.close()}polyline(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let n=1,r=e.length;n<r;n++){let[r,i]=e[n];this.l(r,i,t)}return this}spline(e,t=.5,n=!1){let r=e.length;if(r<2)return this;let[i,a]=e[0];this.m(i,a,n);for(let o=0;o<r-1;o++){let[r,s]=e[o-1]??e[o],[c,l]=e[o],[u,d]=e[o+1],[f,p]=e[o+2]??e[o+1],m=(u-r)*t/6,h=(d-s)*t/6,g=(f-c)*t/6,_=(p-l)*t/6;if(n){let e=c+m-i,t=l+h-a,n=u-g-i,r=d-_-a,o=u-i,s=d-a;this.c(e,t,n,r,o,s,!0)}else this.c(c+m,l+h,u-g,d-_,u,d);[i,a]=[u,d]}return this}pathFrom(e,t=!1,n=!1){if(e.length<2)return this;let[r,i]=e[0];this.m(r,i,n);for(let t=1,r=e.length;t<r;t++){let[r,i]=e[t];this.l(r,i,n)}return t&&this.close(),this}polyBezier(e,t=!1){if(e.length<4||(e.length-1)%3!=0)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1;i<e.length;i+=3){let[a,o]=e[i],[s,c]=e[i+1],[l,u]=e[i+2];if(t){let e=a-n,t=o-r,i=s-n,d=c-r,f=l-n,p=u-r;this.c(e,t,i,d,f,p,!0)}else this.c(a,o,s,c,l,u);[n,r]=[l,u]}return this}polyQuadratic(e,t=!1){if(e.length<3||(e.length-1)%2!=0)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1;i<e.length;i+=2){let[a,o]=e[i],[s,c]=e[i+1];if(t){let e=a-n,t=o-r,i=s-n,l=c-r;this.q(e,t,i,l,!0)}else this.q(a,o,s,c);[n,r]=[s,c]}return this}polyArc(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1,a=e.length;i<a;i++){let[a,o,s,c,l,u,d]=e[i];if(t){let e=u-n,t=d-r;this.a(a,o,s,c,l,e,t,!0)}else this.a(a,o,s,c,l,u,d);[n,r]=[u,d]}return this}toString(){return this._segments.join(` `)}};function ae(){return new Z}var Q=class extends g{constructor(){super(`rect`)}x(e){return this.attr(`x`,e.toString())}y(e){return this.attr(`y`,e.toString())}width(e){return this.attr(`width`,e.toString())}height(e){return this.attr(`height`,e.toString())}rx(e){return this.attr(`rx`,e.toString())}ry(e){return this.attr(`ry`,e.toString())}};function oe(){return new Q}var $=class extends d{constructor(){super(`textarea`)}name(e){return this.dom.name=e,this}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}placeholder(e){return this.dom.placeholder=e,this}rows(e){return this.dom.rows=e,this}cols(e){return this.dom.cols=e,this}wrap(e){return this.dom.wrap=e,this}maxLength(e){return this.dom.maxLength=e,this}};function se(){return new $}export{f as $,h as $a,S as $body,ee as $btn,y as $canvas,G as $circle,ae as $d,E as $document,Y as $group,w as $head,A as $iframe,te as $img,ne as $input,re as $option,ie as $path,B as $progress,p as $query,oe as $rect,H as $select,q as $svg,se as $textarea,O as $window,m as AnchorElement,u as BaseDom,e as BaseStyle,g as BaseSvgElement,_ as Button,v as Canvas,b as CssRule,x as DomBody,T as DomDocument,d as DomElement,C as DomHead,D as DomWindow,k as IFrame,j as ImageElement,M as InputCheckbox,N as InputColor,P as InputNumber,F as InputRange,I as InputText,L as MediaRule,R as OptionElement,z as ProgressElement,r as SVG_TAGS,V as SelectElement,U as StyleSheet,W as SvgCircle,K as SvgElement,J as SvgGroup,X as SvgPath,Z as SvgPathData,Q as SvgRect,i as TAG_ALIAS,$ as TextArea,t as UNITLESS_CSS_PROPS,n as VENDOR_CSS_PROPS,s as camelToKebab,c as getStyleValue,a as uniqueId};
|