hermium 0.1.10 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.md +56 -0
  2. package/bin/hermium.mjs +185 -164
  3. package/dist/api.mjs +3513 -0
  4. package/dist/public/assets/css/index-Dfs9RUU9.css +1 -0
  5. package/dist/public/assets/css/styles-B8p6jk5Z.css +1 -0
  6. package/dist/public/assets/js/ChatInputBlock-Bw7AL70H.js +1 -0
  7. package/dist/public/assets/js/MarkdownMessage-8d7Y6VL-.js +1 -0
  8. package/dist/public/assets/js/base-ui-BvQbAt_1.js +1 -0
  9. package/dist/public/assets/js/chat._sessionId-BG6lVraH.js +1 -0
  10. package/dist/public/assets/js/chat.index-D2zdMPTT.js +1 -0
  11. package/dist/public/assets/js/index-C0AK45FU.js +60 -0
  12. package/dist/public/assets/js/index-Cx5En4FK.js +1 -0
  13. package/dist/public/assets/js/memory-CeSRdTkW.js +3 -0
  14. package/dist/public/assets/js/router-8uDKazL-.js +1 -0
  15. package/dist/public/assets/js/settings-Bc3Y5zXO.js +1 -0
  16. package/dist/public/assets/js/skills-DZv7sA_5.js +1 -0
  17. package/dist/public/assets/js/theme-CPkdkpaj.js +1 -0
  18. package/dist/public/assets/js/usage-DXQsT9_b.js +1 -0
  19. package/dist/public/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  20. package/dist/public/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  21. package/dist/public/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  22. package/dist/public/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  23. package/dist/public/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  24. package/dist/public/favicon.ico +0 -0
  25. package/dist/public/logo.png +0 -0
  26. package/package.json +1 -1
  27. package/dist/public/assets/IconAlertCircle-BW147gsG.js +0 -1
  28. package/dist/public/assets/IconAlertTriangle-DCoTLVSd.js +0 -1
  29. package/dist/public/assets/IconCheck-DAO7Fpl9.js +0 -1
  30. package/dist/public/assets/IconCode-BqfTl5wU.js +0 -1
  31. package/dist/public/assets/IconLoader2-B_pehSXN.js +0 -1
  32. package/dist/public/assets/IconRefresh-BbMGoMV8.js +0 -1
  33. package/dist/public/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
  34. package/dist/public/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
  35. package/dist/public/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
  36. package/dist/public/assets/index-BL9a2Xg9.js +0 -1
  37. package/dist/public/assets/index-BSwXjgjr.js +0 -1
  38. package/dist/public/assets/index-BWl8tn18.js +0 -1
  39. package/dist/public/assets/index-CQh8SXb2.js +0 -94
  40. package/dist/public/assets/index-Cxd-kSUY.js +0 -1
  41. package/dist/public/assets/index-DA5SH--7.js +0 -2
  42. package/dist/public/assets/index-DCHbvtBS.js +0 -1
  43. package/dist/public/assets/index-DCYXJZEe.js +0 -1
  44. package/dist/public/assets/index-DFDfp0ca.js +0 -1
  45. package/dist/public/assets/index-GuAAqSCJ.js +0 -14
  46. package/dist/public/assets/index-WIDirTHx.js +0 -29
  47. package/dist/public/assets/index-X3XZcAzy.js +0 -1
  48. package/dist/public/assets/input-7TQEEJq6.js +0 -1
  49. package/dist/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  50. package/dist/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  51. package/dist/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  52. package/dist/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  53. package/dist/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  54. package/dist/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  55. package/dist/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  56. package/dist/public/assets/models-BlUb1eaf.js +0 -1
  57. package/dist/public/assets/styles-PHtUFHUr.css +0 -1
  58. package/dist/public/assets/switch-B_iYUUM3.js +0 -1
  59. package/dist/public/assets/syntax-highlighter-DcBYfnEK.js +0 -6
  60. package/dist/public/assets/textarea-Dm4aaRqS.js +0 -1
  61. package/dist/public/favicon.png +0 -0
  62. package/dist/public/nous-logo.png +0 -0
  63. package/dist/server/index.mjs +0 -244
  64. package/dist/web-server/__23tanstack-start-plugin-adapters-Cwee5PKy.mjs +0 -6
  65. package/dist/web-server/_chunks/ssr-renderer.mjs +0 -22
  66. package/dist/web-server/_libs/babel__runtime.mjs +0 -237
  67. package/dist/web-server/_libs/bail.mjs +0 -8
  68. package/dist/web-server/_libs/base-ui__react.mjs +0 -9554
  69. package/dist/web-server/_libs/base-ui__utils.mjs +0 -1101
  70. package/dist/web-server/_libs/ccount.mjs +0 -16
  71. package/dist/web-server/_libs/character-entities-legacy.mjs +0 -111
  72. package/dist/web-server/_libs/character-entities.mjs +0 -2130
  73. package/dist/web-server/_libs/character-reference-invalid.mjs +0 -33
  74. package/dist/web-server/_libs/class-variance-authority.mjs +0 -44
  75. package/dist/web-server/_libs/clsx.mjs +0 -16
  76. package/dist/web-server/_libs/comma-separated-tokens.mjs +0 -31
  77. package/dist/web-server/_libs/cookie-es.mjs +0 -44
  78. package/dist/web-server/_libs/croner.mjs +0 -1
  79. package/dist/web-server/_libs/crossws.mjs +0 -1
  80. package/dist/web-server/_libs/decode-named-character-reference+[...].mjs +0 -8
  81. package/dist/web-server/_libs/devlop.mjs +0 -8
  82. package/dist/web-server/_libs/escape-string-regexp.mjs +0 -9
  83. package/dist/web-server/_libs/estree-util-is-identifier-name.mjs +0 -11
  84. package/dist/web-server/_libs/extend.mjs +0 -97
  85. package/dist/web-server/_libs/fault.mjs +0 -1
  86. package/dist/web-server/_libs/floating-ui__core.mjs +0 -663
  87. package/dist/web-server/_libs/floating-ui__dom.mjs +0 -624
  88. package/dist/web-server/_libs/floating-ui__react-dom.mjs +0 -279
  89. package/dist/web-server/_libs/floating-ui__utils.mjs +0 -322
  90. package/dist/web-server/_libs/format.mjs +0 -1
  91. package/dist/web-server/_libs/h3.mjs +0 -408
  92. package/dist/web-server/_libs/hast-util-parse-selector.mjs +0 -39
  93. package/dist/web-server/_libs/hast-util-to-jsx-runtime.mjs +0 -388
  94. package/dist/web-server/_libs/hast-util-whitespace.mjs +0 -10
  95. package/dist/web-server/_libs/hastscript.mjs +0 -200
  96. package/dist/web-server/_libs/highlight.js.mjs +0 -1
  97. package/dist/web-server/_libs/hookable.mjs +0 -1
  98. package/dist/web-server/_libs/html-url-attributes.mjs +0 -26
  99. package/dist/web-server/_libs/inline-style-parser.mjs +0 -142
  100. package/dist/web-server/_libs/is-alphabetical.mjs +0 -7
  101. package/dist/web-server/_libs/is-alphanumerical.mjs +0 -8
  102. package/dist/web-server/_libs/is-decimal.mjs +0 -7
  103. package/dist/web-server/_libs/is-hexadecimal.mjs +0 -7
  104. package/dist/web-server/_libs/is-plain-obj.mjs +0 -10
  105. package/dist/web-server/_libs/isbot.mjs +0 -21
  106. package/dist/web-server/_libs/longest-streak.mjs +0 -25
  107. package/dist/web-server/_libs/lowlight.mjs +0 -1
  108. package/dist/web-server/_libs/markdown-table.mjs +0 -142
  109. package/dist/web-server/_libs/mdast-util-find-and-replace.mjs +0 -109
  110. package/dist/web-server/_libs/mdast-util-from-markdown.mjs +0 -717
  111. package/dist/web-server/_libs/mdast-util-gfm-autolink-literal+[...].mjs +0 -156
  112. package/dist/web-server/_libs/mdast-util-gfm-footnote.mjs +0 -117
  113. package/dist/web-server/_libs/mdast-util-gfm-strikethrough.mjs +0 -54
  114. package/dist/web-server/_libs/mdast-util-gfm-table.mjs +0 -157
  115. package/dist/web-server/_libs/mdast-util-gfm-task-list-item.mjs +0 -77
  116. package/dist/web-server/_libs/mdast-util-gfm.mjs +0 -29
  117. package/dist/web-server/_libs/mdast-util-phrasing.mjs +0 -30
  118. package/dist/web-server/_libs/mdast-util-to-hast.mjs +0 -710
  119. package/dist/web-server/_libs/mdast-util-to-markdown.mjs +0 -798
  120. package/dist/web-server/_libs/mdast-util-to-string.mjs +0 -38
  121. package/dist/web-server/_libs/micromark-core-commonmark.mjs +0 -2259
  122. package/dist/web-server/_libs/micromark-extension-gfm-autolink-literal+[...].mjs +0 -344
  123. package/dist/web-server/_libs/micromark-extension-gfm-footnote+[...].mjs +0 -279
  124. package/dist/web-server/_libs/micromark-extension-gfm-strikethrough+[...].mjs +0 -98
  125. package/dist/web-server/_libs/micromark-extension-gfm-table.mjs +0 -491
  126. package/dist/web-server/_libs/micromark-extension-gfm-tagfilter+[...].mjs +0 -1
  127. package/dist/web-server/_libs/micromark-extension-gfm-task-list-item+[...].mjs +0 -77
  128. package/dist/web-server/_libs/micromark-extension-gfm.mjs +0 -18
  129. package/dist/web-server/_libs/micromark-factory-destination.mjs +0 -94
  130. package/dist/web-server/_libs/micromark-factory-label.mjs +0 -63
  131. package/dist/web-server/_libs/micromark-factory-space.mjs +0 -24
  132. package/dist/web-server/_libs/micromark-factory-title.mjs +0 -65
  133. package/dist/web-server/_libs/micromark-factory-whitespace.mjs +0 -22
  134. package/dist/web-server/_libs/micromark-util-character.mjs +0 -44
  135. package/dist/web-server/_libs/micromark-util-chunked.mjs +0 -36
  136. package/dist/web-server/_libs/micromark-util-classify-character+[...].mjs +0 -12
  137. package/dist/web-server/_libs/micromark-util-combine-extensions+[...].mjs +0 -41
  138. package/dist/web-server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +0 -19
  139. package/dist/web-server/_libs/micromark-util-decode-string.mjs +0 -21
  140. package/dist/web-server/_libs/micromark-util-encode.mjs +0 -1
  141. package/dist/web-server/_libs/micromark-util-html-tag-name.mjs +0 -69
  142. package/dist/web-server/_libs/micromark-util-normalize-identifier+[...].mjs +0 -6
  143. package/dist/web-server/_libs/micromark-util-resolve-all.mjs +0 -15
  144. package/dist/web-server/_libs/micromark-util-sanitize-uri.mjs +0 -41
  145. package/dist/web-server/_libs/micromark-util-subtokenize.mjs +0 -346
  146. package/dist/web-server/_libs/micromark.mjs +0 -906
  147. package/dist/web-server/_libs/ocache.mjs +0 -1
  148. package/dist/web-server/_libs/ohash.mjs +0 -1
  149. package/dist/web-server/_libs/parse-entities.mjs +0 -245
  150. package/dist/web-server/_libs/property-information.mjs +0 -1210
  151. package/dist/web-server/_libs/react-dom.mjs +0 -10779
  152. package/dist/web-server/_libs/react-markdown.mjs +0 -147
  153. package/dist/web-server/_libs/react-syntax-highlighter.mjs +0 -941
  154. package/dist/web-server/_libs/react.mjs +0 -513
  155. package/dist/web-server/_libs/refractor.mjs +0 -2425
  156. package/dist/web-server/_libs/remark-gfm.mjs +0 -20
  157. package/dist/web-server/_libs/remark-parse.mjs +0 -19
  158. package/dist/web-server/_libs/remark-rehype.mjs +0 -21
  159. package/dist/web-server/_libs/reselect.mjs +0 -1
  160. package/dist/web-server/_libs/rou3.mjs +0 -8
  161. package/dist/web-server/_libs/seroval-plugins.mjs +0 -58
  162. package/dist/web-server/_libs/seroval.mjs +0 -1775
  163. package/dist/web-server/_libs/space-separated-tokens.mjs +0 -11
  164. package/dist/web-server/_libs/srvx.mjs +0 -781
  165. package/dist/web-server/_libs/style-to-js.mjs +0 -72
  166. package/dist/web-server/_libs/style-to-object.mjs +0 -38
  167. package/dist/web-server/_libs/tabler__icons-react.mjs +0 -233
  168. package/dist/web-server/_libs/tanstack__history.mjs +0 -204
  169. package/dist/web-server/_libs/tanstack__query-core.mjs +0 -2552
  170. package/dist/web-server/_libs/tanstack__react-query.mjs +0 -190
  171. package/dist/web-server/_libs/tanstack__react-router.mjs +0 -1120
  172. package/dist/web-server/_libs/tanstack__react-store.mjs +0 -2
  173. package/dist/web-server/_libs/tanstack__router-core.mjs +0 -4288
  174. package/dist/web-server/_libs/tanstack__store.mjs +0 -1
  175. package/dist/web-server/_libs/trim-lines.mjs +0 -41
  176. package/dist/web-server/_libs/trough.mjs +0 -85
  177. package/dist/web-server/_libs/ufo.mjs +0 -54
  178. package/dist/web-server/_libs/unctx.mjs +0 -1
  179. package/dist/web-server/_libs/ungap__structured-clone.mjs +0 -224
  180. package/dist/web-server/_libs/unified.mjs +0 -661
  181. package/dist/web-server/_libs/unist-util-is.mjs +0 -100
  182. package/dist/web-server/_libs/unist-util-position.mjs +0 -27
  183. package/dist/web-server/_libs/unist-util-stringify-position.mjs +0 -27
  184. package/dist/web-server/_libs/unist-util-visit-parents.mjs +0 -83
  185. package/dist/web-server/_libs/unist-util-visit.mjs +0 -24
  186. package/dist/web-server/_libs/unstorage.mjs +0 -1
  187. package/dist/web-server/_libs/use-sync-external-store.mjs +0 -139
  188. package/dist/web-server/_libs/vfile-message.mjs +0 -138
  189. package/dist/web-server/_libs/vfile.mjs +0 -467
  190. package/dist/web-server/_libs/zod.mjs +0 -3915
  191. package/dist/web-server/_libs/zustand.mjs +0 -343
  192. package/dist/web-server/_libs/zwitch.mjs +0 -1
  193. package/dist/web-server/_ssr/index--Bo2_ipW.mjs +0 -277
  194. package/dist/web-server/_ssr/index-BEvygh5x.mjs +0 -612
  195. package/dist/web-server/_ssr/index-BFaKxYfN.mjs +0 -40
  196. package/dist/web-server/_ssr/index-BdrMzRTd.mjs +0 -513
  197. package/dist/web-server/_ssr/index-CoDfv1vI.mjs +0 -66
  198. package/dist/web-server/_ssr/index-Cwp8Gyl1.mjs +0 -1812
  199. package/dist/web-server/_ssr/index-DQsfKYjV.mjs +0 -449
  200. package/dist/web-server/_ssr/index-Dbs9k8Ea.mjs +0 -251
  201. package/dist/web-server/_ssr/index-Dk93oyZD.mjs +0 -213
  202. package/dist/web-server/_ssr/index-KNJ7huw_.mjs +0 -369
  203. package/dist/web-server/_ssr/index.mjs +0 -1558
  204. package/dist/web-server/_ssr/input-BV1DMASc.mjs +0 -20
  205. package/dist/web-server/_ssr/models-MzrvbL2i.mjs +0 -43
  206. package/dist/web-server/_ssr/router-CS6Zq3md.mjs +0 -2134
  207. package/dist/web-server/_ssr/start-HYkvq4Ni.mjs +0 -4
  208. package/dist/web-server/_ssr/switch-Bd-Sg0HG.mjs +0 -33
  209. package/dist/web-server/_ssr/syntax-highlighter-5vezNTce.mjs +0 -62
  210. package/dist/web-server/_ssr/textarea-CB4kQp9w.mjs +0 -18
  211. package/dist/web-server/_tanstack-start-manifest_v-m5lY48LR.mjs +0 -4
  212. package/dist/web-server/index.mjs +0 -611
