@aquera/nile-elements 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +301 -185
- package/dist/nile-floating-panel/index.cjs.js +1 -1
- package/dist/nile-floating-panel/index.esm.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js.map +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js.map +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.css.esm.js +137 -21
- package/dist/nile-floating-panel/nile-floating-panel.esm.js +1 -1
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/index.esm.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js.map +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.esm.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-floating-panel/index.js.map +1 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.css.d.ts +1 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.css.js +147 -20
- package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +1 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.d.ts +90 -24
- package/dist/src/nile-floating-panel/nile-floating-panel.js +478 -159
- package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tippy.esm-57628c2b.esm.js +1 -0
- package/dist/tippy.esm-78baa8f2.cjs.js +2 -0
- package/dist/tippy.esm-78baa8f2.cjs.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/index.ts +2 -2
- package/src/nile-floating-panel/index.ts +0 -1
- package/src/nile-floating-panel/nile-floating-panel.css.ts +149 -21
- package/src/nile-floating-panel/nile-floating-panel.ts +489 -190
- package/vscode-html-custom-data.json +213 -23
- package/dist/nile-floating-panel/anchor-manager.cjs.js +0 -2
- package/dist/nile-floating-panel/anchor-manager.cjs.js.map +0 -1
- package/dist/nile-floating-panel/anchor-manager.esm.js +0 -1
- package/dist/nile-floating-panel/content-manager.cjs.js +0 -2
- package/dist/nile-floating-panel/content-manager.cjs.js.map +0 -1
- package/dist/nile-floating-panel/content-manager.esm.js +0 -1
- package/dist/nile-floating-panel/event-manager.cjs.js +0 -2
- package/dist/nile-floating-panel/event-manager.cjs.js.map +0 -1
- package/dist/nile-floating-panel/event-manager.esm.js +0 -1
- package/dist/nile-floating-panel/position-manager.cjs.js +0 -2
- package/dist/nile-floating-panel/position-manager.cjs.js.map +0 -1
- package/dist/nile-floating-panel/position-manager.esm.js +0 -1
- package/dist/nile-floating-panel/style-manager.cjs.js +0 -2
- package/dist/nile-floating-panel/style-manager.cjs.js.map +0 -1
- package/dist/nile-floating-panel/style-manager.esm.js +0 -1
- package/dist/nile-floating-panel/types.cjs.js +0 -2
- package/dist/nile-floating-panel/types.cjs.js.map +0 -1
- package/dist/nile-floating-panel/types.esm.js +0 -1
- package/dist/src/nile-floating-panel/anchor-manager.d.ts +0 -6
- package/dist/src/nile-floating-panel/anchor-manager.js +0 -27
- package/dist/src/nile-floating-panel/anchor-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/content-manager.d.ts +0 -5
- package/dist/src/nile-floating-panel/content-manager.js +0 -44
- package/dist/src/nile-floating-panel/content-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/event-manager.d.ts +0 -14
- package/dist/src/nile-floating-panel/event-manager.js +0 -52
- package/dist/src/nile-floating-panel/event-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/position-manager.d.ts +0 -17
- package/dist/src/nile-floating-panel/position-manager.js +0 -72
- package/dist/src/nile-floating-panel/position-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/style-manager.d.ts +0 -9
- package/dist/src/nile-floating-panel/style-manager.js +0 -44
- package/dist/src/nile-floating-panel/style-manager.js.map +0 -1
- package/dist/src/nile-floating-panel/types.d.ts +0 -11
- package/dist/src/nile-floating-panel/types.js +0 -2
- package/dist/src/nile-floating-panel/types.js.map +0 -1
- package/src/nile-floating-panel/anchor-manager.ts +0 -33
- package/src/nile-floating-panel/content-manager.ts +0 -54
- package/src/nile-floating-panel/event-manager.ts +0 -74
- package/src/nile-floating-panel/position-manager.ts +0 -102
- package/src/nile-floating-panel/style-manager.ts +0 -54
- package/src/nile-floating-panel/types.ts +0 -15
|
@@ -1906,16 +1906,11 @@
|
|
|
1906
1906
|
},
|
|
1907
1907
|
{
|
|
1908
1908
|
"name": "nile-floating-panel",
|
|
1909
|
-
"description": "Nile floating
|
|
1909
|
+
"description": "Nile floating-panel component.\n\nA popover that supports rich content (title, body, actions).\n\n**Wrapper mode** (default): first child element is the trigger.\n**For mode**: set `for=\"elementId\"` to attach to an external element.\n\nEvents:\n\n * `nile-init` {} - Component initialized.\n\n * `nile-destroy` {} - Component destroyed.\n\n * `nile-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Panel opened.\n\n * `nile-hide` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Panel closed.\n\n * `nile-after-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Panel fully visible after animation.\n\n * `nile-after-hide` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Panel fully hidden after animation.\n\n * `nile-toggle` {`CustomEvent<{ open: boolean; instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Open/close transition (detail.open).\n\n * `nile-visibility-change` {} - Hidden by scroll/tab change.\n\nAttributes:\n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - \n\n * `trigger` {`string`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `arrow` {`\"none\" | \"default\" | \"round\"`} - \n\n * `animation` {`string`} - \n\n * `duration` {`string | number | [number, number]`} - \n\n * `delay` {`number | [number, number]`} - \n\n * `interactive` {`boolean`} - \n\n * `interactiveBorder` {`number`} - \n\n * `maxWidth` {`string | number`} - \n\n * `zIndex` {`number`} - \n\n * `followCursor` {`boolean | \"initial\" | \"horizontal\" | \"vertical\" | \"true\" | \"false\"`} - \n\n * `hideOnClick` {`boolean | \"toggle\"`} - \n\n * `inertia` {`boolean`} - \n\n * `allowHTML` {`boolean`} - \n\n * `flip` {`boolean`} - \n\n * `for` {`string | null`} - \n\n * `open` {`boolean`} - \n\n * `preventOverlayClose` {`boolean`} - \n\n * `title` {`string`} - \n\n * `disabled` {`boolean`} - \n\n * `width` {`string | undefined`} - \n\n * `height` {`string | undefined`} - \n\n * `group` {`string | null`} - When set, only one panel in the same group can be open at a time.\n\n * `closeOnEscape` {`boolean`} - Close the panel when Escape is pressed.\n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\nProperties:\n\n * `_groups` {`Map<string, Set<NileFloatingPanel>>`} - \n\n * `_reducedMotionQuery` {`MediaQueryList | null`} - \n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - \n\n * `trigger` {`string`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `arrow` {`\"none\" | \"default\" | \"round\"`} - \n\n * `animation` {`string`} - \n\n * `duration` {`string | number | [number, number]`} - \n\n * `delay` {`number | [number, number]`} - \n\n * `interactive` {`boolean`} - \n\n * `interactiveBorder` {`number`} - \n\n * `maxWidth` {`string | number`} - \n\n * `zIndex` {`number`} - \n\n * `followCursor` {`boolean | \"initial\" | \"horizontal\" | \"vertical\" | \"true\" | \"false\"`} - \n\n * `hideOnClick` {`boolean | \"toggle\"`} - \n\n * `inertia` {`boolean`} - \n\n * `allowHTML` {`boolean`} - \n\n * `flip` {`boolean`} - \n\n * `for` {`string | null`} - \n\n * `open` {`boolean`} - \n\n * `preventOverlayClose` {`boolean`} - \n\n * `title` {`string`} - \n\n * `disabled` {`boolean`} - \n\n * `width` {`string | undefined`} - \n\n * `height` {`string | undefined`} - \n\n * `group` {`string | null`} - When set, only one panel in the same group can be open at a time.\n\n * `closeOnEscape` {`boolean`} - Close the panel when Escape is pressed.\n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\n * `tippyInstance` {`Instance<Props> | null`} - \n\n * `visibilityManager` - \n\n * `panelContainer` {`HTMLElement | null`} - \n\n * `anchorEl` {`HTMLElement | null`} - \n\n * `_suppressOpenWatch` {`boolean`} - \n\n * `_panelId` {`string`} - \n\n * `_boundEscHandler` - \n\n * `_pendingShowListener` - \n\n * `_pendingHideListener` - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
1910
1910
|
"attributes": [
|
|
1911
1911
|
{
|
|
1912
|
-
"name": "
|
|
1913
|
-
"description": "`
|
|
1914
|
-
"values": []
|
|
1915
|
-
},
|
|
1916
|
-
{
|
|
1917
|
-
"name": "position",
|
|
1918
|
-
"description": "`position` {`FloatingPanelPosition`} - \n\nProperty: position\n\nDefault: bottom",
|
|
1912
|
+
"name": "placement",
|
|
1913
|
+
"description": "`placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - \n\nProperty: placement\n\nDefault: bottom",
|
|
1919
1914
|
"values": [
|
|
1920
1915
|
{
|
|
1921
1916
|
"name": "left"
|
|
@@ -1926,24 +1921,195 @@
|
|
|
1926
1921
|
{
|
|
1927
1922
|
"name": "top"
|
|
1928
1923
|
},
|
|
1924
|
+
{
|
|
1925
|
+
"name": "top-start"
|
|
1926
|
+
},
|
|
1927
|
+
{
|
|
1928
|
+
"name": "top-end"
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
"name": "right-start"
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
"name": "right-end"
|
|
1935
|
+
},
|
|
1929
1936
|
{
|
|
1930
1937
|
"name": "bottom"
|
|
1938
|
+
},
|
|
1939
|
+
{
|
|
1940
|
+
"name": "bottom-start"
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
"name": "bottom-end"
|
|
1944
|
+
},
|
|
1945
|
+
{
|
|
1946
|
+
"name": "left-start"
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
"name": "left-end"
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"name": "auto"
|
|
1953
|
+
},
|
|
1954
|
+
{
|
|
1955
|
+
"name": "auto-start"
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
"name": "auto-end"
|
|
1959
|
+
}
|
|
1960
|
+
]
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
"name": "trigger",
|
|
1964
|
+
"description": "`trigger` {`string`} - \n\nProperty: trigger\n\nDefault: click"
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"name": "distance",
|
|
1968
|
+
"description": "`distance` {`number`} - \n\nProperty: distance\n\nDefault: 12"
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
"name": "skidding",
|
|
1972
|
+
"description": "`skidding` {`number`} - \n\nProperty: skidding\n\nDefault: 0"
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
"name": "arrow",
|
|
1976
|
+
"description": "`arrow` {`\"none\" | \"default\" | \"round\"`} - \n\nProperty: arrow\n\nDefault: round",
|
|
1977
|
+
"values": [
|
|
1978
|
+
{
|
|
1979
|
+
"name": "none"
|
|
1980
|
+
},
|
|
1981
|
+
{
|
|
1982
|
+
"name": "default"
|
|
1983
|
+
},
|
|
1984
|
+
{
|
|
1985
|
+
"name": "round"
|
|
1986
|
+
}
|
|
1987
|
+
]
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
"name": "animation",
|
|
1991
|
+
"description": "`animation` {`string`} - \n\nProperty: animation\n\nDefault: fade"
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
"name": "duration",
|
|
1995
|
+
"description": "`duration` {`string | number | [number, number]`} - \n\nProperty: duration\n\nDefault: 200",
|
|
1996
|
+
"values": []
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
"name": "delay",
|
|
2000
|
+
"description": "`delay` {`number | [number, number]`} - \n\nProperty: delay\n\nDefault: 0",
|
|
2001
|
+
"values": []
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
"name": "interactive",
|
|
2005
|
+
"description": "`interactive` {`boolean`} - \n\nProperty: interactive\n\nDefault: true",
|
|
2006
|
+
"valueSet": "v"
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
"name": "interactiveBorder",
|
|
2010
|
+
"description": "`interactiveBorder` {`number`} - \n\nProperty: interactiveBorder\n\nDefault: 2"
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
"name": "maxWidth",
|
|
2014
|
+
"description": "`maxWidth` {`string | number`} - \n\nProperty: maxWidth\n\nDefault: none",
|
|
2015
|
+
"values": []
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
"name": "zIndex",
|
|
2019
|
+
"description": "`zIndex` {`number`} - \n\nProperty: zIndex\n\nDefault: 9999"
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
"name": "followCursor",
|
|
2023
|
+
"description": "`followCursor` {`boolean | \"initial\" | \"horizontal\" | \"vertical\" | \"true\" | \"false\"`} - \n\nProperty: followCursor\n\nDefault: false",
|
|
2024
|
+
"values": [
|
|
2025
|
+
{
|
|
2026
|
+
"name": "initial"
|
|
2027
|
+
},
|
|
2028
|
+
{
|
|
2029
|
+
"name": "horizontal"
|
|
2030
|
+
},
|
|
2031
|
+
{
|
|
2032
|
+
"name": "vertical"
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
"name": "true"
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
"name": "false"
|
|
1931
2039
|
}
|
|
1932
2040
|
]
|
|
1933
2041
|
},
|
|
2042
|
+
{
|
|
2043
|
+
"name": "hideOnClick",
|
|
2044
|
+
"description": "`hideOnClick` {`boolean | \"toggle\"`} - \n\nProperty: hideOnClick\n\nDefault: true",
|
|
2045
|
+
"values": [
|
|
2046
|
+
{
|
|
2047
|
+
"name": "toggle"
|
|
2048
|
+
}
|
|
2049
|
+
]
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
"name": "inertia",
|
|
2053
|
+
"description": "`inertia` {`boolean`} - \n\nProperty: inertia\n\nDefault: false",
|
|
2054
|
+
"valueSet": "v"
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
"name": "allowHTML",
|
|
2058
|
+
"description": "`allowHTML` {`boolean`} - \n\nProperty: allowHTML\n\nDefault: false",
|
|
2059
|
+
"valueSet": "v"
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
"name": "flip",
|
|
2063
|
+
"description": "`flip` {`boolean`} - \n\nProperty: flip\n\nDefault: true",
|
|
2064
|
+
"valueSet": "v"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"name": "for",
|
|
2068
|
+
"description": "`for` {`string | null`} - \n\nProperty: for\n\nDefault: null",
|
|
2069
|
+
"values": []
|
|
2070
|
+
},
|
|
1934
2071
|
{
|
|
1935
2072
|
"name": "open",
|
|
1936
2073
|
"description": "`open` {`boolean`} - \n\nProperty: open\n\nDefault: false",
|
|
1937
2074
|
"valueSet": "v"
|
|
1938
2075
|
},
|
|
1939
2076
|
{
|
|
1940
|
-
"name": "
|
|
1941
|
-
"description": "`
|
|
2077
|
+
"name": "preventOverlayClose",
|
|
2078
|
+
"description": "`preventOverlayClose` {`boolean`} - \n\nProperty: preventOverlayClose\n\nDefault: false",
|
|
2079
|
+
"valueSet": "v"
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
"name": "title",
|
|
2083
|
+
"description": "`title` {`string`} - \n\nProperty: title\n\nDefault: "
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
"name": "disabled",
|
|
2087
|
+
"description": "`disabled` {`boolean`} - \n\nProperty: disabled\n\nDefault: false",
|
|
2088
|
+
"valueSet": "v"
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
"name": "width",
|
|
2092
|
+
"description": "`width` {`string | undefined`} - \n\nProperty: width",
|
|
2093
|
+
"values": []
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
"name": "height",
|
|
2097
|
+
"description": "`height` {`string | undefined`} - \n\nProperty: height",
|
|
2098
|
+
"values": []
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
"name": "group",
|
|
2102
|
+
"description": "`group` {`string | null`} - When set, only one panel in the same group can be open at a time.\n\nProperty: group\n\nDefault: null",
|
|
2103
|
+
"values": []
|
|
2104
|
+
},
|
|
2105
|
+
{
|
|
2106
|
+
"name": "closeOnEscape",
|
|
2107
|
+
"description": "`closeOnEscape` {`boolean`} - Close the panel when Escape is pressed.\n\nProperty: closeOnEscape\n\nDefault: true",
|
|
1942
2108
|
"valueSet": "v"
|
|
1943
2109
|
},
|
|
1944
2110
|
{
|
|
1945
2111
|
"name": "enableVisibilityEffect",
|
|
1946
|
-
"description": "`enableVisibilityEffect` {`boolean`} - \n\nProperty: enableVisibilityEffect\n\nDefault:
|
|
2112
|
+
"description": "`enableVisibilityEffect` {`boolean`} - \n\nProperty: enableVisibilityEffect\n\nDefault: false",
|
|
1947
2113
|
"valueSet": "v"
|
|
1948
2114
|
},
|
|
1949
2115
|
{
|
|
@@ -1951,13 +2117,37 @@
|
|
|
1951
2117
|
"description": "`enableTabClose` {`boolean`} - \n\nProperty: enableTabClose\n\nDefault: false",
|
|
1952
2118
|
"valueSet": "v"
|
|
1953
2119
|
},
|
|
2120
|
+
{
|
|
2121
|
+
"name": "onnile-init",
|
|
2122
|
+
"description": "`nile-init` {} - Component initialized."
|
|
2123
|
+
},
|
|
2124
|
+
{
|
|
2125
|
+
"name": "onnile-destroy",
|
|
2126
|
+
"description": "`nile-destroy` {} - Component destroyed."
|
|
2127
|
+
},
|
|
1954
2128
|
{
|
|
1955
2129
|
"name": "onnile-show",
|
|
1956
|
-
"description": "`nile-show` {
|
|
2130
|
+
"description": "`nile-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Panel opened."
|
|
1957
2131
|
},
|
|
1958
2132
|
{
|
|
1959
2133
|
"name": "onnile-hide",
|
|
1960
|
-
"description": "`nile-hide` {
|
|
2134
|
+
"description": "`nile-hide` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Panel closed."
|
|
2135
|
+
},
|
|
2136
|
+
{
|
|
2137
|
+
"name": "onnile-after-show",
|
|
2138
|
+
"description": "`nile-after-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Panel fully visible after animation."
|
|
2139
|
+
},
|
|
2140
|
+
{
|
|
2141
|
+
"name": "onnile-after-hide",
|
|
2142
|
+
"description": "`nile-after-hide` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Panel fully hidden after animation."
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
"name": "onnile-toggle",
|
|
2146
|
+
"description": "`nile-toggle` {`CustomEvent<{ open: boolean; instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - Open/close transition (detail.open)."
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
"name": "onnile-visibility-change",
|
|
2150
|
+
"description": "`nile-visibility-change` {} - Hidden by scroll/tab change."
|
|
1961
2151
|
}
|
|
1962
2152
|
]
|
|
1963
2153
|
},
|
|
@@ -2943,7 +3133,7 @@
|
|
|
2943
3133
|
},
|
|
2944
3134
|
{
|
|
2945
3135
|
"name": "nile-lite-tooltip",
|
|
2946
|
-
"description": "Nile lite-tooltip component.\n\nSupports wrapper, sibling (for), and singleton modes.\nAligns with Tippy.js props and Nile design system.\n\nEvents:\n\n * `nile-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\n * `nile-toggle` {`CustomEvent<{ open: boolean; instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\n * `nile-hide` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\nAttributes:\n\n * `for` {`string | null`} - ID of the target element (for sibling mode)\n\n * `content` {`string`} - Tooltip content text or HTML\n\n * `size` {`\"small\" | \"large\"`} - Tooltip size (applies CSS class)\n\n * `duration` {`string | number | [number, number]`} - Animation duration for show/hide (ms). Can be a single value or [show, hide].\n\n * `interactive` {`boolean`} - Interactive mode\n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - Placement of the tooltip\n\n * `disabled` {`boolean`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `allowHTML` {`boolean`} - \n\n * `followCursor` {`boolean | \"
|
|
3136
|
+
"description": "Nile lite-tooltip component.\n\nSupports wrapper, sibling (for), and singleton modes.\nAligns with Tippy.js props and Nile design system.\n\nEvents:\n\n * `nile-show` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\n * `nile-toggle` {`CustomEvent<{ open: boolean; instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\n * `nile-hide` {`CustomEvent<{ instance: Instance<Props>; target: ReferenceElement<Props>; }>`} - \n\nAttributes:\n\n * `for` {`string | null`} - ID of the target element (for sibling mode)\n\n * `content` {`string`} - Tooltip content text or HTML\n\n * `size` {`\"small\" | \"large\"`} - Tooltip size (applies CSS class)\n\n * `duration` {`string | number | [number, number]`} - Animation duration for show/hide (ms). Can be a single value or [show, hide].\n\n * `interactive` {`boolean`} - Interactive mode\n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - Placement of the tooltip\n\n * `disabled` {`boolean`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `allowHTML` {`boolean`} - \n\n * `followCursor` {`boolean | \"initial\" | \"horizontal\" | \"vertical\" | \"true\" | \"false\"`} - \n\n * `arrow` {`\"small\" | \"none\" | \"default\" | \"large\" | \"round\" | \"narrow\" | \"wide\"`} - \n\n * `singleton` {`boolean`} - \n\n * `enableRecursiveMode` {`boolean`} - \n\n * `delay` {`number | [number, number]`} - Not added in Doc\n\n * `maxWidth` {`string | number`} - \n\n * `zIndex` {`number`} - \n\n * `hideOnClick` {`boolean | \"toggle\"`} - \n\n * `inertia` {`boolean`} - \n\n * `interactiveBorder` {`number`} - \n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\n * `width` {`string | undefined`} - \n\n * `height` {`string | undefined`} - \n\nProperties:\n\n * `for` {`string | null`} - ID of the target element (for sibling mode)\n\n * `content` {`string`} - Tooltip content text or HTML\n\n * `size` {`\"small\" | \"large\"`} - Tooltip size (applies CSS class)\n\n * `duration` {`string | number | [number, number]`} - Animation duration for show/hide (ms). Can be a single value or [show, hide].\n\n * `interactive` {`boolean`} - Interactive mode\n\n * `placement` {`\"left\" | \"right\" | \"top\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"auto\" | \"auto-start\" | \"auto-end\"`} - Placement of the tooltip\n\n * `disabled` {`boolean`} - \n\n * `distance` {`number`} - \n\n * `skidding` {`number`} - \n\n * `open` {`boolean`} - \n\n * `trigger` {`string`} - \n\n * `allowHTML` {`boolean`} - \n\n * `followCursor` {`boolean | \"initial\" | \"horizontal\" | \"vertical\" | \"true\" | \"false\"`} - \n\n * `arrow` {`\"small\" | \"none\" | \"default\" | \"large\" | \"round\" | \"narrow\" | \"wide\"`} - \n\n * `singleton` {`boolean`} - \n\n * `enableRecursiveMode` {`boolean`} - \n\n * `delay` {`number | [number, number]`} - Not added in Doc\n\n * `maxWidth` {`string | number`} - \n\n * `zIndex` {`number`} - \n\n * `hideOnClick` {`boolean | \"toggle\"`} - \n\n * `inertia` {`boolean`} - \n\n * `interactiveBorder` {`number`} - \n\n * `visibilityManager` - \n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\n * `width` {`string | undefined`} - \n\n * `height` {`string | undefined`} - \n\n * `tooltipInstances` {`Instance<Props>[] | undefined`} - \n\n * `singleInstance` {`Instance<Props> | undefined`} - \n\n * `singletonInstance` {`Instance<Props> | undefined`} - \n\n * `targetEl` {`HTMLElement | null | undefined`} - \n\n * `generatedId` {`string | undefined`} - \n\n * `prevDescribedby` {`string | null | undefined`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
2947
3137
|
"attributes": [
|
|
2948
3138
|
{
|
|
2949
3139
|
"name": "for",
|
|
@@ -3056,28 +3246,28 @@
|
|
|
3056
3246
|
},
|
|
3057
3247
|
{
|
|
3058
3248
|
"name": "followCursor",
|
|
3059
|
-
"description": "`followCursor` {`boolean | \"
|
|
3249
|
+
"description": "`followCursor` {`boolean | \"initial\" | \"horizontal\" | \"vertical\" | \"true\" | \"false\"`} - \n\nProperty: followCursor\n\nDefault: false",
|
|
3060
3250
|
"values": [
|
|
3061
3251
|
{
|
|
3062
|
-
"name": "
|
|
3252
|
+
"name": "initial"
|
|
3063
3253
|
},
|
|
3064
3254
|
{
|
|
3065
|
-
"name": "
|
|
3255
|
+
"name": "horizontal"
|
|
3066
3256
|
},
|
|
3067
3257
|
{
|
|
3068
|
-
"name": "
|
|
3258
|
+
"name": "vertical"
|
|
3069
3259
|
},
|
|
3070
3260
|
{
|
|
3071
|
-
"name": "
|
|
3261
|
+
"name": "true"
|
|
3072
3262
|
},
|
|
3073
3263
|
{
|
|
3074
|
-
"name": "
|
|
3264
|
+
"name": "false"
|
|
3075
3265
|
}
|
|
3076
3266
|
]
|
|
3077
3267
|
},
|
|
3078
3268
|
{
|
|
3079
3269
|
"name": "arrow",
|
|
3080
|
-
"description": "`arrow` {`\"small\" | \"none\" | \"default\" | \"large\" | \"
|
|
3270
|
+
"description": "`arrow` {`\"small\" | \"none\" | \"default\" | \"large\" | \"round\" | \"narrow\" | \"wide\"`} - \n\nProperty: arrow\n\nDefault: default",
|
|
3081
3271
|
"values": [
|
|
3082
3272
|
{
|
|
3083
3273
|
"name": "small"
|
|
@@ -3092,10 +3282,10 @@
|
|
|
3092
3282
|
"name": "large"
|
|
3093
3283
|
},
|
|
3094
3284
|
{
|
|
3095
|
-
"name": "
|
|
3285
|
+
"name": "round"
|
|
3096
3286
|
},
|
|
3097
3287
|
{
|
|
3098
|
-
"name": "
|
|
3288
|
+
"name": "narrow"
|
|
3099
3289
|
},
|
|
3100
3290
|
{
|
|
3101
3291
|
"name": "wide"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register([],function(_export,_context){"use strict";var t;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[],execute:function execute(){_export("A",t=/*#__PURE__*/function(){function t(){_classCallCheck(this,t);}return _createClass(t,null,[{key:"resolveAnchor",value:function resolveAnchor(_t){if(_t instanceof HTMLElement)return _t;if("string"==typeof _t){var e=document.querySelector(_t);if(e)return e;var n=document.getElementById(_t);if(n)return n;}return document.body;}},{key:"appendToAnchor",value:function appendToAnchor(_t2,e){_t2.appendChild(e);}},{key:"removeFromAnchor",value:function removeFromAnchor(_t3){_t3.parentNode&&_t3.parentNode.removeChild(_t3);}}]);}());}};});
|
|
2
|
-
//# sourceMappingURL=anchor-manager.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anchor-manager.cjs.js","sources":["../../../src/nile-floating-panel/anchor-manager.ts"],"sourcesContent":["import type { FloatingPanelAnchor } from './types';\n\nexport class AnchorManager {\n static resolveAnchor(anchor: FloatingPanelAnchor): HTMLElement {\n if (anchor instanceof HTMLElement) {\n return anchor;\n }\n\n if (typeof anchor === 'string') {\n const element = document.querySelector(anchor) as HTMLElement;\n if (element) {\n return element;\n }\n const byId = document.getElementById(anchor);\n if (byId) {\n return byId;\n }\n }\n\n return document.body;\n }\n\n static appendToAnchor(anchor: HTMLElement, panelContainer: HTMLElement): void {\n anchor.appendChild(panelContainer);\n }\n\n static removeFromAnchor(panelContainer: HTMLElement): void {\n if (panelContainer.parentNode) {\n panelContainer.parentNode.removeChild(panelContainer);\n }\n }\n}\n\n"],"names":["AnchorManager","resolveAnchor","anchor","HTMLElement","element","document","querySelector","byId","getElementById","body","key","value","appendToAnchor","panelContainer","appendChild","removeFromAnchor","parentNode","removeChild"],"mappings":"6sCAEaA,CAAAA,kCAAAA,EAAAA,EAAAA,eAAAA,MAAAA,CAAAA,UAAAA,YAAAA,CAAAA,CAAAA,QAAAA,GAAAA,iBAAAA,KAAAA,CACX,QAAOC,CAAAA,aAAAA,CAAcC,EACnB,CAAA,CAAA,GAAIA,aAAkBC,CAAAA,WACpB,CAAA,MAAOD,CAAAA,EAGT,CAAA,GAAsB,QAAXA,EAAAA,MAAAA,CAAAA,EAAAA,CAAqB,CAC9B,GAAME,CAAAA,CAAAA,CAAUC,QAASC,CAAAA,aAAAA,CAAcJ,EACvC,CAAA,CAAA,GAAIE,EACF,MAAOA,CAAAA,CAAAA,CAET,GAAMG,CAAAA,CAAAA,CAAOF,QAASG,CAAAA,cAAAA,CAAeN,IACrC,GAAIK,CAAAA,CACF,MAAOA,CAAAA,CAEV,EAED,MAAOF,CAAAA,SAASI,IACjB,EAED,GAAAC,GAAA,kBAAAC,KAAA,SAAOC,CAAAA,cAAAA,CAAeV,GAAqBW,CAAAA,CAAAA,CAAAA,CACzCX,IAAOY,WAAYD,CAAAA,CAAAA,CACpB,EAED,GAAAH,GAAA,oBAAAC,KAAA,SAAA,CAAAI,gBAAOA,CAAiBF,GAAAA,CAAAA,CAClBA,GAAeG,CAAAA,UAAAA,EACjBH,GAAeG,CAAAA,UAAAA,CAAWC,WAAYJ,CAAAA,GAAAA,CAEzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class t{static resolveAnchor(t){if(t instanceof HTMLElement)return t;if("string"==typeof t){const e=document.querySelector(t);if(e)return e;const n=document.getElementById(t);if(n)return n}return document.body}static appendToAnchor(t,e){t.appendChild(e)}static removeFromAnchor(t){t.parentNode&&t.parentNode.removeChild(t)}}export{t as A};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register([],function(_export,_context){"use strict";var t;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[],execute:function execute(){_export("C",t=/*#__PURE__*/function(){function t(){_classCallCheck(this,t);}return _createClass(t,null,[{key:"updatePanelContent",value:function updatePanelContent(_t,e,n){_t.innerHTML="";var o=e?e.assignedNodes({flatten:!0}):[];o.length>0&&o.some(function(_t2){var _t2$textContent;return _t2.nodeType===Node.TEXT_NODE?""!==((_t2$textContent=_t2.textContent)===null||_t2$textContent===void 0?void 0:_t2$textContent.trim()):_t2 instanceof HTMLElement;})?o.forEach(function(e){if(e.nodeType===Node.TEXT_NODE){var _n=document.createTextNode(e.textContent||"");_t.appendChild(_n);}else e instanceof HTMLElement&&_t.appendChild(e.cloneNode(!0));}):n&&(_t.textContent=n);}},{key:"hasSlotContent",value:function hasSlotContent(_t3){if(!_t3)return!1;var e=_t3.assignedNodes({flatten:!0});return e.length>0&&e.some(function(_t4){var _t4$textContent;return _t4.nodeType===Node.TEXT_NODE?""!==((_t4$textContent=_t4.textContent)===null||_t4$textContent===void 0?void 0:_t4$textContent.trim()):_t4 instanceof HTMLElement;});}},{key:"getSlotContent",value:function getSlotContent(_t5){return _t5?_t5.assignedNodes({flatten:!0}):[];}}]);}());}};});
|
|
2
|
-
//# sourceMappingURL=content-manager.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-manager.cjs.js","sources":["../../../src/nile-floating-panel/content-manager.ts"],"sourcesContent":["import type { FloatingPanelContentConfig } from './types';\n\nexport class ContentManager {\n static updatePanelContent(\n panelContainer: HTMLElement,\n slot: HTMLSlotElement | null,\n dataContent: string\n ): void {\n panelContainer.innerHTML = '';\n\n const slotContent = slot ? slot.assignedNodes({ flatten: true }) : [];\n\n const hasSlotContent = slotContent.length > 0 &&\n slotContent.some(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n return node.textContent?.trim() !== '';\n }\n return node instanceof HTMLElement;\n });\n\n if (hasSlotContent) {\n slotContent.forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n const textNode = document.createTextNode(node.textContent || '');\n panelContainer.appendChild(textNode);\n } else if (node instanceof HTMLElement) {\n panelContainer.appendChild(node.cloneNode(true));\n }\n });\n } else if (dataContent) {\n panelContainer.textContent = dataContent;\n }\n }\n\n static hasSlotContent(slot: HTMLSlotElement | null): boolean {\n if (!slot) {\n return false;\n }\n\n const slotContent = slot.assignedNodes({ flatten: true });\n return slotContent.length > 0 &&\n slotContent.some(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n return node.textContent?.trim() !== '';\n }\n return node instanceof HTMLElement;\n });\n }\n\n static getSlotContent(slot: HTMLSlotElement | null): Node[] {\n return slot ? slot.assignedNodes({ flatten: true }) : [];\n }\n}\n\n"],"names":["ContentManager","updatePanelContent","panelContainer","slot","dataContent","innerHTML","slotContent","assignedNodes","flatten","length","some","node","nodeType","Node","TEXT_NODE","_t2$textContent","textContent","trim","HTMLElement","forEach","textNode","document","createTextNode","appendChild","cloneNode","key","value","hasSlotContent","_t4$textContent","getSlotContent"],"mappings":"6sCAEaA,CAAAA,kCAAAA,EAAAA,EAAAA,eAAAA,MAAAA,CAAAA,UAAAA,YAAAA,CAAAA,CAAAA,QAAAA,GAAAA,sBAAAA,KAAAA,CACX,QAAOC,CAAAA,kBAAAA,CACLC,EACAC,CAAAA,CAAAA,CACAC,GAEAF,EAAeG,CAAAA,SAAAA,CAAY,EAE3B,CAAA,GAAMC,CAAAA,CAAcH,CAAAA,CAAAA,CAAOA,EAAKI,aAAc,CAAA,CAAEC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,EAE5CF,CAAAA,CAAAA,CAAYG,OAAS,CAC1CH,EAAAA,CAAAA,CAAYI,IAAKC,CAAAA,SAAAA,GAAAA,MAAAA,eAAAA,OACXA,CAAAA,GAAKC,CAAAA,QAAAA,GAAaC,KAAKC,SACW,CAAA,EAAA,KAAAC,eAAA,CAA7BJ,GAAKK,CAAAA,WAAAA,UAAAA,eAAAA,iBAALL,eAAAA,CAAkBM,IAEpBN,CAAAA,CAAAA,EAAAA,GAAAA,WAAgBO,CAAAA,eAIzBZ,CAAYa,CAAAA,OAAAA,CAAQR,SAAAA,CAClB,CAAA,CAAA,GAAIA,CAAKC,CAAAA,QAAAA,GAAaC,KAAKC,SAAW,CAAA,CACpC,GAAMM,CAAAA,EAAAA,CAAWC,QAASC,CAAAA,cAAAA,CAAeX,CAAKK,CAAAA,WAAAA,EAAe,EAC7Dd,CAAAA,CAAAA,EAAAA,CAAeqB,WAAYH,CAAAA,EAAAA,CAC5B,EAAUT,IAAAA,CAAAA,CAAAA,WAAgBO,CAAAA,aACzBhB,EAAeqB,CAAAA,WAAAA,CAAYZ,CAAKa,CAAAA,SAAAA,CAAAA,CAAU,CAC3C,CAAA,CAAA,EAAA,CAAA,CAEMpB,IACTF,EAAec,CAAAA,WAAAA,CAAcZ,CAEhC,CAAA,EAED,GAAAqB,GAAA,kBAAAC,KAAA,SAAOC,CAAAA,cAAAA,CAAexB,KACpB,GAAKA,CAAAA,GAAAA,CACH,MAAO,CAAA,CAAA,CAGT,GAAMG,CAAAA,CAAAA,CAAcH,IAAKI,aAAc,CAAA,CAAEC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAClD,MAAOF,CAAAA,CAAAA,CAAYG,OAAS,CAC1BH,EAAAA,CAAAA,CAAYI,IAAKC,CAAAA,SAAAA,GAAAA,MAAAA,eAAAA,OACXA,CAAAA,GAAKC,CAAAA,QAAAA,GAAaC,KAAKC,SACW,CAAA,EAAA,KAAAc,eAAA,CAA7BjB,GAAKK,CAAAA,WAAAA,UAAAA,eAAAA,iBAALL,eAAAA,CAAkBM,IAEpBN,CAAAA,CAAAA,EAAAA,GAAAA,WAAgBO,CAAAA,cAE5B,EAED,GAAAO,GAAA,kBAAAC,KAAA,SAAA,CAAAG,cAAOA,CAAe1B,GAAAA,CAAAA,CACpB,MAAOA,CAAAA,GAAAA,CAAOA,GAAKI,CAAAA,aAAAA,CAAc,CAAEC,OAAAA,CAAAA,CAAS,CAAU,CAAA,CAAA,CAAA,EACvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class t{static updatePanelContent(t,e,n){t.innerHTML="";const o=e?e.assignedNodes({flatten:!0}):[];o.length>0&&o.some((t=>t.nodeType===Node.TEXT_NODE?""!==t.textContent?.trim():t instanceof HTMLElement))?o.forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const n=document.createTextNode(e.textContent||"");t.appendChild(n)}else e instanceof HTMLElement&&t.appendChild(e.cloneNode(!0))})):n&&(t.textContent=n)}static hasSlotContent(t){if(!t)return!1;const e=t.assignedNodes({flatten:!0});return e.length>0&&e.some((t=>t.nodeType===Node.TEXT_NODE?""!==t.textContent?.trim():t instanceof HTMLElement))}static getSlotContent(t){return t?t.assignedNodes({flatten:!0}):[]}}export{t as C};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register([],function(_export,_context){"use strict";var t;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[],execute:function execute(){_export("E",t=/*#__PURE__*/function(){function t(_t){_classCallCheck(this,t);this.panelContainer=null,this.closeOnOutsideClick=!0,this.isOpen=!1,this.boundHandleDocumentClick=null,this.onCloseCallback=null,this.component=_t;}return _createClass(t,[{key:"setupOutsideClickHandler",value:function setupOutsideClickHandler(_t2,s,i,h){this.panelContainer=_t2,this.closeOnOutsideClick=s,this.isOpen=i,this.onCloseCallback=h,this.closeOnOutsideClick&&!this.boundHandleDocumentClick&&(this.boundHandleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("mousedown",this.boundHandleDocumentClick,!0));}},{key:"updateOutsideClickHandler",value:function updateOutsideClickHandler(_t3,s,i){this.panelContainer=_t3,this.closeOnOutsideClick=s,this.isOpen=i,this.cleanupOutsideClickHandler(),i&&s&&_t3&&(this.boundHandleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("mousedown",this.boundHandleDocumentClick,!0));}},{key:"cleanupOutsideClickHandler",value:function cleanupOutsideClickHandler(){this.boundHandleDocumentClick&&(document.removeEventListener("mousedown",this.boundHandleDocumentClick,!0),this.boundHandleDocumentClick=null);}},{key:"handleDocumentClick",value:function handleDocumentClick(_t4){if(!(this.isOpen&&this.closeOnOutsideClick&&this.panelContainer&&this.onCloseCallback))return;var s=_t4.target;this.panelContainer.contains(s)||this.component.contains(s)||this.onCloseCallback();}},{key:"destroy",value:function destroy(){this.cleanupOutsideClickHandler(),this.panelContainer=null,this.onCloseCallback=null;}}]);}());}};});
|
|
2
|
-
//# sourceMappingURL=event-manager.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-manager.cjs.js","sources":["../../../src/nile-floating-panel/event-manager.ts"],"sourcesContent":["export class EventManager {\n private component: HTMLElement;\n private panelContainer: HTMLElement | null = null;\n private closeOnOutsideClick: boolean = true;\n private isOpen: boolean = false;\n private boundHandleDocumentClick: ((event: MouseEvent) => void) | null = null;\n private onCloseCallback: (() => void) | null = null;\n\n constructor(component: HTMLElement) {\n this.component = component;\n }\n\n setupOutsideClickHandler(\n panelContainer: HTMLElement,\n closeOnOutsideClick: boolean,\n isOpen: boolean,\n onClose: () => void\n ): void {\n this.panelContainer = panelContainer;\n this.closeOnOutsideClick = closeOnOutsideClick;\n this.isOpen = isOpen;\n this.onCloseCallback = onClose;\n\n if (!this.closeOnOutsideClick || this.boundHandleDocumentClick) {\n return;\n }\n\n this.boundHandleDocumentClick = this.handleDocumentClick.bind(this);\n document.addEventListener('mousedown', this.boundHandleDocumentClick, true);\n }\n\n updateOutsideClickHandler(\n panelContainer: HTMLElement | null,\n closeOnOutsideClick: boolean,\n isOpen: boolean\n ): void {\n this.panelContainer = panelContainer;\n this.closeOnOutsideClick = closeOnOutsideClick;\n this.isOpen = isOpen;\n\n this.cleanupOutsideClickHandler();\n\n if (isOpen && closeOnOutsideClick && panelContainer) {\n this.boundHandleDocumentClick = this.handleDocumentClick.bind(this);\n document.addEventListener('mousedown', this.boundHandleDocumentClick, true);\n }\n }\n\n cleanupOutsideClickHandler(): void {\n if (this.boundHandleDocumentClick) {\n document.removeEventListener('mousedown', this.boundHandleDocumentClick, true);\n this.boundHandleDocumentClick = null;\n }\n }\n\n private handleDocumentClick(event: MouseEvent): void {\n if (!this.isOpen || !this.closeOnOutsideClick || !this.panelContainer || !this.onCloseCallback) {\n return;\n }\n\n const target = event.target as Node;\n\n if (!this.panelContainer.contains(target) && !this.component.contains(target)) {\n this.onCloseCallback();\n }\n }\n\n destroy(): void {\n this.cleanupOutsideClickHandler();\n this.panelContainer = null;\n this.onCloseCallback = null;\n }\n}\n\n"],"names":["EventManager","t","component","this","panelContainer","closeOnOutsideClick","isOpen","boundHandleDocumentClick","onCloseCallback","_createClass","key","value","setupOutsideClickHandler","onClose","handleDocumentClick","bind","document","addEventListener","updateOutsideClickHandler","cleanupOutsideClickHandler","removeEventListener","event","target","contains","destroy"],"mappings":"6sCAAaA,CAQX,yBAAA,SAAAC,EAAYC,EAAAA,CAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EANJC,KAAcC,cAAuB,CAAA,IAAA,CACrCD,IAAmBE,CAAAA,mBAAAA,CAAAA,CAAY,CAC/BF,CAAAA,IAAAA,CAAMG,MAAY,CAAA,CAAA,CAAA,CAClBH,KAAwBI,wBAAyC,CAAA,IAAA,CACjEJ,IAAeK,CAAAA,eAAAA,CAAwB,IAG7CL,CAAAA,IAAAA,CAAKD,SAAYA,CAAAA,EAClB,EAED,OAAAO,YAAA,CAAAR,CAAA,GAAAS,GAAA,4BAAAC,KAAA,UAAAC,wBAAAA,CACER,GACAC,CAAAA,CAAAA,CACAC,CACAO,CAAAA,CAAAA,CAAAA,CAEAV,IAAKC,CAAAA,cAAAA,CAAiBA,IACtBD,IAAKE,CAAAA,mBAAAA,CAAsBA,CAC3BF,CAAAA,IAAAA,CAAKG,MAASA,CAAAA,CAAAA,CACdH,IAAKK,CAAAA,eAAAA,CAAkBK,EAElBV,IAAKE,CAAAA,mBAAAA,EAAAA,CAAuBF,IAAKI,CAAAA,wBAAAA,GAItCJ,IAAKI,CAAAA,wBAAAA,CAA2BJ,IAAKW,CAAAA,mBAAAA,CAAoBC,KAAKZ,IAC9Da,CAAAA,CAAAA,QAAAA,CAASC,gBAAiB,CAAA,WAAA,CAAad,IAAKI,CAAAA,wBAAAA,CAAAA,CAA0B,CACvE,CAAA,CAAA,EAED,GAAAG,GAAA,6BAAAC,KAAA,UAAAO,yBAAAA,CACEd,GAAAA,CACAC,CACAC,CAAAA,CAAAA,CAAAA,CAEAH,KAAKC,cAAiBA,CAAAA,GAAAA,CACtBD,IAAKE,CAAAA,mBAAAA,CAAsBA,EAC3BF,IAAKG,CAAAA,MAAAA,CAASA,CAEdH,CAAAA,IAAAA,CAAKgB,0BAEDb,CAAAA,CAAAA,CAAAA,CAAAA,EAAUD,CAAuBD,EAAAA,GAAAA,GACnCD,KAAKI,wBAA2BJ,CAAAA,IAAAA,CAAKW,mBAAoBC,CAAAA,IAAAA,CAAKZ,IAC9Da,CAAAA,CAAAA,QAAAA,CAASC,gBAAiB,CAAA,WAAA,CAAad,KAAKI,wBAA0B,CAAA,CAAA,CAAA,CAAA,CAEzE,EAED,GAAAG,GAAA,8BAAAC,KAAA,UAAAQ,0BAAAA,CAAAA,CACMhB,CAAAA,IAAAA,CAAKI,wBACPS,GAAAA,QAAAA,CAASI,oBAAoB,WAAajB,CAAAA,IAAAA,CAAKI,wBAA0B,CAAA,CAAA,CAAA,CAAA,CACzEJ,IAAKI,CAAAA,wBAAAA,CAA2B,IAEnC,CAAA,EAEO,GAAAG,GAAA,uBAAAC,KAAA,UAAAG,mBAAAA,CAAoBO,GAAAA,CAAAA,CAC1B,GAAKlB,EAAAA,IAAAA,CAAKG,MAAWH,EAAAA,IAAAA,CAAKE,mBAAwBF,EAAAA,IAAAA,CAAKC,gBAAmBD,IAAKK,CAAAA,eAAAA,CAAAA,CAC7E,OAGF,GAAMc,CAAAA,CAASD,CAAAA,GAAAA,CAAMC,MAEhBnB,CAAAA,IAAAA,CAAKC,eAAemB,QAASD,CAAAA,CAAAA,CAAAA,EAAYnB,IAAKD,CAAAA,SAAAA,CAAUqB,QAASD,CAAAA,CAAAA,CAAAA,EACpEnB,IAAKK,CAAAA,eAAAA,CAAAA,CAER,EAED,GAAAE,GAAA,WAAAC,KAAA,UAAAa,OAAAA,CAAAA,CAAAA,CACErB,IAAKgB,CAAAA,0BAAAA,CAAAA,CAAAA,CACLhB,KAAKC,cAAiB,CAAA,IAAA,CACtBD,IAAKK,CAAAA,eAAAA,CAAkB,IACxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class t{constructor(t){this.panelContainer=null,this.closeOnOutsideClick=!0,this.isOpen=!1,this.boundHandleDocumentClick=null,this.onCloseCallback=null,this.component=t}setupOutsideClickHandler(t,s,i,h){this.panelContainer=t,this.closeOnOutsideClick=s,this.isOpen=i,this.onCloseCallback=h,this.closeOnOutsideClick&&!this.boundHandleDocumentClick&&(this.boundHandleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("mousedown",this.boundHandleDocumentClick,!0))}updateOutsideClickHandler(t,s,i){this.panelContainer=t,this.closeOnOutsideClick=s,this.isOpen=i,this.cleanupOutsideClickHandler(),i&&s&&t&&(this.boundHandleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("mousedown",this.boundHandleDocumentClick,!0))}cleanupOutsideClickHandler(){this.boundHandleDocumentClick&&(document.removeEventListener("mousedown",this.boundHandleDocumentClick,!0),this.boundHandleDocumentClick=null)}handleDocumentClick(t){if(!(this.isOpen&&this.closeOnOutsideClick&&this.panelContainer&&this.onCloseCallback))return;const s=t.target;this.panelContainer.contains(s)||this.component.contains(s)||this.onCloseCallback()}destroy(){this.cleanupOutsideClickHandler(),this.panelContainer=null,this.onCloseCallback=null}}export{t as E};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register(["../floating-ui.dom-007bbe96.cjs.js"],function(_export,_context){"use strict";var t,s,i,e,h,a;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_floatingUiDom001CjsJs){t=_floatingUiDom001CjsJs.b;s=_floatingUiDom001CjsJs.c;i=_floatingUiDom001CjsJs.o;e=_floatingUiDom001CjsJs.f;h=_floatingUiDom001CjsJs.a;}],execute:function execute(){_export("P",a=/*#__PURE__*/function(){function a(t,s,i){var e=arguments.length>3&&arguments[3]!==undefined?arguments[3]:8;var h=arguments.length>4&&arguments[4]!==undefined?arguments[4]:8;_classCallCheck(this,a);this.cleanup=null,this.referenceElement=t,this.floatingElement=s,this.position=i,this.offsetValue=e,this.shiftPadding=h;}return _createClass(a,[{key:"setupAutoUpdate",value:function setupAutoUpdate(){var _this=this;this.cleanupAutoUpdate(),this.cleanup=t(this.referenceElement,this.floatingElement,function(){_this.reposition();},{ancestorScroll:!0,ancestorResize:!0,elementResize:!0,layoutShift:!0,animationFrame:!1});}},{key:"cleanupAutoUpdate",value:function cleanupAutoUpdate(){this.cleanup&&(this.cleanup(),this.cleanup=null);}},{key:"reposition",value:function reposition(){var _this2=this;var t=this.position;s(this.referenceElement,this.floatingElement,{placement:t,strategy:"fixed",middleware:[i(this.offsetValue),e(),h({padding:this.shiftPadding})]}).then(function(_ref){var t=_ref.x,s=_ref.y,i=_ref.placement;var e=s;i.startsWith("bottom")?e=s+10:i.startsWith("top")&&(e=s-20),Object.assign(_this2.floatingElement.style,{left:"".concat(t,"px"),top:"".concat(e,"px"),position:"fixed"});});}},{key:"updatePosition",value:function updatePosition(t){this.position=t,this.reposition();}},{key:"updateOffset",value:function updateOffset(t){this.offsetValue=t,this.reposition();}},{key:"updateShiftPadding",value:function updateShiftPadding(t){this.shiftPadding=t,this.reposition();}},{key:"destroy",value:function destroy(){this.cleanupAutoUpdate();}}]);}());}};});
|
|
2
|
-
//# sourceMappingURL=position-manager.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"position-manager.cjs.js","sources":["../../../src/nile-floating-panel/position-manager.ts"],"sourcesContent":["import { autoUpdate, computePosition, offset, shift, flip } from '@floating-ui/dom';\nimport type { Placement } from '@floating-ui/dom';\nimport type { FloatingPanelPosition } from './types';\n\nexport class PositionManager {\n private cleanup: (() => void) | null = null;\n private referenceElement: HTMLElement;\n private floatingElement: HTMLElement;\n private position: FloatingPanelPosition;\n private offsetValue: number;\n private shiftPadding: number;\n\n constructor(\n referenceElement: HTMLElement,\n floatingElement: HTMLElement,\n position: FloatingPanelPosition,\n offsetValue: number = 8,\n shiftPadding: number = 8\n ) {\n this.referenceElement = referenceElement;\n this.floatingElement = floatingElement;\n this.position = position;\n this.offsetValue = offsetValue;\n this.shiftPadding = shiftPadding;\n }\n\n setupAutoUpdate(): void {\n this.cleanupAutoUpdate();\n\n this.cleanup = autoUpdate(\n this.referenceElement,\n this.floatingElement,\n () => {\n this.reposition();\n },\n {\n ancestorScroll: true,\n ancestorResize: true,\n elementResize: true,\n layoutShift: true,\n animationFrame: false,\n }\n );\n }\n\n cleanupAutoUpdate(): void {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = null;\n }\n }\n\n reposition(): void {\n const placement: Placement = this.position;\n\n computePosition(this.referenceElement, this.floatingElement, {\n placement,\n strategy: 'fixed',\n middleware: [\n offset(this.offsetValue),\n flip(),\n shift({\n padding: this.shiftPadding,\n }),\n ],\n }).then(({ x, y, placement: finalPlacement }) => {\n let adjustedY = y;\n \n if (finalPlacement.startsWith('bottom')) {\n adjustedY = y + 10;\n } else if (finalPlacement.startsWith('top')) {\n adjustedY = y - 20;\n }\n \n Object.assign(this.floatingElement.style, {\n left: `${x}px`,\n top: `${adjustedY}px`,\n position: 'fixed',\n });\n });\n }\n\n updatePosition(position: FloatingPanelPosition): void {\n this.position = position;\n this.reposition();\n }\n\n updateOffset(offset: number): void {\n this.offsetValue = offset;\n this.reposition();\n }\n\n updateShiftPadding(padding: number): void {\n this.shiftPadding = padding;\n this.reposition();\n }\n\n destroy(): void {\n this.cleanupAutoUpdate();\n }\n}\n\n"],"names":["PositionManager","a","referenceElement","floatingElement","position","offsetValue","shiftPadding","arguments","length","undefined","_classCallCheck","this","cleanup","_createClass","key","value","setupAutoUpdate","cleanupAutoUpdate","autoUpdate","reposition","ancestorScroll","ancestorResize","elementResize","layoutShift","animationFrame","placement","computePosition","strategy","middleware","offset","flip","shift","padding","then","_ref","finalPlacement","x","y","adjustedY","startsWith","Object","assign","style","left","concat","top","updatePosition","updateOffset","updateShiftPadding","destroy"],"mappings":"o6CAIaA,CAQX,yBAAA,SAAAC,EACEC,CAAAA,CACAC,EACAC,CACAC,CACuB,IADvBA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,MAAAA,IAAAA,SAAAA,MAAAA,SAAAA,CAAAA,SAAAA,IAAsB,KACtBC,CAAAA,CAAuB,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAA,CAAA,CAAAG,eAAA,MAAAT,CAAA,EAZjBU,KAAOC,OAAwB,CAAA,IAAA,CAcrCD,IAAKT,CAAAA,gBAAAA,CAAmBA,EACxBS,IAAKR,CAAAA,eAAAA,CAAkBA,CACvBQ,CAAAA,IAAAA,CAAKP,SAAWA,CAChBO,CAAAA,IAAAA,CAAKN,WAAcA,CAAAA,CAAAA,CACnBM,KAAKL,YAAeA,CAAAA,CACrB,EAED,OAAAO,YAAA,CAAAZ,CAAA,GAAAa,GAAA,mBAAAC,KAAA,UAAAC,eAAAA,CAAAA,CAAAA,KAAAA,KAAAA,MACEL,KAAKM,iBAELN,CAAAA,CAAAA,CAAAA,IAAAA,CAAKC,OAAUM,CAAAA,CAAAA,CACbP,KAAKT,gBACLS,CAAAA,IAAAA,CAAKR,eACL,CAAA,UAAA,CACEQ,MAAKQ,UAAY,CAAA,CAAA,EAAA,CAEnB,CACEC,cAAAA,CAAAA,CAAgB,EAChBC,cAAgB,CAAA,CAAA,CAAA,CAChBC,eAAe,CACfC,CAAAA,WAAAA,CAAAA,CAAa,EACbC,cAAgB,CAAA,CAAA,CAAA,CAAA,CAGrB,EAED,GAAAV,GAAA,qBAAAC,KAAA,UAAAE,iBAAAA,CAAAA,EACMN,IAAKC,CAAAA,OAAAA,GACPD,KAAKC,OACLD,CAAAA,CAAAA,CAAAA,IAAAA,CAAKC,QAAU,IAElB,CAAA,EAED,GAAAE,GAAA,cAAAC,KAAA,UAAAI,UAAAA,CAAAA,CAAAA,KAAAA,MAAAA,MACE,GAAMM,CAAAA,CAAuBd,CAAAA,IAAAA,CAAKP,SAElCsB,CAAgBf,CAAAA,IAAAA,CAAKT,iBAAkBS,IAAKR,CAAAA,eAAAA,CAAiB,CAC3DsB,SAAAA,CAAAA,CAAAA,CACAE,SAAU,OACVC,CAAAA,UAAAA,CAAY,CACVC,CAAAA,CAAOlB,KAAKN,WACZyB,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CACAC,CAAM,CAAA,CACJC,QAASrB,IAAKL,CAAAA,YAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAGjB2B,KAAK,SAAAC,IAAA,CAAoBC,IAAjBC,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,QAAGC,EAAcF,CAAAA,CAAAA,IAAAA,CAAXV,SAAWU,CAC1B,GAAIG,CAAAA,CAAAA,CAAYD,EAEZF,CAAeI,CAAAA,UAAAA,CAAW,QAC5BD,CAAAA,CAAAA,CAAAA,CAAYD,EAAI,EACPF,CAAAA,CAAAA,CAAeI,UAAW,CAAA,KAAA,CAAA,GACnCD,EAAYD,CAAI,CAAA,EAAA,CAAA,CAGlBG,OAAOC,MAAO9B,CAAAA,MAAAA,CAAKR,gBAAgBuC,KAAO,CAAA,CACxCC,IAAM,IAAAC,MAAA,CAAGR,QACTS,GAAK,IAAAD,MAAA,CAAGN,CACRlC,MAAAA,CAAAA,QAAAA,CAAU,SACV,EAEL,CAAA,EAED,GAAAU,GAAA,kBAAAC,KAAA,UAAA+B,cAAAA,CAAe1C,GACbO,IAAKP,CAAAA,QAAAA,CAAWA,EAChBO,IAAKQ,CAAAA,UAAAA,CAAAA,CACN,EAED,GAAAL,GAAA,gBAAAC,KAAA,UAAAgC,YAAAA,CAAalB,CACXlB,CAAAA,CAAAA,IAAAA,CAAKN,YAAcwB,CACnBlB,CAAAA,IAAAA,CAAKQ,YACN,EAED,GAAAL,GAAA,sBAAAC,KAAA,UAAAiC,kBAAAA,CAAmBhB,CACjBrB,CAAAA,CAAAA,IAAAA,CAAKL,YAAe0B,CAAAA,CAAAA,CACpBrB,KAAKQ,UACN,CAAA,CAAA,EAED,GAAAL,GAAA,WAAAC,KAAA,UAAAkC,OAAAA,CAAAA,CACEtC,CAAAA,IAAAA,CAAKM,mBACN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as t,c as s,o as i,f as e,a as h}from"../floating-ui.dom-cc9126da.esm.js";class a{constructor(t,s,i,e=8,h=8){this.cleanup=null,this.referenceElement=t,this.floatingElement=s,this.position=i,this.offsetValue=e,this.shiftPadding=h}setupAutoUpdate(){this.cleanupAutoUpdate(),this.cleanup=t(this.referenceElement,this.floatingElement,(()=>{this.reposition()}),{ancestorScroll:!0,ancestorResize:!0,elementResize:!0,layoutShift:!0,animationFrame:!1})}cleanupAutoUpdate(){this.cleanup&&(this.cleanup(),this.cleanup=null)}reposition(){const t=this.position;s(this.referenceElement,this.floatingElement,{placement:t,strategy:"fixed",middleware:[i(this.offsetValue),e(),h({padding:this.shiftPadding})]}).then((({x:t,y:s,placement:i})=>{let e=s;i.startsWith("bottom")?e=s+10:i.startsWith("top")&&(e=s-20),Object.assign(this.floatingElement.style,{left:`${t}px`,top:`${e}px`,position:"fixed"})}))}updatePosition(t){this.position=t,this.reposition()}updateOffset(t){this.offsetValue=t,this.reposition()}updateShiftPadding(t){this.shiftPadding=t,this.reposition()}destroy(){this.cleanupAutoUpdate()}}export{a as P};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register(["./nile-floating-panel.css.cjs.js","lit"],function(_export,_context){"use strict";var t,e;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_nileFloatingPanelCssCjsJs){t=_nileFloatingPanelCssCjsJs.p;},function(_lit){}],execute:function execute(){_export("S",e=/*#__PURE__*/function(){function e(){_classCallCheck(this,e);this.injectedStyleId=null;}return _createClass(e,[{key:"injectStyles",value:function injectStyles(t){var s="nile-floating-panel-styles-global";if(e.injectedStyleIds.has(s))return;if(this.injectedStyleId&&document.getElementById(this.injectedStyleId))return;this.injectedStyleId=s,e.injectedStyleIds.add(s);var n=this.extractCSSFromStyles(t),l=document.createElement("style");l.id=s,l.textContent=n,document.head.appendChild(l);}},{key:"extractCSSFromStyles",value:function extractCSSFromStyles(_e){return(t.cssText||"")+"\n"+_e.map(function(t){return"string"==typeof t?t:t&&"cssText"in t?t.cssText:"";}).join("\n");}},{key:"cleanupStyles",value:function cleanupStyles(){}},{key:"getInjectedStyleId",value:function getInjectedStyleId(){return this.injectedStyleId;}}]);}());e.injectedStyleIds=new Set();}};});
|
|
2
|
-
//# sourceMappingURL=style-manager.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style-manager.cjs.js","sources":["../../../src/nile-floating-panel/style-manager.ts"],"sourcesContent":["import type { CSSResultArray } from 'lit';\nimport { panelContainerStyles } from './nile-floating-panel.css';\n\nexport class StyleManager {\n private injectedStyleId: string | null = null;\n private static injectedStyleIds: Set<string> = new Set();\n\n injectStyles(componentStyles: CSSResultArray): void {\n const globalStyleId = 'nile-floating-panel-styles-global';\n if (StyleManager.injectedStyleIds.has(globalStyleId)) {\n return;\n }\n\n if (this.injectedStyleId && document.getElementById(this.injectedStyleId)) {\n return;\n }\n\n this.injectedStyleId = globalStyleId;\n StyleManager.injectedStyleIds.add(globalStyleId);\n\n const cssText = this.extractCSSFromStyles(componentStyles);\n\n const styleElement = document.createElement('style');\n styleElement.id = globalStyleId;\n styleElement.textContent = cssText;\n document.head.appendChild(styleElement);\n }\n\n private extractCSSFromStyles(styles: CSSResultArray): string {\n const containerStyles = panelContainerStyles.cssText || '';\n\n const componentStyles = styles\n .map(style => {\n if (typeof style === 'string') {\n return style;\n }\n if (style && 'cssText' in style) {\n return (style as any).cssText;\n }\n return '';\n })\n .join('\\n');\n\n return containerStyles + '\\n' + componentStyles;\n }\n\n cleanupStyles(): void {\n }\n\n getInjectedStyleId(): string | null {\n return this.injectedStyleId;\n }\n}\n\n"],"names":["StyleManager","e","this","injectedStyleId","_createClass","key","value","injectStyles","componentStyles","globalStyleId","injectedStyleIds","has","document","getElementById","add","cssText","extractCSSFromStyles","styleElement","createElement","id","textContent","head","appendChild","styles","panelContainerStyles","map","style","join","cleanupStyles","getInjectedStyleId","Set"],"mappings":"60CAGaA,CAAAA,yBAAb,SAAAC,EAAA,CACUC,CAAAA,eAAAA,MAAAA,CAAAA,EAAAA,IAAAA,CAAeC,gBAAkB,IAgD1C,EA7CC,OAAAC,YAAA,CAAAH,CAAA,GAAAI,GAAA,gBAAAC,KAAA,UAAAC,YAAAA,CAAaC,CAAAA,CAAAA,CACX,GAAMC,CAAAA,CAAgB,CAAA,mCAAA,CACtB,GAAIT,CAAaU,CAAAA,gBAAAA,CAAiBC,IAAIF,CACpC,CAAA,CAAA,OAGF,GAAIP,IAAKC,CAAAA,eAAAA,EAAmBS,SAASC,cAAeX,CAAAA,IAAAA,CAAKC,iBACvD,OAGFD,IAAAA,CAAKC,gBAAkBM,CACvBT,CAAAA,CAAAA,CAAaU,iBAAiBI,GAAIL,CAAAA,CAAAA,CAAAA,CAElC,GAAMM,CAAAA,CAAUb,CAAAA,IAAAA,CAAKc,qBAAqBR,CAEpCS,CAAAA,CAAAA,CAAAA,CAAeL,SAASM,aAAc,CAAA,OAAA,CAAA,CAC5CD,EAAaE,EAAKV,CAAAA,CAAAA,CAClBQ,EAAaG,WAAcL,CAAAA,CAAAA,CAC3BH,SAASS,IAAKC,CAAAA,WAAAA,CAAYL,EAC3B,EAEO,GAAAZ,GAAA,wBAAAC,KAAA,UAAAU,oBAAAA,CAAqBO,EAe3B,CAAA,CAAA,MAAA,CAdwBC,EAAqBT,OAAW,EAAA,EAAA,EAc/B,KAZDQ,EACrBE,CAAAA,GAAAA,CAAIC,SAAAA,SACkB,QAAVA,EAAAA,MAAAA,CAAAA,CAAAA,CACFA,EAELA,CAAS,EAAA,SAAA,EAAaA,CAAAA,EAChBA,CAAcX,CAAAA,OAAAA,CAEjB,MAERY,IAAK,CAAA,IAAA,CAGT,EAED,GAAAtB,GAAA,iBAAAC,KAAA,UAAAsB,aAAAA,CAAAA,CAAAA,CACC,CAED,GAAAvB,GAAA,sBAAAC,KAAA,UAAAuB,kBAAAA,CAAAA,CAAAA,CACE,MAAO3B,KAAKC,CAAAA,eACb,WA9CcH,CAAAU,CAAAA,gBAAAA,CAAgC,GAAIoB,CAAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t}from"./nile-floating-panel.css.esm.js";import"lit";class e{constructor(){this.injectedStyleId=null}injectStyles(t){const s="nile-floating-panel-styles-global";if(e.injectedStyleIds.has(s))return;if(this.injectedStyleId&&document.getElementById(this.injectedStyleId))return;this.injectedStyleId=s,e.injectedStyleIds.add(s);const n=this.extractCSSFromStyles(t),l=document.createElement("style");l.id=s,l.textContent=n,document.head.appendChild(l)}extractCSSFromStyles(e){return(t.cssText||"")+"\n"+e.map((t=>"string"==typeof t?t:t&&"cssText"in t?t.cssText:"")).join("\n")}cleanupStyles(){}getInjectedStyleId(){return this.injectedStyleId}}e.injectedStyleIds=new Set;export{e as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { FloatingPanelAnchor } from './types';
|
|
2
|
-
export declare class AnchorManager {
|
|
3
|
-
static resolveAnchor(anchor: FloatingPanelAnchor): HTMLElement;
|
|
4
|
-
static appendToAnchor(anchor: HTMLElement, panelContainer: HTMLElement): void;
|
|
5
|
-
static removeFromAnchor(panelContainer: HTMLElement): void;
|
|
6
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export class AnchorManager {
|
|
2
|
-
static resolveAnchor(anchor) {
|
|
3
|
-
if (anchor instanceof HTMLElement) {
|
|
4
|
-
return anchor;
|
|
5
|
-
}
|
|
6
|
-
if (typeof anchor === 'string') {
|
|
7
|
-
const element = document.querySelector(anchor);
|
|
8
|
-
if (element) {
|
|
9
|
-
return element;
|
|
10
|
-
}
|
|
11
|
-
const byId = document.getElementById(anchor);
|
|
12
|
-
if (byId) {
|
|
13
|
-
return byId;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return document.body;
|
|
17
|
-
}
|
|
18
|
-
static appendToAnchor(anchor, panelContainer) {
|
|
19
|
-
anchor.appendChild(panelContainer);
|
|
20
|
-
}
|
|
21
|
-
static removeFromAnchor(panelContainer) {
|
|
22
|
-
if (panelContainer.parentNode) {
|
|
23
|
-
panelContainer.parentNode.removeChild(panelContainer);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=anchor-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anchor-manager.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/anchor-manager.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,aAAa;IACxB,MAAM,CAAC,aAAa,CAAC,MAA2B;QAC9C,IAAI,MAAM,YAAY,WAAW,EAAE,CAAC;YAClC,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAgB,CAAC;YAC9D,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,OAAO,CAAC;YACjB,CAAC;YACD,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAC7C,IAAI,IAAI,EAAE,CAAC;gBACT,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAmB,EAAE,cAA2B;QACpE,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,cAA2B;QACjD,IAAI,cAAc,CAAC,UAAU,EAAE,CAAC;YAC9B,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;CACF","sourcesContent":["import type { FloatingPanelAnchor } from './types';\n\nexport class AnchorManager {\n static resolveAnchor(anchor: FloatingPanelAnchor): HTMLElement {\n if (anchor instanceof HTMLElement) {\n return anchor;\n }\n\n if (typeof anchor === 'string') {\n const element = document.querySelector(anchor) as HTMLElement;\n if (element) {\n return element;\n }\n const byId = document.getElementById(anchor);\n if (byId) {\n return byId;\n }\n }\n\n return document.body;\n }\n\n static appendToAnchor(anchor: HTMLElement, panelContainer: HTMLElement): void {\n anchor.appendChild(panelContainer);\n }\n\n static removeFromAnchor(panelContainer: HTMLElement): void {\n if (panelContainer.parentNode) {\n panelContainer.parentNode.removeChild(panelContainer);\n }\n }\n}\n\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare class ContentManager {
|
|
2
|
-
static updatePanelContent(panelContainer: HTMLElement, slot: HTMLSlotElement | null, dataContent: string): void;
|
|
3
|
-
static hasSlotContent(slot: HTMLSlotElement | null): boolean;
|
|
4
|
-
static getSlotContent(slot: HTMLSlotElement | null): Node[];
|
|
5
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export class ContentManager {
|
|
2
|
-
static updatePanelContent(panelContainer, slot, dataContent) {
|
|
3
|
-
panelContainer.innerHTML = '';
|
|
4
|
-
const slotContent = slot ? slot.assignedNodes({ flatten: true }) : [];
|
|
5
|
-
const hasSlotContent = slotContent.length > 0 &&
|
|
6
|
-
slotContent.some(node => {
|
|
7
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
8
|
-
return node.textContent?.trim() !== '';
|
|
9
|
-
}
|
|
10
|
-
return node instanceof HTMLElement;
|
|
11
|
-
});
|
|
12
|
-
if (hasSlotContent) {
|
|
13
|
-
slotContent.forEach(node => {
|
|
14
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
15
|
-
const textNode = document.createTextNode(node.textContent || '');
|
|
16
|
-
panelContainer.appendChild(textNode);
|
|
17
|
-
}
|
|
18
|
-
else if (node instanceof HTMLElement) {
|
|
19
|
-
panelContainer.appendChild(node.cloneNode(true));
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
else if (dataContent) {
|
|
24
|
-
panelContainer.textContent = dataContent;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
static hasSlotContent(slot) {
|
|
28
|
-
if (!slot) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
const slotContent = slot.assignedNodes({ flatten: true });
|
|
32
|
-
return slotContent.length > 0 &&
|
|
33
|
-
slotContent.some(node => {
|
|
34
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
35
|
-
return node.textContent?.trim() !== '';
|
|
36
|
-
}
|
|
37
|
-
return node instanceof HTMLElement;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
static getSlotContent(slot) {
|
|
41
|
-
return slot ? slot.assignedNodes({ flatten: true }) : [];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=content-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-manager.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/content-manager.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,cAAc;IACzB,MAAM,CAAC,kBAAkB,CACvB,cAA2B,EAC3B,IAA4B,EAC5B,WAAmB;QAEnB,cAAc,CAAC,SAAS,GAAG,EAAE,CAAC;QAE9B,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAEtE,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC;YAC3C,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACtB,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;oBACrC,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gBACzC,CAAC;gBACD,OAAO,IAAI,YAAY,WAAW,CAAC;YACrC,CAAC,CAAC,CAAC;QAEL,IAAI,cAAc,EAAE,CAAC;YACnB,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACzB,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;oBACrC,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;oBACjE,cAAc,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;gBACvC,CAAC;qBAAM,IAAI,IAAI,YAAY,WAAW,EAAE,CAAC;oBACvC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;gBACnD,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,IAAI,WAAW,EAAE,CAAC;YACvB,cAAc,CAAC,WAAW,GAAG,WAAW,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,IAA4B;QAChD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,OAAO,WAAW,CAAC,MAAM,GAAG,CAAC;YAC3B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACtB,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;oBACrC,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gBACzC,CAAC;gBACD,OAAO,IAAI,YAAY,WAAW,CAAC;YACrC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,IAA4B;QAChD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,CAAC;CACF","sourcesContent":["import type { FloatingPanelContentConfig } from './types';\n\nexport class ContentManager {\n static updatePanelContent(\n panelContainer: HTMLElement,\n slot: HTMLSlotElement | null,\n dataContent: string\n ): void {\n panelContainer.innerHTML = '';\n\n const slotContent = slot ? slot.assignedNodes({ flatten: true }) : [];\n\n const hasSlotContent = slotContent.length > 0 &&\n slotContent.some(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n return node.textContent?.trim() !== '';\n }\n return node instanceof HTMLElement;\n });\n\n if (hasSlotContent) {\n slotContent.forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n const textNode = document.createTextNode(node.textContent || '');\n panelContainer.appendChild(textNode);\n } else if (node instanceof HTMLElement) {\n panelContainer.appendChild(node.cloneNode(true));\n }\n });\n } else if (dataContent) {\n panelContainer.textContent = dataContent;\n }\n }\n\n static hasSlotContent(slot: HTMLSlotElement | null): boolean {\n if (!slot) {\n return false;\n }\n\n const slotContent = slot.assignedNodes({ flatten: true });\n return slotContent.length > 0 &&\n slotContent.some(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n return node.textContent?.trim() !== '';\n }\n return node instanceof HTMLElement;\n });\n }\n\n static getSlotContent(slot: HTMLSlotElement | null): Node[] {\n return slot ? slot.assignedNodes({ flatten: true }) : [];\n }\n}\n\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare class EventManager {
|
|
2
|
-
private component;
|
|
3
|
-
private panelContainer;
|
|
4
|
-
private closeOnOutsideClick;
|
|
5
|
-
private isOpen;
|
|
6
|
-
private boundHandleDocumentClick;
|
|
7
|
-
private onCloseCallback;
|
|
8
|
-
constructor(component: HTMLElement);
|
|
9
|
-
setupOutsideClickHandler(panelContainer: HTMLElement, closeOnOutsideClick: boolean, isOpen: boolean, onClose: () => void): void;
|
|
10
|
-
updateOutsideClickHandler(panelContainer: HTMLElement | null, closeOnOutsideClick: boolean, isOpen: boolean): void;
|
|
11
|
-
cleanupOutsideClickHandler(): void;
|
|
12
|
-
private handleDocumentClick;
|
|
13
|
-
destroy(): void;
|
|
14
|
-
}
|