@talex-touch/tuffex 0.3.3 → 0.3.4

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 (610) hide show
  1. package/README.md +49 -221
  2. package/dist/es/agents/index.js +1 -1
  3. package/dist/es/alert/index.d.ts +104 -1
  4. package/dist/es/alert/index.js +6 -0
  5. package/dist/es/alert/src/TxAlert.vue.d.ts +1 -0
  6. package/dist/es/alert/src/TxAlert.vue.js +2 -2
  7. package/dist/es/alert/src/TxAlert.vue2.js +6 -2
  8. package/dist/es/auto-sizer/index.js +1 -1
  9. package/dist/es/auto-sizer/src/TxAutoSizer.vue.js +2 -2
  10. package/dist/es/avatar/index.js +1 -1
  11. package/dist/es/avatar/src/TxAvatar.vue.js +1 -1
  12. package/dist/es/avatar/src/TxAvatar.vue2.js +47 -6
  13. package/dist/es/avatar/src/TxAvatarGroup.vue.js +1 -1
  14. package/dist/es/avatar/src/TxAvatarGroup.vue2.js +1 -1
  15. package/dist/es/avatar/src/types.d.ts +2 -1
  16. package/dist/es/badge/index.d.ts +78 -1
  17. package/dist/es/badge/index.js +6 -0
  18. package/dist/es/badge/src/TxBadge.vue.js +2 -2
  19. package/dist/es/base-anchor/index.d.ts +464 -0
  20. package/dist/es/base-anchor/index.js +6 -0
  21. package/dist/es/base-anchor/src/TxBaseAnchor.vue.d.ts +124 -0
  22. package/dist/es/base-anchor/src/TxBaseAnchor.vue.js +7 -0
  23. package/dist/es/base-anchor/src/TxBaseAnchor.vue2.js +798 -0
  24. package/dist/es/base-anchor/src/types.d.ts +36 -0
  25. package/dist/es/base-surface/index.d.ts +561 -0
  26. package/dist/es/base-surface/index.js +7 -0
  27. package/dist/es/base-surface/src/TxBaseSurface.vue.d.ts +123 -0
  28. package/dist/es/base-surface/src/TxBaseSurface.vue.js +1012 -0
  29. package/dist/es/base-surface/src/TxBaseSurface.vue2.js +6 -0
  30. package/dist/es/base-surface/src/style/index.css +105 -0
  31. package/dist/es/base-surface/src/types.d.ts +87 -0
  32. package/dist/es/blank-slate/index.d.ts +9 -9
  33. package/dist/es/blank-slate/index.js +1 -1
  34. package/dist/es/button/index.d.ts +45 -15
  35. package/dist/es/button/index.js +2 -1
  36. package/dist/es/button/src/button.vue.d.ts +7 -1
  37. package/dist/es/button/src/button.vue.js +50 -20
  38. package/dist/es/button/src/split-button.vue.js +31 -5
  39. package/dist/es/button/src/style/index.css +72 -15
  40. package/dist/es/button/src/types.d.ts +4 -0
  41. package/dist/es/card/index.d.ts +236 -56
  42. package/dist/es/card/index.js +1 -1
  43. package/dist/es/card/src/TxCard.vue.d.ts +40 -4
  44. package/dist/es/card/src/TxCard.vue.js +1 -1
  45. package/dist/es/card/src/TxCard.vue2.js +288 -57
  46. package/dist/es/card/src/types.d.ts +14 -1
  47. package/dist/es/card-item/index.d.ts +7 -7
  48. package/dist/es/card-item/index.js +1 -1
  49. package/dist/es/cascader/index.d.ts +15 -15
  50. package/dist/es/cascader/index.js +1 -1
  51. package/dist/es/cascader/src/TxCascader.vue.d.ts +1 -1
  52. package/dist/es/cascader/src/TxCascader.vue.js +1 -1
  53. package/dist/es/cascader/src/TxCascader.vue2.js +1 -3
  54. package/dist/es/chat/index.d.ts +18 -18
  55. package/dist/es/chat/index.js +1 -1
  56. package/dist/es/chat/src/TxChatComposer.vue.js +1 -1
  57. package/dist/es/chat/src/TxChatComposer.vue2.js +1 -0
  58. package/dist/es/chat/src/TxTypingIndicator.vue.d.ts +1 -1
  59. package/dist/es/code-editor/index.d.ts +387 -0
  60. package/dist/es/code-editor/index.js +8 -0
  61. package/dist/es/code-editor/src/TxCodeEditor.vue.d.ts +117 -0
  62. package/dist/es/code-editor/src/TxCodeEditor.vue.js +7 -0
  63. package/dist/es/code-editor/src/TxCodeEditor.vue2.js +658 -0
  64. package/dist/es/code-editor/src/TxCodeEditorToolbar.vue.d.ts +40 -0
  65. package/dist/es/code-editor/src/TxCodeEditorToolbar.vue.js +7 -0
  66. package/dist/es/code-editor/src/TxCodeEditorToolbar.vue2.js +89 -0
  67. package/dist/es/code-editor/src/types.d.ts +47 -0
  68. package/dist/es/command-palette/index.js +1 -1
  69. package/dist/es/command-palette/src/TxCommandPalette.vue.js +1 -1
  70. package/dist/es/command-palette/src/TxCommandPalette.vue2.js +128 -21
  71. package/dist/es/components.css +4253 -3117
  72. package/dist/es/components.d.ts +15 -2
  73. package/dist/es/components.js +44 -7
  74. package/dist/es/container/src/TxCol.vue.d.ts +1 -1
  75. package/dist/es/container/src/TxCol.vue2.js +1 -1
  76. package/dist/es/container/src/TxContainer.vue.d.ts +1 -1
  77. package/dist/es/container/src/TxRow.vue.d.ts +2 -2
  78. package/dist/es/container/src/TxRow.vue2.js +1 -1
  79. package/dist/es/context-menu/index.js +1 -1
  80. package/dist/es/context-menu/src/TxContextMenu.vue.js +1 -1
  81. package/dist/es/context-menu/src/TxContextMenu.vue2.js +4 -1
  82. package/dist/es/corner-overlay/index.js +1 -1
  83. package/dist/es/data-table/index.d.ts +15 -15
  84. package/dist/es/data-table/index.js +1 -1
  85. package/dist/es/data-table/src/TxDataTable.vue.d.ts +1 -1
  86. package/dist/es/date-picker/index.js +1 -1
  87. package/dist/es/dialog/index.js +1 -1
  88. package/dist/es/dialog/src/TxBlowDialog.vue.js +6 -2
  89. package/dist/es/dialog/src/TxBottomDialog.vue.js +1 -1
  90. package/dist/es/dialog/src/TxBottomDialog.vue2.js +6 -2
  91. package/dist/es/dialog/src/TxPopperDialog.vue.js +6 -2
  92. package/dist/es/dialog/src/TxTouchTip.vue.js +1 -1
  93. package/dist/es/dialog/src/TxTouchTip.vue2.js +25 -22
  94. package/dist/es/dialog/src/types.d.ts +1 -1
  95. package/dist/es/drawer/index.d.ts +24 -30
  96. package/dist/es/drawer/index.js +1 -1
  97. package/dist/es/drawer/src/TxDrawer.vue.d.ts +1 -4
  98. package/dist/es/drawer/src/TxDrawer.vue.js +8 -2
  99. package/dist/es/dropdown-menu/index.d.ts +81 -18
  100. package/dist/es/dropdown-menu/index.js +1 -1
  101. package/dist/es/dropdown-menu/src/TxDropdownMenu.vue.d.ts +11 -2
  102. package/dist/es/dropdown-menu/src/TxDropdownMenu.vue.js +1 -1
  103. package/dist/es/dropdown-menu/src/TxDropdownMenu.vue2.js +13 -3
  104. package/dist/es/dropdown-menu/src/types.d.ts +8 -1
  105. package/dist/es/edge-fade-mask/index.d.ts +120 -0
  106. package/dist/es/edge-fade-mask/index.js +6 -0
  107. package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue.d.ts +51 -0
  108. package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue.js +7 -0
  109. package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue2.js +154 -0
  110. package/dist/es/edge-fade-mask/src/types.d.ts +9 -0
  111. package/dist/es/empty/index.js +1 -1
  112. package/dist/es/empty-state/index.d.ts +9 -9
  113. package/dist/es/empty-state/index.js +1 -1
  114. package/dist/es/empty-state/src/TxEmptyState.vue.js +1 -1
  115. package/dist/es/empty-state/src/TxEmptyState.vue2.js +25 -17
  116. package/dist/es/error-state/index.d.ts +131 -0
  117. package/dist/es/error-state/index.js +6 -0
  118. package/dist/es/error-state/src/TxErrorState.vue.d.ts +13 -0
  119. package/dist/es/error-state/src/TxErrorState.vue.js +35 -0
  120. package/dist/es/error-state/src/TxErrorState.vue2.js +5 -0
  121. package/dist/es/error-state/src/types.d.ts +3 -0
  122. package/dist/es/file-uploader/index.js +1 -1
  123. package/dist/es/flat-radio/index.d.ts +201 -0
  124. package/dist/es/flat-radio/index.js +8 -0
  125. package/dist/es/flat-radio/src/TxFlatRadio.vue.d.ts +51 -0
  126. package/dist/es/flat-radio/src/TxFlatRadio.vue.js +7 -0
  127. package/dist/es/flat-radio/src/TxFlatRadio.vue2.js +237 -0
  128. package/dist/es/flat-radio/src/TxFlatRadioItem.vue.d.ts +43 -0
  129. package/dist/es/flat-radio/src/TxFlatRadioItem.vue.js +7 -0
  130. package/dist/es/flat-radio/src/TxFlatRadioItem.vue2.js +87 -0
  131. package/dist/es/flat-radio/src/types.d.ts +28 -0
  132. package/dist/es/flat-radio/src/types.js +3 -0
  133. package/dist/es/flat-select/index.d.ts +159 -0
  134. package/dist/es/flat-select/index.js +8 -0
  135. package/dist/es/flat-select/src/TxFlatSelect.vue.d.ts +56 -0
  136. package/dist/es/flat-select/src/TxFlatSelect.vue.js +7 -0
  137. package/dist/es/flat-select/src/TxFlatSelect.vue2.js +208 -0
  138. package/dist/es/flat-select/src/TxFlatSelectItem.vue.d.ts +47 -0
  139. package/dist/es/flat-select/src/TxFlatSelectItem.vue.js +7 -0
  140. package/dist/es/flat-select/src/TxFlatSelectItem.vue2.js +71 -0
  141. package/dist/es/flat-select/src/types.d.ts +21 -0
  142. package/dist/es/flat-select/src/types.js +3 -0
  143. package/dist/es/flex/index.d.ts +33 -33
  144. package/dist/es/flex/index.js +1 -1
  145. package/dist/es/flex/src/TxFlex.vue.d.ts +3 -3
  146. package/dist/es/flip-overlay/index.d.ts +579 -0
  147. package/dist/es/flip-overlay/index.js +7 -0
  148. package/dist/es/flip-overlay/src/TxFlipOverlay.vue.d.ts +175 -0
  149. package/dist/es/flip-overlay/src/TxFlipOverlay.vue.js +982 -0
  150. package/dist/es/flip-overlay/src/TxFlipOverlay.vue3.js +6 -0
  151. package/dist/es/flip-overlay/src/types.d.ts +53 -0
  152. package/dist/es/floating/index.d.ts +145 -0
  153. package/dist/es/floating/index.js +8 -0
  154. package/dist/es/floating/src/TxFloating.vue.d.ts +45 -0
  155. package/dist/es/floating/src/TxFloating.vue.js +7 -0
  156. package/dist/es/floating/src/TxFloating.vue2.js +118 -0
  157. package/dist/es/floating/src/TxFloatingElement.vue.d.ts +39 -0
  158. package/dist/es/floating/src/TxFloatingElement.vue.js +7 -0
  159. package/dist/es/floating/src/TxFloatingElement.vue2.js +43 -0
  160. package/dist/es/floating/src/context.d.ts +7 -0
  161. package/dist/es/floating/src/context.js +3 -0
  162. package/dist/es/floating/src/types.d.ts +10 -0
  163. package/dist/es/form/index.d.ts +9 -9
  164. package/dist/es/form/index.js +1 -1
  165. package/dist/es/fusion/index.d.ts +15 -15
  166. package/dist/es/fusion/index.js +1 -1
  167. package/dist/es/fusion/src/TxFusion.vue.d.ts +1 -1
  168. package/dist/es/glass-surface/index.d.ts +30 -30
  169. package/dist/es/glass-surface/index.js +1 -1
  170. package/dist/es/glass-surface/src/TxGlassSurface.vue.d.ts +2 -2
  171. package/dist/es/glass-surface/src/TxGlassSurface.vue.js +16 -38
  172. package/dist/es/glow-text/index.d.ts +24 -6
  173. package/dist/es/glow-text/index.js +1 -1
  174. package/dist/es/glow-text/src/TxGlowText.vue.d.ts +3 -3
  175. package/dist/es/glow-text/src/TxGlowText.vue.js +1 -1
  176. package/dist/es/glow-text/src/TxGlowText.vue2.js +93 -10
  177. package/dist/es/glow-text/src/types.d.ts +2 -0
  178. package/dist/es/gradient-border/index.js +1 -1
  179. package/dist/es/gradual-blur/index.d.ts +42 -42
  180. package/dist/es/gradual-blur/index.js +1 -1
  181. package/dist/es/gradual-blur/src/TxGradualBlur.vue.d.ts +3 -3
  182. package/dist/es/gradual-blur/src/TxGradualBlur.vue.js +1 -1
  183. package/dist/es/grid/src/TxGrid.vue.d.ts +2 -2
  184. package/dist/es/grid/src/TxGrid.vue2.js +1 -1
  185. package/dist/es/grid-layout/index.js +1 -1
  186. package/dist/es/group-block/index.d.ts +321 -4
  187. package/dist/es/group-block/index.js +8 -2
  188. package/dist/es/group-block/src/TxBlockInput.vue.d.ts +90 -0
  189. package/dist/es/group-block/src/TxBlockInput.vue.js +94 -0
  190. package/dist/es/group-block/src/TxBlockInput.vue3.js +6 -0
  191. package/dist/es/group-block/src/TxBlockSelect.vue.d.ts +73 -0
  192. package/dist/es/group-block/src/TxBlockSelect.vue.js +76 -0
  193. package/dist/es/group-block/src/TxBlockSelect.vue3.js +6 -0
  194. package/dist/es/group-block/src/TxGroupBlock.vue.js +1 -1
  195. package/dist/es/group-block/src/types.d.ts +138 -0
  196. package/dist/es/guide-state/index.d.ts +131 -0
  197. package/dist/es/guide-state/index.js +6 -0
  198. package/dist/es/guide-state/src/TxGuideState.vue.d.ts +13 -0
  199. package/dist/es/guide-state/src/TxGuideState.vue.js +35 -0
  200. package/dist/es/guide-state/src/TxGuideState.vue2.js +5 -0
  201. package/dist/es/guide-state/src/types.d.ts +3 -0
  202. package/dist/es/icon/index.js +1 -1
  203. package/dist/es/icon/src/TxIcon.vue.js +1 -1
  204. package/dist/es/icon/src/TxIcon.vue2.js +10 -4
  205. package/dist/es/image-gallery/index.js +1 -1
  206. package/dist/es/image-uploader/index.js +1 -1
  207. package/dist/es/index.js +53 -13
  208. package/dist/es/input/index.d.ts +211 -1
  209. package/dist/es/input/index.js +2 -1
  210. package/dist/es/input/src/TxInput.vue.d.ts +21 -11
  211. package/dist/es/input/src/TxInput.vue.js +1 -1
  212. package/dist/es/input/src/TxInput.vue2.js +80 -23
  213. package/dist/es/keyframe-stroke-text/index.d.ts +146 -0
  214. package/dist/es/keyframe-stroke-text/index.js +6 -0
  215. package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.d.ts +48 -0
  216. package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.js +7 -0
  217. package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue2.js +102 -0
  218. package/dist/es/keyframe-stroke-text/src/types.d.ts +10 -0
  219. package/dist/es/layout-skeleton/index.js +1 -1
  220. package/dist/es/loading-overlay/index.d.ts +15 -15
  221. package/dist/es/loading-overlay/index.js +1 -1
  222. package/dist/es/loading-overlay/src/TxLoadingOverlay.vue.d.ts +1 -1
  223. package/dist/es/loading-overlay/src/TxLoadingOverlay.vue.js +12 -2
  224. package/dist/es/loading-state/index.d.ts +9 -9
  225. package/dist/es/loading-state/index.js +1 -1
  226. package/dist/es/markdown-view/index.d.ts +3 -3
  227. package/dist/es/markdown-view/index.js +1 -1
  228. package/dist/es/markdown-view/src/TxMarkdownView.vue.js +3 -2
  229. package/dist/es/modal/index.js +1 -1
  230. package/dist/es/modal/src/TxModal.vue.js +1 -1
  231. package/dist/es/modal/src/TxModal.vue2.js +26 -4
  232. package/dist/es/nav-bar/index.js +1 -1
  233. package/dist/es/no-data/index.d.ts +9 -9
  234. package/dist/es/no-data/index.js +1 -1
  235. package/dist/es/no-selection/index.d.ts +9 -9
  236. package/dist/es/no-selection/index.js +1 -1
  237. package/dist/es/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/properties.js +62 -0
  238. package/dist/es/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/toml.js +76 -0
  239. package/dist/es/node_modules/.pnpm/@lezer_common@1.5.0/node_modules/@lezer/common/dist/index.js +252 -0
  240. package/dist/es/node_modules/.pnpm/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +682 -0
  241. package/dist/es/offline-state/index.d.ts +9 -9
  242. package/dist/es/offline-state/index.js +1 -1
  243. package/dist/es/outline-border/index.d.ts +18 -18
  244. package/dist/es/outline-border/index.js +1 -1
  245. package/dist/es/outline-border/src/TxOutlineBorder.vue.d.ts +1 -1
  246. package/dist/es/{utils → packages/tuffex/packages/utils}/toast.js +4 -1
  247. package/dist/es/packages/tuffex/packages/utils/z-index-manager.js +114 -0
  248. package/dist/es/packages/utils/env/index.js +8 -0
  249. package/dist/es/permission-state/index.d.ts +9 -9
  250. package/dist/es/permission-state/index.js +1 -1
  251. package/dist/es/picker/index.js +1 -1
  252. package/dist/es/picker/src/TxPicker.vue.js +1 -1
  253. package/dist/es/picker/src/TxPicker.vue2.js +6 -1
  254. package/dist/es/popover/index.d.ts +195 -82
  255. package/dist/es/popover/index.js +1 -1
  256. package/dist/es/popover/src/TxPopover.vue.d.ts +33 -16
  257. package/dist/es/popover/src/TxPopover.vue.js +1 -1
  258. package/dist/es/popover/src/TxPopover.vue2.js +147 -317
  259. package/dist/es/popover/src/types.d.ts +14 -3
  260. package/dist/es/progress-bar/index.d.ts +21 -21
  261. package/dist/es/progress-bar/index.js +1 -1
  262. package/dist/es/progress-bar/src/TxProgressBar.vue.d.ts +1 -1
  263. package/dist/es/radio/index.js +1 -1
  264. package/dist/es/radio/src/TxRadioGroup.vue2.js +1 -1
  265. package/dist/es/scroll/index.d.ts +42 -12
  266. package/dist/es/scroll/index.js +1 -1
  267. package/dist/es/scroll/src/TxScroll.vue.d.ts +11 -1
  268. package/dist/es/scroll/src/TxScroll.vue.js +1 -1
  269. package/dist/es/scroll/src/TxScroll.vue2.js +25 -13
  270. package/dist/es/scroll/src/runtime-capabilities.d.ts +2 -0
  271. package/dist/es/scroll/src/runtime-capabilities.js +67 -0
  272. package/dist/es/search-empty/index.d.ts +9 -9
  273. package/dist/es/search-empty/index.js +1 -1
  274. package/dist/es/search-input/index.js +1 -1
  275. package/dist/es/search-select/index.d.ts +9 -9
  276. package/dist/es/search-select/index.js +1 -1
  277. package/dist/es/search-select/src/TxSearchSelect.vue.d.ts +1 -1
  278. package/dist/es/search-select/src/TxSearchSelect.vue.js +1 -1
  279. package/dist/es/search-select/src/TxSearchSelect.vue2.js +105 -178
  280. package/dist/es/search-select/src/types.d.ts +1 -1
  281. package/dist/es/segmented-slider/index.js +1 -1
  282. package/dist/es/segmented-slider/src/TxSegmentedSlider.vue.js +1 -0
  283. package/dist/es/select/index.d.ts +366 -4
  284. package/dist/es/select/index.js +6 -9
  285. package/dist/es/select/src/TxSelect.vue.d.ts +23 -23
  286. package/dist/es/select/src/TxSelect.vue.js +2 -2
  287. package/dist/es/select/src/TxSelect.vue2.js +203 -152
  288. package/dist/es/select/src/TxSelectItem.vue.js +2 -2
  289. package/dist/es/select/src/TxSelectItem.vue2.js +44 -7
  290. package/dist/es/select/src/types.d.ts +34 -0
  291. package/dist/es/select/src/types.js +3 -0
  292. package/dist/es/skeleton/index.d.ts +7 -7
  293. package/dist/es/skeleton/index.js +1 -1
  294. package/dist/es/slider/index.d.ts +4 -4
  295. package/dist/es/slider/index.js +1 -1
  296. package/dist/es/sortable-list/index.js +1 -1
  297. package/dist/es/sortable-list/src/TxSortableList.vue.js +1 -1
  298. package/dist/es/sortable-list/src/TxSortableList.vue2.js +1 -1
  299. package/dist/es/spinner/index.d.ts +1 -1
  300. package/dist/es/spinner/index.js +1 -1
  301. package/dist/es/splitter/index.d.ts +15 -15
  302. package/dist/es/splitter/index.js +1 -1
  303. package/dist/es/splitter/src/TxSplitter.vue.d.ts +1 -1
  304. package/dist/es/stack/index.d.ts +33 -33
  305. package/dist/es/stack/index.js +1 -1
  306. package/dist/es/stack/src/TxStack.vue.d.ts +3 -3
  307. package/dist/es/stagger/index.d.ts +15 -15
  308. package/dist/es/stagger/index.js +1 -1
  309. package/dist/es/stagger/src/TxStagger.vue.d.ts +1 -1
  310. package/dist/es/stat-card/index.d.ts +46 -3
  311. package/dist/es/stat-card/index.js +1 -1
  312. package/dist/es/stat-card/src/TxStatCard.vue.d.ts +5 -1
  313. package/dist/es/stat-card/src/TxStatCard.vue.js +1 -1
  314. package/dist/es/stat-card/src/TxStatCard.vue2.js +247 -19
  315. package/dist/es/stat-card/src/types.d.ts +15 -0
  316. package/dist/es/status-badge/index.js +1 -1
  317. package/dist/es/switch/index.js +1 -0
  318. package/dist/es/tab-bar/index.d.ts +15 -15
  319. package/dist/es/tab-bar/index.js +1 -1
  320. package/dist/es/tab-bar/src/TxTabBar.vue.d.ts +1 -1
  321. package/dist/es/tabs/index.d.ts +18 -3
  322. package/dist/es/tabs/index.js +1 -1
  323. package/dist/es/tabs/src/TxTabs.vue.d.ts +10 -1
  324. package/dist/es/tabs/src/TxTabs.vue.js +1 -1
  325. package/dist/es/tabs/src/TxTabs.vue2.js +3 -1
  326. package/dist/es/tabs/src/types.d.ts +1 -0
  327. package/dist/es/tag/index.js +1 -1
  328. package/dist/es/tag-input/index.js +1 -1
  329. package/dist/es/text-transformer/index.d.ts +1 -1
  330. package/dist/es/text-transformer/index.js +1 -1
  331. package/dist/es/toast/index.js +1 -1
  332. package/dist/es/toast/src/TxToastHost.vue.js +18 -17
  333. package/dist/es/tooltip/index.d.ts +75 -178
  334. package/dist/es/tooltip/index.js +1 -1
  335. package/dist/es/tooltip/src/TxTooltip.vue.d.ts +21 -40
  336. package/dist/es/tooltip/src/TxTooltip.vue.js +1 -1
  337. package/dist/es/tooltip/src/TxTooltip.vue2.js +102 -350
  338. package/dist/es/tooltip/src/types.d.ts +8 -13
  339. package/dist/es/transfer/index.d.ts +131 -0
  340. package/dist/es/transfer/index.js +6 -0
  341. package/dist/es/transfer/src/TxTransfer.vue.d.ts +48 -0
  342. package/dist/es/transfer/src/TxTransfer.vue.js +7 -0
  343. package/dist/es/transfer/src/TxTransfer.vue2.js +217 -0
  344. package/dist/es/transfer/src/types.d.ts +17 -0
  345. package/dist/es/transition/index.d.ts +30 -30
  346. package/dist/es/transition/index.js +1 -1
  347. package/dist/es/transition/src/TxTransition.vue.d.ts +1 -1
  348. package/dist/es/transition/src/TxTransitionSmoothSize.vue.d.ts +1 -1
  349. package/dist/es/tree/index.d.ts +15 -15
  350. package/dist/es/tree/index.js +1 -1
  351. package/dist/es/tree/src/TxTree.vue.d.ts +1 -1
  352. package/dist/es/tree/src/TxTree.vue.js +1 -1
  353. package/dist/es/tree/src/TxTree.vue2.js +3 -2
  354. package/dist/es/tree/src/types.d.ts +1 -0
  355. package/dist/es/tree-select/index.d.ts +9 -9
  356. package/dist/es/tree-select/index.js +1 -1
  357. package/dist/es/tree-select/src/TxTreeSelect.vue.d.ts +1 -1
  358. package/dist/es/tree-select/src/TxTreeSelect.vue.js +1 -1
  359. package/dist/es/tree-select/src/TxTreeSelect.vue2.js +0 -2
  360. package/dist/es/tuff-logo-stroke/index.d.ts +146 -0
  361. package/dist/es/tuff-logo-stroke/index.js +6 -0
  362. package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue.d.ts +48 -0
  363. package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue.js +7 -0
  364. package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue2.js +147 -0
  365. package/dist/es/tuff-logo-stroke/src/types.d.ts +10 -0
  366. package/dist/es/virtual-list/index.js +1 -1
  367. package/dist/lib/agents/index.js +1 -1
  368. package/dist/lib/alert/index.js +11 -0
  369. package/dist/lib/alert/src/TxAlert.vue.js +2 -2
  370. package/dist/lib/alert/src/TxAlert.vue2.js +5 -1
  371. package/dist/lib/auto-sizer/index.js +1 -1
  372. package/dist/lib/auto-sizer/src/TxAutoSizer.vue.js +2 -2
  373. package/dist/lib/avatar/index.js +1 -1
  374. package/dist/lib/avatar/src/TxAvatar.vue.js +1 -1
  375. package/dist/lib/avatar/src/TxAvatar.vue2.js +47 -6
  376. package/dist/lib/avatar/src/TxAvatarGroup.vue.js +1 -1
  377. package/dist/lib/avatar/src/TxAvatarGroup.vue2.js +1 -1
  378. package/dist/lib/badge/index.js +11 -0
  379. package/dist/lib/badge/src/TxBadge.vue.js +2 -2
  380. package/dist/lib/base-anchor/index.js +12 -0
  381. package/dist/lib/base-anchor/src/TxBaseAnchor.vue.js +11 -0
  382. package/dist/lib/base-anchor/src/TxBaseAnchor.vue2.js +802 -0
  383. package/dist/lib/base-surface/index.js +13 -0
  384. package/dist/lib/base-surface/src/TxBaseSurface.vue.js +1016 -0
  385. package/dist/lib/base-surface/src/TxBaseSurface.vue2.js +10 -0
  386. package/dist/lib/base-surface/src/style/index.css +105 -0
  387. package/dist/lib/blank-slate/index.js +1 -1
  388. package/dist/lib/button/index.js +2 -1
  389. package/dist/lib/button/src/button.vue.js +49 -19
  390. package/dist/lib/button/src/split-button.vue.js +30 -4
  391. package/dist/lib/button/src/style/index.css +72 -15
  392. package/dist/lib/card/index.js +1 -1
  393. package/dist/lib/card/src/TxCard.vue.js +1 -1
  394. package/dist/lib/card/src/TxCard.vue2.js +285 -54
  395. package/dist/lib/card-item/index.js +1 -1
  396. package/dist/lib/cascader/index.js +1 -1
  397. package/dist/lib/cascader/src/TxCascader.vue.js +1 -1
  398. package/dist/lib/cascader/src/TxCascader.vue2.js +1 -3
  399. package/dist/lib/chat/index.js +1 -1
  400. package/dist/lib/chat/src/TxChatComposer.vue.js +1 -1
  401. package/dist/lib/chat/src/TxChatComposer.vue2.js +1 -0
  402. package/dist/lib/code-editor/index.js +16 -0
  403. package/dist/lib/code-editor/src/TxCodeEditor.vue.js +11 -0
  404. package/dist/lib/code-editor/src/TxCodeEditor.vue2.js +662 -0
  405. package/dist/lib/code-editor/src/TxCodeEditorToolbar.vue.js +11 -0
  406. package/dist/lib/code-editor/src/TxCodeEditorToolbar.vue2.js +93 -0
  407. package/dist/lib/command-palette/index.js +1 -1
  408. package/dist/lib/command-palette/src/TxCommandPalette.vue.js +1 -1
  409. package/dist/lib/command-palette/src/TxCommandPalette.vue2.js +127 -20
  410. package/dist/lib/components.css +4253 -3117
  411. package/dist/lib/components.js +255 -178
  412. package/dist/lib/container/src/TxCol.vue2.js +1 -1
  413. package/dist/lib/container/src/TxRow.vue2.js +1 -1
  414. package/dist/lib/context-menu/index.js +1 -1
  415. package/dist/lib/context-menu/src/TxContextMenu.vue.js +1 -1
  416. package/dist/lib/context-menu/src/TxContextMenu.vue2.js +4 -1
  417. package/dist/lib/corner-overlay/index.js +1 -1
  418. package/dist/lib/data-table/index.js +1 -1
  419. package/dist/lib/date-picker/index.js +1 -1
  420. package/dist/lib/dialog/index.js +1 -1
  421. package/dist/lib/dialog/src/TxBlowDialog.vue.js +5 -1
  422. package/dist/lib/dialog/src/TxBottomDialog.vue.js +1 -1
  423. package/dist/lib/dialog/src/TxBottomDialog.vue2.js +5 -1
  424. package/dist/lib/dialog/src/TxPopperDialog.vue.js +5 -1
  425. package/dist/lib/dialog/src/TxTouchTip.vue.js +1 -1
  426. package/dist/lib/dialog/src/TxTouchTip.vue2.js +24 -21
  427. package/dist/lib/drawer/index.js +1 -1
  428. package/dist/lib/drawer/src/TxDrawer.vue.js +8 -2
  429. package/dist/lib/dropdown-menu/index.js +1 -1
  430. package/dist/lib/dropdown-menu/src/TxDropdownMenu.vue.js +1 -1
  431. package/dist/lib/dropdown-menu/src/TxDropdownMenu.vue2.js +13 -3
  432. package/dist/lib/edge-fade-mask/index.js +12 -0
  433. package/dist/lib/edge-fade-mask/src/TxEdgeFadeMask.vue.js +11 -0
  434. package/dist/lib/edge-fade-mask/src/TxEdgeFadeMask.vue2.js +158 -0
  435. package/dist/lib/empty/index.js +1 -1
  436. package/dist/lib/empty-state/index.js +1 -1
  437. package/dist/lib/empty-state/src/TxEmptyState.vue.js +1 -1
  438. package/dist/lib/empty-state/src/TxEmptyState.vue2.js +25 -17
  439. package/dist/lib/error-state/index.js +11 -0
  440. package/dist/lib/error-state/src/TxErrorState.vue.js +39 -0
  441. package/dist/lib/error-state/src/TxErrorState.vue2.js +9 -0
  442. package/dist/lib/file-uploader/index.js +1 -1
  443. package/dist/lib/flat-radio/index.js +16 -0
  444. package/dist/lib/flat-radio/src/TxFlatRadio.vue.js +11 -0
  445. package/dist/lib/flat-radio/src/TxFlatRadio.vue2.js +241 -0
  446. package/dist/lib/flat-radio/src/TxFlatRadioItem.vue.js +11 -0
  447. package/dist/lib/flat-radio/src/TxFlatRadioItem.vue2.js +91 -0
  448. package/dist/lib/flat-radio/src/types.js +7 -0
  449. package/dist/lib/flat-select/index.js +16 -0
  450. package/dist/lib/flat-select/src/TxFlatSelect.vue.js +11 -0
  451. package/dist/lib/flat-select/src/TxFlatSelect.vue2.js +212 -0
  452. package/dist/lib/flat-select/src/TxFlatSelectItem.vue.js +11 -0
  453. package/dist/lib/flat-select/src/TxFlatSelectItem.vue2.js +75 -0
  454. package/dist/lib/flat-select/src/types.js +7 -0
  455. package/dist/lib/flex/index.js +1 -1
  456. package/dist/lib/flip-overlay/index.js +13 -0
  457. package/dist/lib/flip-overlay/src/TxFlipOverlay.vue.js +986 -0
  458. package/dist/lib/flip-overlay/src/TxFlipOverlay.vue3.js +10 -0
  459. package/dist/lib/floating/index.js +16 -0
  460. package/dist/lib/floating/src/TxFloating.vue.js +11 -0
  461. package/dist/lib/floating/src/TxFloating.vue2.js +122 -0
  462. package/dist/lib/floating/src/TxFloatingElement.vue.js +11 -0
  463. package/dist/lib/floating/src/TxFloatingElement.vue2.js +47 -0
  464. package/dist/lib/floating/src/context.js +7 -0
  465. package/dist/lib/form/index.js +1 -1
  466. package/dist/lib/fusion/index.js +1 -1
  467. package/dist/lib/glass-surface/index.js +1 -1
  468. package/dist/lib/glass-surface/src/TxGlassSurface.vue.js +15 -37
  469. package/dist/lib/glow-text/index.js +1 -1
  470. package/dist/lib/glow-text/src/TxGlowText.vue.js +1 -1
  471. package/dist/lib/glow-text/src/TxGlowText.vue2.js +92 -9
  472. package/dist/lib/gradient-border/index.js +1 -1
  473. package/dist/lib/gradual-blur/index.js +1 -1
  474. package/dist/lib/gradual-blur/src/TxGradualBlur.vue.js +1 -1
  475. package/dist/lib/grid/src/TxGrid.vue2.js +1 -1
  476. package/dist/lib/grid-layout/index.js +1 -1
  477. package/dist/lib/group-block/index.js +11 -1
  478. package/dist/lib/group-block/src/TxBlockInput.vue.js +98 -0
  479. package/dist/lib/group-block/src/TxBlockInput.vue3.js +10 -0
  480. package/dist/lib/group-block/src/TxBlockSelect.vue.js +80 -0
  481. package/dist/lib/group-block/src/TxBlockSelect.vue3.js +10 -0
  482. package/dist/lib/group-block/src/TxGroupBlock.vue.js +1 -1
  483. package/dist/lib/guide-state/index.js +11 -0
  484. package/dist/lib/guide-state/src/TxGuideState.vue.js +39 -0
  485. package/dist/lib/guide-state/src/TxGuideState.vue2.js +9 -0
  486. package/dist/lib/icon/index.js +1 -1
  487. package/dist/lib/icon/src/TxIcon.vue.js +1 -1
  488. package/dist/lib/icon/src/TxIcon.vue2.js +9 -3
  489. package/dist/lib/image-gallery/index.js +1 -1
  490. package/dist/lib/image-uploader/index.js +1 -1
  491. package/dist/lib/index.js +269 -182
  492. package/dist/lib/input/index.js +7 -5
  493. package/dist/lib/input/src/TxInput.vue.js +1 -1
  494. package/dist/lib/input/src/TxInput.vue2.js +79 -22
  495. package/dist/lib/keyframe-stroke-text/index.js +12 -0
  496. package/dist/lib/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.js +11 -0
  497. package/dist/lib/keyframe-stroke-text/src/TxKeyframeStrokeText.vue2.js +106 -0
  498. package/dist/lib/layout-skeleton/index.js +1 -1
  499. package/dist/lib/loading-overlay/index.js +1 -1
  500. package/dist/lib/loading-overlay/src/TxLoadingOverlay.vue.js +11 -1
  501. package/dist/lib/loading-state/index.js +1 -1
  502. package/dist/lib/markdown-view/index.js +1 -1
  503. package/dist/lib/markdown-view/src/TxMarkdownView.vue.js +3 -2
  504. package/dist/lib/modal/index.js +1 -1
  505. package/dist/lib/modal/src/TxModal.vue.js +1 -1
  506. package/dist/lib/modal/src/TxModal.vue2.js +25 -3
  507. package/dist/lib/nav-bar/index.js +1 -1
  508. package/dist/lib/no-data/index.js +1 -1
  509. package/dist/lib/no-selection/index.js +1 -1
  510. package/dist/lib/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/properties.js +66 -0
  511. package/dist/lib/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/toml.js +80 -0
  512. package/dist/lib/node_modules/.pnpm/@lezer_common@1.5.0/node_modules/@lezer/common/dist/index.js +257 -0
  513. package/dist/lib/node_modules/.pnpm/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +688 -0
  514. package/dist/lib/offline-state/index.js +1 -1
  515. package/dist/lib/outline-border/index.js +1 -1
  516. package/dist/lib/{utils → packages/tuffex/packages/utils}/toast.js +4 -1
  517. package/dist/lib/packages/tuffex/packages/utils/z-index-manager.js +124 -0
  518. package/dist/lib/packages/utils/env/index.js +13 -0
  519. package/dist/lib/permission-state/index.js +1 -1
  520. package/dist/lib/picker/index.js +1 -1
  521. package/dist/lib/picker/src/TxPicker.vue.js +1 -1
  522. package/dist/lib/picker/src/TxPicker.vue2.js +6 -1
  523. package/dist/lib/popover/index.js +1 -1
  524. package/dist/lib/popover/src/TxPopover.vue.js +1 -1
  525. package/dist/lib/popover/src/TxPopover.vue2.js +146 -316
  526. package/dist/lib/progress-bar/index.js +1 -1
  527. package/dist/lib/radio/index.js +1 -1
  528. package/dist/lib/radio/src/TxRadioGroup.vue2.js +1 -1
  529. package/dist/lib/scroll/index.js +1 -1
  530. package/dist/lib/scroll/src/TxScroll.vue.js +1 -1
  531. package/dist/lib/scroll/src/TxScroll.vue2.js +25 -13
  532. package/dist/lib/scroll/src/runtime-capabilities.js +72 -0
  533. package/dist/lib/search-empty/index.js +1 -1
  534. package/dist/lib/search-input/index.js +1 -1
  535. package/dist/lib/search-select/index.js +1 -1
  536. package/dist/lib/search-select/src/TxSearchSelect.vue.js +1 -1
  537. package/dist/lib/search-select/src/TxSearchSelect.vue2.js +104 -177
  538. package/dist/lib/segmented-slider/index.js +1 -1
  539. package/dist/lib/segmented-slider/src/TxSegmentedSlider.vue.js +1 -0
  540. package/dist/lib/select/index.js +6 -9
  541. package/dist/lib/select/src/TxSelect.vue.js +2 -2
  542. package/dist/lib/select/src/TxSelect.vue2.js +202 -151
  543. package/dist/lib/select/src/TxSelectItem.vue.js +2 -2
  544. package/dist/lib/select/src/TxSelectItem.vue2.js +43 -6
  545. package/dist/lib/select/src/types.js +7 -0
  546. package/dist/lib/skeleton/index.js +1 -1
  547. package/dist/lib/slider/index.js +1 -1
  548. package/dist/lib/sortable-list/index.js +1 -1
  549. package/dist/lib/sortable-list/src/TxSortableList.vue.js +1 -1
  550. package/dist/lib/sortable-list/src/TxSortableList.vue2.js +1 -1
  551. package/dist/lib/spinner/index.js +1 -1
  552. package/dist/lib/splitter/index.js +1 -1
  553. package/dist/lib/stack/index.js +1 -1
  554. package/dist/lib/stagger/index.js +1 -1
  555. package/dist/lib/stat-card/index.js +1 -1
  556. package/dist/lib/stat-card/src/TxStatCard.vue.js +1 -1
  557. package/dist/lib/stat-card/src/TxStatCard.vue2.js +246 -18
  558. package/dist/lib/status-badge/index.js +1 -1
  559. package/dist/lib/switch/index.js +1 -0
  560. package/dist/lib/tab-bar/index.js +1 -1
  561. package/dist/lib/tabs/index.js +1 -1
  562. package/dist/lib/tabs/src/TxTabs.vue.js +1 -1
  563. package/dist/lib/tabs/src/TxTabs.vue2.js +3 -1
  564. package/dist/lib/tag/index.js +1 -1
  565. package/dist/lib/tag-input/index.js +1 -1
  566. package/dist/lib/text-transformer/index.js +1 -1
  567. package/dist/lib/toast/index.js +1 -1
  568. package/dist/lib/toast/src/TxToastHost.vue.js +17 -16
  569. package/dist/lib/tooltip/index.js +1 -1
  570. package/dist/lib/tooltip/src/TxTooltip.vue.js +1 -1
  571. package/dist/lib/tooltip/src/TxTooltip.vue2.js +101 -349
  572. package/dist/lib/transfer/index.js +12 -0
  573. package/dist/lib/transfer/src/TxTransfer.vue.js +11 -0
  574. package/dist/lib/transfer/src/TxTransfer.vue2.js +221 -0
  575. package/dist/lib/transition/index.js +1 -1
  576. package/dist/lib/tree/index.js +1 -1
  577. package/dist/lib/tree/src/TxTree.vue.js +1 -1
  578. package/dist/lib/tree/src/TxTree.vue2.js +3 -2
  579. package/dist/lib/tree-select/index.js +1 -1
  580. package/dist/lib/tree-select/src/TxTreeSelect.vue.js +1 -1
  581. package/dist/lib/tree-select/src/TxTreeSelect.vue2.js +0 -2
  582. package/dist/lib/tuff-logo-stroke/index.js +12 -0
  583. package/dist/lib/tuff-logo-stroke/src/TxTuffLogoStroke.vue.js +11 -0
  584. package/dist/lib/tuff-logo-stroke/src/TxTuffLogoStroke.vue2.js +151 -0
  585. package/dist/lib/virtual-list/index.js +1 -1
  586. package/package.json +37 -25
  587. package/dist/es/button/__tests__/button.test.d.ts +0 -1
  588. package/dist/es/button/__tests__/split-button.test.d.ts +0 -1
  589. package/dist/es/cascader/__tests__/cascader.test.d.ts +0 -1
  590. package/dist/es/command-palette/__tests__/command-palette.test.d.ts +0 -1
  591. package/dist/es/data-table/__tests__/data-table.test.d.ts +0 -1
  592. package/dist/es/file-uploader/__tests__/file-uploader.test.d.ts +0 -1
  593. package/dist/es/form/__tests__/form.test.d.ts +0 -1
  594. package/dist/es/search-select/__tests__/search-select.test.d.ts +0 -1
  595. package/dist/es/tag-input/__tests__/tag-input.test.d.ts +0 -1
  596. package/dist/es/tree/__tests__/tree.test.d.ts +0 -1
  597. package/dist/es/tree-select/__tests__/tree-select.test.d.ts +0 -1
  598. package/dist/es/virtual-list/__tests__/virtual-list.test.d.ts +0 -1
  599. /package/dist/es/{utils → packages/tuffex/packages/utils}/animation/auto-resize.js +0 -0
  600. /package/dist/es/{utils → packages/tuffex/packages/utils}/animation/flip.js +0 -0
  601. /package/dist/es/{utils → packages/tuffex/packages/utils}/dialog-manager.js +0 -0
  602. /package/dist/es/{utils → packages/tuffex/packages/utils}/env.js +0 -0
  603. /package/dist/es/{utils → packages/tuffex/packages/utils}/vibrate.js +0 -0
  604. /package/dist/es/{utils → packages/tuffex/packages/utils}/withInstall.js +0 -0
  605. /package/dist/lib/{utils → packages/tuffex/packages/utils}/animation/auto-resize.js +0 -0
  606. /package/dist/lib/{utils → packages/tuffex/packages/utils}/animation/flip.js +0 -0
  607. /package/dist/lib/{utils → packages/tuffex/packages/utils}/dialog-manager.js +0 -0
  608. /package/dist/lib/{utils → packages/tuffex/packages/utils}/env.js +0 -0
  609. /package/dist/lib/{utils → packages/tuffex/packages/utils}/vibrate.js +0 -0
  610. /package/dist/lib/{utils → packages/tuffex/packages/utils}/withInstall.js +0 -0