@@ -1,279 +0,0 @@
1
- import { f as flip$1, s as size$1, c as computePosition, o as offset$1, h as hide$1, b as shift$1, l as limitShift$1 } from "./floating-ui__dom.mjs";
2
- import { r as reactExports } from "./react.mjs";
3
- import { r as reactDomExports } from "./react-dom.mjs";
4
- var isClient = typeof document !== "undefined";
5
- var noop = function noop2() {
6
- };
7
- var index = isClient ? reactExports.useLayoutEffect : noop;
8
- function deepEqual(a, b) {
9
- if (a === b) {
10
- return true;
11
- }
12
- if (typeof a !== typeof b) {
13
- return false;
14
- }
15
- if (typeof a === "function" && a.toString() === b.toString()) {
16
- return true;
17
- }
18
- let length;
19
- let i;
20
- let keys;
21
- if (a && b && typeof a === "object") {
22
- if (Array.isArray(a)) {
23
- length = a.length;
24
- if (length !== b.length) return false;
25
- for (i = length; i-- !== 0; ) {
26
- if (!deepEqual(a[i], b[i])) {
27
- return false;
28
- }
29
- }
30
- return true;
31
- }
32
- keys = Object.keys(a);
33
- length = keys.length;
34
- if (length !== Object.keys(b).length) {
35
- return false;
36
- }
37
- for (i = length; i-- !== 0; ) {
38
- if (!{}.hasOwnProperty.call(b, keys[i])) {
39
- return false;
40
- }
41
- }
42
- for (i = length; i-- !== 0; ) {
43
- const key = keys[i];
44
- if (key === "_owner" && a.$$typeof) {
45
- continue;
46
- }
47
- if (!deepEqual(a[key], b[key])) {
48
- return false;
49
- }
50
- }
51
- return true;
52
- }
53
- return a !== a && b !== b;
54
- }
55
- function getDPR(element) {
56
- if (typeof window === "undefined") {
57
- return 1;
58
- }
59
- const win = element.ownerDocument.defaultView || window;
60
- return win.devicePixelRatio || 1;
61
- }
62
- function roundByDPR(element, value) {
63
- const dpr = getDPR(element);
64
- return Math.round(value * dpr) / dpr;
65
- }
66
- function useLatestRef(value) {
67
- const ref = reactExports.useRef(value);
68
- index(() => {
69
- ref.current = value;
70
- });
71
- return ref;
72
- }
73
- function useFloating(options) {
74
- if (options === void 0) {
75
- options = {};
76
- }
77
- const {
78
- placement = "bottom",
79
- strategy = "absolute",
80
- middleware = [],
81
- platform,
82
- elements: {
83
- reference: externalReference,
84
- floating: externalFloating
85
- } = {},
86
- transform = true,
87
- whileElementsMounted,
88
- open
89
- } = options;
90
- const [data, setData] = reactExports.useState({
91
- x: 0,
92
- y: 0,
93
- strategy,
94
- placement,
95
- middlewareData: {},
96
- isPositioned: false
97
- });
98
- const [latestMiddleware, setLatestMiddleware] = reactExports.useState(middleware);
99
- if (!deepEqual(latestMiddleware, middleware)) {
100
- setLatestMiddleware(middleware);
101
- }
102
- const [_reference, _setReference] = reactExports.useState(null);
103
- const [_floating, _setFloating] = reactExports.useState(null);
104
- const setReference = reactExports.useCallback((node) => {
105
- if (node !== referenceRef.current) {
106
- referenceRef.current = node;
107
- _setReference(node);
108
- }
109
- }, []);
110
- const setFloating = reactExports.useCallback((node) => {
111
- if (node !== floatingRef.current) {
112
- floatingRef.current = node;
113
- _setFloating(node);
114
- }
115
- }, []);
116
- const referenceEl = externalReference || _reference;
117
- const floatingEl = externalFloating || _floating;
118
- const referenceRef = reactExports.useRef(null);
119
- const floatingRef = reactExports.useRef(null);
120
- const dataRef = reactExports.useRef(data);
121
- const hasWhileElementsMounted = whileElementsMounted != null;
122
- const whileElementsMountedRef = useLatestRef(whileElementsMounted);
123
- const platformRef = useLatestRef(platform);
124
- const openRef = useLatestRef(open);
125
- const update = reactExports.useCallback(() => {
126
- if (!referenceRef.current || !floatingRef.current) {
127
- return;
128
- }
129
- const config = {
130
- placement,
131
- strategy,
132
- middleware: latestMiddleware
133
- };
134
- if (platformRef.current) {
135
- config.platform = platformRef.current;
136
- }
137
- computePosition(referenceRef.current, floatingRef.current, config).then((data2) => {
138
- const fullData = {
139
- ...data2,
140
- // The floating element's position may be recomputed while it's closed
141
- // but still mounted (such as when transitioning out). To ensure
142
- // `isPositioned` will be `false` initially on the next open, avoid
143
- // setting it to `true` when `open === false` (must be specified).
144
- isPositioned: openRef.current !== false
145
- };
146
- if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
147
- dataRef.current = fullData;
148
- reactDomExports.flushSync(() => {
149
- setData(fullData);
150
- });
151
- }
152
- });
153
- }, [latestMiddleware, placement, strategy, platformRef, openRef]);
154
- index(() => {
155
- if (open === false && dataRef.current.isPositioned) {
156
- dataRef.current.isPositioned = false;
157
- setData((data2) => ({
158
- ...data2,
159
- isPositioned: false
160
- }));
161
- }
162
- }, [open]);
163
- const isMountedRef = reactExports.useRef(false);
164
- index(() => {
165
- isMountedRef.current = true;
166
- return () => {
167
- isMountedRef.current = false;
168
- };
169
- }, []);
170
- index(() => {
171
- if (referenceEl) referenceRef.current = referenceEl;
172
- if (floatingEl) floatingRef.current = floatingEl;
173
- if (referenceEl && floatingEl) {
174
- if (whileElementsMountedRef.current) {
175
- return whileElementsMountedRef.current(referenceEl, floatingEl, update);
176
- }
177
- update();
178
- }
179
- }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
180
- const refs = reactExports.useMemo(() => ({
181
- reference: referenceRef,
182
- floating: floatingRef,
183
- setReference,
184
- setFloating
185
- }), [setReference, setFloating]);
186
- const elements = reactExports.useMemo(() => ({
187
- reference: referenceEl,
188
- floating: floatingEl
189
- }), [referenceEl, floatingEl]);
190
- const floatingStyles = reactExports.useMemo(() => {
191
- const initialStyles = {
192
- position: strategy,
193
- left: 0,
194
- top: 0
195
- };
196
- if (!elements.floating) {
197
- return initialStyles;
198
- }
199
- const x = roundByDPR(elements.floating, data.x);
200
- const y = roundByDPR(elements.floating, data.y);
201
- if (transform) {
202
- return {
203
- ...initialStyles,
204
- transform: "translate(" + x + "px, " + y + "px)",
205
- ...getDPR(elements.floating) >= 1.5 && {
206
- willChange: "transform"
207
- }
208
- };
209
- }
210
- return {
211
- position: strategy,
212
- left: x,
213
- top: y
214
- };
215
- }, [strategy, transform, elements.floating, data.x, data.y]);
216
- return reactExports.useMemo(() => ({
217
- ...data,
218
- update,
219
- refs,
220
- elements,
221
- floatingStyles
222
- }), [data, update, refs, elements, floatingStyles]);
223
- }
224
- const offset = (options, deps) => {
225
- const result = offset$1(options);
226
- return {
227
- name: result.name,
228
- fn: result.fn,
229
- options: [options, deps]
230
- };
231
- };
232
- const shift = (options, deps) => {
233
- const result = shift$1(options);
234
- return {
235
- name: result.name,
236
- fn: result.fn,
237
- options: [options, deps]
238
- };
239
- };
240
- const limitShift = (options, deps) => {
241
- const result = limitShift$1(options);
242
- return {
243
- fn: result.fn,
244
- options: [options, deps]
245
- };
246
- };
247
- const flip = (options, deps) => {
248
- const result = flip$1(options);
249
- return {
250
- name: result.name,
251
- fn: result.fn,
252
- options: [options, deps]
253
- };
254
- };
255
- const size = (options, deps) => {
256
- const result = size$1(options);
257
- return {
258
- name: result.name,
259
- fn: result.fn,
260
- options: [options, deps]
261
- };
262
- };
263
- const hide = (options, deps) => {
264
- const result = hide$1(options);
265
- return {
266
- name: result.name,
267
- fn: result.fn,
268
- options: [options, deps]
269
- };
270
- };
271
- export {
272
- shift as a,
273
- flip as f,
274
- hide as h,
275
- limitShift as l,
276
- offset as o,
277
- size as s,
278
- useFloating as u
279
- };
@@ -1,322 +0,0 @@
1
- function hasWindow() {
2
- return typeof window !== "undefined";
3
- }
4
- function getNodeName(node) {
5
- if (isNode(node)) {
6
- return (node.nodeName || "").toLowerCase();
7
- }
8
- return "#document";
9
- }
10
- function getWindow(node) {
11
- var _node$ownerDocument;
12
- return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
13
- }
14
- function getDocumentElement(node) {
15
- var _ref;
16
- return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
17
- }
18
- function isNode(value) {
19
- if (!hasWindow()) {
20
- return false;
21
- }
22
- return value instanceof Node || value instanceof getWindow(value).Node;
23
- }
24
- function isElement(value) {
25
- if (!hasWindow()) {
26
- return false;
27
- }
28
- return value instanceof Element || value instanceof getWindow(value).Element;
29
- }
30
- function isHTMLElement(value) {
31
- if (!hasWindow()) {
32
- return false;
33
- }
34
- return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
35
- }
36
- function isShadowRoot(value) {
37
- if (!hasWindow() || typeof ShadowRoot === "undefined") {
38
- return false;
39
- }
40
- return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
41
- }
42
- function isOverflowElement(element) {
43
- const {
44
- overflow,
45
- overflowX,
46
- overflowY,
47
- display
48
- } = getComputedStyle(element);
49
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
50
- }
51
- function isTableElement(element) {
52
- return /^(table|td|th)$/.test(getNodeName(element));
53
- }
54
- function isTopLayer(element) {
55
- try {
56
- if (element.matches(":popover-open")) {
57
- return true;
58
- }
59
- } catch (_e) {
60
- }
61
- try {
62
- return element.matches(":modal");
63
- } catch (_e) {
64
- return false;
65
- }
66
- }
67
- const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
68
- const containRe = /paint|layout|strict|content/;
69
- const isNotNone = (value) => !!value && value !== "none";
70
- let isWebKitValue;
71
- function isContainingBlock(elementOrCss) {
72
- const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
73
- return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
74
- }
75
- function getContainingBlock(element) {
76
- let currentNode = getParentNode(element);
77
- while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
78
- if (isContainingBlock(currentNode)) {
79
- return currentNode;
80
- } else if (isTopLayer(currentNode)) {
81
- return null;
82
- }
83
- currentNode = getParentNode(currentNode);
84
- }
85
- return null;
86
- }
87
- function isWebKit() {
88
- if (isWebKitValue == null) {
89
- isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
90
- }
91
- return isWebKitValue;
92
- }
93
- function isLastTraversableNode(node) {
94
- return /^(html|body|#document)$/.test(getNodeName(node));
95
- }
96
- function getComputedStyle(element) {
97
- return getWindow(element).getComputedStyle(element);
98
- }
99
- function getNodeScroll(element) {
100
- if (isElement(element)) {
101
- return {
102
- scrollLeft: element.scrollLeft,
103
- scrollTop: element.scrollTop
104
- };
105
- }
106
- return {
107
- scrollLeft: element.scrollX,
108
- scrollTop: element.scrollY
109
- };
110
- }
111
- function getParentNode(node) {
112
- if (getNodeName(node) === "html") {
113
- return node;
114
- }
115
- const result = (
116
- // Step into the shadow DOM of the parent of a slotted node.
117
- node.assignedSlot || // DOM Element detected.
118
- node.parentNode || // ShadowRoot detected.
119
- isShadowRoot(node) && node.host || // Fallback.
120
- getDocumentElement(node)
121
- );
122
- return isShadowRoot(result) ? result.host : result;
123
- }
124
- function getNearestOverflowAncestor(node) {
125
- const parentNode = getParentNode(node);
126
- if (isLastTraversableNode(parentNode)) {
127
- return node.ownerDocument ? node.ownerDocument.body : node.body;
128
- }
129
- if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
130
- return parentNode;
131
- }
132
- return getNearestOverflowAncestor(parentNode);
133
- }
134
- function getOverflowAncestors(node, list, traverseIframes) {
135
- var _node$ownerDocument2;
136
- if (list === void 0) {
137
- list = [];
138
- }
139
- if (traverseIframes === void 0) {
140
- traverseIframes = true;
141
- }
142
- const scrollableAncestor = getNearestOverflowAncestor(node);
143
- const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
144
- const win = getWindow(scrollableAncestor);
145
- if (isBody) {
146
- const frameElement = getFrameElement(win);
147
- return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
148
- } else {
149
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
150
- }
151
- }
152
- function getFrameElement(win) {
153
- return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
154
- }
155
- const sides = ["top", "right", "bottom", "left"];
156
- const min = Math.min;
157
- const max = Math.max;
158
- const round = Math.round;
159
- const floor = Math.floor;
160
- const createCoords = (v) => ({
161
- x: v,
162
- y: v
163
- });
164
- const oppositeSideMap = {
165
- left: "right",
166
- right: "left",
167
- bottom: "top",
168
- top: "bottom"
169
- };
170
- function clamp(start, value, end) {
171
- return max(start, min(value, end));
172
- }
173
- function evaluate(value, param) {
174
- return typeof value === "function" ? value(param) : value;
175
- }
176
- function getSide(placement) {
177
- return placement.split("-")[0];
178
- }
179
- function getAlignment(placement) {
180
- return placement.split("-")[1];
181
- }
182
- function getOppositeAxis(axis) {
183
- return axis === "x" ? "y" : "x";
184
- }
185
- function getAxisLength(axis) {
186
- return axis === "y" ? "height" : "width";
187
- }
188
- function getSideAxis(placement) {
189
- const firstChar = placement[0];
190
- return firstChar === "t" || firstChar === "b" ? "y" : "x";
191
- }
192
- function getAlignmentAxis(placement) {
193
- return getOppositeAxis(getSideAxis(placement));
194
- }
195
- function getAlignmentSides(placement, rects, rtl) {
196
- if (rtl === void 0) {
197
- rtl = false;
198
- }
199
- const alignment = getAlignment(placement);
200
- const alignmentAxis = getAlignmentAxis(placement);
201
- const length = getAxisLength(alignmentAxis);
202
- let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
203
- if (rects.reference[length] > rects.floating[length]) {
204
- mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
205
- }
206
- return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
207
- }
208
- function getExpandedPlacements(placement) {
209
- const oppositePlacement = getOppositePlacement(placement);
210
- return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
211
- }
212
- function getOppositeAlignmentPlacement(placement) {
213
- return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
214
- }
215
- const lrPlacement = ["left", "right"];
216
- const rlPlacement = ["right", "left"];
217
- const tbPlacement = ["top", "bottom"];
218
- const btPlacement = ["bottom", "top"];
219
- function getSideList(side, isStart, rtl) {
220
- switch (side) {
221
- case "top":
222
- case "bottom":
223
- if (rtl) return isStart ? rlPlacement : lrPlacement;
224
- return isStart ? lrPlacement : rlPlacement;
225
- case "left":
226
- case "right":
227
- return isStart ? tbPlacement : btPlacement;
228
- default:
229
- return [];
230
- }
231
- }
232
- function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
233
- const alignment = getAlignment(placement);
234
- let list = getSideList(getSide(placement), direction === "start", rtl);
235
- if (alignment) {
236
- list = list.map((side) => side + "-" + alignment);
237
- if (flipAlignment) {
238
- list = list.concat(list.map(getOppositeAlignmentPlacement));
239
- }
240
- }
241
- return list;
242
- }
243
- function getOppositePlacement(placement) {
244
- const side = getSide(placement);
245
- return oppositeSideMap[side] + placement.slice(side.length);
246
- }
247
- function expandPaddingObject(padding) {
248
- return {
249
- top: 0,
250
- right: 0,
251
- bottom: 0,
252
- left: 0,
253
- ...padding
254
- };
255
- }
256
- function getPaddingObject(padding) {
257
- return typeof padding !== "number" ? expandPaddingObject(padding) : {
258
- top: padding,
259
- right: padding,
260
- bottom: padding,
261
- left: padding
262
- };
263
- }
264
- function rectToClientRect(rect) {
265
- const {
266
- x,
267
- y,
268
- width,
269
- height
270
- } = rect;
271
- return {
272
- width,
273
- height,
274
- top: y,
275
- left: x,
276
- right: x + width,
277
- bottom: y + height,
278
- x,
279
- y
280
- };
281
- }
282
- export {
283
- rectToClientRect as A,
284
- sides as B,
285
- getOppositeAxis as C,
286
- getOverflowAncestors as D,
287
- getDocumentElement as E,
288
- createCoords as F,
289
- getFrameElement as G,
290
- round as H,
291
- isTopLayer as I,
292
- isTableElement as J,
293
- isContainingBlock as K,
294
- getContainingBlock as L,
295
- getNodeScroll as M,
296
- isShadowRoot as a,
297
- isHTMLElement as b,
298
- isElement as c,
299
- getComputedStyle as d,
300
- getNodeName as e,
301
- floor as f,
302
- getWindow as g,
303
- isNode as h,
304
- isOverflowElement as i,
305
- isWebKit as j,
306
- isLastTraversableNode as k,
307
- getParentNode as l,
308
- evaluate as m,
309
- getPaddingObject as n,
310
- getAlignmentAxis as o,
311
- getAlignment as p,
312
- getAxisLength as q,
313
- clamp as r,
314
- getSide as s,
315
- getSideAxis as t,
316
- getOppositePlacement as u,
317
- getExpandedPlacements as v,
318
- getOppositeAxisPlacements as w,
319
- getAlignmentSides as x,
320
- min as y,
321
- max as z
322
- };
@@ -1 +0,0 @@
1
-