@welldot/vue 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +563 -2
  3. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  4. package/dist/_virtual/icons/ph/caret-down.js +21 -0
  5. package/dist/_virtual/icons/ph/caret-down.js.map +1 -0
  6. package/dist/_virtual/icons/ph/info.js +21 -0
  7. package/dist/_virtual/icons/ph/info.js.map +1 -0
  8. package/dist/_virtual/icons/ph/pencil-simple-line.js +21 -0
  9. package/dist/_virtual/icons/ph/pencil-simple-line.js.map +1 -0
  10. package/dist/_virtual/icons/ph/pencil-simple.js +21 -0
  11. package/dist/_virtual/icons/ph/pencil-simple.js.map +1 -0
  12. package/dist/_virtual/icons/ph/plus.js +21 -0
  13. package/dist/_virtual/icons/ph/plus.js.map +1 -0
  14. package/dist/_virtual/icons/ph/x.js +21 -0
  15. package/dist/_virtual/icons/ph/x.js.map +1 -0
  16. package/dist/components/WellChip.d.ts +30 -0
  17. package/dist/components/WellChip.d.ts.map +1 -0
  18. package/dist/components/WellChip.js +9 -0
  19. package/dist/components/WellChip.js.map +1 -0
  20. package/dist/components/WellChip.vue_vue_type_script_setup_true_lang.js +43 -0
  21. package/dist/components/WellChip.vue_vue_type_script_setup_true_lang.js.map +1 -0
  22. package/dist/components/WellComboSelect.d.ts +19 -0
  23. package/dist/components/WellComboSelect.d.ts.map +1 -0
  24. package/dist/components/WellComboSelect.js +7 -0
  25. package/dist/components/WellComboSelect.js.map +1 -0
  26. package/dist/components/WellComboSelect.vue_vue_type_script_setup_true_lang.js +31 -0
  27. package/dist/components/WellComboSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  28. package/dist/components/WellInfoPopover.d.ts +31 -0
  29. package/dist/components/WellInfoPopover.d.ts.map +1 -0
  30. package/dist/components/WellInfoPopover.js +7 -0
  31. package/dist/components/WellInfoPopover.js.map +1 -0
  32. package/dist/components/WellInfoPopover.vue_vue_type_script_setup_true_lang.js +50 -0
  33. package/dist/components/WellInfoPopover.vue_vue_type_script_setup_true_lang.js.map +1 -0
  34. package/dist/components/WellInputNumber.d.ts +4 -0
  35. package/dist/components/WellInputNumber.d.ts.map +1 -0
  36. package/dist/components/WellInputNumber.js +7 -0
  37. package/dist/components/WellInputNumber.js.map +1 -0
  38. package/dist/components/WellInputNumber.vue_vue_type_script_setup_true_lang.js +16 -0
  39. package/dist/components/WellInputNumber.vue_vue_type_script_setup_true_lang.js.map +1 -0
  40. package/dist/components/WellLabeledField.d.ts +22 -0
  41. package/dist/components/WellLabeledField.d.ts.map +1 -0
  42. package/dist/components/WellLabeledField.js +7 -0
  43. package/dist/components/WellLabeledField.js.map +1 -0
  44. package/dist/components/WellLabeledField.vue_vue_type_script_setup_true_lang.js +32 -0
  45. package/dist/components/WellLabeledField.vue_vue_type_script_setup_true_lang.js.map +1 -0
  46. package/dist/components/WellTagSelect.d.ts +21 -0
  47. package/dist/components/WellTagSelect.d.ts.map +1 -0
  48. package/dist/components/WellTagSelect.js +7 -0
  49. package/dist/components/WellTagSelect.js.map +1 -0
  50. package/dist/components/WellTagSelect.vue_vue_type_script_setup_true_lang.js +66 -0
  51. package/dist/components/WellTagSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  52. package/dist/components/WellTextureSelect.d.ts +30 -0
  53. package/dist/components/WellTextureSelect.d.ts.map +1 -0
  54. package/dist/components/WellTextureSelect.js +7 -0
  55. package/dist/components/WellTextureSelect.js.map +1 -0
  56. package/dist/components/WellTextureSelect.vue_vue_type_script_setup_true_lang.js +103 -0
  57. package/dist/components/WellTextureSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  58. package/dist/components/WellTextureThumbnail.d.ts +10 -0
  59. package/dist/components/WellTextureThumbnail.d.ts.map +1 -0
  60. package/dist/components/WellTextureThumbnail.js +9 -0
  61. package/dist/components/WellTextureThumbnail.js.map +1 -0
  62. package/dist/components/WellTextureThumbnail.vue_vue_type_script_setup_true_lang.js +393 -0
  63. package/dist/components/WellTextureThumbnail.vue_vue_type_script_setup_true_lang.js.map +1 -0
  64. package/dist/components/WellUnitInput.d.ts +19 -0
  65. package/dist/components/WellUnitInput.d.ts.map +1 -0
  66. package/dist/components/WellUnitInput.js +7 -0
  67. package/dist/components/WellUnitInput.js.map +1 -0
  68. package/dist/components/WellUnitInput.vue_vue_type_script_setup_true_lang.js +41 -0
  69. package/dist/components/WellUnitInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  70. package/dist/components/parts/WellInfoTrigger.d.ts +8 -0
  71. package/dist/components/parts/WellInfoTrigger.d.ts.map +1 -0
  72. package/dist/components/parts/WellInfoTrigger.js +7 -0
  73. package/dist/components/parts/WellInfoTrigger.js.map +1 -0
  74. package/dist/components/parts/WellInfoTrigger.vue_vue_type_script_setup_true_lang.js +26 -0
  75. package/dist/components/parts/WellInfoTrigger.vue_vue_type_script_setup_true_lang.js.map +1 -0
  76. package/dist/composables/useWellNumberFormat.d.ts +12 -0
  77. package/dist/composables/useWellNumberFormat.d.ts.map +1 -0
  78. package/dist/composables/useWellNumberFormat.js +25 -0
  79. package/dist/composables/useWellNumberFormat.js.map +1 -0
  80. package/dist/composables/useWellText.d.ts +11 -0
  81. package/dist/composables/useWellText.d.ts.map +1 -0
  82. package/dist/composables/useWellText.js +15 -0
  83. package/dist/composables/useWellText.js.map +1 -0
  84. package/dist/composables/useWellUnits.d.ts +29 -0
  85. package/dist/composables/useWellUnits.d.ts.map +1 -0
  86. package/dist/composables/useWellUnits.js +52 -0
  87. package/dist/composables/useWellUnits.js.map +1 -0
  88. package/dist/config.d.ts +110 -0
  89. package/dist/config.d.ts.map +1 -0
  90. package/dist/config.js +76 -0
  91. package/dist/config.js.map +1 -0
  92. package/dist/grid/WellDataGrid.d.ts +34 -0
  93. package/dist/grid/WellDataGrid.d.ts.map +1 -0
  94. package/dist/grid/WellDataGrid.js +9 -0
  95. package/dist/grid/WellDataGrid.js.map +1 -0
  96. package/dist/grid/WellDataGrid.vue_vue_type_script_setup_true_lang.js +87 -0
  97. package/dist/grid/WellDataGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
  98. package/dist/grid/cells/GridCheckboxCell.d.ts +10 -0
  99. package/dist/grid/cells/GridCheckboxCell.d.ts.map +1 -0
  100. package/dist/grid/cells/GridCheckboxCell.js +7 -0
  101. package/dist/grid/cells/GridCheckboxCell.js.map +1 -0
  102. package/dist/grid/cells/GridCheckboxCell.vue_vue_type_script_setup_true_lang.js +32 -0
  103. package/dist/grid/cells/GridCheckboxCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  104. package/dist/grid/cells/GridColorCell.d.ts +7 -0
  105. package/dist/grid/cells/GridColorCell.d.ts.map +1 -0
  106. package/dist/grid/cells/GridColorCell.js +7 -0
  107. package/dist/grid/cells/GridColorCell.js.map +1 -0
  108. package/dist/grid/cells/GridColorCell.vue_vue_type_script_setup_true_lang.js +18 -0
  109. package/dist/grid/cells/GridColorCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  110. package/dist/grid/cells/GridColorPickerEditor.d.ts +12 -0
  111. package/dist/grid/cells/GridColorPickerEditor.d.ts.map +1 -0
  112. package/dist/grid/cells/GridColorPickerEditor.js +7 -0
  113. package/dist/grid/cells/GridColorPickerEditor.js.map +1 -0
  114. package/dist/grid/cells/GridColorPickerEditor.vue_vue_type_script_setup_true_lang.js +70 -0
  115. package/dist/grid/cells/GridColorPickerEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  116. package/dist/grid/cells/GridComboEditor.d.ts +14 -0
  117. package/dist/grid/cells/GridComboEditor.d.ts.map +1 -0
  118. package/dist/grid/cells/GridComboEditor.js +7 -0
  119. package/dist/grid/cells/GridComboEditor.js.map +1 -0
  120. package/dist/grid/cells/GridComboEditor.vue_vue_type_script_setup_true_lang.js +177 -0
  121. package/dist/grid/cells/GridComboEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  122. package/dist/grid/cells/GridDeleteCell.d.ts +12 -0
  123. package/dist/grid/cells/GridDeleteCell.d.ts.map +1 -0
  124. package/dist/grid/cells/GridDeleteCell.js +7 -0
  125. package/dist/grid/cells/GridDeleteCell.js.map +1 -0
  126. package/dist/grid/cells/GridDeleteCell.vue_vue_type_script_setup_true_lang.js +33 -0
  127. package/dist/grid/cells/GridDeleteCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  128. package/dist/grid/cells/GridDragCell.d.ts +16 -0
  129. package/dist/grid/cells/GridDragCell.d.ts.map +1 -0
  130. package/dist/grid/cells/GridDragCell.js +7 -0
  131. package/dist/grid/cells/GridDragCell.js.map +1 -0
  132. package/dist/grid/cells/GridDragCell.vue_vue_type_script_setup_true_lang.js +50 -0
  133. package/dist/grid/cells/GridDragCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  134. package/dist/grid/cells/GridFormattedCell.d.ts +9 -0
  135. package/dist/grid/cells/GridFormattedCell.d.ts.map +1 -0
  136. package/dist/grid/cells/GridFormattedCell.js +7 -0
  137. package/dist/grid/cells/GridFormattedCell.js.map +1 -0
  138. package/dist/grid/cells/GridFormattedCell.vue_vue_type_script_setup_true_lang.js +19 -0
  139. package/dist/grid/cells/GridFormattedCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  140. package/dist/grid/cells/GridHeaderCell.d.ts +11 -0
  141. package/dist/grid/cells/GridHeaderCell.d.ts.map +1 -0
  142. package/dist/grid/cells/GridHeaderCell.js +7 -0
  143. package/dist/grid/cells/GridHeaderCell.js.map +1 -0
  144. package/dist/grid/cells/GridHeaderCell.vue_vue_type_script_setup_true_lang.js +35 -0
  145. package/dist/grid/cells/GridHeaderCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  146. package/dist/grid/cells/GridNumberEditor.d.ts +9 -0
  147. package/dist/grid/cells/GridNumberEditor.d.ts.map +1 -0
  148. package/dist/grid/cells/GridNumberEditor.js +7 -0
  149. package/dist/grid/cells/GridNumberEditor.js.map +1 -0
  150. package/dist/grid/cells/GridNumberEditor.vue_vue_type_script_setup_true_lang.js +50 -0
  151. package/dist/grid/cells/GridNumberEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  152. package/dist/grid/cells/GridSelectButtonCell.d.ts +12 -0
  153. package/dist/grid/cells/GridSelectButtonCell.d.ts.map +1 -0
  154. package/dist/grid/cells/GridSelectButtonCell.js +7 -0
  155. package/dist/grid/cells/GridSelectButtonCell.js.map +1 -0
  156. package/dist/grid/cells/GridSelectButtonCell.vue_vue_type_script_setup_true_lang.js +52 -0
  157. package/dist/grid/cells/GridSelectButtonCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  158. package/dist/grid/cells/GridSelectCell.d.ts +9 -0
  159. package/dist/grid/cells/GridSelectCell.d.ts.map +1 -0
  160. package/dist/grid/cells/GridSelectCell.js +7 -0
  161. package/dist/grid/cells/GridSelectCell.js.map +1 -0
  162. package/dist/grid/cells/GridSelectCell.vue_vue_type_script_setup_true_lang.js +18 -0
  163. package/dist/grid/cells/GridSelectCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  164. package/dist/grid/cells/GridSelectEditor.d.ts +11 -0
  165. package/dist/grid/cells/GridSelectEditor.d.ts.map +1 -0
  166. package/dist/grid/cells/GridSelectEditor.js +7 -0
  167. package/dist/grid/cells/GridSelectEditor.js.map +1 -0
  168. package/dist/grid/cells/GridSelectEditor.vue_vue_type_script_setup_true_lang.js +51 -0
  169. package/dist/grid/cells/GridSelectEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  170. package/dist/grid/cells/GridTextEditor.d.ts +9 -0
  171. package/dist/grid/cells/GridTextEditor.d.ts.map +1 -0
  172. package/dist/grid/cells/GridTextEditor.js +7 -0
  173. package/dist/grid/cells/GridTextEditor.js.map +1 -0
  174. package/dist/grid/cells/GridTextEditor.vue_vue_type_script_setup_true_lang.js +44 -0
  175. package/dist/grid/cells/GridTextEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  176. package/dist/grid/cells/GridTextureSelectCell.d.ts +7 -0
  177. package/dist/grid/cells/GridTextureSelectCell.d.ts.map +1 -0
  178. package/dist/grid/cells/GridTextureSelectCell.js +7 -0
  179. package/dist/grid/cells/GridTextureSelectCell.js.map +1 -0
  180. package/dist/grid/cells/GridTextureSelectCell.vue_vue_type_script_setup_true_lang.js +19 -0
  181. package/dist/grid/cells/GridTextureSelectCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  182. package/dist/grid/cells/GridTextureSelectEditor.d.ts +13 -0
  183. package/dist/grid/cells/GridTextureSelectEditor.d.ts.map +1 -0
  184. package/dist/grid/cells/GridTextureSelectEditor.js +7 -0
  185. package/dist/grid/cells/GridTextureSelectEditor.js.map +1 -0
  186. package/dist/grid/cells/GridTextureSelectEditor.vue_vue_type_script_setup_true_lang.js +49 -0
  187. package/dist/grid/cells/GridTextureSelectEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  188. package/dist/grid/cells/GridUnitCell.d.ts +9 -0
  189. package/dist/grid/cells/GridUnitCell.d.ts.map +1 -0
  190. package/dist/grid/cells/GridUnitCell.js +7 -0
  191. package/dist/grid/cells/GridUnitCell.js.map +1 -0
  192. package/dist/grid/cells/GridUnitCell.vue_vue_type_script_setup_true_lang.js +29 -0
  193. package/dist/grid/cells/GridUnitCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  194. package/dist/grid/cells/GridUnitEditor.d.ts +11 -0
  195. package/dist/grid/cells/GridUnitEditor.d.ts.map +1 -0
  196. package/dist/grid/cells/GridUnitEditor.js +7 -0
  197. package/dist/grid/cells/GridUnitEditor.js.map +1 -0
  198. package/dist/grid/cells/GridUnitEditor.vue_vue_type_script_setup_true_lang.js +58 -0
  199. package/dist/grid/cells/GridUnitEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  200. package/dist/grid/columnStretchPlugin.d.ts +12 -0
  201. package/dist/grid/columnStretchPlugin.d.ts.map +1 -0
  202. package/dist/grid/columnStretchPlugin.js +35 -0
  203. package/dist/grid/columnStretchPlugin.js.map +1 -0
  204. package/dist/grid/composables/useCellTemplate.d.ts +35 -0
  205. package/dist/grid/composables/useCellTemplate.d.ts.map +1 -0
  206. package/dist/grid/composables/useCellTemplate.js +30 -0
  207. package/dist/grid/composables/useCellTemplate.js.map +1 -0
  208. package/dist/grid/composables/useGridOverlayFocusGuard.d.ts +5 -0
  209. package/dist/grid/composables/useGridOverlayFocusGuard.d.ts.map +1 -0
  210. package/dist/grid/composables/useGridOverlayFocusGuard.js +12 -0
  211. package/dist/grid/composables/useGridOverlayFocusGuard.js.map +1 -0
  212. package/dist/grid/composables/useUnitSuffix.d.ts +9 -0
  213. package/dist/grid/composables/useUnitSuffix.d.ts.map +1 -0
  214. package/dist/grid/composables/useUnitSuffix.js +13 -0
  215. package/dist/grid/composables/useUnitSuffix.js.map +1 -0
  216. package/dist/grid/gridHeight.d.ts +11 -0
  217. package/dist/grid/gridHeight.d.ts.map +1 -0
  218. package/dist/grid/gridHeight.js +8 -0
  219. package/dist/grid/gridHeight.js.map +1 -0
  220. package/dist/grid/index.d.ts +8 -0
  221. package/dist/grid/index.d.ts.map +1 -0
  222. package/dist/grid/index.js +4 -0
  223. package/dist/grid/parts/WellGridAddButton.d.ts +5 -0
  224. package/dist/grid/parts/WellGridAddButton.d.ts.map +1 -0
  225. package/dist/grid/parts/WellGridAddButton.js +7 -0
  226. package/dist/grid/parts/WellGridAddButton.js.map +1 -0
  227. package/dist/grid/parts/WellGridAddButton.vue_vue_type_script_setup_true_lang.js +23 -0
  228. package/dist/grid/parts/WellGridAddButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  229. package/dist/grid/parts/WellGridDeleteButton.d.ts +5 -0
  230. package/dist/grid/parts/WellGridDeleteButton.d.ts.map +1 -0
  231. package/dist/grid/parts/WellGridDeleteButton.js +7 -0
  232. package/dist/grid/parts/WellGridDeleteButton.js.map +1 -0
  233. package/dist/grid/parts/WellGridDeleteButton.vue_vue_type_script_setup_true_lang.js +21 -0
  234. package/dist/grid/parts/WellGridDeleteButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  235. package/dist/grid/types.d.ts +90 -0
  236. package/dist/grid/types.d.ts.map +1 -0
  237. package/dist/grid/useWellGridColumns.d.ts +40 -0
  238. package/dist/grid/useWellGridColumns.d.ts.map +1 -0
  239. package/dist/grid/useWellGridColumns.js +242 -0
  240. package/dist/grid/useWellGridColumns.js.map +1 -0
  241. package/dist/grid.css +407 -0
  242. package/dist/index.d.ts +17 -0
  243. package/dist/index.d.ts.map +1 -0
  244. package/dist/index.js +14 -0
  245. package/dist/location/WellCoordinateInput.d.ts +14 -0
  246. package/dist/location/WellCoordinateInput.d.ts.map +1 -0
  247. package/dist/location/WellCoordinateInput.js +7 -0
  248. package/dist/location/WellCoordinateInput.js.map +1 -0
  249. package/dist/location/WellCoordinateInput.vue_vue_type_script_setup_true_lang.js +53 -0
  250. package/dist/location/WellCoordinateInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  251. package/dist/location/WellLocationMap.d.ts +22 -0
  252. package/dist/location/WellLocationMap.d.ts.map +1 -0
  253. package/dist/location/WellLocationMap.js +9 -0
  254. package/dist/location/WellLocationMap.js.map +1 -0
  255. package/dist/location/WellLocationMap.vue_vue_type_script_setup_true_lang.js +91 -0
  256. package/dist/location/WellLocationMap.vue_vue_type_script_setup_true_lang.js.map +1 -0
  257. package/dist/location/WellLocationPicker.d.ts +32 -0
  258. package/dist/location/WellLocationPicker.d.ts.map +1 -0
  259. package/dist/location/WellLocationPicker.js +7 -0
  260. package/dist/location/WellLocationPicker.js.map +1 -0
  261. package/dist/location/WellLocationPicker.vue_vue_type_script_setup_true_lang.js +117 -0
  262. package/dist/location/WellLocationPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  263. package/dist/location/index.d.ts +6 -0
  264. package/dist/location/index.d.ts.map +1 -0
  265. package/dist/location/index.js +5 -0
  266. package/dist/location/location.d.ts +61 -0
  267. package/dist/location/location.d.ts.map +1 -0
  268. package/dist/location/location.js +15 -0
  269. package/dist/location/location.js.map +1 -0
  270. package/dist/nuxt/module.d.ts +76 -0
  271. package/dist/nuxt/module.d.ts.map +1 -0
  272. package/dist/nuxt/module.js +129 -0
  273. package/dist/nuxt/module.js.map +1 -0
  274. package/dist/nuxt/runtime/plugin.d.ts +14 -0
  275. package/dist/nuxt/runtime/plugin.d.ts.map +1 -0
  276. package/dist/nuxt/runtime/plugin.js +13 -0
  277. package/dist/nuxt/runtime/plugin.js.map +1 -0
  278. package/dist/style.css +2 -0
  279. package/dist/tailwind.css +160 -0
  280. package/dist/theme/define.d.ts +44 -0
  281. package/dist/theme/define.d.ts.map +1 -0
  282. package/dist/theme/define.js +14 -0
  283. package/dist/theme/define.js.map +1 -0
  284. package/dist/theme/index.d.ts +5 -0
  285. package/dist/theme/index.d.ts.map +1 -0
  286. package/dist/theme/index.js +4 -0
  287. package/dist/theme/preset.d.ts +20 -0
  288. package/dist/theme/preset.d.ts.map +1 -0
  289. package/dist/theme/preset.js +977 -0
  290. package/dist/theme/preset.js.map +1 -0
  291. package/dist/theme/pt.d.ts +8 -0
  292. package/dist/theme/pt.d.ts.map +1 -0
  293. package/dist/theme/pt.js +66 -0
  294. package/dist/theme/pt.js.map +1 -0
  295. package/dist/types.d.ts +38 -0
  296. package/dist/types.d.ts.map +1 -0
  297. package/package.json +134 -3