@@ -0,0 +1,1016 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
+
5
+ const vue = require('vue');
6
+ const env = require('../../packages/tuffex/packages/utils/env.js');
7
+ const TxGlassSurface_vue_vue_type_script_setup_true_lang = require('../../glass-surface/src/TxGlassSurface.vue.js');
8
+ ;/* empty css */
9
+
10
+ const _hoisted_1 = {
11
+ key: 0,
12
+ class: "tx-base-surface__layer tx-base-surface__layer--filter"
13
+ };
14
+ const _hoisted_2 = {
15
+ key: 0,
16
+ class: "tx-base-surface__layer tx-base-surface__layer--motion-cover"
17
+ };
18
+ const _hoisted_3 = {
19
+ key: 0,
20
+ class: "tx-base-surface__layer tx-base-surface__layer--mask"
21
+ };
22
+ const _hoisted_4 = {
23
+ key: 0,
24
+ class: "tx-base-surface__layer tx-base-surface__layer--refraction-edge"
25
+ };
26
+ const _hoisted_5 = { class: "tx-base-surface__content" };
27
+ const SURFACE_MOTION_DURATION_MS = 299;
28
+ const REFRACTION_PARAM_BLEND_DURATION_MS = 182;
29
+ const REFRACTION_MASK_RELEASE_DELAY_AFTER_FALLBACK_MS = 100;
30
+ const REFRACTION_RECOVERY_DURATION_FACTOR = 0.7;
31
+ const REFRACTION_MASK_PEAK_OPACITY = 0.95;
32
+ const REFRACTION_MASK_PEAK_RAMP_DURATION_MS = 180;
33
+ const REFRACTION_EDGE_REVEAL_DELAY_MS = 60;
34
+ const REFRACTION_EDGE_REVEAL_DURATION_MS = 220;
35
+ const REFRACTION_MASK_RELEASE_SLOWDOWN = 1.2;
36
+ const REFRACTION_MOVING_PARAM_FLOOR = 0.28;
37
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
38
+ ...{
39
+ name: "TxBaseSurface"
40
+ },
41
+ __name: "TxBaseSurface",
42
+ props: {
43
+ mode: { default: "pure" },
44
+ radius: {},
45
+ color: {},
46
+ opacity: { default: 0.75 },
47
+ fallbackMaskOpacity: {},
48
+ blur: { default: 10 },
49
+ filterSaturation: { default: 1.5 },
50
+ filterContrast: { default: 1 },
51
+ filterBrightness: { default: 1 },
52
+ saturation: { default: 1.8 },
53
+ brightness: { default: 70 },
54
+ backgroundOpacity: { default: 0 },
55
+ borderWidth: { default: 0.07 },
56
+ displace: { default: 0.5 },
57
+ distortionScale: { default: -180 },
58
+ refractionStrength: {},
59
+ refractionProfile: {},
60
+ refractionTone: { default: "balanced" },
61
+ refractionAngle: {},
62
+ refractionLightX: {},
63
+ refractionLightY: {},
64
+ refractionHaloOpacity: {},
65
+ redOffset: { default: 0 },
66
+ greenOffset: { default: 10 },
67
+ blueOffset: { default: 20 },
68
+ xChannel: { default: "R" },
69
+ yChannel: { default: "G" },
70
+ mixBlendMode: { default: "difference" },
71
+ moving: { type: Boolean, default: false },
72
+ fallbackMode: { default: "mask" },
73
+ settleDelay: { default: 150 },
74
+ autoDetect: { type: Boolean, default: false },
75
+ transitionDuration: { default: 299 },
76
+ fake: { type: Boolean, default: false },
77
+ fakeIndex: { default: 0 },
78
+ preset: { default: "default" },
79
+ refractionRenderer: { default: "svg" },
80
+ overlayOpacity: { default: 0 },
81
+ tag: { default: "div" }
82
+ },
83
+ setup(__props) {
84
+ const props = __props;
85
+ const rootRef = vue.ref(null);
86
+ const attrs = vue.useAttrs();
87
+ const autoMoving = vue.ref(false);
88
+ const settling = vue.ref(false);
89
+ let settleTimer;
90
+ const refractionRecovering = vue.ref(false);
91
+ const refractionRecoveryProgress = vue.ref(1);
92
+ const refractionRecoveryElapsed = vue.ref(0);
93
+ const REFRACTION_MASK_RELEASE_DURATION_MS = Math.round(650 * REFRACTION_RECOVERY_DURATION_FACTOR);
94
+ let refractionRecoveryRaf = null;
95
+ let refractionMaskPeakRampRaf = null;
96
+ let refractionEdgeRevealRaf = null;
97
+ let refractionEdgeRevealTimer = null;
98
+ const refractionMaskPeakRampProgress = vue.ref(1);
99
+ const refractionEdgeRevealProgress = vue.ref(1);
100
+ const isMoving = vue.computed(() => props.moving || autoMoving.value);
101
+ const settleDelayMs = vue.computed(() => Math.max(toFinite(props.transitionDuration, SURFACE_MOTION_DURATION_MS), toFinite(props.settleDelay, 150)));
102
+ function clamp(value, min, max) {
103
+ return Math.max(min, Math.min(max, value));
104
+ }
105
+ function toNumber(value) {
106
+ if (typeof value === "number" && Number.isFinite(value)) {
107
+ return value;
108
+ }
109
+ if (typeof value === "string" && value.trim() !== "") {
110
+ const parsed = Number(value);
111
+ if (Number.isFinite(parsed)) {
112
+ return parsed;
113
+ }
114
+ }
115
+ return void 0;
116
+ }
117
+ function readAttr(keys) {
118
+ const source = attrs;
119
+ for (const key of keys) {
120
+ const value = source[key];
121
+ if (value != null) {
122
+ return value;
123
+ }
124
+ }
125
+ return void 0;
126
+ }
127
+ function toFinite(value, fallback, attrKeys = []) {
128
+ const direct = toNumber(value);
129
+ if (direct != null) {
130
+ return direct;
131
+ }
132
+ const fromAttr = toNumber(readAttr(attrKeys));
133
+ if (fromAttr != null) {
134
+ return fromAttr;
135
+ }
136
+ return fallback;
137
+ }
138
+ function toEnum(value, allow, fallback, attrKeys = []) {
139
+ if (typeof value === "string" && allow.includes(value)) {
140
+ return value;
141
+ }
142
+ const fromAttr = readAttr(attrKeys);
143
+ if (typeof fromAttr === "string" && allow.includes(fromAttr)) {
144
+ return fromAttr;
145
+ }
146
+ return fallback;
147
+ }
148
+ function lerp(from, to, t) {
149
+ return from + (to - from) * t;
150
+ }
151
+ function smoothstep01(value) {
152
+ const t = clamp(value, 0, 1);
153
+ return t * t * (3 - 2 * t);
154
+ }
155
+ function normalizeAngleDeg(value) {
156
+ return ((value + 180) % 360 + 360) % 360 - 180;
157
+ }
158
+ function easeOutQuad(value) {
159
+ const t = clamp(value, 0, 1);
160
+ return 1 - (1 - t) * (1 - t);
161
+ }
162
+ const needsFallback = vue.computed(
163
+ () => props.mode === "blur" || props.mode === "glass"
164
+ );
165
+ const fallbackActive = vue.computed(
166
+ () => needsFallback.value && (isMoving.value || settling.value)
167
+ );
168
+ const activeMode = vue.computed(() => {
169
+ if (props.mode === "refraction") {
170
+ return "refraction";
171
+ }
172
+ if (fallbackActive.value) {
173
+ return props.fallbackMode;
174
+ }
175
+ return props.mode;
176
+ });
177
+ const refractionParamProgress = vue.computed(() => {
178
+ if (props.mode !== "refraction") {
179
+ return 1;
180
+ }
181
+ if (isMoving.value) {
182
+ return REFRACTION_MOVING_PARAM_FLOOR;
183
+ }
184
+ if (refractionRecovering.value) {
185
+ return lerp(REFRACTION_MOVING_PARAM_FLOOR, 1, refractionRecoveryProgress.value);
186
+ }
187
+ return 1;
188
+ });
189
+ const easedRefractionParamProgress = vue.computed(() => {
190
+ return easeOutQuad(refractionParamProgress.value);
191
+ });
192
+ const showLayerGlass = vue.computed(
193
+ () => activeMode.value === "glass" || activeMode.value === "refraction"
194
+ );
195
+ const showLayerFilter = vue.computed(
196
+ () => activeMode.value === "blur" || activeMode.value === "refraction"
197
+ );
198
+ const glassBorderRadius = vue.computed(() => {
199
+ if (typeof props.radius === "number") {
200
+ return props.radius;
201
+ }
202
+ if (typeof props.radius === "string") {
203
+ const parsed = Number.parseFloat(props.radius);
204
+ if (Number.isFinite(parsed)) {
205
+ return parsed;
206
+ }
207
+ }
208
+ return 0;
209
+ });
210
+ const normalizedBrightness = vue.computed(() => {
211
+ const raw = toFinite(props.brightness, 70);
212
+ if (raw <= 3) {
213
+ return Math.round(raw * 100);
214
+ }
215
+ return raw;
216
+ });
217
+ const shouldUseRefractionModel = vue.computed(
218
+ () => props.refractionStrength != null || props.refractionAngle != null || props.refractionProfile != null
219
+ );
220
+ const resolvedRefractionProfile = vue.computed(() => toEnum(
221
+ props.refractionProfile,
222
+ ["soft", "filmic", "cinematic"],
223
+ "filmic",
224
+ ["refraction-profile", "refractionProfile"]
225
+ ));
226
+ const resolvedRefractionTone = vue.computed(() => toEnum(
227
+ props.refractionTone,
228
+ ["mist", "balanced", "vivid"],
229
+ "balanced",
230
+ ["refraction-tone", "refractionTone"]
231
+ ));
232
+ const normalizedRefractionStrength = vue.computed(() => {
233
+ const raw = toFinite(props.refractionStrength, 62, ["refraction-strength", "refractionStrength"]);
234
+ return clamp(raw, 0, 100) / 100;
235
+ });
236
+ const filmicRefractionStrength = vue.computed(() => {
237
+ const eased = smoothstep01(normalizedRefractionStrength.value);
238
+ if (resolvedRefractionProfile.value === "soft") {
239
+ return 1 - (1 - eased) ** 1.15;
240
+ }
241
+ if (resolvedRefractionProfile.value === "cinematic") {
242
+ return 1 - (1 - eased) ** 2.2;
243
+ }
244
+ return 1 - (1 - eased) ** 1.65;
245
+ });
246
+ const normalizedRefractionAngleDeg = vue.computed(() => {
247
+ const raw = toFinite(props.refractionAngle, -24, ["refraction-angle", "refractionAngle"]);
248
+ return normalizeAngleDeg(raw);
249
+ });
250
+ const normalizedRefractionAngleRad = vue.computed(() => {
251
+ return normalizedRefractionAngleDeg.value * (Math.PI / 180);
252
+ });
253
+ const refractionModel = vue.computed(() => {
254
+ const strength = filmicRefractionStrength.value;
255
+ const angle = normalizedRefractionAngleRad.value;
256
+ const profile = resolvedRefractionProfile.value;
257
+ const spectralAmplitude = profile === "soft" ? lerp(4, 24, strength) : profile === "cinematic" ? lerp(8, 44, strength) : lerp(5, 34, strength);
258
+ const spectralSeparation = profile === "soft" ? lerp(0.58, 0.92, strength) : profile === "cinematic" ? lerp(0.7, 1.32, strength) : lerp(0.62, 1.15, strength);
259
+ const baseScale = profile === "soft" ? lerp(-90, -240, strength) : profile === "cinematic" ? lerp(-140, -460, strength) : lerp(-110, -360, strength);
260
+ const displace = profile === "soft" ? lerp(0.14, 0.98, strength) : profile === "cinematic" ? lerp(0.28, 1.85, strength) : lerp(0.22, 1.45, strength);
261
+ const greenAngle = profile === "soft" ? angle + Math.PI * lerp(0.22, 0.38, strength) : profile === "cinematic" ? angle + Math.PI * lerp(0.34, 0.54, strength) : angle + Math.PI * lerp(0.28, 0.46, strength);
262
+ const blueAngle = profile === "soft" ? angle - Math.PI * lerp(0.18, 0.32, strength) : profile === "cinematic" ? angle - Math.PI * lerp(0.28, 0.48, strength) : angle - Math.PI * lerp(0.22, 0.4, strength);
263
+ const greenGain = profile === "soft" ? 0.62 : profile === "cinematic" ? 0.84 : 0.72;
264
+ return {
265
+ displace,
266
+ distortionScale: Math.round(baseScale),
267
+ redOffset: Math.round(spectralAmplitude * Math.cos(angle)),
268
+ greenOffset: Math.round(spectralAmplitude * greenGain * Math.cos(greenAngle)),
269
+ blueOffset: Math.round(spectralAmplitude * spectralSeparation * Math.cos(blueAngle))
270
+ };
271
+ });
272
+ const refractionToneModel = vue.computed(() => {
273
+ const tone = resolvedRefractionTone.value;
274
+ const profile = resolvedRefractionProfile.value;
275
+ const strength = filmicRefractionStrength.value;
276
+ const base = tone === "mist" ? {
277
+ filterPrimaryTint: 24,
278
+ filterSecondaryTint: 16,
279
+ filterVeilTint: 42,
280
+ filterBaseTint: 16,
281
+ filterSaturationBoost: 1.22,
282
+ filterContrastBase: 1.04,
283
+ filterContrastGain: 0.07,
284
+ filterBrightnessBoost: 1.01,
285
+ maskPrimaryTint: 28,
286
+ maskSecondaryTint: 21,
287
+ maskVeilTint: 22,
288
+ maskStrengthGain: 0.06,
289
+ glassOpacityFrom: 0.66,
290
+ glassOpacityTo: 0.58,
291
+ glassSaturationBoost: 1.02,
292
+ glassBrightnessBoost: 4,
293
+ haloOpacityGain: 1.1,
294
+ streakTint: 20
295
+ } : tone === "vivid" ? {
296
+ filterPrimaryTint: 44,
297
+ filterSecondaryTint: 34,
298
+ filterVeilTint: 18,
299
+ filterBaseTint: 6,
300
+ filterSaturationBoost: 1.58,
301
+ filterContrastBase: 1.08,
302
+ filterContrastGain: 0.12,
303
+ filterBrightnessBoost: 1.07,
304
+ maskPrimaryTint: 48,
305
+ maskSecondaryTint: 38,
306
+ maskVeilTint: 8,
307
+ maskStrengthGain: 0.04,
308
+ glassOpacityFrom: 0.54,
309
+ glassOpacityTo: 0.42,
310
+ glassSaturationBoost: 1.22,
311
+ glassBrightnessBoost: 10,
312
+ haloOpacityGain: 0.82,
313
+ streakTint: 30
314
+ } : {
315
+ filterPrimaryTint: 34,
316
+ filterSecondaryTint: 24,
317
+ filterVeilTint: 28,
318
+ filterBaseTint: 10,
319
+ filterSaturationBoost: 1.4,
320
+ filterContrastBase: 1.06,
321
+ filterContrastGain: 0.1,
322
+ filterBrightnessBoost: 1.04,
323
+ maskPrimaryTint: 38,
324
+ maskSecondaryTint: 30,
325
+ maskVeilTint: 14,
326
+ maskStrengthGain: 0.05,
327
+ glassOpacityFrom: 0.62,
328
+ glassOpacityTo: 0.5,
329
+ glassSaturationBoost: 1.12,
330
+ glassBrightnessBoost: 7,
331
+ haloOpacityGain: 0.94,
332
+ streakTint: 24
333
+ };
334
+ const profileFactor = profile === "soft" ? 0.92 : profile === "cinematic" ? 1.1 : 1;
335
+ const primaryTint = clamp(base.filterPrimaryTint * lerp(0.86, 1.18, strength) * profileFactor, 10, 64);
336
+ const secondaryTint = clamp(base.filterSecondaryTint * lerp(0.88, 1.16, strength) * profileFactor, 8, 56);
337
+ const veilTint = clamp(base.filterVeilTint - strength * (tone === "vivid" ? 8 : 5), 6, 56);
338
+ const baseTint = clamp(base.filterBaseTint - strength * (tone === "vivid" ? 2.4 : 1.4), 2, 26);
339
+ const maskPrimaryTint = clamp(base.maskPrimaryTint * lerp(0.9, 1.16, strength) * profileFactor, 12, 68);
340
+ const maskSecondaryTint = clamp(base.maskSecondaryTint * lerp(0.9, 1.14, strength) * profileFactor, 10, 62);
341
+ const maskVeilTint = clamp(base.maskVeilTint - strength * (tone === "vivid" ? 4 : 2), 3, 28);
342
+ const saturationBoost = clamp(
343
+ base.filterSaturationBoost * lerp(0.96, 1.1, strength) * (profile === "soft" ? 0.96 : 1),
344
+ 1,
345
+ 2.2
346
+ );
347
+ const contrastBase = clamp(base.filterContrastBase + (profile === "cinematic" ? 0.02 : 0), 1, 1.2);
348
+ const contrastGain = clamp(base.filterContrastGain + (profile === "cinematic" ? 0.02 : 0), 0.04, 0.18);
349
+ const brightnessBoost = clamp(
350
+ base.filterBrightnessBoost + (profile === "cinematic" ? 0.02 : 0) + strength * 0.03,
351
+ 1,
352
+ 1.18
353
+ );
354
+ const maskStrengthGain = clamp(
355
+ base.maskStrengthGain + (profile === "cinematic" ? 8e-3 : 0),
356
+ 0.03,
357
+ 0.09
358
+ );
359
+ const glassOpacity = clamp(lerp(base.glassOpacityFrom, base.glassOpacityTo, strength), 0.36, 0.72);
360
+ const glassSaturationBoost = clamp(base.glassSaturationBoost * lerp(0.96, 1.08, strength), 0.9, 1.5);
361
+ const glassBrightnessBoost = clamp(
362
+ base.glassBrightnessBoost + strength * 8 + (profile === "cinematic" ? 2 : 0),
363
+ 2,
364
+ 18
365
+ );
366
+ const haloOpacityGain = clamp(base.haloOpacityGain * lerp(0.92, 1.06, strength), 0.72, 1.2);
367
+ const streakTint = clamp(base.streakTint * lerp(0.9, 1.15, strength), 12, 46);
368
+ return {
369
+ filterPrimaryTint: primaryTint,
370
+ filterSecondaryTint: secondaryTint,
371
+ filterVeilTint: veilTint,
372
+ filterBaseTint: baseTint,
373
+ filterSaturationBoost: saturationBoost,
374
+ filterContrastBase: contrastBase,
375
+ filterContrastGain: contrastGain,
376
+ filterBrightnessBoost: brightnessBoost,
377
+ maskPrimaryTint,
378
+ maskSecondaryTint,
379
+ maskVeilTint,
380
+ maskStrengthGain,
381
+ glassOpacity,
382
+ glassSaturationBoost,
383
+ glassBrightnessBoost,
384
+ haloOpacityGain,
385
+ streakTint
386
+ };
387
+ });
388
+ const baseRefractionMaskOpacity = vue.computed(() => {
389
+ const base = clamp(toFinite(props.overlayOpacity, 0, ["overlay-opacity", "overlayOpacity"]), 0, 1);
390
+ if (base <= 0) {
391
+ return 0;
392
+ }
393
+ const tone = resolvedRefractionTone.value;
394
+ const toneBoost = tone === "mist" ? 0.11 : tone === "vivid" ? 0.05 : 0.08;
395
+ const profileBoost = resolvedRefractionProfile.value === "soft" ? -0.012 : resolvedRefractionProfile.value === "cinematic" ? 0.022 : 0;
396
+ const boost = clamp(toneBoost + profileBoost, 0.03, 0.16);
397
+ const blendedStrength = lerp(0, filmicRefractionStrength.value, easedRefractionParamProgress.value);
398
+ return clamp(base + blendedStrength * boost, 0, 0.62);
399
+ });
400
+ const refractionRecoveryBlendDurationMs = vue.computed(() => {
401
+ const base = toFinite(props.transitionDuration, SURFACE_MOTION_DURATION_MS);
402
+ return Math.max(REFRACTION_PARAM_BLEND_DURATION_MS, base * REFRACTION_RECOVERY_DURATION_FACTOR);
403
+ });
404
+ const refractionMaskReleaseDelayMs = vue.computed(() => {
405
+ return REFRACTION_MASK_RELEASE_DELAY_AFTER_FALLBACK_MS;
406
+ });
407
+ const refractionRecoveryTotalDurationMs = vue.computed(() => {
408
+ return Math.max(
409
+ refractionRecoveryBlendDurationMs.value,
410
+ refractionMaskReleaseDelayMs.value + REFRACTION_MASK_RELEASE_DURATION_MS
411
+ );
412
+ });
413
+ const refractionMaskReleaseProgress = vue.computed(() => {
414
+ if (props.mode !== "refraction" || !refractionRecovering.value) {
415
+ return 1;
416
+ }
417
+ const afterDelayElapsed = refractionRecoveryElapsed.value - refractionMaskReleaseDelayMs.value;
418
+ if (afterDelayElapsed <= 0) {
419
+ return 0;
420
+ }
421
+ const timeProgress = smoothstep01(afterDelayElapsed / REFRACTION_MASK_RELEASE_DURATION_MS);
422
+ const effectProgress = smoothstep01(refractionParamProgress.value);
423
+ return clamp(Math.min(timeProgress, effectProgress), 0, 1);
424
+ });
425
+ const refractionRestMaskOpacity = vue.computed(() => {
426
+ const baseOpacity = baseRefractionMaskOpacity.value;
427
+ if (!refractionRecovering.value) {
428
+ return baseOpacity;
429
+ }
430
+ const releaseProgress = refractionMaskReleaseProgress.value;
431
+ return lerp(
432
+ REFRACTION_MASK_PEAK_OPACITY,
433
+ baseOpacity,
434
+ releaseProgress ** REFRACTION_MASK_RELEASE_SLOWDOWN
435
+ );
436
+ });
437
+ const refractionRestMotionCoverOpacity = vue.computed(() => {
438
+ if (!refractionRecovering.value) {
439
+ return 0;
440
+ }
441
+ const releaseProgress = refractionMaskReleaseProgress.value;
442
+ return lerp(
443
+ REFRACTION_MASK_PEAK_OPACITY,
444
+ 0,
445
+ releaseProgress ** REFRACTION_MASK_RELEASE_SLOWDOWN
446
+ );
447
+ });
448
+ const layerMaskOpacity = vue.computed(() => {
449
+ if (activeMode.value === "mask") {
450
+ const triggeredByFallback = (fallbackActive.value || props.mode === "refraction" && isMoving.value) && props.fallbackMode === "mask";
451
+ if (triggeredByFallback) {
452
+ return REFRACTION_MASK_PEAK_OPACITY;
453
+ }
454
+ return clamp(toFinite(props.opacity, 0.75, ["opacity"]), 0, 1);
455
+ }
456
+ if (activeMode.value === "refraction") {
457
+ if (isMoving.value) {
458
+ return lerp(refractionRestMaskOpacity.value, REFRACTION_MASK_PEAK_OPACITY, refractionMaskPeakRampProgress.value);
459
+ }
460
+ return refractionRestMaskOpacity.value;
461
+ }
462
+ return clamp(toFinite(props.overlayOpacity, 0, ["overlay-opacity", "overlayOpacity"]), 0, 1);
463
+ });
464
+ const refractionMotionCoverOpacity = vue.computed(() => {
465
+ if (activeMode.value !== "refraction") {
466
+ return 0;
467
+ }
468
+ if (isMoving.value) {
469
+ return lerp(refractionRestMotionCoverOpacity.value, REFRACTION_MASK_PEAK_OPACITY, refractionMaskPeakRampProgress.value);
470
+ }
471
+ return refractionRestMotionCoverOpacity.value;
472
+ });
473
+ const showLayerMotionCover = vue.computed(() => {
474
+ return refractionMotionCoverOpacity.value > 0;
475
+ });
476
+ const refractionEdgeTargetOpacity = vue.computed(() => {
477
+ if (activeMode.value !== "refraction") {
478
+ return 0;
479
+ }
480
+ return clamp(baseRefractionMaskOpacity.value * 0.36 + 8e-3, 0.018, 0.065);
481
+ });
482
+ const refractionEdgeOpacity = vue.computed(() => {
483
+ if (activeMode.value !== "refraction") {
484
+ return 0;
485
+ }
486
+ return refractionEdgeTargetOpacity.value * refractionEdgeRevealProgress.value;
487
+ });
488
+ const showLayerRefractionEdge = vue.computed(() => {
489
+ return activeMode.value === "refraction";
490
+ });
491
+ const showLayerMask = vue.computed(() => {
492
+ if (activeMode.value === "pure") {
493
+ return false;
494
+ }
495
+ if (activeMode.value === "mask") {
496
+ return true;
497
+ }
498
+ return layerMaskOpacity.value > 0;
499
+ });
500
+ const glassSurfaceProps = vue.computed(() => {
501
+ const base = {
502
+ width: "100%",
503
+ height: "100%",
504
+ borderRadius: glassBorderRadius.value,
505
+ blur: Math.max(0, toFinite(props.blur, 10, ["blur"])),
506
+ saturation: Math.max(0, toFinite(props.saturation, 1.8, ["saturation"])),
507
+ brightness: normalizedBrightness.value,
508
+ opacity: 0.93,
509
+ backgroundOpacity: clamp(toFinite(props.backgroundOpacity, 0, ["background-opacity", "backgroundOpacity"]), 0, 1),
510
+ borderWidth: Math.max(0, toFinite(props.borderWidth, 0.07, ["border-width", "borderWidth"]))
511
+ };
512
+ if (activeMode.value === "refraction") {
513
+ const model = refractionModel.value;
514
+ const toneModel = refractionToneModel.value;
515
+ const parameterBlend = easedRefractionParamProgress.value;
516
+ const targetSaturation = clamp(Math.max(0, toFinite(props.saturation, 1.8, ["saturation"])) * toneModel.glassSaturationBoost, 0.6, 3.2);
517
+ const targetBrightness = clamp(normalizedBrightness.value + toneModel.glassBrightnessBoost, 24, 100);
518
+ const targetDisplace = shouldUseRefractionModel.value ? model.displace : toFinite(props.displace, 0.5, ["displace"]);
519
+ const targetDistortionScale = shouldUseRefractionModel.value ? model.distortionScale : toFinite(props.distortionScale, -180, ["distortion-scale", "distortionScale"]);
520
+ const targetRedOffset = shouldUseRefractionModel.value ? model.redOffset : toFinite(props.redOffset, 0, ["red-offset", "redOffset"]);
521
+ const targetGreenOffset = shouldUseRefractionModel.value ? model.greenOffset : toFinite(props.greenOffset, 10, ["green-offset", "greenOffset"]);
522
+ const targetBlueOffset = shouldUseRefractionModel.value ? model.blueOffset : toFinite(props.blueOffset, 20, ["blue-offset", "blueOffset"]);
523
+ return {
524
+ ...base,
525
+ saturation: lerp(1.02, targetSaturation, parameterBlend),
526
+ brightness: lerp(Math.max(24, normalizedBrightness.value), targetBrightness, parameterBlend),
527
+ opacity: lerp(0.18, toneModel.glassOpacity, parameterBlend),
528
+ displace: lerp(0.06, targetDisplace, parameterBlend),
529
+ distortionScale: Math.round(lerp(-90, targetDistortionScale, parameterBlend)),
530
+ redOffset: Math.round(lerp(0, targetRedOffset, parameterBlend)),
531
+ greenOffset: Math.round(lerp(0, targetGreenOffset, parameterBlend)),
532
+ blueOffset: Math.round(lerp(0, targetBlueOffset, parameterBlend)),
533
+ xChannel: props.xChannel,
534
+ yChannel: props.yChannel,
535
+ mixBlendMode: props.mixBlendMode ?? "difference"
536
+ };
537
+ }
538
+ return {
539
+ ...base,
540
+ displace: 0.5,
541
+ distortionScale: -180,
542
+ redOffset: 0,
543
+ greenOffset: 10,
544
+ blueOffset: 20,
545
+ xChannel: "R",
546
+ yChannel: "G",
547
+ mixBlendMode: "difference"
548
+ };
549
+ });
550
+ const cssVars = vue.computed(() => {
551
+ const vars = {
552
+ "--tx-surface-transition": `${Math.max(0, toFinite(props.transitionDuration, SURFACE_MOTION_DURATION_MS))}ms`
553
+ };
554
+ if (props.radius != null) {
555
+ vars["--tx-surface-radius"] = typeof props.radius === "number" ? `${props.radius}px` : props.radius;
556
+ }
557
+ if (props.color) {
558
+ vars["--tx-surface-color"] = props.color;
559
+ }
560
+ if (showLayerFilter.value) {
561
+ vars["--tx-surface-filter-blur"] = `${Math.max(0, toFinite(props.blur, 10, ["blur"]))}px`;
562
+ vars["--tx-surface-filter-saturation"] = `${Math.max(0, toFinite(props.filterSaturation, 1.5, ["filter-saturation", "filterSaturation"]))}`;
563
+ vars["--tx-surface-filter-contrast"] = `${Math.max(0, toFinite(props.filterContrast, 1, ["filter-contrast", "filterContrast"]))}`;
564
+ vars["--tx-surface-filter-brightness"] = `${Math.max(0, toFinite(props.filterBrightness, 1, ["filter-brightness", "filterBrightness"]))}`;
565
+ }
566
+ if (showLayerMask.value) {
567
+ vars["--tx-surface-mask-opacity"] = `${layerMaskOpacity.value}`;
568
+ vars["--tx-surface-mask-opacity-percent"] = `${Math.round(layerMaskOpacity.value * 100)}%`;
569
+ }
570
+ if (showLayerMotionCover.value) {
571
+ vars["--tx-surface-motion-cover-opacity"] = `${refractionMotionCoverOpacity.value}`;
572
+ }
573
+ if (showLayerRefractionEdge.value) {
574
+ vars["--tx-surface-refraction-edge-opacity"] = `${refractionEdgeOpacity.value}`;
575
+ }
576
+ if (activeMode.value === "refraction") {
577
+ const angleDeg = normalizedRefractionAngleDeg.value;
578
+ const angleRad = normalizedRefractionAngleRad.value;
579
+ const toneModel = refractionToneModel.value;
580
+ const parameterBlend = easedRefractionParamProgress.value;
581
+ const blendedStrength = lerp(0, filmicRefractionStrength.value, parameterBlend);
582
+ const fallbackLightX = clamp(50 + Math.cos(angleRad) * 24, 0, 100);
583
+ const fallbackLightY = clamp(50 + Math.sin(angleRad) * 22, 0, 100);
584
+ const lightX = props.refractionLightX == null ? fallbackLightX : clamp(toFinite(props.refractionLightX, 0.5, ["refraction-light-x", "refractionLightX"]), 0, 1) * 100;
585
+ const lightY = props.refractionLightY == null ? fallbackLightY : clamp(toFinite(props.refractionLightY, 0.5, ["refraction-light-y", "refractionLightY"]), 0, 1) * 100;
586
+ vars["--tx-surface-refraction-strength"] = `${blendedStrength}`;
587
+ vars["--tx-surface-refraction-light-x"] = `${lightX}%`;
588
+ vars["--tx-surface-refraction-light-y"] = `${lightY}%`;
589
+ vars["--tx-surface-refraction-streak-angle"] = `${angleDeg + 92}deg`;
590
+ vars["--tx-surface-refraction-filter-primary-weight"] = `${Math.round(lerp(10, clamp(toneModel.filterPrimaryTint, 8, 76), parameterBlend))}%`;
591
+ vars["--tx-surface-refraction-filter-secondary-weight"] = `${Math.round(lerp(8, clamp(toneModel.filterSecondaryTint, 6, 68), parameterBlend))}%`;
592
+ vars["--tx-surface-refraction-filter-veil-weight"] = `${Math.round(lerp(6, clamp(toneModel.filterVeilTint, 4, 52), parameterBlend))}%`;
593
+ vars["--tx-surface-refraction-filter-base-weight"] = `${Math.round(lerp(2, clamp(toneModel.filterBaseTint, 2, 32), parameterBlend))}%`;
594
+ vars["--tx-surface-refraction-filter-saturation-boost"] = `${lerp(1, toneModel.filterSaturationBoost, parameterBlend)}`;
595
+ vars["--tx-surface-refraction-filter-contrast-base"] = `${lerp(1, toneModel.filterContrastBase, parameterBlend)}`;
596
+ vars["--tx-surface-refraction-filter-contrast-gain"] = `${lerp(0, toneModel.filterContrastGain, parameterBlend)}`;
597
+ vars["--tx-surface-refraction-filter-brightness-boost"] = `${lerp(1, toneModel.filterBrightnessBoost, parameterBlend)}`;
598
+ vars["--tx-surface-refraction-mask-primary-weight"] = `${Math.round(lerp(12, clamp(toneModel.maskPrimaryTint, 8, 78), parameterBlend))}%`;
599
+ vars["--tx-surface-refraction-mask-secondary-weight"] = `${Math.round(lerp(10, clamp(toneModel.maskSecondaryTint, 6, 72), parameterBlend))}%`;
600
+ vars["--tx-surface-refraction-mask-veil-weight"] = `${Math.round(lerp(4, clamp(toneModel.maskVeilTint, 3, 36), parameterBlend))}%`;
601
+ vars["--tx-surface-refraction-mask-strength-gain"] = `${lerp(0.01, toneModel.maskStrengthGain, parameterBlend)}`;
602
+ vars["--tx-surface-refraction-mask-effective-opacity"] = `${layerMaskOpacity.value}`;
603
+ vars["--tx-surface-refraction-streak-weight"] = `${Math.round(lerp(8, clamp(toneModel.streakTint, 8, 52), parameterBlend))}%`;
604
+ vars["--tx-surface-refraction-halo-opacity-gain"] = `${lerp(0.72, toneModel.haloOpacityGain, parameterBlend)}`;
605
+ const modelHaloMin = resolvedRefractionProfile.value === "soft" ? 0.16 : resolvedRefractionProfile.value === "cinematic" ? 0.28 : 0.22;
606
+ const modelHaloMax = resolvedRefractionProfile.value === "soft" ? 0.34 : resolvedRefractionProfile.value === "cinematic" ? 0.58 : 0.48;
607
+ const modelHaloOpacity = lerp(modelHaloMin, modelHaloMax, blendedStrength) * lerp(0.72, toneModel.haloOpacityGain, parameterBlend);
608
+ const haloOpacity = props.refractionHaloOpacity == null ? modelHaloOpacity : clamp(toFinite(props.refractionHaloOpacity, modelHaloOpacity, ["refraction-halo-opacity", "refractionHaloOpacity"]), 0, 1);
609
+ vars["--tx-surface-refraction-halo-opacity"] = `${haloOpacity}`;
610
+ }
611
+ if (props.fake) {
612
+ vars["--tx-surface-fake-index"] = String(props.fakeIndex);
613
+ const mode = activeMode.value;
614
+ if (mode === "pure") {
615
+ vars["--tx-surface-fake-bg"] = props.color || "var(--tx-fill-color-lighter, #fafafa)";
616
+ vars["--tx-surface-fake-opacity"] = "1";
617
+ } else if (mode === "mask") {
618
+ vars["--tx-surface-fake-bg"] = props.color || "var(--tx-fill-color-lighter, #fafafa)";
619
+ vars["--tx-surface-fake-opacity"] = String(layerMaskOpacity.value);
620
+ }
621
+ }
622
+ return vars;
623
+ });
624
+ const rootClasses = vue.computed(() => {
625
+ const classes = ["tx-base-surface"];
626
+ classes.push(`tx-base-surface--preset-${props.preset}`);
627
+ classes.push(`tx-base-surface--${activeMode.value}`);
628
+ if (showLayerGlass.value) {
629
+ classes.push("tx-base-surface--with-glass");
630
+ }
631
+ if (showLayerFilter.value) {
632
+ classes.push("tx-base-surface--with-filter");
633
+ }
634
+ if (showLayerMask.value) {
635
+ classes.push("tx-base-surface--with-mask");
636
+ }
637
+ if (showLayerMotionCover.value) {
638
+ classes.push("tx-base-surface--with-motion-cover");
639
+ }
640
+ if (showLayerRefractionEdge.value) {
641
+ classes.push("tx-base-surface--with-refraction-edge");
642
+ }
643
+ if (activeMode.value === "refraction") {
644
+ classes.push(`tx-base-surface--refraction-renderer-${props.refractionRenderer}`);
645
+ classes.push(`tx-base-surface--refraction-profile-${resolvedRefractionProfile.value}`);
646
+ classes.push(`tx-base-surface--refraction-tone-${resolvedRefractionTone.value}`);
647
+ }
648
+ if (props.fake) {
649
+ classes.push("tx-base-surface--fake");
650
+ }
651
+ if (settling.value) {
652
+ classes.push("tx-base-surface--settling");
653
+ }
654
+ return classes;
655
+ });
656
+ let mutationObserver = null;
657
+ let observedElements = [];
658
+ function stopRefractionEdgeReveal(resetProgress = true) {
659
+ if (refractionEdgeRevealTimer != null) {
660
+ clearTimeout(refractionEdgeRevealTimer);
661
+ refractionEdgeRevealTimer = null;
662
+ }
663
+ if (refractionEdgeRevealRaf != null) {
664
+ cancelAnimationFrame(refractionEdgeRevealRaf);
665
+ refractionEdgeRevealRaf = null;
666
+ }
667
+ if (resetProgress) {
668
+ refractionEdgeRevealProgress.value = 1;
669
+ }
670
+ }
671
+ function hideRefractionEdge() {
672
+ stopRefractionEdgeReveal(false);
673
+ refractionEdgeRevealProgress.value = 0;
674
+ }
675
+ function startRefractionEdgeReveal() {
676
+ if (props.mode !== "refraction") {
677
+ refractionEdgeRevealProgress.value = 1;
678
+ return;
679
+ }
680
+ if (!env.hasWindow()) {
681
+ refractionEdgeRevealProgress.value = 1;
682
+ return;
683
+ }
684
+ stopRefractionEdgeReveal(false);
685
+ refractionEdgeRevealProgress.value = 0;
686
+ refractionEdgeRevealTimer = setTimeout(() => {
687
+ refractionEdgeRevealTimer = null;
688
+ const total = Math.max(80, REFRACTION_EDGE_REVEAL_DURATION_MS);
689
+ let startedAt = 0;
690
+ const tick = (timestamp) => {
691
+ if (!startedAt) {
692
+ startedAt = timestamp;
693
+ }
694
+ const elapsed = timestamp - startedAt;
695
+ const progress = clamp(elapsed / total, 0, 1);
696
+ refractionEdgeRevealProgress.value = smoothstep01(progress);
697
+ if (progress >= 1 || isMoving.value || refractionRecovering.value) {
698
+ if (isMoving.value || refractionRecovering.value) {
699
+ refractionEdgeRevealProgress.value = 0;
700
+ } else {
701
+ refractionEdgeRevealProgress.value = 1;
702
+ }
703
+ refractionEdgeRevealRaf = null;
704
+ return;
705
+ }
706
+ refractionEdgeRevealRaf = requestAnimationFrame(tick);
707
+ };
708
+ refractionEdgeRevealRaf = requestAnimationFrame(tick);
709
+ }, Math.max(0, REFRACTION_EDGE_REVEAL_DELAY_MS));
710
+ }
711
+ function stopRefractionMaskPeakRamp(resetProgress = true) {
712
+ if (refractionMaskPeakRampRaf != null) {
713
+ cancelAnimationFrame(refractionMaskPeakRampRaf);
714
+ refractionMaskPeakRampRaf = null;
715
+ }
716
+ if (resetProgress) {
717
+ refractionMaskPeakRampProgress.value = 1;
718
+ }
719
+ }
720
+ function startRefractionMaskPeakRamp() {
721
+ if (props.mode !== "refraction") {
722
+ refractionMaskPeakRampProgress.value = 1;
723
+ return;
724
+ }
725
+ if (!env.hasWindow()) {
726
+ refractionMaskPeakRampProgress.value = 1;
727
+ return;
728
+ }
729
+ stopRefractionMaskPeakRamp(false);
730
+ refractionMaskPeakRampProgress.value = 0;
731
+ const total = Math.max(40, REFRACTION_MASK_PEAK_RAMP_DURATION_MS);
732
+ let startedAt = 0;
733
+ const tick = (timestamp) => {
734
+ if (!startedAt) {
735
+ startedAt = timestamp;
736
+ }
737
+ const elapsed = timestamp - startedAt;
738
+ const progress = clamp(elapsed / total, 0, 1);
739
+ refractionMaskPeakRampProgress.value = smoothstep01(progress);
740
+ if (progress >= 1 || !isMoving.value) {
741
+ refractionMaskPeakRampProgress.value = 1;
742
+ refractionMaskPeakRampRaf = null;
743
+ return;
744
+ }
745
+ refractionMaskPeakRampRaf = requestAnimationFrame(tick);
746
+ };
747
+ refractionMaskPeakRampRaf = requestAnimationFrame(tick);
748
+ }
749
+ function stopRefractionRecovery(resetProgress = true) {
750
+ if (refractionRecoveryRaf != null) {
751
+ cancelAnimationFrame(refractionRecoveryRaf);
752
+ refractionRecoveryRaf = null;
753
+ }
754
+ refractionRecovering.value = false;
755
+ refractionRecoveryElapsed.value = 0;
756
+ if (resetProgress) {
757
+ refractionRecoveryProgress.value = 1;
758
+ }
759
+ }
760
+ function startRefractionRecovery() {
761
+ if (props.mode !== "refraction") {
762
+ return;
763
+ }
764
+ if (isMoving.value) {
765
+ return;
766
+ }
767
+ if (refractionRecovering.value) {
768
+ return;
769
+ }
770
+ if (!env.hasWindow()) {
771
+ refractionRecovering.value = false;
772
+ refractionRecoveryProgress.value = 1;
773
+ refractionRecoveryElapsed.value = 0;
774
+ return;
775
+ }
776
+ stopRefractionRecovery(false);
777
+ refractionRecovering.value = true;
778
+ refractionRecoveryProgress.value = 0;
779
+ refractionRecoveryElapsed.value = 0;
780
+ const blendTotal = refractionRecoveryBlendDurationMs.value;
781
+ const total = refractionRecoveryTotalDurationMs.value;
782
+ let startedAt = 0;
783
+ const tick = (timestamp) => {
784
+ if (!startedAt) {
785
+ startedAt = timestamp;
786
+ }
787
+ const elapsed = timestamp - startedAt;
788
+ refractionRecoveryElapsed.value = elapsed;
789
+ const progress = blendTotal <= 0 ? 1 : smoothstep01(elapsed / blendTotal);
790
+ refractionRecoveryProgress.value = clamp(progress, 0, 1);
791
+ if (elapsed >= total) {
792
+ refractionRecovering.value = false;
793
+ refractionRecoveryProgress.value = 1;
794
+ refractionRecoveryElapsed.value = total;
795
+ refractionRecoveryRaf = null;
796
+ return;
797
+ }
798
+ refractionRecoveryRaf = requestAnimationFrame(tick);
799
+ };
800
+ refractionRecoveryRaf = requestAnimationFrame(tick);
801
+ }
802
+ function startSettleTimer() {
803
+ clearTimeout(settleTimer);
804
+ settling.value = true;
805
+ settleTimer = setTimeout(() => {
806
+ settling.value = false;
807
+ }, settleDelayMs.value);
808
+ }
809
+ function onTransformStart() {
810
+ autoMoving.value = true;
811
+ clearTimeout(settleTimer);
812
+ settling.value = false;
813
+ if (props.mode === "refraction") {
814
+ stopRefractionRecovery(false);
815
+ refractionRecoveryProgress.value = 0;
816
+ refractionRecoveryElapsed.value = 0;
817
+ }
818
+ }
819
+ function onTransformEnd() {
820
+ autoMoving.value = false;
821
+ if (props.mode === "refraction") {
822
+ startRefractionRecovery();
823
+ return;
824
+ }
825
+ startSettleTimer();
826
+ }
827
+ function handleTransitionStart(e) {
828
+ if (e.propertyName === "transform" || e.propertyName === "translate") {
829
+ onTransformStart();
830
+ }
831
+ }
832
+ function handleTransitionEnd(e) {
833
+ if (e.propertyName === "transform" || e.propertyName === "translate") {
834
+ onTransformEnd();
835
+ }
836
+ }
837
+ function hasTransformChanged(el) {
838
+ const transform = el.style.transform || el.style.getPropertyValue("transform");
839
+ return transform && transform !== "none" && transform !== "";
840
+ }
841
+ function setupAutoDetect() {
842
+ if (!props.autoDetect || !env.hasWindow() || !rootRef.value) {
843
+ return;
844
+ }
845
+ const el = rootRef.value;
846
+ const targets = [];
847
+ let current = el;
848
+ while (current) {
849
+ targets.push(current);
850
+ current = current.parentElement;
851
+ }
852
+ observedElements = targets;
853
+ for (const target of targets) {
854
+ target.addEventListener("transitionstart", handleTransitionStart);
855
+ target.addEventListener("transitionend", handleTransitionEnd);
856
+ target.addEventListener("transitioncancel", handleTransitionEnd);
857
+ }
858
+ mutationObserver = new MutationObserver((mutations) => {
859
+ for (const mutation of mutations) {
860
+ if (mutation.type === "attributes" && mutation.attributeName === "style") {
861
+ const target = mutation.target;
862
+ if (hasTransformChanged(target)) {
863
+ onTransformStart();
864
+ } else if (autoMoving.value) {
865
+ onTransformEnd();
866
+ }
867
+ }
868
+ }
869
+ });
870
+ for (const target of targets) {
871
+ mutationObserver.observe(target, { attributes: true, attributeFilter: ["style"] });
872
+ }
873
+ }
874
+ function teardownAutoDetect() {
875
+ for (const target of observedElements) {
876
+ target.removeEventListener("transitionstart", handleTransitionStart);
877
+ target.removeEventListener("transitionend", handleTransitionEnd);
878
+ target.removeEventListener("transitioncancel", handleTransitionEnd);
879
+ }
880
+ observedElements = [];
881
+ mutationObserver?.disconnect();
882
+ mutationObserver = null;
883
+ clearTimeout(settleTimer);
884
+ stopRefractionEdgeReveal();
885
+ stopRefractionMaskPeakRamp();
886
+ stopRefractionRecovery();
887
+ }
888
+ vue.watch(() => props.moving, (newVal, oldVal) => {
889
+ if (props.mode === "refraction") {
890
+ if (newVal) {
891
+ stopRefractionRecovery(false);
892
+ refractionRecoveryProgress.value = 0;
893
+ refractionRecoveryElapsed.value = 0;
894
+ return;
895
+ }
896
+ if (oldVal && !newVal) {
897
+ startRefractionRecovery();
898
+ }
899
+ return;
900
+ }
901
+ if (oldVal && !newVal && needsFallback.value) {
902
+ startSettleTimer();
903
+ }
904
+ });
905
+ vue.watch(isMoving, (moving, prevMoving) => {
906
+ if (props.mode !== "refraction") {
907
+ stopRefractionMaskPeakRamp();
908
+ stopRefractionEdgeReveal();
909
+ return;
910
+ }
911
+ if (moving && !prevMoving) {
912
+ hideRefractionEdge();
913
+ startRefractionMaskPeakRamp();
914
+ return;
915
+ }
916
+ if (!moving) {
917
+ stopRefractionMaskPeakRamp();
918
+ }
919
+ }, { flush: "sync" });
920
+ vue.watch(
921
+ [isMoving, refractionRecovering, () => props.mode],
922
+ ([moving, recovering, mode], [prevMoving, prevRecovering, prevMode]) => {
923
+ if (mode !== "refraction") {
924
+ stopRefractionEdgeReveal();
925
+ return;
926
+ }
927
+ if (moving || recovering) {
928
+ hideRefractionEdge();
929
+ return;
930
+ }
931
+ if (prevMode !== "refraction" || prevMoving || prevRecovering) {
932
+ startRefractionEdgeReveal();
933
+ }
934
+ },
935
+ { flush: "sync" }
936
+ );
937
+ vue.watch(() => props.mode, (mode) => {
938
+ if (mode !== "refraction") {
939
+ stopRefractionMaskPeakRamp();
940
+ stopRefractionEdgeReveal();
941
+ stopRefractionRecovery();
942
+ return;
943
+ }
944
+ if (isMoving.value) {
945
+ hideRefractionEdge();
946
+ startRefractionMaskPeakRamp();
947
+ stopRefractionRecovery(false);
948
+ refractionRecoveryProgress.value = 0;
949
+ refractionRecoveryElapsed.value = 0;
950
+ return;
951
+ }
952
+ startRefractionEdgeReveal();
953
+ stopRefractionMaskPeakRamp();
954
+ stopRefractionRecovery();
955
+ });
956
+ vue.watch(() => props.autoDetect, (newVal) => {
957
+ teardownAutoDetect();
958
+ if (newVal) {
959
+ setupAutoDetect();
960
+ }
961
+ });
962
+ vue.onMounted(() => {
963
+ setupAutoDetect();
964
+ });
965
+ vue.onBeforeUnmount(() => {
966
+ teardownAutoDetect();
967
+ });
968
+ return (_ctx, _cache) => {
969
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.tag), {
970
+ ref_key: "rootRef",
971
+ ref: rootRef,
972
+ class: vue.normalizeClass(rootClasses.value),
973
+ style: vue.normalizeStyle(cssVars.value)
974
+ }, {
975
+ default: vue.withCtx(() => [
976
+ vue.createVNode(vue.Transition, { name: "tx-surface-layer-fade" }, {
977
+ default: vue.withCtx(() => [
978
+ showLayerGlass.value ? (vue.openBlock(), vue.createBlock(TxGlassSurface_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 0 }, glassSurfaceProps.value, { class: "tx-base-surface__layer tx-base-surface__layer--glass" }), null, 16)) : vue.createCommentVNode("", true)
979
+ ]),
980
+ _: 1
981
+ }),
982
+ vue.createVNode(vue.Transition, { name: "tx-surface-layer-fade" }, {
983
+ default: vue.withCtx(() => [
984
+ showLayerFilter.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1)) : vue.createCommentVNode("", true)
985
+ ]),
986
+ _: 1
987
+ }),
988
+ vue.createVNode(vue.Transition, { name: "tx-surface-layer-fade" }, {
989
+ default: vue.withCtx(() => [
990
+ showLayerMotionCover.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2)) : vue.createCommentVNode("", true)
991
+ ]),
992
+ _: 1
993
+ }),
994
+ vue.createVNode(vue.Transition, { name: "tx-surface-layer-fade" }, {
995
+ default: vue.withCtx(() => [
996
+ showLayerMask.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3)) : vue.createCommentVNode("", true)
997
+ ]),
998
+ _: 1
999
+ }),
1000
+ vue.createVNode(vue.Transition, { name: "tx-surface-layer-fade" }, {
1001
+ default: vue.withCtx(() => [
1002
+ showLayerRefractionEdge.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4)) : vue.createCommentVNode("", true)
1003
+ ]),
1004
+ _: 1
1005
+ }),
1006
+ vue.createElementVNode("div", _hoisted_5, [
1007
+ vue.renderSlot(_ctx.$slots, "default")
1008
+ ])
1009
+ ]),
1010
+ _: 3
1011
+ }, 8, ["class", "style"]);
1012
+ };
1013
+ }
1014
+ });
1015
+
1016
+ exports.default = _sfc_main;