@welldot/vue 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +526 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/_virtual/icons/ph/caret-down.js +21 -0
- package/dist/_virtual/icons/ph/caret-down.js.map +1 -0
- package/dist/_virtual/icons/ph/info.js +21 -0
- package/dist/_virtual/icons/ph/info.js.map +1 -0
- package/dist/_virtual/icons/ph/pencil-simple-line.js +21 -0
- package/dist/_virtual/icons/ph/pencil-simple-line.js.map +1 -0
- package/dist/_virtual/icons/ph/pencil-simple.js +21 -0
- package/dist/_virtual/icons/ph/pencil-simple.js.map +1 -0
- package/dist/_virtual/icons/ph/plus.js +21 -0
- package/dist/_virtual/icons/ph/plus.js.map +1 -0
- package/dist/_virtual/icons/ph/x.js +21 -0
- package/dist/_virtual/icons/ph/x.js.map +1 -0
- package/dist/components/WellChip.d.ts +30 -0
- package/dist/components/WellChip.d.ts.map +1 -0
- package/dist/components/WellChip.js +9 -0
- package/dist/components/WellChip.js.map +1 -0
- package/dist/components/WellChip.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/components/WellChip.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/WellComboSelect.d.ts +19 -0
- package/dist/components/WellComboSelect.d.ts.map +1 -0
- package/dist/components/WellComboSelect.js +7 -0
- package/dist/components/WellComboSelect.js.map +1 -0
- package/dist/components/WellComboSelect.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/WellComboSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/WellInfoPopover.d.ts +31 -0
- package/dist/components/WellInfoPopover.d.ts.map +1 -0
- package/dist/components/WellInfoPopover.js +7 -0
- package/dist/components/WellInfoPopover.js.map +1 -0
- package/dist/components/WellInfoPopover.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/components/WellInfoPopover.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/WellInputNumber.d.ts +4 -0
- package/dist/components/WellInputNumber.d.ts.map +1 -0
- package/dist/components/WellInputNumber.js +7 -0
- package/dist/components/WellInputNumber.js.map +1 -0
- package/dist/components/WellInputNumber.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/components/WellInputNumber.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/WellLabeledField.d.ts +22 -0
- package/dist/components/WellLabeledField.d.ts.map +1 -0
- package/dist/components/WellLabeledField.js +7 -0
- package/dist/components/WellLabeledField.js.map +1 -0
- package/dist/components/WellLabeledField.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/components/WellLabeledField.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/WellTagSelect.d.ts +21 -0
- package/dist/components/WellTagSelect.d.ts.map +1 -0
- package/dist/components/WellTagSelect.js +7 -0
- package/dist/components/WellTagSelect.js.map +1 -0
- package/dist/components/WellTagSelect.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/WellTagSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/WellTextureSelect.d.ts +30 -0
- package/dist/components/WellTextureSelect.d.ts.map +1 -0
- package/dist/components/WellTextureSelect.js +7 -0
- package/dist/components/WellTextureSelect.js.map +1 -0
- package/dist/components/WellTextureSelect.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/WellTextureSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/WellTextureThumbnail.d.ts +10 -0
- package/dist/components/WellTextureThumbnail.d.ts.map +1 -0
- package/dist/components/WellTextureThumbnail.js +9 -0
- package/dist/components/WellTextureThumbnail.js.map +1 -0
- package/dist/components/WellTextureThumbnail.vue_vue_type_script_setup_true_lang.js +393 -0
- package/dist/components/WellTextureThumbnail.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/WellUnitInput.d.ts +19 -0
- package/dist/components/WellUnitInput.d.ts.map +1 -0
- package/dist/components/WellUnitInput.js +7 -0
- package/dist/components/WellUnitInput.js.map +1 -0
- package/dist/components/WellUnitInput.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/components/WellUnitInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/parts/WellInfoTrigger.d.ts +8 -0
- package/dist/components/parts/WellInfoTrigger.d.ts.map +1 -0
- package/dist/components/parts/WellInfoTrigger.js +7 -0
- package/dist/components/parts/WellInfoTrigger.js.map +1 -0
- package/dist/components/parts/WellInfoTrigger.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/components/parts/WellInfoTrigger.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composables/useWellNumberFormat.d.ts +12 -0
- package/dist/composables/useWellNumberFormat.d.ts.map +1 -0
- package/dist/composables/useWellNumberFormat.js +25 -0
- package/dist/composables/useWellNumberFormat.js.map +1 -0
- package/dist/composables/useWellText.d.ts +11 -0
- package/dist/composables/useWellText.d.ts.map +1 -0
- package/dist/composables/useWellText.js +15 -0
- package/dist/composables/useWellText.js.map +1 -0
- package/dist/composables/useWellUnits.d.ts +29 -0
- package/dist/composables/useWellUnits.d.ts.map +1 -0
- package/dist/composables/useWellUnits.js +52 -0
- package/dist/composables/useWellUnits.js.map +1 -0
- package/dist/config.d.ts +110 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +76 -0
- package/dist/config.js.map +1 -0
- package/dist/grid/WellDataGrid.d.ts +29 -0
- package/dist/grid/WellDataGrid.d.ts.map +1 -0
- package/dist/grid/WellDataGrid.js +9 -0
- package/dist/grid/WellDataGrid.js.map +1 -0
- package/dist/grid/WellDataGrid.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/grid/WellDataGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridCheckboxCell.d.ts +10 -0
- package/dist/grid/cells/GridCheckboxCell.d.ts.map +1 -0
- package/dist/grid/cells/GridCheckboxCell.js +7 -0
- package/dist/grid/cells/GridCheckboxCell.js.map +1 -0
- package/dist/grid/cells/GridCheckboxCell.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/grid/cells/GridCheckboxCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridColorCell.d.ts +7 -0
- package/dist/grid/cells/GridColorCell.d.ts.map +1 -0
- package/dist/grid/cells/GridColorCell.js +7 -0
- package/dist/grid/cells/GridColorCell.js.map +1 -0
- package/dist/grid/cells/GridColorCell.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/grid/cells/GridColorCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridColorPickerEditor.d.ts +12 -0
- package/dist/grid/cells/GridColorPickerEditor.d.ts.map +1 -0
- package/dist/grid/cells/GridColorPickerEditor.js +7 -0
- package/dist/grid/cells/GridColorPickerEditor.js.map +1 -0
- package/dist/grid/cells/GridColorPickerEditor.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/grid/cells/GridColorPickerEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridComboEditor.d.ts +14 -0
- package/dist/grid/cells/GridComboEditor.d.ts.map +1 -0
- package/dist/grid/cells/GridComboEditor.js +7 -0
- package/dist/grid/cells/GridComboEditor.js.map +1 -0
- package/dist/grid/cells/GridComboEditor.vue_vue_type_script_setup_true_lang.js +177 -0
- package/dist/grid/cells/GridComboEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridDeleteCell.d.ts +12 -0
- package/dist/grid/cells/GridDeleteCell.d.ts.map +1 -0
- package/dist/grid/cells/GridDeleteCell.js +7 -0
- package/dist/grid/cells/GridDeleteCell.js.map +1 -0
- package/dist/grid/cells/GridDeleteCell.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/grid/cells/GridDeleteCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridDragCell.d.ts +16 -0
- package/dist/grid/cells/GridDragCell.d.ts.map +1 -0
- package/dist/grid/cells/GridDragCell.js +7 -0
- package/dist/grid/cells/GridDragCell.js.map +1 -0
- package/dist/grid/cells/GridDragCell.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/grid/cells/GridDragCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridFormattedCell.d.ts +9 -0
- package/dist/grid/cells/GridFormattedCell.d.ts.map +1 -0
- package/dist/grid/cells/GridFormattedCell.js +7 -0
- package/dist/grid/cells/GridFormattedCell.js.map +1 -0
- package/dist/grid/cells/GridFormattedCell.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/grid/cells/GridFormattedCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridHeaderCell.d.ts +11 -0
- package/dist/grid/cells/GridHeaderCell.d.ts.map +1 -0
- package/dist/grid/cells/GridHeaderCell.js +7 -0
- package/dist/grid/cells/GridHeaderCell.js.map +1 -0
- package/dist/grid/cells/GridHeaderCell.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/grid/cells/GridHeaderCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridNumberEditor.d.ts +9 -0
- package/dist/grid/cells/GridNumberEditor.d.ts.map +1 -0
- package/dist/grid/cells/GridNumberEditor.js +7 -0
- package/dist/grid/cells/GridNumberEditor.js.map +1 -0
- package/dist/grid/cells/GridNumberEditor.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/grid/cells/GridNumberEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridSelectButtonCell.d.ts +12 -0
- package/dist/grid/cells/GridSelectButtonCell.d.ts.map +1 -0
- package/dist/grid/cells/GridSelectButtonCell.js +7 -0
- package/dist/grid/cells/GridSelectButtonCell.js.map +1 -0
- package/dist/grid/cells/GridSelectButtonCell.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/grid/cells/GridSelectButtonCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridSelectCell.d.ts +9 -0
- package/dist/grid/cells/GridSelectCell.d.ts.map +1 -0
- package/dist/grid/cells/GridSelectCell.js +7 -0
- package/dist/grid/cells/GridSelectCell.js.map +1 -0
- package/dist/grid/cells/GridSelectCell.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/grid/cells/GridSelectCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridSelectEditor.d.ts +11 -0
- package/dist/grid/cells/GridSelectEditor.d.ts.map +1 -0
- package/dist/grid/cells/GridSelectEditor.js +7 -0
- package/dist/grid/cells/GridSelectEditor.js.map +1 -0
- package/dist/grid/cells/GridSelectEditor.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/grid/cells/GridSelectEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridTextEditor.d.ts +9 -0
- package/dist/grid/cells/GridTextEditor.d.ts.map +1 -0
- package/dist/grid/cells/GridTextEditor.js +7 -0
- package/dist/grid/cells/GridTextEditor.js.map +1 -0
- package/dist/grid/cells/GridTextEditor.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/grid/cells/GridTextEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridTextureSelectCell.d.ts +7 -0
- package/dist/grid/cells/GridTextureSelectCell.d.ts.map +1 -0
- package/dist/grid/cells/GridTextureSelectCell.js +7 -0
- package/dist/grid/cells/GridTextureSelectCell.js.map +1 -0
- package/dist/grid/cells/GridTextureSelectCell.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/grid/cells/GridTextureSelectCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridTextureSelectEditor.d.ts +13 -0
- package/dist/grid/cells/GridTextureSelectEditor.d.ts.map +1 -0
- package/dist/grid/cells/GridTextureSelectEditor.js +7 -0
- package/dist/grid/cells/GridTextureSelectEditor.js.map +1 -0
- package/dist/grid/cells/GridTextureSelectEditor.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/grid/cells/GridTextureSelectEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridUnitCell.d.ts +9 -0
- package/dist/grid/cells/GridUnitCell.d.ts.map +1 -0
- package/dist/grid/cells/GridUnitCell.js +7 -0
- package/dist/grid/cells/GridUnitCell.js.map +1 -0
- package/dist/grid/cells/GridUnitCell.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/grid/cells/GridUnitCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/cells/GridUnitEditor.d.ts +11 -0
- package/dist/grid/cells/GridUnitEditor.d.ts.map +1 -0
- package/dist/grid/cells/GridUnitEditor.js +7 -0
- package/dist/grid/cells/GridUnitEditor.js.map +1 -0
- package/dist/grid/cells/GridUnitEditor.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/grid/cells/GridUnitEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/columnStretchPlugin.d.ts +12 -0
- package/dist/grid/columnStretchPlugin.d.ts.map +1 -0
- package/dist/grid/columnStretchPlugin.js +35 -0
- package/dist/grid/columnStretchPlugin.js.map +1 -0
- package/dist/grid/composables/useCellTemplate.d.ts +35 -0
- package/dist/grid/composables/useCellTemplate.d.ts.map +1 -0
- package/dist/grid/composables/useCellTemplate.js +30 -0
- package/dist/grid/composables/useCellTemplate.js.map +1 -0
- package/dist/grid/composables/useGridOverlayFocusGuard.d.ts +5 -0
- package/dist/grid/composables/useGridOverlayFocusGuard.d.ts.map +1 -0
- package/dist/grid/composables/useGridOverlayFocusGuard.js +12 -0
- package/dist/grid/composables/useGridOverlayFocusGuard.js.map +1 -0
- package/dist/grid/composables/useUnitSuffix.d.ts +9 -0
- package/dist/grid/composables/useUnitSuffix.d.ts.map +1 -0
- package/dist/grid/composables/useUnitSuffix.js +13 -0
- package/dist/grid/composables/useUnitSuffix.js.map +1 -0
- package/dist/grid/index.d.ts +8 -0
- package/dist/grid/index.d.ts.map +1 -0
- package/dist/grid/index.js +4 -0
- package/dist/grid/parts/WellGridAddButton.d.ts +5 -0
- package/dist/grid/parts/WellGridAddButton.d.ts.map +1 -0
- package/dist/grid/parts/WellGridAddButton.js +7 -0
- package/dist/grid/parts/WellGridAddButton.js.map +1 -0
- package/dist/grid/parts/WellGridAddButton.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/grid/parts/WellGridAddButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/parts/WellGridDeleteButton.d.ts +5 -0
- package/dist/grid/parts/WellGridDeleteButton.d.ts.map +1 -0
- package/dist/grid/parts/WellGridDeleteButton.js +7 -0
- package/dist/grid/parts/WellGridDeleteButton.js.map +1 -0
- package/dist/grid/parts/WellGridDeleteButton.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/grid/parts/WellGridDeleteButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/grid/types.d.ts +90 -0
- package/dist/grid/types.d.ts.map +1 -0
- package/dist/grid/useWellGridColumns.d.ts +40 -0
- package/dist/grid/useWellGridColumns.d.ts.map +1 -0
- package/dist/grid/useWellGridColumns.js +242 -0
- package/dist/grid/useWellGridColumns.js.map +1 -0
- package/dist/grid.css +407 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/location/WellCoordinateInput.d.ts +14 -0
- package/dist/location/WellCoordinateInput.d.ts.map +1 -0
- package/dist/location/WellCoordinateInput.js +7 -0
- package/dist/location/WellCoordinateInput.js.map +1 -0
- package/dist/location/WellCoordinateInput.vue_vue_type_script_setup_true_lang.js +53 -0
- package/dist/location/WellCoordinateInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/location/WellLocationMap.d.ts +22 -0
- package/dist/location/WellLocationMap.d.ts.map +1 -0
- package/dist/location/WellLocationMap.js +9 -0
- package/dist/location/WellLocationMap.js.map +1 -0
- package/dist/location/WellLocationMap.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/location/WellLocationMap.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/location/WellLocationPicker.d.ts +32 -0
- package/dist/location/WellLocationPicker.d.ts.map +1 -0
- package/dist/location/WellLocationPicker.js +7 -0
- package/dist/location/WellLocationPicker.js.map +1 -0
- package/dist/location/WellLocationPicker.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/location/WellLocationPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/location/index.d.ts +6 -0
- package/dist/location/index.d.ts.map +1 -0
- package/dist/location/index.js +5 -0
- package/dist/location/location.d.ts +61 -0
- package/dist/location/location.d.ts.map +1 -0
- package/dist/location/location.js +15 -0
- package/dist/location/location.js.map +1 -0
- package/dist/nuxt/module.d.ts +76 -0
- package/dist/nuxt/module.d.ts.map +1 -0
- package/dist/nuxt/module.js +129 -0
- package/dist/nuxt/module.js.map +1 -0
- package/dist/nuxt/runtime/plugin.d.ts +14 -0
- package/dist/nuxt/runtime/plugin.d.ts.map +1 -0
- package/dist/nuxt/runtime/plugin.js +13 -0
- package/dist/nuxt/runtime/plugin.js.map +1 -0
- package/dist/style.css +2 -0
- package/dist/tailwind.css +160 -0
- package/dist/theme/define.d.ts +44 -0
- package/dist/theme/define.d.ts.map +1 -0
- package/dist/theme/define.js +14 -0
- package/dist/theme/define.js.map +1 -0
- package/dist/theme/index.d.ts +5 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +4 -0
- package/dist/theme/preset.d.ts +20 -0
- package/dist/theme/preset.d.ts.map +1 -0
- package/dist/theme/preset.js +977 -0
- package/dist/theme/preset.js.map +1 -0
- package/dist/theme/pt.d.ts +8 -0
- package/dist/theme/pt.d.ts.map +1 -0
- package/dist/theme/pt.js +66 -0
- package/dist/theme/pt.js.map +1 -0
- package/dist/types.d.ts +38 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +134 -3
package/README.md
CHANGED
|
@@ -1,3 +1,527 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @welldot/vue
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Vue 3 + PrimeVue base components, theme and composables for `.well` water well editors, with a Nuxt module. Part of the [welldot](https://github.com/rafaeelneto/welldot) open-source ecosystem.
|
|
4
|
+
|
|
5
|
+
Labeled fields, chips, tag selects, info popovers, number and unit inputs, an FGDC texture picker, a spreadsheet-style data grid and a map-based location picker, all sharing one PrimeVue theme and Tailwind tokens. No i18n library and no store: text props accept a plain string or a `LanguageText` (`{ en, pt, … }`), and app-wide settings come from one `createWelldot` plugin.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @welldot/vue @welldot/core @welldot/utils @welldot/render primevue @primeuix/themes
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Optional peers, only for the subpath that needs them:
|
|
16
|
+
|
|
17
|
+
| Subpath | Install |
|
|
18
|
+
| ----------------------- | ----------------------------------------------------------- |
|
|
19
|
+
| `@welldot/vue/grid` | `@revolist/vue3-datagrid @revolist/revogrid vue-color` |
|
|
20
|
+
| `@welldot/vue/location` | `leaflet` |
|
|
21
|
+
| `@welldot/vue/nuxt` | `@nuxt/kit`, `@nuxt/schema` (already present in a Nuxt app) |
|
|
22
|
+
|
|
23
|
+
The package is ESM only.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Quick start
|
|
28
|
+
|
|
29
|
+
### Vue
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import PrimeVue from 'primevue/config';
|
|
33
|
+
import { createApp } from 'vue';
|
|
34
|
+
import { createWelldot } from '@welldot/vue';
|
|
35
|
+
import { WelldotPreset, welldotPt } from '@welldot/vue/theme';
|
|
36
|
+
|
|
37
|
+
const app = createApp(App);
|
|
38
|
+
app.use(PrimeVue, { theme: WelldotPreset, pt: welldotPt });
|
|
39
|
+
app.use(createWelldot({ locale: 'pt' }));
|
|
40
|
+
app.mount('#app');
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```vue
|
|
44
|
+
<script setup lang="ts">
|
|
45
|
+
import { WellLabeledField, WellUnitInput } from '@welldot/vue';
|
|
46
|
+
|
|
47
|
+
const depth = ref<number | null>(120); // always stored in metres
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<template>
|
|
51
|
+
<WellLabeledField :label="{ en: 'Depth', pt: 'Profundidade' }">
|
|
52
|
+
<WellUnitInput v-model="depth" unit-type="length" />
|
|
53
|
+
</WellLabeledField>
|
|
54
|
+
</template>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Nuxt
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
// nuxt.config.ts
|
|
61
|
+
export default defineNuxtConfig({
|
|
62
|
+
modules: ['@primevue/nuxt-module', '@nuxtjs/i18n', '@welldot/vue/nuxt'],
|
|
63
|
+
css: ['~/assets/styles/main.css'], // see Tailwind setup
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The module:
|
|
68
|
+
|
|
69
|
+
- registers every `Well*` component (names as-is, no prefix) and auto-imports `createWelldot`, `useWelldotConfig`, `useWellText`, `useWellUnits` and `useWellNumberFormat`;
|
|
70
|
+
- adds `@welldot/vue` to `build.transpile` and keeps Nuxt's auto-import transform off its built files (needed when the package is linked, e.g. in a pnpm workspace);
|
|
71
|
+
- when `@primevue/nuxt-module` is installed, defaults `primevue.importTheme` / `importPT` to `WelldotPreset` / `welldotPt` — each only if the app hasn't set it;
|
|
72
|
+
- when `@nuxtjs/i18n` is installed, adds a plugin that installs `createWelldot({ locale })` following `$i18n.locale`.
|
|
73
|
+
|
|
74
|
+
| Option (`welldot: {}`) | Default | Description |
|
|
75
|
+
| ---------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
76
|
+
| `grid` | `true` | Register `WellDataGrid` |
|
|
77
|
+
| `location` | `true` | Register `WellCoordinateInput`, `WellLocationMap`, `WellLocationPicker` |
|
|
78
|
+
| `theme` | `true` | Default PrimeVue `importTheme` / `importPT` to the Welldot theme; `{ preset?, pt? }` merges override files onto it ([Theme](#theme)) |
|
|
79
|
+
| `i18n` | `true` if `@nuxtjs/i18n` exists | Wire `locale` to `$i18n.locale` |
|
|
80
|
+
|
|
81
|
+
Units and coordinate format are app state, so the app wires them in its own plugin. Its `createWelldot` layers on top of the module's (see [Layering](#layering)):
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
// app/plugins/welldot.ts
|
|
85
|
+
export default defineNuxtPlugin(nuxtApp => {
|
|
86
|
+
const ui = useUiStore();
|
|
87
|
+
nuxtApp.vueApp.use(
|
|
88
|
+
createWelldot({
|
|
89
|
+
units: () => ({ length: ui.lengthUnit, diameter: ui.diameterUnit }),
|
|
90
|
+
coordinateFormat: () => ui.coordinateFormat,
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The module never injects CSS: add the Tailwind import below in Nuxt too.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Tailwind setup
|
|
101
|
+
|
|
102
|
+
The components are styled with Tailwind CSS 4 utilities and the Welldot tokens. In the app's main stylesheet:
|
|
103
|
+
|
|
104
|
+
```css
|
|
105
|
+
@import 'tailwindcss';
|
|
106
|
+
@import 'tailwindcss-primeui';
|
|
107
|
+
@import '@welldot/vue/tailwind.css';
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`@welldot/vue/tailwind.css` brings the `@theme` tokens, the `dark` variant (`.dark-mode`), the base layer, the data grid's styles and the components' own styles, and adds the package's built files as a Tailwind `@source`. It must be imported from the app's CSS (not from JS) so the tokens join the app's Tailwind compilation. The tokens read PrimeVue's `--w-*` variables, so use `WelldotPreset` (prefix `w`) or a preset with the same prefix.
|
|
111
|
+
|
|
112
|
+
### Overriding the tokens
|
|
113
|
+
|
|
114
|
+
Everything in `tailwind.css` can be overridden from the app's own stylesheet, **after** the import:
|
|
115
|
+
|
|
116
|
+
| Token | Where it comes from | Override with |
|
|
117
|
+
| ------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
118
|
+
| Colors (`--color-{surface,content,primary,error,warning,success,info}-*`) | PrimeVue's `--w-*` variables | The preset — `defineWelldotTheme` (see [Overriding the theme](#overriding-the-theme)), so PrimeVue components and Tailwind utilities stay in sync |
|
|
119
|
+
| Fonts (`--font-display`, `--font-serif`, `--font-mono`) | `@theme static` | The app's `@theme` block |
|
|
120
|
+
| Radii (`--radius-{sm,md,lg,xl,2xl,pill}`) | `@theme static` | The app's `@theme` block |
|
|
121
|
+
| Focus/error rings (`--color-focus-ring`, `--color-error-ring`) | `@layer base` (`:root` and `.dark-mode`) | The app's `@layer base` |
|
|
122
|
+
|
|
123
|
+
```css
|
|
124
|
+
/* app main.css */
|
|
125
|
+
@import 'tailwindcss';
|
|
126
|
+
@import 'tailwindcss-primeui';
|
|
127
|
+
@import '@welldot/vue/tailwind.css';
|
|
128
|
+
|
|
129
|
+
@theme {
|
|
130
|
+
--font-display: 'Inter', system-ui, sans-serif;
|
|
131
|
+
--radius-md: 4px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@layer base {
|
|
135
|
+
:root {
|
|
136
|
+
--color-focus-ring: var(--color-primary-600);
|
|
137
|
+
}
|
|
138
|
+
.dark-mode {
|
|
139
|
+
--color-focus-ring: var(--color-primary-200);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Avoid overriding a color token in `@theme` directly: Tailwind utilities would change while PrimeVue components keep the preset's color. Fonts and radii are declared `static` so they're always emitted, even when only component styles read them through `var()`. The fonts themselves aren't loaded by the package; load them in the app (e.g. `@nuxt/fonts`).
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Configuration
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
app.use(
|
|
152
|
+
createWelldot({
|
|
153
|
+
locale: () => i18n.global.locale.value, // BCP-47 or 'en' | 'pt'
|
|
154
|
+
units: () => ({ length, diameter, flow, power, volume }),
|
|
155
|
+
coordinateFormat: () => ui.coordinateFormat, // 'DD' | 'DMS'
|
|
156
|
+
components: { deleteButton: TrashButton }, // global part overrides
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
| Option | Type | Default | Used by |
|
|
162
|
+
| ------------------ | ----------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------- |
|
|
163
|
+
| `locale` | `MaybeRefOrGetter<string>` | `'en'` | text resolution, number formatting |
|
|
164
|
+
| `units` | `MaybeRefOrGetter<Partial<WelldotUnits>>` | `{ length: 'm', diameter: 'mm', flow: 'm3/h', power: 'kW', volume: 'm3' }` | unit inputs, grid unit columns |
|
|
165
|
+
| `coordinateFormat` | `MaybeRefOrGetter<'DD' \| 'DMS'>` | `'DD'` | location inputs without a bound `format` |
|
|
166
|
+
| `components` | `MaybeRefOrGetter<WelldotComponents>` | `{}` | swappable parts (wrapped in `markRaw`) |
|
|
167
|
+
|
|
168
|
+
Every option takes a value, a ref or a getter. Getters keep the configuration reactive to any store or i18n instance without the package depending on either. Missing unit quantities fall back to SI. `.well` files always store SI; units only change what is shown and typed.
|
|
169
|
+
|
|
170
|
+
`useWelldotConfig()` returns the active configuration (as getters) and falls back to the defaults when the plugin isn't installed.
|
|
171
|
+
|
|
172
|
+
**Precedence:** a component's own prop (`unit`, `format`, `components`) → `createWelldot` → built-in default.
|
|
173
|
+
|
|
174
|
+
### Layering
|
|
175
|
+
|
|
176
|
+
Installing `createWelldot` more than once on the same app stacks the configurations instead of replacing them:
|
|
177
|
+
|
|
178
|
+
- `locale` and `coordinateFormat` come from the last install that sets them (`undefined`, `null` and `''` don't count);
|
|
179
|
+
- `units` and `components` merge key by key, the later install winning per quantity / part.
|
|
180
|
+
|
|
181
|
+
So a library plugin can set the locale and the app another plugin with the units. Install every layer before `app.mount()`. Layers are kept per app, so one `createWelldot()` result can be installed in several apps (e.g. per SSR request).
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Text and i18n
|
|
186
|
+
|
|
187
|
+
Every text prop is a `LanguageTextInput` from `@welldot/core`: a plain string, or a `LanguageText` such as `{ en: 'Depth', pt: 'Profundidade' }`, resolved with `resolveLanguageText(text, locale)` against the configured locale. Core vocabularies (`VocabEntry[]`) can be passed as options directly.
|
|
188
|
+
|
|
189
|
+
- An omitted label is not rendered (no built-in dictionary). The only built-in text is locale-independent (`DD` / `DMS`, coordinate examples).
|
|
190
|
+
- Composite components take a grouped `labels` prop (`WellLocationPicker`, `WellTextureSelect`, `WellDataGrid`).
|
|
191
|
+
- With vue-i18n, pass the translated string: `:label="t('editor.depth')"`.
|
|
192
|
+
|
|
193
|
+
`useWellText()` returns the resolver for custom components:
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
const text = useWellText();
|
|
197
|
+
text({ en: 'Depth', pt: 'Profundidade' }); // 'Profundidade' when locale is 'pt'
|
|
198
|
+
text(undefined); // undefined
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Swappable parts
|
|
204
|
+
|
|
205
|
+
Parts are replaced with components, not slots: through a component's `components` prop, or globally through `createWelldot({ components })`.
|
|
206
|
+
|
|
207
|
+
```vue
|
|
208
|
+
<WellDataGrid
|
|
209
|
+
:rows="rows"
|
|
210
|
+
:columns="columns"
|
|
211
|
+
:components="{ deleteButton: TrashButton, dragHandle: Grip }"
|
|
212
|
+
/>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
| Part | Used by | Props contract | Notes |
|
|
216
|
+
| -------------- | ------------------------- | ------------------------------------------------ | ------------------------------------- |
|
|
217
|
+
| `trigger` | `WellInfoPopover` | `WellInfoTriggerProps` `{ label?, size }` | must be focusable |
|
|
218
|
+
| `icon` | `WellChip` (string icons) | `WellIconProps` `{ name }` | without it, string icons don't render |
|
|
219
|
+
| `addButton` | `WellDataGrid` | `WellAddButtonProps` `{ label? }` | emits `click` |
|
|
220
|
+
| `deleteButton` | `WellDataGrid` | `WellDeleteButtonProps` `{ index, row, label? }` | emits `click` |
|
|
221
|
+
| `dragHandle` | `WellDataGrid` | `WellDragHandleProps` (none) | visual only |
|
|
222
|
+
|
|
223
|
+
Text reaches a part already resolved. A custom part owns its aria-label wording; listeners (`onClick`, `onFocus`, …) arrive as attrs and must fall through to its root element.
|
|
224
|
+
|
|
225
|
+
For example, render string icons with `@nuxt/icon`:
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
import { Icon } from '#components';
|
|
229
|
+
|
|
230
|
+
createWelldot({
|
|
231
|
+
components: {
|
|
232
|
+
icon: defineComponent({
|
|
233
|
+
props: { name: { type: String, required: true } },
|
|
234
|
+
setup: props => () => h(Icon, { name: props.name }),
|
|
235
|
+
}),
|
|
236
|
+
},
|
|
237
|
+
});
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Components
|
|
243
|
+
|
|
244
|
+
### `WellLabeledField`
|
|
245
|
+
|
|
246
|
+
Small uppercase label above (or beside) a control, with an optional info popover.
|
|
247
|
+
|
|
248
|
+
| Prop | Type | Description |
|
|
249
|
+
| ------------- | ---------------------------- | ------------------------------------ |
|
|
250
|
+
| `label` | `LanguageTextInput` | Not rendered when omitted |
|
|
251
|
+
| `orientation` | `'vertical' \| 'horizontal'` | Default `vertical` |
|
|
252
|
+
| `info` | `LanguageTextInput` | Info popover text |
|
|
253
|
+
| `infoLabel` | `LanguageTextInput` | Accessible label of the info trigger |
|
|
254
|
+
|
|
255
|
+
Slots: `default` (the control), `info` (rich popover body, replaces `info`).
|
|
256
|
+
|
|
257
|
+
The info popover sits in the label row, so it needs a `label`: with `info` (or the `info` slot) but no label (or a label that resolves to empty text), neither the label nor the popover is rendered. Use `WellInfoPopover` directly for an info button without a label.
|
|
258
|
+
|
|
259
|
+
### `WellChip`
|
|
260
|
+
|
|
261
|
+
Compact pill. A `<button>` by default (listen to `click`); with `removable`, a static chip with a trailing × that emits `remove`.
|
|
262
|
+
|
|
263
|
+
| Prop | Type | Description |
|
|
264
|
+
| ------------- | --------------------- | ---------------------------------------- |
|
|
265
|
+
| `label` | `LanguageTextInput` | |
|
|
266
|
+
| `icon` | `string \| Component` | A string renders through the `icon` part |
|
|
267
|
+
| `active` | `boolean` | Selected state (primary tint) |
|
|
268
|
+
| `removable` | `boolean` | |
|
|
269
|
+
| `removeLabel` | `LanguageTextInput` | Accessible label of the × button |
|
|
270
|
+
|
|
271
|
+
### `WellTagSelect`
|
|
272
|
+
|
|
273
|
+
Multi-value picker: selected values render as removable chips above a single Select. `v-model: string[]`. Values missing from `options` still show, as their raw value.
|
|
274
|
+
|
|
275
|
+
| Prop | Type | Description |
|
|
276
|
+
| ------------- | -------------------------- | ---------------------------------------------------------- |
|
|
277
|
+
| `options` | `readonly WellTagOption[]` | `{ value, label: LanguageTextInput }`; `VocabEntry[]` fits |
|
|
278
|
+
| `placeholder` | `LanguageTextInput` | |
|
|
279
|
+
| `removeLabel` | `LanguageTextInput` | Accessible label of each chip's × |
|
|
280
|
+
| `filter` | `boolean` | Filter box in the Select |
|
|
281
|
+
|
|
282
|
+
### `WellComboSelect`
|
|
283
|
+
|
|
284
|
+
Editable PrimeVue `Select` for open fields: the options are suggestions and any typed text is kept as the value. `hint` opens the overlay with a short note saying so. Every other attr (`v-model`, `options`, `option-label`, `show-clear`, `invalid`, `pt`…) and slot passes through to `Select`.
|
|
285
|
+
|
|
286
|
+
| Prop | Type | Description |
|
|
287
|
+
| ------ | ------------------- | ----------------------------------------------------- |
|
|
288
|
+
| `hint` | `LanguageTextInput` | Note atop the options (e.g. "Suggestions — or type…") |
|
|
289
|
+
|
|
290
|
+
### `WellInfoPopover`
|
|
291
|
+
|
|
292
|
+
Info icon that opens a popover on hover, focus or click. Body: `info` or the default slot.
|
|
293
|
+
|
|
294
|
+
| Prop | Type | Description |
|
|
295
|
+
| ------------ | ------------------------- | --------------------------------------- |
|
|
296
|
+
| `info` | `LanguageTextInput` | |
|
|
297
|
+
| `label` | `LanguageTextInput` | Accessible label of the trigger |
|
|
298
|
+
| `size` | `'sm' \| 'md'` | Default `sm` |
|
|
299
|
+
| `components` | `{ trigger?: Component }` | See [Swappable parts](#swappable-parts) |
|
|
300
|
+
|
|
301
|
+
### `WellInputNumber`
|
|
302
|
+
|
|
303
|
+
PrimeVue `InputNumber` with the locale from the configuration (`en` → `en-US`, `pt` → `pt-BR`, other BCP-47 tags as-is). All attrs pass through.
|
|
304
|
+
|
|
305
|
+
### `WellUnitInput`
|
|
306
|
+
|
|
307
|
+
Number input bound to a canonical SI value, shown and edited in the configured display unit. `v-model: number | null`. Other attrs pass through to `WellInputNumber`; `maxFractionDigits` defaults to 4. Follows `unitType` / `unit` changes. A blur that leaves the shown value as it was emits nothing, so an untouched focus + blur never replaces the exact SI value with its rounded display (`1` m shown as `3.2808` ft stays `1`).
|
|
308
|
+
|
|
309
|
+
| Prop | Type | Description |
|
|
310
|
+
| ---------------------- | --------------------------------------------------------- | -------------------------------------------- |
|
|
311
|
+
| `unitType` | `'length' \| 'diameter' \| 'flow' \| 'power' \| 'volume'` | Required |
|
|
312
|
+
| `unit` | unit of that quantity | Overrides the configured unit for this input |
|
|
313
|
+
| `min` / `max` / `step` | `number` | In SI; converted for display |
|
|
314
|
+
|
|
315
|
+
### `WellTextureSelect`
|
|
316
|
+
|
|
317
|
+
Filterable Select of lithology texture codes with thumbnails. `v-model: TextureCode | null`. Other attrs (`disabled`, `invalid`, listeners…) pass through to the PrimeVue Select; `show()` / `hide()` are exposed.
|
|
318
|
+
|
|
319
|
+
| Prop | Type | Description |
|
|
320
|
+
| ---------- | -------------------------------- | --------------------------------------------------------------------- |
|
|
321
|
+
| `options` | `readonly TextureOption[]` | Default `FGDC_TEXTURES_OPTIONS` |
|
|
322
|
+
| `labels` | `{ placeholder?, showPending? }` | `showPending` labels the "pending textures" toggle; hidden without it |
|
|
323
|
+
| `appendTo` | `string \| HTMLElement` | Overlay target, default `body` |
|
|
324
|
+
| `filter` | `boolean` | Default `true` |
|
|
325
|
+
| `pt` | `object` | Merged per section over the built-in pass-through |
|
|
326
|
+
|
|
327
|
+
### `WellTextureThumbnail`
|
|
328
|
+
|
|
329
|
+
SVG thumbnail of an FGDC texture, loaded lazily from `@welldot/render/textures`.
|
|
330
|
+
|
|
331
|
+
| Prop | Type | Description |
|
|
332
|
+
| ------ | ------------------------------- | -------------- |
|
|
333
|
+
| `code` | `number \| string \| undefined` | |
|
|
334
|
+
| `size` | `number` | px, default 48 |
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Data grid (`@welldot/vue/grid`)
|
|
339
|
+
|
|
340
|
+
`WellDataGrid` is a spreadsheet-style editor for any `.well` feature array, built on [RevoGrid](https://rv-grid.com). It never mutates `rows`: it emits events and the parent updates its state. The grid renders on the client after mount (a skeleton shows until then).
|
|
341
|
+
|
|
342
|
+
```vue
|
|
343
|
+
<script setup lang="ts">
|
|
344
|
+
import { WellDataGrid, type WellGridColumn } from '@welldot/vue/grid';
|
|
345
|
+
import { CONSTRUCTION_MATERIALS, type WellCase } from '@welldot/core';
|
|
346
|
+
|
|
347
|
+
const casings = ref<WellCase[]>([]);
|
|
348
|
+
|
|
349
|
+
const columns: WellGridColumn[] = [
|
|
350
|
+
{
|
|
351
|
+
prop: 'from',
|
|
352
|
+
label: { en: 'From', pt: 'De' },
|
|
353
|
+
type: 'number',
|
|
354
|
+
unitType: 'length',
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
prop: 'to',
|
|
358
|
+
label: { en: 'To', pt: 'Até' },
|
|
359
|
+
type: 'number',
|
|
360
|
+
unitType: 'length',
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
prop: 'type',
|
|
364
|
+
label: 'Material',
|
|
365
|
+
type: 'select',
|
|
366
|
+
options: CONSTRUCTION_MATERIALS,
|
|
367
|
+
},
|
|
368
|
+
];
|
|
369
|
+
</script>
|
|
370
|
+
|
|
371
|
+
<template>
|
|
372
|
+
<WellDataGrid
|
|
373
|
+
:rows="casings"
|
|
374
|
+
:columns="columns"
|
|
375
|
+
:add-label="{ en: 'Add casing', pt: 'Adicionar revestimento' }"
|
|
376
|
+
:delete-label="{ en: 'Delete row', pt: 'Excluir linha' }"
|
|
377
|
+
@add="casings.push({ from: 0, to: 0, type: '', diameter: 0 })"
|
|
378
|
+
@delete="i => casings.splice(i, 1)"
|
|
379
|
+
@change="
|
|
380
|
+
(i, prop, value) =>
|
|
381
|
+
((casings[i] as Record<string, unknown>)[prop] = value)
|
|
382
|
+
"
|
|
383
|
+
@reorder="(from, to) => casings.splice(to, 0, ...casings.splice(from, 1))"
|
|
384
|
+
/>
|
|
385
|
+
</template>
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
| Prop | Type | Description |
|
|
389
|
+
| ------------- | --------------------------- | ---------------------------------------------------------------------- |
|
|
390
|
+
| `rows` | `Record<string, unknown>[]` | Rows to display |
|
|
391
|
+
| `columns` | `WellGridColumn[]` | Column definitions (below) |
|
|
392
|
+
| `addLabel` | `LanguageTextInput` | Add-row button label; icon-only button when omitted |
|
|
393
|
+
| `deleteLabel` | `LanguageTextInput` | Accessible label of each delete button |
|
|
394
|
+
| `labels` | `WellDataGridLabels` | `texturePlaceholder`, `showPendingTextures`, `columnInfo`, `comboHint` |
|
|
395
|
+
| `components` | `WellDataGridComponents` | `addButton`, `deleteButton`, `dragHandle` |
|
|
396
|
+
|
|
397
|
+
| Event | Payload |
|
|
398
|
+
| --------- | --------------------------------------------- |
|
|
399
|
+
| `add` | — |
|
|
400
|
+
| `delete` | `index: number` |
|
|
401
|
+
| `change` | `index: number, prop: string, value: unknown` |
|
|
402
|
+
| `reorder` | `from: number, to: number` |
|
|
403
|
+
|
|
404
|
+
**`WellGridColumn`**: `prop`, `label`, `info?`, `infoHighlight?` (text fields are `LanguageTextInput`), `type` (`text`, `number`, `color`, `checkbox`, `select`, `select-button`, `combo` — free text with suggested options, its menu topped by `labels.comboHint` —, `texture`), `options` (for `select` / `select-button` / `combo`; `{ value, label, deprecated? }`, so `VocabEntry[]` fits), `unitType` (values stay SI, shown in the configured unit with the unit in the header), `formatter`, `editor`, `readonly`, `size`, `minSize`, `stretch`, `pin`.
|
|
405
|
+
|
|
406
|
+
Grid styles ship in `dist/grid.css`, included by `@welldot/vue/tailwind.css`. The color editor loads `vue-color/style.css` itself with a client-only dynamic import, so `@welldot/vue/grid` loads in plain-Vite SSR without `ssr.noExternal` and the app's CSS needs nothing from `vue-color`. Cells are mounted by RevoGrid outside the component tree and only see app-level provides: install `createWelldot` with `app.use` (the Nuxt module does).
|
|
407
|
+
|
|
408
|
+
Lower-level exports for a custom RevoGrid: `useWellGridColumns({ columns, onDelete, onChange, enableDrag?, enableDelete?, deleteLabel?, labels?, components? })` returns `revoColumns`, `gridEditors`, `plugins` and the edit handlers (cell templates, unit conversion, drag and delete columns included), and `columnStretchPlugin` lets `stretch` columns absorb the remaining width.
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
## Location (`@welldot/vue/location`)
|
|
413
|
+
|
|
414
|
+
Leaflet is imported on mount, so server-side rendering outputs an empty map container.
|
|
415
|
+
|
|
416
|
+
### `WellCoordinateInput`
|
|
417
|
+
|
|
418
|
+
Text input for one coordinate. `v-model: number` (decimal degrees). Accepts DD or DMS, clamps, and reformats on blur or Enter. Blur or Enter on the untouched text emits nothing, so the exact model is not replaced by its rounded display.
|
|
419
|
+
|
|
420
|
+
| Prop | Type | Description |
|
|
421
|
+
| ------------- | ------------------- | ---------------------------------------------------------- |
|
|
422
|
+
| `axis` | `'lat' \| 'lng'` | Required |
|
|
423
|
+
| `format` | `'DD' \| 'DMS'` | Falls back to `createWelldot({ coordinateFormat })` |
|
|
424
|
+
| `placeholder` | `LanguageTextInput` | Overrides the built-in example (`COORDINATE_PLACEHOLDERS`) |
|
|
425
|
+
|
|
426
|
+
### `WellLocationMap`
|
|
427
|
+
|
|
428
|
+
Leaflet map with a draggable pin drawn in the theme's primary colour. `v-model:lat`, `v-model:lng`.
|
|
429
|
+
|
|
430
|
+
| Prop | Type | Description |
|
|
431
|
+
| ------------- | --------- | ------------------------------------------ |
|
|
432
|
+
| `readonly` | `boolean` | No dragging or click-to-place (reactive) |
|
|
433
|
+
| `tileUrl` | `string` | Default OpenStreetMap (`DEFAULT_TILE_URL`) |
|
|
434
|
+
| `attribution` | `string` | Default `DEFAULT_TILE_ATTRIBUTION` |
|
|
435
|
+
| `height` | `string` | CSS height, default `16rem` |
|
|
436
|
+
|
|
437
|
+
### `WellLocationPicker`
|
|
438
|
+
|
|
439
|
+
DD/DMS toggle, latitude/longitude inputs, optional elevation and the map. `v-model:lat`, `v-model:lng`, `v-model:elevation`, `v-model:format` (when unbound: `createWelldot({ coordinateFormat })`, then local state).
|
|
440
|
+
|
|
441
|
+
| Prop | Type | Description |
|
|
442
|
+
| --------------- | -------------------------- | --------------------------------------------------------------------------- |
|
|
443
|
+
| `showElevation` | `boolean` | Default `true` |
|
|
444
|
+
| `labels` | `WellLocationPickerLabels` | `coordinates`, `latitude`, `longitude`, `elevation` (unit appended), `hint` |
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## Composables
|
|
449
|
+
|
|
450
|
+
| Export | Returns | Description |
|
|
451
|
+
| ---------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
452
|
+
| `useWelldotConfig()` | `ResolvedWelldotConfig` | Active `locale`, `units`, `coordinateFormat`, `components` |
|
|
453
|
+
| `useWellText()` | `(text?: LanguageTextInput) => string \| undefined` | Resolves text for the configured locale; empty → `undefined` |
|
|
454
|
+
| `useWellUnits(type, override?)` | `{ unit, toDisplay, toCanonical }` | SI ↔ display conversion for one quantity; `type` and `override` are values, refs or getters |
|
|
455
|
+
| `useWellNumberFormat()` | `{ formatNumber, resolvedLocale }` | Locale-aware number formatting |
|
|
456
|
+
| `resolvePart(name, prop?, fallback?, config?)` | `Component \| undefined` | Picks a part by precedence; a `prop` override is returned `markRaw(toRaw(…))` |
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## Theme
|
|
461
|
+
|
|
462
|
+
`@welldot/vue/theme` exports:
|
|
463
|
+
|
|
464
|
+
- `WelldotPreset`: `{ preset, options }` for PrimeVue's `theme` option (prefix `w`, dark mode on `.dark-mode`, CSS layer `primevue`);
|
|
465
|
+
- `welldotPt`: the global pass-through (filled inputs, full-width fields, …).
|
|
466
|
+
|
|
467
|
+
```ts
|
|
468
|
+
app.use(PrimeVue, { theme: WelldotPreset, pt: welldotPt });
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
Toggle dark mode with the `dark-mode` class on `<html>`.
|
|
472
|
+
|
|
473
|
+
### Overriding the theme
|
|
474
|
+
|
|
475
|
+
`defineWelldotTheme(overrides)` and `defineWelldotPt(overrides)` return the Welldot theme / pass-through with your overrides deep-merged on top ([`defu`](https://github.com/unjs/defu)). The exported defaults are never mutated.
|
|
476
|
+
|
|
477
|
+
- Plain objects merge key by key, so you only write what changes.
|
|
478
|
+
- Any other value you set wins: a PT section given as a class string or a function **replaces** the default's (it is not combined with it).
|
|
479
|
+
- Arrays are concatenated.
|
|
480
|
+
- Keep `options.prefix` at `w`: the Tailwind tokens read PrimeVue's `--w-*` variables.
|
|
481
|
+
|
|
482
|
+
```ts
|
|
483
|
+
import { defineWelldotPt, defineWelldotTheme } from '@welldot/vue/theme';
|
|
484
|
+
|
|
485
|
+
app.use(PrimeVue, {
|
|
486
|
+
theme: defineWelldotTheme({
|
|
487
|
+
preset: { semantic: { primary: { 500: '#0f766e' } } },
|
|
488
|
+
options: { darkModeSelector: '.night' },
|
|
489
|
+
}),
|
|
490
|
+
pt: defineWelldotPt({ tabpanels: { root: 'p-0' } }),
|
|
491
|
+
});
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
In Nuxt, point the module at files whose **default export** is the overrides. Paths accept aliases (`~/`, `@/`) and are resolved from the project root; PT overrides may contain functions because they're imported, not serialized:
|
|
495
|
+
|
|
496
|
+
```ts
|
|
497
|
+
// nuxt.config.ts
|
|
498
|
+
export default defineNuxtConfig({
|
|
499
|
+
welldot: { theme: { preset: '~/theme/preset', pt: '~/theme/pt' } },
|
|
500
|
+
});
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
```ts
|
|
504
|
+
// app/theme/pt.ts
|
|
505
|
+
import type { PrimeVuePTOptions } from 'primevue/config';
|
|
506
|
+
|
|
507
|
+
export default {
|
|
508
|
+
tabpanels: { root: 'p-0' },
|
|
509
|
+
} satisfies PrimeVuePTOptions;
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
```ts
|
|
513
|
+
// app/theme/preset.ts
|
|
514
|
+
import type { WelldotThemeOverrides } from '@welldot/vue/theme';
|
|
515
|
+
|
|
516
|
+
export default {
|
|
517
|
+
preset: { components: { tabs: { tab: { padding: '0.5rem 1rem' } } } },
|
|
518
|
+
} satisfies WelldotThemeOverrides;
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
Setting `primevue.importTheme` / `importPT` yourself still takes precedence over the module, override files included.
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## License
|
|
526
|
+
|
|
527
|
+
Apache 2.0 — see [LICENSE](./LICENSE)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, markRaw as n, openBlock as r } from "vue";
|
|
2
|
+
//#region ~icons/ph/caret-down
|
|
3
|
+
var i = {
|
|
4
|
+
viewBox: "0 0 256 256",
|
|
5
|
+
width: "1.2em",
|
|
6
|
+
height: "1.2em"
|
|
7
|
+
};
|
|
8
|
+
function a(n, a) {
|
|
9
|
+
return r(), e("svg", i, [...a[0] || (a[0] = [t("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "m213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32"
|
|
12
|
+
}, null, -1)])]);
|
|
13
|
+
}
|
|
14
|
+
var o = n({
|
|
15
|
+
name: "ph-caret-down",
|
|
16
|
+
render: a
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { o as default };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=caret-down.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caret-down.js","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, markRaw as n, openBlock as r } from "vue";
|
|
2
|
+
//#region ~icons/ph/info
|
|
3
|
+
var i = {
|
|
4
|
+
viewBox: "0 0 256 256",
|
|
5
|
+
width: "1.2em",
|
|
6
|
+
height: "1.2em"
|
|
7
|
+
};
|
|
8
|
+
function a(n, a) {
|
|
9
|
+
return r(), e("svg", i, [...a[0] || (a[0] = [t("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m16-40a8 8 0 0 1-8 8a16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16a16 16 0 0 1 16 16v40a8 8 0 0 1 8 8m-32-92a12 12 0 1 1 12 12a12 12 0 0 1-12-12"
|
|
12
|
+
}, null, -1)])]);
|
|
13
|
+
}
|
|
14
|
+
var o = n({
|
|
15
|
+
name: "ph-info",
|
|
16
|
+
render: a
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { o as default };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, markRaw as n, openBlock as r } from "vue";
|
|
2
|
+
//#region ~icons/ph/pencil-simple-line
|
|
3
|
+
var i = {
|
|
4
|
+
viewBox: "0 0 256 256",
|
|
5
|
+
width: "1.2em",
|
|
6
|
+
height: "1.2em"
|
|
7
|
+
};
|
|
8
|
+
function a(n, a) {
|
|
9
|
+
return r(), e("svg", i, [...a[0] || (a[0] = [t("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "m227.32 73.37l-44.69-44.68a16 16 0 0 0-22.63 0L36.69 152A15.86 15.86 0 0 0 32 163.31V208a16 16 0 0 0 16 16h168a8 8 0 0 0 0-16H115.32l112-112a16 16 0 0 0 0-22.63M92.69 208H48v-44.69l88-88L180.69 120ZM192 108.69L147.32 64l24-24L216 84.69Z"
|
|
12
|
+
}, null, -1)])]);
|
|
13
|
+
}
|
|
14
|
+
var o = n({
|
|
15
|
+
name: "ph-pencil-simple-line",
|
|
16
|
+
render: a
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { o as default };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=pencil-simple-line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pencil-simple-line.js","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, markRaw as n, openBlock as r } from "vue";
|
|
2
|
+
//#region ~icons/ph/pencil-simple
|
|
3
|
+
var i = {
|
|
4
|
+
viewBox: "0 0 256 256",
|
|
5
|
+
width: "1.2em",
|
|
6
|
+
height: "1.2em"
|
|
7
|
+
};
|
|
8
|
+
function a(n, a) {
|
|
9
|
+
return r(), e("svg", i, [...a[0] || (a[0] = [t("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "m227.31 73.37l-44.68-44.69a16 16 0 0 0-22.63 0L36.69 152A15.86 15.86 0 0 0 32 163.31V208a16 16 0 0 0 16 16h44.69a15.86 15.86 0 0 0 11.31-4.69L227.31 96a16 16 0 0 0 0-22.63M92.69 208H48v-44.69l88-88L180.69 120ZM192 108.68L147.31 64l24-24L216 84.68Z"
|
|
12
|
+
}, null, -1)])]);
|
|
13
|
+
}
|
|
14
|
+
var o = n({
|
|
15
|
+
name: "ph-pencil-simple",
|
|
16
|
+
render: a
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { o as default };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=pencil-simple.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pencil-simple.js","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createElementBlock as e, createElementVNode as t, markRaw as n, openBlock as r } from "vue";
|
|
2
|
+
//#region ~icons/ph/plus
|
|
3
|
+
var i = {
|
|
4
|
+
viewBox: "0 0 256 256",
|
|
5
|
+
width: "1.2em",
|
|
6
|
+
height: "1.2em"
|
|
7
|
+
};
|
|
8
|
+
function a(n, a) {
|
|
9
|
+
return r(), e("svg", i, [...a[0] || (a[0] = [t("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "M224 128a8 8 0 0 1-8 8h-80v80a8 8 0 0 1-16 0v-80H40a8 8 0 0 1 0-16h80V40a8 8 0 0 1 16 0v80h80a8 8 0 0 1 8 8"
|
|
12
|
+
}, null, -1)])]);
|
|
13
|
+
}
|
|
14
|
+
var o = n({
|
|
15
|
+
name: "ph-plus",
|
|
16
|
+
render: a
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { o as default };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=plus.js.map
|