@@ -0,0 +1,29 @@
1
+ import { ComputedRef, MaybeRefOrGetter } from 'vue';
2
+ import { WelldotUnits } from '../config';
3
+ export type DisplayUnitType = keyof WelldotUnits;
4
+ /**
5
+ * Canonical ↔ display conversion for one quantity, following the configured
6
+ * display unit (`createWelldot({ units })`). `.well` files always store SI
7
+ * (m, mm, m³/h, kW, m³); this only changes what the UI shows and accepts.
8
+ *
9
+ * `unitType` is a value, ref or getter, so a component can pass
10
+ * `() => props.unitType` and follow prop changes. `unitOverride` (a value,
11
+ * ref or getter) replaces the configured unit for this quantity;
12
+ * `null`/`undefined` falls back to the configuration.
13
+ */
14
+ export declare function useWellUnits<T extends DisplayUnitType>(unitType: MaybeRefOrGetter<T>, unitOverride?: MaybeRefOrGetter<WelldotUnits[T] | null | undefined>): {
15
+ /** Raw unit for length/diameter/power (`m`, `inches`, `kW`…); display label for flow/volume (`m³/h`, `m³`). */
16
+ unit: ComputedRef<string>;
17
+ toDisplay: (canonical: number) => number;
18
+ toCanonical: (display: number) => number;
19
+ };
20
+ /**
21
+ * Whether `value`, emitted by a PrimeVue `InputNumber`, is just `display`
22
+ * as that input shows it (rounded to `maxFractionDigits`). `InputNumber`
23
+ * emits its parsed text on every blur, so an untouched focus + blur would
24
+ * otherwise replace the exact value with its rounded display (`1` m shown
25
+ * as `3.2808` ft would come back as `0.99998784` m). Internal: not exported
26
+ * from the package entry.
27
+ */
28
+ export declare function isDisplayedValue(value: number | null | undefined, display: number | null | undefined, maxFractionDigits: number): boolean;
29
+ //# sourceMappingURL=useWellUnits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWellUnits.d.ts","sourceRoot":"","sources":["../../src/composables/useWellUnits.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAC;AACb,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG,MAAM,YAAY,CAAC;AAEjD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,eAAe,EACpD,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC7B,YAAY,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAClE;IACD,+GAA+G;IAC/G,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1C,CAqDA;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAKT"}
@@ -0,0 +1,52 @@
1
+ import { useWelldotConfig as e } from "../config.js";
2
+ import { computed as t, toValue as n } from "vue";
3
+ import { resolveFlowUnitLabel as r, resolveVolumeUnitLabel as i } from "@welldot/utils";
4
+ import { feetToMeters as a, flowFromCanonical as o, flowToCanonical as s, inchesToMm as c, metersToFeet as l, mmToInches as u, powerFromCanonical as d, powerToCanonical as f, volumeFromCanonical as p, volumeToCanonical as m } from "@welldot/core";
5
+ //#region src/composables/useWellUnits.ts
6
+ function h(h, g) {
7
+ let _ = e(), v = t(() => n(h)), y = t(() => {
8
+ let e = n(g);
9
+ return e == null ? _.units : {
10
+ ..._.units,
11
+ [v.value]: e
12
+ };
13
+ }), b = t(() => {
14
+ let e = y.value, t = v.value;
15
+ return t === "length" ? e.length : t === "diameter" ? e.diameter : t === "flow" ? r(e.flow) : t === "volume" ? i(e.volume) : e.power;
16
+ });
17
+ function x(e) {
18
+ let t = y.value;
19
+ switch (v.value) {
20
+ case "length": return t.length === "ft" ? l(e) : e;
21
+ case "diameter": return t.diameter === "inches" ? u(e) : e;
22
+ case "flow": return o(e, t.flow);
23
+ case "power": return d(e, t.power);
24
+ default: return p(e, t.volume);
25
+ }
26
+ }
27
+ function S(e) {
28
+ let t = y.value;
29
+ switch (v.value) {
30
+ case "length": return t.length === "ft" ? a(e) : e;
31
+ case "diameter": return t.diameter === "inches" ? c(e) : e;
32
+ case "flow": return s(e, t.flow);
33
+ case "power": return f(e, t.power);
34
+ default: return m(e, t.volume);
35
+ }
36
+ }
37
+ return {
38
+ unit: b,
39
+ toDisplay: x,
40
+ toCanonical: S
41
+ };
42
+ }
43
+ function g(e, t, n) {
44
+ if (e == null || t == null) return e == null && t == null;
45
+ if (!Number.isFinite(t)) return !1;
46
+ let r = Math.min(100, Math.max(0, Math.trunc(n) || 0));
47
+ return e === Number(t.toFixed(r));
48
+ }
49
+ //#endregion
50
+ export { g as isDisplayedValue, h as useWellUnits };
51
+
52
+ //# sourceMappingURL=useWellUnits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWellUnits.js","names":[],"sources":["../../src/composables/useWellUnits.ts"],"sourcesContent":["import {\n feetToMeters,\n flowFromCanonical,\n flowToCanonical,\n inchesToMm,\n metersToFeet,\n mmToInches,\n powerFromCanonical,\n powerToCanonical,\n volumeFromCanonical,\n volumeToCanonical,\n} from '@welldot/core';\nimport { resolveFlowUnitLabel, resolveVolumeUnitLabel } from '@welldot/utils';\nimport {\n computed,\n toValue,\n type ComputedRef,\n type MaybeRefOrGetter,\n} from 'vue';\nimport { useWelldotConfig, type WelldotUnits } from '../config';\n\nexport type DisplayUnitType = keyof WelldotUnits;\n\n/**\n * Canonical ↔ display conversion for one quantity, following the configured\n * display unit (`createWelldot({ units })`). `.well` files always store SI\n * (m, mm, m³/h, kW, m³); this only changes what the UI shows and accepts.\n *\n * `unitType` is a value, ref or getter, so a component can pass\n * `() => props.unitType` and follow prop changes. `unitOverride` (a value,\n * ref or getter) replaces the configured unit for this quantity;\n * `null`/`undefined` falls back to the configuration.\n */\nexport function useWellUnits<T extends DisplayUnitType>(\n unitType: MaybeRefOrGetter<T>,\n unitOverride?: MaybeRefOrGetter<WelldotUnits[T] | null | undefined>,\n): {\n /** Raw unit for length/diameter/power (`m`, `inches`, `kW`…); display label for flow/volume (`m³/h`, `m³`). */\n unit: ComputedRef<string>;\n toDisplay: (canonical: number) => number;\n toCanonical: (display: number) => number;\n} {\n const config = useWelldotConfig();\n const type = computed<DisplayUnitType>(() => toValue(unitType));\n const units = computed<WelldotUnits>(() => {\n const override = toValue(unitOverride);\n return override != null\n ? { ...config.units, [type.value]: override }\n : config.units;\n });\n\n const unit = computed(() => {\n const u = units.value;\n const kind = type.value;\n if (kind === 'length') return u.length;\n if (kind === 'diameter') return u.diameter;\n if (kind === 'flow') return resolveFlowUnitLabel(u.flow);\n if (kind === 'volume') return resolveVolumeUnitLabel(u.volume);\n return u.power;\n });\n\n function toDisplay(canonical: number): number {\n const u = units.value;\n switch (type.value) {\n case 'length':\n return u.length === 'ft' ? metersToFeet(canonical) : canonical;\n case 'diameter':\n return u.diameter === 'inches' ? mmToInches(canonical) : canonical;\n case 'flow':\n return flowFromCanonical(canonical, u.flow);\n case 'power':\n return powerFromCanonical(canonical, u.power);\n default:\n return volumeFromCanonical(canonical, u.volume);\n }\n }\n\n function toCanonical(display: number): number {\n const u = units.value;\n switch (type.value) {\n case 'length':\n return u.length === 'ft' ? feetToMeters(display) : display;\n case 'diameter':\n return u.diameter === 'inches' ? inchesToMm(display) : display;\n case 'flow':\n return flowToCanonical(display, u.flow);\n case 'power':\n return powerToCanonical(display, u.power);\n default:\n return volumeToCanonical(display, u.volume);\n }\n }\n\n return { unit, toDisplay, toCanonical };\n}\n\n/**\n * Whether `value`, emitted by a PrimeVue `InputNumber`, is just `display`\n * as that input shows it (rounded to `maxFractionDigits`). `InputNumber`\n * emits its parsed text on every blur, so an untouched focus + blur would\n * otherwise replace the exact value with its rounded display (`1` m shown\n * as `3.2808` ft would come back as `0.99998784` m). Internal: not exported\n * from the package entry.\n */\nexport function isDisplayedValue(\n value: number | null | undefined,\n display: number | null | undefined,\n maxFractionDigits: number,\n): boolean {\n if (value == null || display == null) return value == null && display == null;\n if (!Number.isFinite(display)) return false;\n const digits = Math.min(100, Math.max(0, Math.trunc(maxFractionDigits) || 0));\n return value === Number(display.toFixed(digits));\n}\n"],"mappings":";;;;;AAiCA,SAAgB,EACd,GACA,GAMA;CACA,IAAM,IAAS,GAAkB,EAC3B,IAAO,QAAgC,EAAQ,EAAS,CAAC,EACzD,IAAQ,QAA6B;EACzC,IAAM,IAAW,EAAQ,EAAa;AACtC,SAAO,KAAY,OAEf,EAAO,QADP;GAAE,GAAG,EAAO;IAAQ,EAAK,QAAQ;GAAU;GAE/C,EAEI,IAAO,QAAe;EAC1B,IAAM,IAAI,EAAM,OACV,IAAO,EAAK;AAKlB,SAJI,MAAS,WAAiB,EAAE,SAC5B,MAAS,aAAmB,EAAE,WAC9B,MAAS,SAAe,EAAqB,EAAE,KAAK,GACpD,MAAS,WAAiB,EAAuB,EAAE,OAAO,GACvD,EAAE;GACT;CAEF,SAAS,EAAU,GAA2B;EAC5C,IAAM,IAAI,EAAM;AAChB,UAAQ,EAAK,OAAb;GACE,KAAK,SACH,QAAO,EAAE,WAAW,OAAO,EAAa,EAAU,GAAG;GACvD,KAAK,WACH,QAAO,EAAE,aAAa,WAAW,EAAW,EAAU,GAAG;GAC3D,KAAK,OACH,QAAO,EAAkB,GAAW,EAAE,KAAK;GAC7C,KAAK,QACH,QAAO,EAAmB,GAAW,EAAE,MAAM;GAC/C,QACE,QAAO,EAAoB,GAAW,EAAE,OAAO;;;CAIrD,SAAS,EAAY,GAAyB;EAC5C,IAAM,IAAI,EAAM;AAChB,UAAQ,EAAK,OAAb;GACE,KAAK,SACH,QAAO,EAAE,WAAW,OAAO,EAAa,EAAQ,GAAG;GACrD,KAAK,WACH,QAAO,EAAE,aAAa,WAAW,EAAW,EAAQ,GAAG;GACzD,KAAK,OACH,QAAO,EAAgB,GAAS,EAAE,KAAK;GACzC,KAAK,QACH,QAAO,EAAiB,GAAS,EAAE,MAAM;GAC3C,QACE,QAAO,EAAkB,GAAS,EAAE,OAAO;;;AAIjD,QAAO;EAAE;EAAM;EAAW;EAAa;;AAWzC,SAAgB,EACd,GACA,GACA,GACS;AACT,KAAI,KAAS,QAAQ,KAAW,KAAM,QAAO,KAAS,QAAQ,KAAW;AACzE,KAAI,CAAC,OAAO,SAAS,EAAQ,CAAE,QAAO;CACtC,IAAM,IAAS,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,MAAM,EAAkB,IAAI,EAAE,CAAC;AAC7E,QAAO,MAAU,OAAO,EAAQ,QAAQ,EAAO,CAAC"}
@@ -0,0 +1,110 @@
1
+ import { DiameterUnits, FlowUnits, LengthUnits, PowerUnits, VolumeUnits } from '@welldot/core';
2
+ import { CoordFormat } from '@welldot/utils';
3
+ import { Component, InjectionKey, MaybeRefOrGetter, Plugin } from 'vue';
4
+ /** Display units, one per quantity. `.well` files always store SI. */
5
+ export interface WelldotUnits {
6
+ length: LengthUnits;
7
+ diameter: DiameterUnits;
8
+ flow: FlowUnits;
9
+ power: PowerUnits;
10
+ volume: VolumeUnits;
11
+ }
12
+ /**
13
+ * Swappable parts, keyed by part name. Each part has a typed props contract
14
+ * exported from `types.ts` (e.g. `trigger` → `WellInfoTriggerProps`).
15
+ *
16
+ * Precedence when a component renders a part: its own `components` prop,
17
+ * then this map (from `createWelldot`), then the built-in default.
18
+ */
19
+ export interface WelldotComponents {
20
+ /** `WellInfoPopover` trigger. Props: `WellInfoTriggerProps`. */
21
+ trigger?: Component;
22
+ /**
23
+ * Renders a string icon name (e.g. `WellChip`'s `icon="ph:drop"`).
24
+ * Props: `WellIconProps`. Without it, string icons are not rendered.
25
+ */
26
+ icon?: Component;
27
+ /** `WellDataGrid` add-row button. Props: `WellAddButtonProps`. */
28
+ addButton?: Component;
29
+ /** `WellDataGrid` delete-row button. Props: `WellDeleteButtonProps`. */
30
+ deleteButton?: Component;
31
+ /** `WellDataGrid` drag handle. Visual only, no props. */
32
+ dragHandle?: Component;
33
+ }
34
+ export type WelldotPartName = keyof WelldotComponents;
35
+ /**
36
+ * Options of `createWelldot`. Every field is optional and may be a plain
37
+ * value, a ref or a getter — getters keep the configuration reactive to an
38
+ * app store or i18n instance without the package depending on either.
39
+ */
40
+ export interface WelldotConfig {
41
+ /** BCP-47 tag or a bare language (`en`, `pt`, `pt-BR`). Default `en`. */
42
+ locale?: MaybeRefOrGetter<string>;
43
+ /** Display units. Missing quantities fall back to SI (m, mm, m³/h, kW, m³). */
44
+ units?: MaybeRefOrGetter<Partial<WelldotUnits>>;
45
+ /** Fallback coordinate format for location inputs. Default `DD`. */
46
+ coordinateFormat?: MaybeRefOrGetter<CoordFormat>;
47
+ /** Global part overrides. Wrapped in `markRaw`. */
48
+ components?: MaybeRefOrGetter<WelldotComponents>;
49
+ }
50
+ /** The configuration as components read it: plain values behind getters. */
51
+ export interface ResolvedWelldotConfig {
52
+ readonly locale: string;
53
+ readonly units: Readonly<WelldotUnits>;
54
+ readonly coordinateFormat: CoordFormat;
55
+ readonly components: Readonly<WelldotComponents>;
56
+ }
57
+ export declare const DEFAULT_WELLDOT_UNITS: Readonly<WelldotUnits>;
58
+ export declare const DEFAULT_WELLDOT_LOCALE = "en";
59
+ export declare const DEFAULT_COORDINATE_FORMAT: CoordFormat;
60
+ export declare const WELLDOT_CONFIG_KEY: InjectionKey<ResolvedWelldotConfig>;
61
+ /**
62
+ * Resolves options into getters; reading a field re-reads its source, so
63
+ * refs and getters stay reactive. Missing fields fall back to the defaults
64
+ * (`en`, SI units, `DD`, no part overrides).
65
+ */
66
+ export declare function resolveWelldotConfig(options?: WelldotConfig): ResolvedWelldotConfig;
67
+ /**
68
+ * The `@welldot/vue` Vue plugin. Install it with `app.use()`.
69
+ *
70
+ * It registers the configuration with `app.provide`, which is what makes it
71
+ * reach components mounted outside the normal tree (e.g. RevoGrid cells,
72
+ * which only inherit the app context).
73
+ *
74
+ * **Layering.** Installing `createWelldot` again on the same app stacks the
75
+ * new options on top of the existing configuration instead of replacing it:
76
+ * `locale` and `coordinateFormat` come from the last install that sets them,
77
+ * `units` and `components` merge per key (the later install wins per
78
+ * quantity / part). This lets a library-level plugin (e.g. the Nuxt module's,
79
+ * which wires `locale`) and an app plugin (which wires `units`) each set their
80
+ * own fields. Install every layer before the app mounts.
81
+ *
82
+ * @example
83
+ * app.use(createWelldot({
84
+ * locale: () => i18n.global.locale.value,
85
+ * units: () => ({ length: ui.lengthUnit, diameter: ui.diameterUnit }),
86
+ * components: { trigger: MyInfoButton },
87
+ * }))
88
+ */
89
+ export declare function createWelldot(options?: WelldotConfig): Plugin;
90
+ /**
91
+ * The active configuration. Falls back to the defaults (`en`, SI, `DD`, no
92
+ * part overrides) when `createWelldot` isn't installed or when called outside
93
+ * an injection context.
94
+ */
95
+ export declare function useWelldotConfig(): ResolvedWelldotConfig;
96
+ /**
97
+ * Picks the component for a swappable part: `propOverride` (the rendering
98
+ * component's own `components` prop), then the `createWelldot` map, then
99
+ * `fallback` (the built-in default).
100
+ *
101
+ * `config` defaults to `useWelldotConfig()`, so call it from `setup` or a
102
+ * render function — or pass the config captured in `setup` when resolving
103
+ * inside a `computed` or callback.
104
+ *
105
+ * A prop override is unwrapped and marked raw, so a part held in reactive
106
+ * state (e.g. `components` built from a `reactive` object) is not rendered
107
+ * as a reactive component.
108
+ */
109
+ export declare function resolvePart(name: WelldotPartName, propOverride?: Component | null, fallback?: Component, config?: ResolvedWelldotConfig): Component | undefined;
110
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAQL,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACZ,MAAM,KAAK,CAAC;AAEb,sEAAsE;AACtE,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,gEAAgE;IAChE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kEAAkE;IAClE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,wEAAwE;IACxE,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,yDAAyD;IACzD,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,iBAAiB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,MAAM,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAClC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IAChD,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACjD,mDAAmD;IACnD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;CAClD;AAED,4EAA4E;AAC5E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,YAAY,CAMvD,CAAC;AAEH,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,yBAAyB,EAAE,WAAkB,CAAC;AAE3D,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,qBAAqB,CACzC,CAAC;AAqG3B;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,aAAkB,GAC1B,qBAAqB,CAEvB;AAID;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,aAAkB,GAAG,MAAM,CAejE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,qBAAqB,CAGxD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,eAAe,EACrB,YAAY,CAAC,EAAE,SAAS,GAAG,IAAI,EAC/B,QAAQ,CAAC,EAAE,SAAS,EACpB,MAAM,GAAE,qBAA0C,GACjD,SAAS,GAAG,SAAS,CAGvB"}
package/dist/config.js ADDED
@@ -0,0 +1,76 @@
1
+ import { hasInjectionContext as e, inject as t, isRef as n, markRaw as r, toRaw as i, toValue as a } from "vue";
2
+ //#region src/config.ts
3
+ var o = Object.freeze({
4
+ length: "m",
5
+ diameter: "mm",
6
+ flow: "m3/h",
7
+ power: "kW",
8
+ volume: "m3"
9
+ }), s = "en", c = "DD", l = Symbol("welldot-config"), u = Object.freeze({});
10
+ function d(e) {
11
+ if (!e) return u;
12
+ let t = {};
13
+ for (let [n, i] of Object.entries(e)) i && (t[n] = typeof i == "object" ? r(i) : i);
14
+ return r(t);
15
+ }
16
+ function f(e) {
17
+ let { components: t } = e;
18
+ return {
19
+ options: e,
20
+ staticComponents: t && typeof t != "function" && !n(t) ? d(t) : void 0
21
+ };
22
+ }
23
+ function p(e) {
24
+ return e.staticComponents ?? d(a(e.options.components));
25
+ }
26
+ function m(e, t) {
27
+ let n = { ...e };
28
+ for (let e of t) if (e) for (let [t, r] of Object.entries(e)) r != null && (n[t] = r);
29
+ return n;
30
+ }
31
+ var h = /* @__PURE__ */ new WeakMap();
32
+ function g(e) {
33
+ function t(t) {
34
+ for (let n = e.length - 1; n >= 0; n--) {
35
+ let r = t(e[n].options);
36
+ if (r != null && r !== "") return r;
37
+ }
38
+ }
39
+ let n = {
40
+ get locale() {
41
+ return t((e) => a(e.locale)) ?? "en";
42
+ },
43
+ get units() {
44
+ return m(o, e.map((e) => a(e.options.units)));
45
+ },
46
+ get coordinateFormat() {
47
+ return t((e) => a(e.coordinateFormat)) ?? "DD";
48
+ },
49
+ get components() {
50
+ let t = e.map(p).filter((e) => e !== u);
51
+ return t.length === 0 ? u : t.length === 1 ? t[0] : r(Object.assign({}, ...t));
52
+ }
53
+ };
54
+ return h.set(n, e), n;
55
+ }
56
+ function _(e = {}) {
57
+ return g([f(e)]);
58
+ }
59
+ var v = _();
60
+ function y(e = {}) {
61
+ let n = f(e);
62
+ return { install(e) {
63
+ let r = e.runWithContext(() => t(l, null)), i = r ? h.get(r) : void 0;
64
+ i ? i.push(n) : e.provide(l, g([n]));
65
+ } };
66
+ }
67
+ function b() {
68
+ return e() ? t(l, v) : v;
69
+ }
70
+ function x(e, t, n, a = b()) {
71
+ return t ? r(i(t)) : a.components[e] ?? n;
72
+ }
73
+ //#endregion
74
+ export { c as DEFAULT_COORDINATE_FORMAT, s as DEFAULT_WELLDOT_LOCALE, o as DEFAULT_WELLDOT_UNITS, l as WELLDOT_CONFIG_KEY, y as createWelldot, x as resolvePart, _ as resolveWelldotConfig, b as useWelldotConfig };
75
+
76
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","names":[],"sources":["../src/config.ts"],"sourcesContent":["import type {\n DiameterUnits,\n FlowUnits,\n LengthUnits,\n PowerUnits,\n VolumeUnits,\n} from '@welldot/core';\nimport type { CoordFormat } from '@welldot/utils';\nimport {\n hasInjectionContext,\n inject,\n isRef,\n markRaw,\n toRaw,\n toValue,\n type App,\n type Component,\n type InjectionKey,\n type MaybeRefOrGetter,\n type Plugin,\n} from 'vue';\n\n/** Display units, one per quantity. `.well` files always store SI. */\nexport interface WelldotUnits {\n length: LengthUnits;\n diameter: DiameterUnits;\n flow: FlowUnits;\n power: PowerUnits;\n volume: VolumeUnits;\n}\n\n/**\n * Swappable parts, keyed by part name. Each part has a typed props contract\n * exported from `types.ts` (e.g. `trigger` → `WellInfoTriggerProps`).\n *\n * Precedence when a component renders a part: its own `components` prop,\n * then this map (from `createWelldot`), then the built-in default.\n */\nexport interface WelldotComponents {\n /** `WellInfoPopover` trigger. Props: `WellInfoTriggerProps`. */\n trigger?: Component;\n /**\n * Renders a string icon name (e.g. `WellChip`'s `icon=\"ph:drop\"`).\n * Props: `WellIconProps`. Without it, string icons are not rendered.\n */\n icon?: Component;\n /** `WellDataGrid` add-row button. Props: `WellAddButtonProps`. */\n addButton?: Component;\n /** `WellDataGrid` delete-row button. Props: `WellDeleteButtonProps`. */\n deleteButton?: Component;\n /** `WellDataGrid` drag handle. Visual only, no props. */\n dragHandle?: Component;\n}\n\nexport type WelldotPartName = keyof WelldotComponents;\n\n/**\n * Options of `createWelldot`. Every field is optional and may be a plain\n * value, a ref or a getter — getters keep the configuration reactive to an\n * app store or i18n instance without the package depending on either.\n */\nexport interface WelldotConfig {\n /** BCP-47 tag or a bare language (`en`, `pt`, `pt-BR`). Default `en`. */\n locale?: MaybeRefOrGetter<string>;\n /** Display units. Missing quantities fall back to SI (m, mm, m³/h, kW, m³). */\n units?: MaybeRefOrGetter<Partial<WelldotUnits>>;\n /** Fallback coordinate format for location inputs. Default `DD`. */\n coordinateFormat?: MaybeRefOrGetter<CoordFormat>;\n /** Global part overrides. Wrapped in `markRaw`. */\n components?: MaybeRefOrGetter<WelldotComponents>;\n}\n\n/** The configuration as components read it: plain values behind getters. */\nexport interface ResolvedWelldotConfig {\n readonly locale: string;\n readonly units: Readonly<WelldotUnits>;\n readonly coordinateFormat: CoordFormat;\n readonly components: Readonly<WelldotComponents>;\n}\n\nexport const DEFAULT_WELLDOT_UNITS: Readonly<WelldotUnits> = Object.freeze({\n length: 'm',\n diameter: 'mm',\n flow: 'm3/h',\n power: 'kW',\n volume: 'm3',\n});\n\nexport const DEFAULT_WELLDOT_LOCALE = 'en';\nexport const DEFAULT_COORDINATE_FORMAT: CoordFormat = 'DD';\n\nexport const WELLDOT_CONFIG_KEY: InjectionKey<ResolvedWelldotConfig> =\n Symbol('welldot-config');\n\nconst EMPTY_COMPONENTS: Readonly<WelldotComponents> = Object.freeze({});\n\nfunction rawComponents(map: WelldotComponents | undefined): WelldotComponents {\n if (!map) return EMPTY_COMPONENTS;\n const raw: WelldotComponents = {};\n for (const [name, part] of Object.entries(map)) {\n if (part)\n raw[name as WelldotPartName] =\n typeof part === 'object' ? markRaw(part) : part;\n }\n return markRaw(raw);\n}\n\n/** One `createWelldot` call. A static `components` map is wrapped once. */\ninterface ConfigLayer {\n readonly options: WelldotConfig;\n readonly staticComponents?: WelldotComponents;\n}\n\nfunction toLayer(options: WelldotConfig): ConfigLayer {\n const { components } = options;\n const isStatic =\n !!components && typeof components !== 'function' && !isRef(components);\n return {\n options,\n staticComponents: isStatic\n ? rawComponents(components as WelldotComponents)\n : undefined,\n };\n}\n\nfunction layerComponents(layer: ConfigLayer): WelldotComponents {\n return (\n layer.staticComponents ?? rawComponents(toValue(layer.options.components))\n );\n}\n\n/** Merges plain objects key by key, skipping `undefined` values. */\nfunction mergeDefined<T extends object>(\n base: T,\n parts: Array<Partial<T> | null | undefined>,\n): T {\n const out = { ...base };\n for (const part of parts) {\n if (!part) continue;\n for (const [key, value] of Object.entries(part)) {\n if (value !== undefined && value !== null) {\n (out as Record<string, unknown>)[key] = value;\n }\n }\n }\n return out;\n}\n\n/** The layer stack behind every config this module created. */\nconst CONFIG_LAYERS = new WeakMap<ResolvedWelldotConfig, ConfigLayer[]>();\n\n/**\n * Builds the getters over a layer stack. The last layer that sets `locale`\n * or `coordinateFormat` wins; `units` and `components` merge key by key, the\n * later layer winning per quantity / part.\n */\nfunction layeredConfig(layers: ConfigLayer[]): ResolvedWelldotConfig {\n function last<T>(read: (options: WelldotConfig) => T | null | undefined) {\n for (let i = layers.length - 1; i >= 0; i--) {\n const value = read(layers[i].options);\n if (value !== undefined && value !== null && value !== '') return value;\n }\n return undefined;\n }\n\n const config: ResolvedWelldotConfig = {\n get locale() {\n return last(o => toValue(o.locale)) ?? DEFAULT_WELLDOT_LOCALE;\n },\n get units() {\n return mergeDefined<WelldotUnits>(\n DEFAULT_WELLDOT_UNITS,\n layers.map(l => toValue(l.options.units)),\n );\n },\n get coordinateFormat() {\n return (\n last(o => toValue(o.coordinateFormat)) ?? DEFAULT_COORDINATE_FORMAT\n );\n },\n get components() {\n const maps = layers\n .map(layerComponents)\n .filter(map => map !== EMPTY_COMPONENTS);\n if (maps.length === 0) return EMPTY_COMPONENTS;\n if (maps.length === 1) return maps[0];\n return markRaw(Object.assign({}, ...maps) as WelldotComponents);\n },\n };\n CONFIG_LAYERS.set(config, layers);\n return config;\n}\n\n/**\n * Resolves options into getters; reading a field re-reads its source, so\n * refs and getters stay reactive. Missing fields fall back to the defaults\n * (`en`, SI units, `DD`, no part overrides).\n */\nexport function resolveWelldotConfig(\n options: WelldotConfig = {},\n): ResolvedWelldotConfig {\n return layeredConfig([toLayer(options)]);\n}\n\nconst DEFAULT_CONFIG = resolveWelldotConfig();\n\n/**\n * The `@welldot/vue` Vue plugin. Install it with `app.use()`.\n *\n * It registers the configuration with `app.provide`, which is what makes it\n * reach components mounted outside the normal tree (e.g. RevoGrid cells,\n * which only inherit the app context).\n *\n * **Layering.** Installing `createWelldot` again on the same app stacks the\n * new options on top of the existing configuration instead of replacing it:\n * `locale` and `coordinateFormat` come from the last install that sets them,\n * `units` and `components` merge per key (the later install wins per\n * quantity / part). This lets a library-level plugin (e.g. the Nuxt module's,\n * which wires `locale`) and an app plugin (which wires `units`) each set their\n * own fields. Install every layer before the app mounts.\n *\n * @example\n * app.use(createWelldot({\n * locale: () => i18n.global.locale.value,\n * units: () => ({ length: ui.lengthUnit, diameter: ui.diameterUnit }),\n * components: { trigger: MyInfoButton },\n * }))\n */\nexport function createWelldot(options: WelldotConfig = {}): Plugin {\n const layer = toLayer(options);\n return {\n install(app: App) {\n // The stack lives per app (never on the plugin object), so one\n // `createWelldot()` result installed into several apps — e.g. one per\n // SSR request — never leaks layers between them.\n const current = app.runWithContext(() =>\n inject(WELLDOT_CONFIG_KEY, null),\n );\n const layers = current ? CONFIG_LAYERS.get(current) : undefined;\n if (layers) layers.push(layer);\n else app.provide(WELLDOT_CONFIG_KEY, layeredConfig([layer]));\n },\n };\n}\n\n/**\n * The active configuration. Falls back to the defaults (`en`, SI, `DD`, no\n * part overrides) when `createWelldot` isn't installed or when called outside\n * an injection context.\n */\nexport function useWelldotConfig(): ResolvedWelldotConfig {\n if (!hasInjectionContext()) return DEFAULT_CONFIG;\n return inject(WELLDOT_CONFIG_KEY, DEFAULT_CONFIG);\n}\n\n/**\n * Picks the component for a swappable part: `propOverride` (the rendering\n * component's own `components` prop), then the `createWelldot` map, then\n * `fallback` (the built-in default).\n *\n * `config` defaults to `useWelldotConfig()`, so call it from `setup` or a\n * render function — or pass the config captured in `setup` when resolving\n * inside a `computed` or callback.\n *\n * A prop override is unwrapped and marked raw, so a part held in reactive\n * state (e.g. `components` built from a `reactive` object) is not rendered\n * as a reactive component.\n */\nexport function resolvePart(\n name: WelldotPartName,\n propOverride?: Component | null,\n fallback?: Component,\n config: ResolvedWelldotConfig = useWelldotConfig(),\n): Component | undefined {\n if (propOverride) return markRaw(toRaw(propOverride));\n return config.components[name] ?? fallback;\n}\n"],"mappings":";;AAgFA,IAAa,IAAgD,OAAO,OAAO;CACzE,QAAQ;CACR,UAAU;CACV,MAAM;CACN,OAAO;CACP,QAAQ;CACT,CAAC,EAEW,IAAyB,MACzB,IAAyC,MAEzC,IACX,OAAO,iBAAiB,EAEpB,IAAgD,OAAO,OAAO,EAAE,CAAC;AAEvE,SAAS,EAAc,GAAuD;AAC5E,KAAI,CAAC,EAAK,QAAO;CACjB,IAAM,IAAyB,EAAE;AACjC,MAAK,IAAM,CAAC,GAAM,MAAS,OAAO,QAAQ,EAAI,CAC5C,CAAI,MACF,EAAI,KACF,OAAO,KAAS,WAAW,EAAQ,EAAK,GAAG;AAEjD,QAAO,EAAQ,EAAI;;AASrB,SAAS,EAAQ,GAAqC;CACpD,IAAM,EAAE,kBAAe;AAGvB,QAAO;EACL;EACA,kBAHE,KAAc,OAAO,KAAe,cAAc,CAAC,EAAM,EAAW,GAIlE,EAAc,EAAgC,GAC9C,KAAA;EACL;;AAGH,SAAS,EAAgB,GAAuC;AAC9D,QACE,EAAM,oBAAoB,EAAc,EAAQ,EAAM,QAAQ,WAAW,CAAC;;AAK9E,SAAS,EACP,GACA,GACG;CACH,IAAM,IAAM,EAAE,GAAG,GAAM;AACvB,MAAK,IAAM,KAAQ,EACZ,OACL,MAAK,IAAM,CAAC,GAAK,MAAU,OAAO,QAAQ,EAAK,CAC7C,CAAI,KAAiC,SAClC,EAAgC,KAAO;AAI9C,QAAO;;AAIT,IAAM,oBAAgB,IAAI,SAA+C;AAOzE,SAAS,EAAc,GAA8C;CACnE,SAAS,EAAQ,GAAwD;AACvE,OAAK,IAAI,IAAI,EAAO,SAAS,GAAG,KAAK,GAAG,KAAK;GAC3C,IAAM,IAAQ,EAAK,EAAO,GAAG,QAAQ;AACrC,OAAI,KAAiC,QAAQ,MAAU,GAAI,QAAO;;;CAKtE,IAAM,IAAgC;EACpC,IAAI,SAAS;AACX,UAAO,GAAK,MAAK,EAAQ,EAAE,OAAO,CAAC,IAAA;;EAErC,IAAI,QAAQ;AACV,UAAO,EACL,GACA,EAAO,KAAI,MAAK,EAAQ,EAAE,QAAQ,MAAM,CAAC,CAC1C;;EAEH,IAAI,mBAAmB;AACrB,UACE,GAAK,MAAK,EAAQ,EAAE,iBAAiB,CAAC,IAAA;;EAG1C,IAAI,aAAa;GACf,IAAM,IAAO,EACV,IAAI,EAAgB,CACpB,QAAO,MAAO,MAAQ,EAAiB;AAG1C,UAFI,EAAK,WAAW,IAAU,IAC1B,EAAK,WAAW,IAAU,EAAK,KAC5B,EAAQ,OAAO,OAAO,EAAE,EAAE,GAAG,EAAK,CAAsB;;EAElE;AAED,QADA,EAAc,IAAI,GAAQ,EAAO,EAC1B;;AAQT,SAAgB,EACd,IAAyB,EAAE,EACJ;AACvB,QAAO,EAAc,CAAC,EAAQ,EAAQ,CAAC,CAAC;;AAG1C,IAAM,IAAiB,GAAsB;AAwB7C,SAAgB,EAAc,IAAyB,EAAE,EAAU;CACjE,IAAM,IAAQ,EAAQ,EAAQ;AAC9B,QAAO,EACL,QAAQ,GAAU;EAIhB,IAAM,IAAU,EAAI,qBAClB,EAAO,GAAoB,KAAK,CACjC,EACK,IAAS,IAAU,EAAc,IAAI,EAAQ,GAAG,KAAA;AACtD,EAAI,IAAQ,EAAO,KAAK,EAAM,GACzB,EAAI,QAAQ,GAAoB,EAAc,CAAC,EAAM,CAAC,CAAC;IAE/D;;AAQH,SAAgB,IAA0C;AAExD,QADK,GAAqB,GACnB,EAAO,GAAoB,EAAe,GADd;;AAiBrC,SAAgB,EACd,GACA,GACA,GACA,IAAgC,GAAkB,EAC3B;AAEvB,QADI,IAAqB,EAAQ,EAAM,EAAa,CAAC,GAC9C,EAAO,WAAW,MAAS"}
@@ -0,0 +1,34 @@
1
+ import { LanguageTextInput } from '@welldot/core';
2
+ import { WellDataGridComponents, WellDataGridLabels, WellGridColumn } from './types';
3
+ type __VLS_Props = {
4
+ /** Reactive array from the store (via deep-proxy or plain copy). */
5
+ rows: Record<string, unknown>[];
6
+ columns: WellGridColumn[];
7
+ /** Label of the add-row button. Icon-only when omitted. */
8
+ addLabel?: LanguageTextInput;
9
+ /** Label handed to the delete-row button (its aria-label by default). */
10
+ deleteLabel?: LanguageTextInput;
11
+ /** Grid-internal text (texture editor, column info trigger). */
12
+ labels?: WellDataGridLabels;
13
+ /** Part overrides: `addButton`, `deleteButton`, `dragHandle`. */
14
+ components?: WellDataGridComponents;
15
+ /**
16
+ * Height cap in px. Taller content scrolls inside the grid, so RevoGrid
17
+ * renders only the visible rows. Without it the grid grows with its rows.
18
+ */
19
+ maxHeight?: number;
20
+ };
21
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
+ delete: (index: number) => any;
23
+ add: () => any;
24
+ change: (index: number, prop: string, value: unknown) => any;
25
+ reorder: (from: number, to: number) => any;
26
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ onDelete?: ((index: number) => any) | undefined;
28
+ onAdd?: (() => any) | undefined;
29
+ onChange?: ((index: number, prop: string, value: unknown) => any) | undefined;
30
+ onReorder?: ((from: number, to: number) => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
34
+ //# sourceMappingURL=WellDataGrid.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WellDataGrid.d.ts","sourceRoot":"","sources":["../../src/grid/WellDataGrid.vue"],"names":[],"mappings":"AAsMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMvD,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACf,MAAM,SAAS,CAAC;AAKjB,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,yEAAyE;IACzE,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,gEAAgE;IAChE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,iEAAiE;IACjE,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAsMF,QAAA,MAAM,YAAY;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,9 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./WellDataGrid.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/grid/WellDataGrid.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-956e05cd"]]);
6
+ //#endregion
7
+ export { n as default };
8
+
9
+ //# sourceMappingURL=WellDataGrid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WellDataGrid.js","names":[],"sources":["../../src/grid/WellDataGrid.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Editable spreadsheet for a well feature array (lithology, casing, screens…)\n * built on RevoGrid. Controlled: the grid never mutates `rows`, it emits\n * `add` / `delete` / `change` / `reorder` and the parent updates its store.\n *\n * - Columns are `WellGridColumn`s; their text is `LanguageTextInput`,\n * resolved for the configured locale. Unit columns follow the configured\n * display units.\n * - Parts (`components` prop, then `createWelldot({ components })`, then the\n * built-in default): `addButton` (`WellAddButtonProps`), `deleteButton`\n * (`WellDeleteButtonProps`), `dragHandle` (visual only).\n * - Rendered on the client only (after mount); a skeleton shows until then.\n * - Needs `@welldot/vue/tailwind.css` (which imports `grid.css`) for the\n * RevoGrid theme.\n */\nimport { VGrid } from '@revolist/vue3-datagrid';\nimport type { LanguageTextInput } from '@welldot/core';\nimport { computed, onMounted, ref } from 'vue';\nimport { useWellText } from '../composables/useWellText';\nimport { resolvePart, useWelldotConfig } from '../config';\nimport { GRID_HEADER_H, GRID_ROW_H, gridHeight } from './gridHeight';\nimport WellGridAddButton from './parts/WellGridAddButton.vue';\nimport type {\n WellDataGridComponents,\n WellDataGridLabels,\n WellGridColumn,\n} from './types';\nimport { useWellGridColumns } from './useWellGridColumns';\n\n// ─── Props / Emits ────────────────────────────────────────────────────────────\n\nconst props = defineProps<{\n /** Reactive array from the store (via deep-proxy or plain copy). */\n rows: Record<string, unknown>[];\n columns: WellGridColumn[];\n /** Label of the add-row button. Icon-only when omitted. */\n addLabel?: LanguageTextInput;\n /** Label handed to the delete-row button (its aria-label by default). */\n deleteLabel?: LanguageTextInput;\n /** Grid-internal text (texture editor, column info trigger). */\n labels?: WellDataGridLabels;\n /** Part overrides: `addButton`, `deleteButton`, `dragHandle`. */\n components?: WellDataGridComponents;\n /**\n * Height cap in px. Taller content scrolls inside the grid, so RevoGrid\n * renders only the visible rows. Without it the grid grows with its rows.\n */\n maxHeight?: number;\n}>();\n\nconst emit = defineEmits<{\n /** Parent should push a new row to the store */\n add: [];\n /** Parent should splice row at `index` from the store */\n delete: [index: number];\n /** Parent should assign `value` to `store.array[index][prop]` */\n change: [index: number, prop: string, value: unknown];\n /** Parent should reorder row from `from` to `to` */\n reorder: [from: number, to: number];\n}>();\n\nconst config = useWelldotConfig();\nconst text = useWellText();\n\nconst {\n gridEditors,\n revoColumns,\n gridStretch,\n plugins,\n handleAfterEdit,\n gridContainerRef,\n handleAfterFocus,\n handleGridMousedown,\n handleGridClick,\n} = useWellGridColumns({\n columns: () => props.columns,\n onDelete: rowIndex => emit('delete', rowIndex),\n onChange: (rowIndex, prop, value) => emit('change', rowIndex, prop, value),\n deleteLabel: () => props.deleteLabel,\n labels: () => props.labels,\n components: () => props.components,\n});\n\nconst addButton = computed(() =>\n resolvePart(\n 'addButton',\n props.components?.addButton,\n WellGridAddButton,\n config,\n ),\n);\n\n// ─── Client-only rendering ────────────────────────────────────────────────────\n// RevoGrid is a web component; render it only once mounted in the browser.\n\nconst mounted = ref(false);\nonMounted(() => {\n mounted.value = true;\n});\n\n// ─── Source ───────────────────────────────────────────────────────────────────\n// Spread to a plain array so RevoGrid's internal diffing does not fight the\n// Immer/deep-proxy wrapper on the store.\n\nconst gridSource = computed(() => props.rows.map(r => ({ ...r })));\n\n// ─── Height — auto-size based on row count, up to `maxHeight` ─────────────────\n\nconst HEADER_H = GRID_HEADER_H;\nconst ROW_H = GRID_ROW_H;\n\nconst height = computed(\n () => `${gridHeight(props.rows.length, props.maxHeight)}px`,\n);\n\n// ─── Event handlers ───────────────────────────────────────────────────────────\n\nfunction handleRowOrderChanged(\n event: CustomEvent<{ from: number; to: number }>,\n) {\n emit('reorder', event.detail.from, event.detail.to);\n}\n</script>\n\n<template>\n <div class=\"well-data-grid-wrapper flex flex-col\">\n <div\n v-show=\"rows.length > 0\"\n ref=\"gridContainerRef\"\n class=\"well-grid-container\"\n @mousedown.capture=\"handleGridMousedown\"\n @click=\"handleGridClick\"\n >\n <VGrid\n v-if=\"mounted\"\n class=\"well-data-grid\"\n :style=\"{ height }\"\n :row-size=\"ROW_H\"\n :stretch=\"gridStretch\"\n :source=\"gridSource\"\n :columns=\"revoColumns\"\n :editors=\"gridEditors\"\n :plugins=\"plugins\"\n :range=\"true\"\n can-drag\n theme=\"compact\"\n @afteredit=\"handleAfterEdit\"\n @afterfocus=\"handleAfterFocus\"\n @roworderchanged=\"handleRowOrderChanged\"\n />\n <div\n v-else\n class=\"well-grid-skeleton animate-pulse rounded bg-surface-100 w-full h-full\"\n />\n </div>\n\n <component\n :is=\"addButton\"\n :label=\"text(props.addLabel)\"\n @click=\"emit('add')\"\n />\n </div>\n</template>\n\n<style scoped>\n.well-data-grid-wrapper {\n --accent-soft: color-mix(in srgb, var(--color-primary-500) 12%, transparent);\n --color-primary-soft: color-mix(\n in srgb,\n var(--color-primary-500) 25%,\n transparent\n );\n}\n\n.well-data-grid :deep(.header-rgRow) {\n height: v-bind('`${HEADER_H}px`');\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,87 @@
1
+ import { resolvePart as e, useWelldotConfig as t } from "../config.js";
2
+ import { useWellText as n } from "../composables/useWellText.js";
3
+ import { useWellGridColumns as r } from "./useWellGridColumns.js";
4
+ import { gridHeight as i } from "./gridHeight.js";
5
+ import a from "./parts/WellGridAddButton.js";
6
+ import { computed as o, createBlock as s, createElementBlock as c, createElementVNode as l, defineComponent as u, normalizeStyle as d, onMounted as f, openBlock as p, ref as m, resolveDynamicComponent as h, unref as g, useCssVars as _, vShow as v, withDirectives as y } from "vue";
7
+ import { VGrid as b } from "@revolist/vue3-datagrid";
8
+ //#region src/grid/WellDataGrid.vue?vue&type=script&setup=true&lang.ts
9
+ var x = { class: "well-data-grid-wrapper flex flex-col" }, S = {
10
+ key: 1,
11
+ class: "well-grid-skeleton animate-pulse rounded bg-surface-100 w-full h-full"
12
+ }, C = /* @__PURE__ */ u({
13
+ __name: "WellDataGrid",
14
+ props: {
15
+ rows: {},
16
+ columns: {},
17
+ addLabel: {},
18
+ deleteLabel: {},
19
+ labels: {},
20
+ components: {},
21
+ maxHeight: {}
22
+ },
23
+ emits: [
24
+ "add",
25
+ "delete",
26
+ "change",
27
+ "reorder"
28
+ ],
29
+ setup(u, { emit: C }) {
30
+ _((e) => ({ v3e240dfe: `${g(B)}px` }));
31
+ let w = u, T = C, E = t(), D = n(), { gridEditors: O, revoColumns: k, gridStretch: A, plugins: j, handleAfterEdit: M, gridContainerRef: N, handleAfterFocus: P, handleGridMousedown: F, handleGridClick: I } = r({
32
+ columns: () => w.columns,
33
+ onDelete: (e) => T("delete", e),
34
+ onChange: (e, t, n) => T("change", e, t, n),
35
+ deleteLabel: () => w.deleteLabel,
36
+ labels: () => w.labels,
37
+ components: () => w.components
38
+ }), L = o(() => e("addButton", w.components?.addButton, a, E)), R = m(!1);
39
+ f(() => {
40
+ R.value = !0;
41
+ });
42
+ let z = o(() => w.rows.map((e) => ({ ...e }))), B = 38, V = o(() => `${i(w.rows.length, w.maxHeight)}px`);
43
+ function H(e) {
44
+ T("reorder", e.detail.from, e.detail.to);
45
+ }
46
+ return (e, t) => (p(), c("div", x, [y(l("div", {
47
+ ref_key: "gridContainerRef",
48
+ ref: N,
49
+ class: "well-grid-container",
50
+ onMousedownCapture: t[0] || (t[0] = (...e) => g(F) && g(F)(...e)),
51
+ onClick: t[1] || (t[1] = (...e) => g(I) && g(I)(...e))
52
+ }, [R.value ? (p(), s(g(b), {
53
+ key: 0,
54
+ class: "well-data-grid",
55
+ style: d({ height: V.value }),
56
+ "row-size": g(30),
57
+ stretch: g(A),
58
+ source: z.value,
59
+ columns: g(k),
60
+ editors: g(O),
61
+ plugins: g(j),
62
+ range: !0,
63
+ "can-drag": "",
64
+ theme: "compact",
65
+ onAfteredit: g(M),
66
+ onAfterfocus: g(P),
67
+ onRoworderchanged: H
68
+ }, null, 8, [
69
+ "style",
70
+ "row-size",
71
+ "stretch",
72
+ "source",
73
+ "columns",
74
+ "editors",
75
+ "plugins",
76
+ "onAfteredit",
77
+ "onAfterfocus"
78
+ ])) : (p(), c("div", S))], 544), [[v, u.rows.length > 0]]), (p(), s(h(L.value), {
79
+ label: g(D)(w.addLabel),
80
+ onClick: t[2] || (t[2] = (e) => T("add"))
81
+ }, null, 8, ["label"]))]));
82
+ }
83
+ });
84
+ //#endregion
85
+ export { C as default };
86
+
87
+ //# sourceMappingURL=WellDataGrid.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WellDataGrid.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/grid/WellDataGrid.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Editable spreadsheet for a well feature array (lithology, casing, screens…)\n * built on RevoGrid. Controlled: the grid never mutates `rows`, it emits\n * `add` / `delete` / `change` / `reorder` and the parent updates its store.\n *\n * - Columns are `WellGridColumn`s; their text is `LanguageTextInput`,\n * resolved for the configured locale. Unit columns follow the configured\n * display units.\n * - Parts (`components` prop, then `createWelldot({ components })`, then the\n * built-in default): `addButton` (`WellAddButtonProps`), `deleteButton`\n * (`WellDeleteButtonProps`), `dragHandle` (visual only).\n * - Rendered on the client only (after mount); a skeleton shows until then.\n * - Needs `@welldot/vue/tailwind.css` (which imports `grid.css`) for the\n * RevoGrid theme.\n */\nimport { VGrid } from '@revolist/vue3-datagrid';\nimport type { LanguageTextInput } from '@welldot/core';\nimport { computed, onMounted, ref } from 'vue';\nimport { useWellText } from '../composables/useWellText';\nimport { resolvePart, useWelldotConfig } from '../config';\nimport { GRID_HEADER_H, GRID_ROW_H, gridHeight } from './gridHeight';\nimport WellGridAddButton from './parts/WellGridAddButton.vue';\nimport type {\n WellDataGridComponents,\n WellDataGridLabels,\n WellGridColumn,\n} from './types';\nimport { useWellGridColumns } from './useWellGridColumns';\n\n// ─── Props / Emits ────────────────────────────────────────────────────────────\n\nconst props = defineProps<{\n /** Reactive array from the store (via deep-proxy or plain copy). */\n rows: Record<string, unknown>[];\n columns: WellGridColumn[];\n /** Label of the add-row button. Icon-only when omitted. */\n addLabel?: LanguageTextInput;\n /** Label handed to the delete-row button (its aria-label by default). */\n deleteLabel?: LanguageTextInput;\n /** Grid-internal text (texture editor, column info trigger). */\n labels?: WellDataGridLabels;\n /** Part overrides: `addButton`, `deleteButton`, `dragHandle`. */\n components?: WellDataGridComponents;\n /**\n * Height cap in px. Taller content scrolls inside the grid, so RevoGrid\n * renders only the visible rows. Without it the grid grows with its rows.\n */\n maxHeight?: number;\n}>();\n\nconst emit = defineEmits<{\n /** Parent should push a new row to the store */\n add: [];\n /** Parent should splice row at `index` from the store */\n delete: [index: number];\n /** Parent should assign `value` to `store.array[index][prop]` */\n change: [index: number, prop: string, value: unknown];\n /** Parent should reorder row from `from` to `to` */\n reorder: [from: number, to: number];\n}>();\n\nconst config = useWelldotConfig();\nconst text = useWellText();\n\nconst {\n gridEditors,\n revoColumns,\n gridStretch,\n plugins,\n handleAfterEdit,\n gridContainerRef,\n handleAfterFocus,\n handleGridMousedown,\n handleGridClick,\n} = useWellGridColumns({\n columns: () => props.columns,\n onDelete: rowIndex => emit('delete', rowIndex),\n onChange: (rowIndex, prop, value) => emit('change', rowIndex, prop, value),\n deleteLabel: () => props.deleteLabel,\n labels: () => props.labels,\n components: () => props.components,\n});\n\nconst addButton = computed(() =>\n resolvePart(\n 'addButton',\n props.components?.addButton,\n WellGridAddButton,\n config,\n ),\n);\n\n// ─── Client-only rendering ────────────────────────────────────────────────────\n// RevoGrid is a web component; render it only once mounted in the browser.\n\nconst mounted = ref(false);\nonMounted(() => {\n mounted.value = true;\n});\n\n// ─── Source ───────────────────────────────────────────────────────────────────\n// Spread to a plain array so RevoGrid's internal diffing does not fight the\n// Immer/deep-proxy wrapper on the store.\n\nconst gridSource = computed(() => props.rows.map(r => ({ ...r })));\n\n// ─── Height — auto-size based on row count, up to `maxHeight` ─────────────────\n\nconst HEADER_H = GRID_HEADER_H;\nconst ROW_H = GRID_ROW_H;\n\nconst height = computed(\n () => `${gridHeight(props.rows.length, props.maxHeight)}px`,\n);\n\n// ─── Event handlers ───────────────────────────────────────────────────────────\n\nfunction handleRowOrderChanged(\n event: CustomEvent<{ from: number; to: number }>,\n) {\n emit('reorder', event.detail.from, event.detail.to);\n}\n</script>\n\n<template>\n <div class=\"well-data-grid-wrapper flex flex-col\">\n <div\n v-show=\"rows.length > 0\"\n ref=\"gridContainerRef\"\n class=\"well-grid-container\"\n @mousedown.capture=\"handleGridMousedown\"\n @click=\"handleGridClick\"\n >\n <VGrid\n v-if=\"mounted\"\n class=\"well-data-grid\"\n :style=\"{ height }\"\n :row-size=\"ROW_H\"\n :stretch=\"gridStretch\"\n :source=\"gridSource\"\n :columns=\"revoColumns\"\n :editors=\"gridEditors\"\n :plugins=\"plugins\"\n :range=\"true\"\n can-drag\n theme=\"compact\"\n @afteredit=\"handleAfterEdit\"\n @afterfocus=\"handleAfterFocus\"\n @roworderchanged=\"handleRowOrderChanged\"\n />\n <div\n v-else\n class=\"well-grid-skeleton animate-pulse rounded bg-surface-100 w-full h-full\"\n />\n </div>\n\n <component\n :is=\"addButton\"\n :label=\"text(props.addLabel)\"\n @click=\"emit('add')\"\n />\n </div>\n</template>\n\n<style scoped>\n.well-data-grid-wrapper {\n --accent-soft: color-mix(in srgb, var(--color-primary-500) 12%, transparent);\n --color-primary-soft: color-mix(\n in srgb,\n var(--color-primary-500) 25%,\n transparent\n );\n}\n\n.well-data-grid :deep(.header-rgRow) {\n height: v-bind('`${HEADER_H}px`');\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCA,IAAM,IAAQ,GAmBR,IAAO,GAWP,IAAS,GAAkB,EAC3B,IAAO,GAAa,EAEpB,EACJ,gBACA,gBACA,gBACA,YACA,oBACA,qBACA,qBACA,wBACA,uBACE,EAAmB;GACrB,eAAe,EAAM;GACrB,WAAU,MAAY,EAAK,UAAU,EAAS;GAC9C,WAAW,GAAU,GAAM,MAAU,EAAK,UAAU,GAAU,GAAM,EAAM;GAC1E,mBAAmB,EAAM;GACzB,cAAc,EAAM;GACpB,kBAAkB,EAAM;GACzB,CAAC,EAEI,IAAY,QAChB,EACE,aACA,EAAM,YAAY,WAClB,GACA,EACD,CACF,EAKK,IAAU,EAAI,GAAM;AAC1B,UAAgB;AACd,KAAQ,QAAQ;IAChB;EAMF,IAAM,IAAa,QAAe,EAAM,KAAK,KAAI,OAAM,EAAE,GAAG,GAAG,EAAE,CAAC,EAI5D,IAAA,IAGA,IAAS,QACP,GAAG,EAAW,EAAM,KAAK,QAAQ,EAAM,UAAU,CAAC,IACzD;EAID,SAAS,EACP,GACA;AACA,KAAK,WAAW,EAAM,OAAO,MAAM,EAAM,OAAO,GAAG;;yBAKnD,EAoCM,OApCN,GAoCM,CAAA,EAnCJ,EA4BM,OAAA;YA1BA;GAAJ,KAAI;GACJ,OAAM;iDACc,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,GAAA,EAAmB;GACtC,SAAK,EAAA,OAAA,EAAA,MAAA,GAAA,MAAE,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,GAAA,EAAe;MAGf,EAAA,SAAA,GAAA,EADR,EAgBE,EAAA,EAAA,EAAA;;GAdA,OAAM;GACL,OAAK,EAAA,EAAA,QAAI,EAAA,OAAM,CAAA;GACf,YAAU,EAAA,GAAK;GACf,SAAS,EAAA,EAAW;GACpB,QAAQ,EAAA;GACR,SAAS,EAAA,EAAW;GACpB,SAAS,EAAA,EAAW;GACpB,SAAS,EAAA,EAAO;GAChB,OAAO;GACR,YAAA;GACA,OAAM;GACL,aAAW,EAAA,EAAe;GAC1B,cAAY,EAAA,EAAgB;GAC5B,mBAAiB;;;;;;;;;;;cAEpB,EAGE,OAHF,EAGE,EAAA,EAAA,IAAA,EAAA,CAAA,CAAA,GA1BM,EAAA,KAAK,SAAM,EAAA,CAAA,CAAA,GAAA,GAAA,EA6BrB,EAIE,EAHK,EAAA,MAAS,EAAA;GACb,OAAO,EAAA,EAAI,CAAC,EAAM,SAAQ;GAC1B,SAAK,EAAA,OAAA,EAAA,MAAA,MAAE,EAAI,MAAA"}
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ value?: unknown;
3
+ rowIndex: number;
4
+ prop: string;
5
+ onToggle: (rowIndex: number, prop: string, value: boolean) => void;
6
+ };
7
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
10
+ //# sourceMappingURL=GridCheckboxCell.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridCheckboxCell.d.ts","sourceRoot":"","sources":["../../../src/grid/cells/GridCheckboxCell.vue"],"names":[],"mappings":"AAmCA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpE,CAAC;AAuDF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,7 @@
1
+ import e from "./GridCheckboxCell.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/grid/cells/GridCheckboxCell.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
6
+
7
+ //# sourceMappingURL=GridCheckboxCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridCheckboxCell.js","names":[],"sources":["../../../src/grid/cells/GridCheckboxCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport Checkbox from 'primevue/checkbox';\n\nconst props = defineProps<{\n value?: unknown;\n rowIndex: number;\n prop: string;\n onToggle: (rowIndex: number, prop: string, value: boolean) => void;\n}>();\n\ndefineOptions({ inheritAttrs: false });\n\nfunction handleChange(checked: boolean) {\n props.onToggle(props.rowIndex, props.prop, checked);\n}\n</script>\n\n<template>\n <span\n class=\"flex h-full w-full items-center justify-center\"\n @click.stop\n @mousedown.stop\n >\n <Checkbox\n :model-value=\"!!value\"\n binary\n @update:model-value=\"handleChange\"\n />\n </span>\n</template>\n"],"mappings":""}
@@ -0,0 +1,32 @@
1
+ import { createElementBlock as e, createVNode as t, defineComponent as n, openBlock as r, unref as i, withModifiers as a } from "vue";
2
+ import o from "primevue/checkbox";
3
+ //#region src/grid/cells/GridCheckboxCell.vue?vue&type=script&setup=true&lang.ts
4
+ var s = /* @__PURE__ */ n({
5
+ inheritAttrs: !1,
6
+ __name: "GridCheckboxCell",
7
+ props: {
8
+ value: {},
9
+ rowIndex: {},
10
+ prop: {},
11
+ onToggle: { type: Function }
12
+ },
13
+ setup(n) {
14
+ let s = n;
15
+ function c(e) {
16
+ s.onToggle(s.rowIndex, s.prop, e);
17
+ }
18
+ return (s, l) => (r(), e("span", {
19
+ class: "flex h-full w-full items-center justify-center",
20
+ onClick: l[0] || (l[0] = a(() => {}, ["stop"])),
21
+ onMousedown: l[1] || (l[1] = a(() => {}, ["stop"]))
22
+ }, [t(i(o), {
23
+ "model-value": !!n.value,
24
+ binary: "",
25
+ "onUpdate:modelValue": c
26
+ }, null, 8, ["model-value"])], 32));
27
+ }
28
+ });
29
+ //#endregion
30
+ export { s as default };
31
+
32
+ //# sourceMappingURL=GridCheckboxCell.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridCheckboxCell.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/grid/cells/GridCheckboxCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport Checkbox from 'primevue/checkbox';\n\nconst props = defineProps<{\n value?: unknown;\n rowIndex: number;\n prop: string;\n onToggle: (rowIndex: number, prop: string, value: boolean) => void;\n}>();\n\ndefineOptions({ inheritAttrs: false });\n\nfunction handleChange(checked: boolean) {\n props.onToggle(props.rowIndex, props.prop, checked);\n}\n</script>\n\n<template>\n <span\n class=\"flex h-full w-full items-center justify-center\"\n @click.stop\n @mousedown.stop\n >\n <Checkbox\n :model-value=\"!!value\"\n binary\n @update:model-value=\"handleChange\"\n />\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;EAGA,IAAM,IAAQ;EASd,SAAS,EAAa,GAAkB;AACtC,KAAM,SAAS,EAAM,UAAU,EAAM,MAAM,EAAQ;;yBAKnD,EAUO,QAAA;GATL,OAAM;GACL,SAAK,EAAA,OAAA,EAAA,KAAA,QAAN,IAAW,CAAA,OAAA,CAAA;GACV,aAAS,EAAA,OAAA,EAAA,KAAA,QAAV,IAAe,CAAA,OAAA,CAAA;MAEf,EAIE,EAAA,EAAA,EAAA;GAHC,eAAW,CAAA,CAAI,EAAA;GAChB,QAAA;GACC,uBAAoB"}
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ value?: unknown;
3
+ };
4
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ //# sourceMappingURL=GridColorCell.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridColorCell.d.ts","sourceRoot":"","sources":["../../../src/grid/cells/GridColorCell.vue"],"names":[],"mappings":"AA0BA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AA2CF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,7 @@
1
+ import e from "./GridColorCell.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/grid/cells/GridColorCell.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
6
+
7
+ //# sourceMappingURL=GridColorCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridColorCell.js","names":[],"sources":["../../../src/grid/cells/GridColorCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n value?: unknown;\n}>();\n\ndefineOptions({ inheritAttrs: false });\n\nconst hex = computed(() => (props.value as string) ?? '');\n</script>\n\n<template>\n <span class=\"flex h-full w-full items-center gap-1.5\">\n <span\n class=\"inline-block h-3 w-3 shrink-0 rounded-sm border border-surface-300\"\n :style=\"{ backgroundColor: hex }\"\n />\n <span>{{ hex }}</span>\n </span>\n</template>\n"],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeStyle as i, openBlock as a, toDisplayString as o } from "vue";
2
+ //#region src/grid/cells/GridColorCell.vue?vue&type=script&setup=true&lang.ts
3
+ var s = { class: "flex h-full w-full items-center gap-1.5" }, c = /* @__PURE__ */ r({
4
+ inheritAttrs: !1,
5
+ __name: "GridColorCell",
6
+ props: { value: {} },
7
+ setup(r) {
8
+ let c = r, l = e(() => c.value ?? "");
9
+ return (e, r) => (a(), t("span", s, [n("span", {
10
+ class: "inline-block h-3 w-3 shrink-0 rounded-sm border border-surface-300",
11
+ style: i({ backgroundColor: l.value })
12
+ }, null, 4), n("span", null, o(l.value), 1)]));
13
+ }
14
+ });
15
+ //#endregion
16
+ export { c as default };
17
+
18
+ //# sourceMappingURL=GridColorCell.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridColorCell.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/grid/cells/GridColorCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n value?: unknown;\n}>();\n\ndefineOptions({ inheritAttrs: false });\n\nconst hex = computed(() => (props.value as string) ?? '');\n</script>\n\n<template>\n <span class=\"flex h-full w-full items-center gap-1.5\">\n <span\n class=\"inline-block h-3 w-3 shrink-0 rounded-sm border border-surface-300\"\n :style=\"{ backgroundColor: hex }\"\n />\n <span>{{ hex }}</span>\n </span>\n</template>\n"],"mappings":";;;;;;;EAGA,IAAM,IAAQ,GAMR,IAAM,QAAgB,EAAM,SAAoB,GAAG;yBAIvD,EAMO,QANP,GAMO,CALL,EAGE,QAAA;GAFA,OAAM;GACL,OAAK,EAAA,EAAA,iBAAqB,EAAA,OAAG,CAAA;eAEhC,EAAsB,QAAA,MAAA,EAAb,EAAA,MAAG,EAAA,EAAA,CAAA,CAAA"}
@@ -0,0 +1,12 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import('vue').DefineComponent<{
4
+ val?: unknown;
5
+ save: (value: unknown, preventFocus?: boolean) => void;
6
+ close: (focusNext?: boolean) => void;
7
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
8
+ val?: unknown;
9
+ save: (value: unknown, preventFocus?: boolean) => void;
10
+ close: (focusNext?: boolean) => void;
11
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ //# sourceMappingURL=GridColorPickerEditor.vue.d.ts.map