@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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TextureCode, TextureOption } from '@welldot/core';
|
|
2
|
+
import { WellTextureSelectLabels } from '../types';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
options?: readonly TextureOption[];
|
|
5
|
+
labels?: WellTextureSelectLabels;
|
|
6
|
+
appendTo?: string | HTMLElement;
|
|
7
|
+
filter?: boolean;
|
|
8
|
+
pt?: Record<string, unknown>;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_ModelProps = {
|
|
11
|
+
modelValue?: TextureCode | null | undefined;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
15
|
+
show: () => void | undefined;
|
|
16
|
+
hide: () => void | undefined;
|
|
17
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: TextureCode | null | undefined) => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: TextureCode | null | undefined) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
filter: boolean;
|
|
23
|
+
pt: Record<string, unknown>;
|
|
24
|
+
options: readonly TextureOption[];
|
|
25
|
+
appendTo: string | HTMLElement;
|
|
26
|
+
labels: WellTextureSelectLabels;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
//# sourceMappingURL=WellTextureSelect.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WellTextureSelect.d.ts","sourceRoot":"","sources":["../../src/components/WellTextureSelect.vue"],"names":[],"mappings":"AAiJA;;;;;;;;;;;GAWG;AACH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAGxD,KAAK,WAAW,GAAG;IACf,OAAO,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B,CAAC;AAwDJ,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,CAAC;AAaF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAyKxD,QAAA,MAAM,YAAY;;;;;;;;;;;;;6EAKhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WellTextureSelect.js","names":[],"sources":["../../src/components/WellTextureSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Lithology texture picker: a filterable Select of texture codes with\n * thumbnails. `v-model` is the texture code.\n *\n * - `options` defaults to the FGDC catalogue (`FGDC_TEXTURES_OPTIONS`).\n * - Options flagged `pending` are hidden until the footer toggle is checked;\n * the toggle renders only when `labels.showPending` is given.\n * - `pt` is shallow-merged over the built-in pass-through per section (two\n * objects merge; otherwise the given value wins). Other attrs (`disabled`,\n * `invalid`, `@keydown`, `@hide`…) pass through to the PrimeVue Select.\n * - `show()` / `hide()` are exposed to open the overlay programmatically.\n */\nimport {\n FGDC_TEXTURES_OPTIONS,\n type TextureCode,\n type TextureOption,\n} from '@welldot/core';\nimport Checkbox from 'primevue/checkbox';\nimport Select from 'primevue/select';\nimport { computed, ref, useId } from 'vue';\nimport { useWellText } from '../composables/useWellText';\nimport type { WellTextureSelectLabels } from '../types';\nimport WellTextureThumbnail from './WellTextureThumbnail.vue';\n\nconst props = withDefaults(\n defineProps<{\n options?: readonly TextureOption[];\n labels?: WellTextureSelectLabels;\n appendTo?: string | HTMLElement;\n filter?: boolean;\n pt?: Record<string, unknown>;\n }>(),\n {\n options: () => FGDC_TEXTURES_OPTIONS,\n labels: () => ({}),\n appendTo: 'body',\n filter: true,\n pt: undefined,\n },\n);\n\ndefineOptions({ inheritAttrs: false });\n\nconst model = defineModel<TextureCode | null | undefined>();\n\nconst text = useWellText();\nconst toggleId = useId();\nconst selectRef = ref<InstanceType<typeof Select> | null>(null);\nconst showPending = ref(false);\n\nconst showPendingLabel = computed(() => text(props.labels.showPending));\n\nconst filteredOptions = computed(() =>\n showPending.value\n ? props.options\n : props.options.filter(option => !option.pending),\n);\n\nconst DEFAULT_PT: Record<string, unknown> = {\n label: 'flex items-center',\n option: 'p-1',\n overlay: { class: 'min-w-[340px]' },\n};\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nconst mergedPt = computed(() => {\n const merged: Record<string, unknown> = { ...DEFAULT_PT };\n for (const [key, value] of Object.entries(props.pt ?? {})) {\n const base = merged[key];\n merged[key] =\n isPlainObject(base) && isPlainObject(value)\n ? { ...base, ...value }\n : value;\n }\n return merged;\n});\n\ndefineExpose({\n show: () => selectRef.value?.show(),\n hide: () => selectRef.value?.hide(),\n});\n</script>\n\n<template>\n <Select\n v-bind=\"$attrs\"\n ref=\"selectRef\"\n v-model=\"model\"\n :options=\"filteredOptions as TextureOption[]\"\n option-label=\"label\"\n option-value=\"code\"\n :filter=\"props.filter\"\n :filter-fields=\"['label', 'code']\"\n :placeholder=\"text(props.labels.placeholder)\"\n :append-to=\"props.appendTo\"\n :pt=\"mergedPt\"\n >\n <template #option=\"{ option }: { option: TextureOption }\">\n <div class=\"flex items-center gap-2.5 py-0.5\">\n <WellTextureThumbnail :code=\"option.code\" :size=\"48\" />\n <div class=\"flex flex-col min-w-0\">\n <span class=\"font-mono text-[13px] font-semibold leading-tight\">{{\n option.code\n }}</span>\n <span class=\"text-[11px] opacity-65 truncate max-w-60\">{{\n option.label\n }}</span>\n </div>\n </div>\n </template>\n <template #value=\"{ value: selectedCode, placeholder }\">\n <div v-if=\"selectedCode != null\" class=\"flex items-center gap-1.5\">\n <WellTextureThumbnail\n :code=\"selectedCode as string | number\"\n :size=\"28\"\n />\n <span class=\"font-mono text-[11px]\">{{ selectedCode }}</span>\n </div>\n <span v-else class=\"text-content-400 text-[11px]\">{{ placeholder }}</span>\n </template>\n <template v-if=\"showPendingLabel\" #footer>\n <div class=\"flex items-center gap-1 px-2 py-1\">\n <Checkbox\n v-model=\"showPending\"\n binary\n size=\"small\"\n :input-id=\"toggleId\"\n />\n <label\n :for=\"toggleId\"\n class=\"text-[10px] text-content-400 cursor-pointer select-none\"\n >\n {{ showPendingLabel }}\n </label>\n </div>\n </template>\n </Select>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { useWellText as e } from "../composables/useWellText.js";
|
|
2
|
+
import t from "./WellTextureThumbnail.js";
|
|
3
|
+
import { computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, openBlock as d, ref as f, toDisplayString as p, unref as m, useId as h, useModel as g, withCtx as _ } from "vue";
|
|
4
|
+
import { FGDC_TEXTURES_OPTIONS as v } from "@welldot/core";
|
|
5
|
+
import y from "primevue/select";
|
|
6
|
+
import b from "primevue/checkbox";
|
|
7
|
+
//#region src/components/WellTextureSelect.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var x = { class: "flex items-center gap-2.5 py-0.5" }, S = { class: "flex flex-col min-w-0" }, C = { class: "font-mono text-[13px] font-semibold leading-tight" }, w = { class: "text-[11px] opacity-65 truncate max-w-60" }, T = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "flex items-center gap-1.5"
|
|
11
|
+
}, E = { class: "font-mono text-[11px]" }, D = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "text-content-400 text-[11px]"
|
|
14
|
+
}, O = { class: "flex items-center gap-1 px-2 py-1" }, k = ["for"], A = /* @__PURE__ */ c({
|
|
15
|
+
inheritAttrs: !1,
|
|
16
|
+
__name: "WellTextureSelect",
|
|
17
|
+
props: /* @__PURE__ */ l({
|
|
18
|
+
options: { default: () => v },
|
|
19
|
+
labels: { default: () => ({}) },
|
|
20
|
+
appendTo: { default: "body" },
|
|
21
|
+
filter: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !0
|
|
24
|
+
},
|
|
25
|
+
pt: { default: void 0 }
|
|
26
|
+
}, {
|
|
27
|
+
modelValue: {},
|
|
28
|
+
modelModifiers: {}
|
|
29
|
+
}),
|
|
30
|
+
emits: ["update:modelValue"],
|
|
31
|
+
setup(c, { expose: l }) {
|
|
32
|
+
let v = c, A = g(c, "modelValue"), j = e(), M = h(), N = f(null), P = f(!1), F = n(() => j(v.labels.showPending)), I = n(() => P.value ? v.options : v.options.filter((e) => !e.pending)), L = {
|
|
33
|
+
label: "flex items-center",
|
|
34
|
+
option: "p-1",
|
|
35
|
+
overlay: { class: "min-w-[340px]" }
|
|
36
|
+
};
|
|
37
|
+
function R(e) {
|
|
38
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
39
|
+
}
|
|
40
|
+
let z = n(() => {
|
|
41
|
+
let e = { ...L };
|
|
42
|
+
for (let [t, n] of Object.entries(v.pt ?? {})) {
|
|
43
|
+
let r = e[t];
|
|
44
|
+
e[t] = R(r) && R(n) ? {
|
|
45
|
+
...r,
|
|
46
|
+
...n
|
|
47
|
+
} : n;
|
|
48
|
+
}
|
|
49
|
+
return e;
|
|
50
|
+
});
|
|
51
|
+
return l({
|
|
52
|
+
show: () => N.value?.show(),
|
|
53
|
+
hide: () => N.value?.hide()
|
|
54
|
+
}), (e, n) => (d(), r(m(y), u(e.$attrs, {
|
|
55
|
+
ref_key: "selectRef",
|
|
56
|
+
ref: N,
|
|
57
|
+
modelValue: A.value,
|
|
58
|
+
"onUpdate:modelValue": n[1] || (n[1] = (e) => A.value = e),
|
|
59
|
+
options: I.value,
|
|
60
|
+
"option-label": "label",
|
|
61
|
+
"option-value": "code",
|
|
62
|
+
filter: v.filter,
|
|
63
|
+
"filter-fields": ["label", "code"],
|
|
64
|
+
placeholder: m(j)(v.labels.placeholder),
|
|
65
|
+
"append-to": v.appendTo,
|
|
66
|
+
pt: z.value
|
|
67
|
+
}), o({
|
|
68
|
+
option: _(({ option: e }) => [a("div", x, [s(t, {
|
|
69
|
+
code: e.code,
|
|
70
|
+
size: 48
|
|
71
|
+
}, null, 8, ["code"]), a("div", S, [a("span", C, p(e.code), 1), a("span", w, p(e.label), 1)])])]),
|
|
72
|
+
value: _(({ value: e, placeholder: n }) => [e == null ? (d(), i("span", D, p(n), 1)) : (d(), i("div", T, [s(t, {
|
|
73
|
+
code: e,
|
|
74
|
+
size: 28
|
|
75
|
+
}, null, 8, ["code"]), a("span", E, p(e), 1)]))]),
|
|
76
|
+
_: 2
|
|
77
|
+
}, [F.value ? {
|
|
78
|
+
name: "footer",
|
|
79
|
+
fn: _(() => [a("div", O, [s(m(b), {
|
|
80
|
+
modelValue: P.value,
|
|
81
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => P.value = e),
|
|
82
|
+
binary: "",
|
|
83
|
+
size: "small",
|
|
84
|
+
"input-id": m(M)
|
|
85
|
+
}, null, 8, ["modelValue", "input-id"]), a("label", {
|
|
86
|
+
for: m(M),
|
|
87
|
+
class: "text-[10px] text-content-400 cursor-pointer select-none"
|
|
88
|
+
}, p(F.value), 9, k)])]),
|
|
89
|
+
key: "0"
|
|
90
|
+
} : void 0]), 1040, [
|
|
91
|
+
"modelValue",
|
|
92
|
+
"options",
|
|
93
|
+
"filter",
|
|
94
|
+
"placeholder",
|
|
95
|
+
"append-to",
|
|
96
|
+
"pt"
|
|
97
|
+
]));
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
//#endregion
|
|
101
|
+
export { A as default };
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=WellTextureSelect.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WellTextureSelect.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../src/components/WellTextureSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Lithology texture picker: a filterable Select of texture codes with\n * thumbnails. `v-model` is the texture code.\n *\n * - `options` defaults to the FGDC catalogue (`FGDC_TEXTURES_OPTIONS`).\n * - Options flagged `pending` are hidden until the footer toggle is checked;\n * the toggle renders only when `labels.showPending` is given.\n * - `pt` is shallow-merged over the built-in pass-through per section (two\n * objects merge; otherwise the given value wins). Other attrs (`disabled`,\n * `invalid`, `@keydown`, `@hide`…) pass through to the PrimeVue Select.\n * - `show()` / `hide()` are exposed to open the overlay programmatically.\n */\nimport {\n FGDC_TEXTURES_OPTIONS,\n type TextureCode,\n type TextureOption,\n} from '@welldot/core';\nimport Checkbox from 'primevue/checkbox';\nimport Select from 'primevue/select';\nimport { computed, ref, useId } from 'vue';\nimport { useWellText } from '../composables/useWellText';\nimport type { WellTextureSelectLabels } from '../types';\nimport WellTextureThumbnail from './WellTextureThumbnail.vue';\n\nconst props = withDefaults(\n defineProps<{\n options?: readonly TextureOption[];\n labels?: WellTextureSelectLabels;\n appendTo?: string | HTMLElement;\n filter?: boolean;\n pt?: Record<string, unknown>;\n }>(),\n {\n options: () => FGDC_TEXTURES_OPTIONS,\n labels: () => ({}),\n appendTo: 'body',\n filter: true,\n pt: undefined,\n },\n);\n\ndefineOptions({ inheritAttrs: false });\n\nconst model = defineModel<TextureCode | null | undefined>();\n\nconst text = useWellText();\nconst toggleId = useId();\nconst selectRef = ref<InstanceType<typeof Select> | null>(null);\nconst showPending = ref(false);\n\nconst showPendingLabel = computed(() => text(props.labels.showPending));\n\nconst filteredOptions = computed(() =>\n showPending.value\n ? props.options\n : props.options.filter(option => !option.pending),\n);\n\nconst DEFAULT_PT: Record<string, unknown> = {\n label: 'flex items-center',\n option: 'p-1',\n overlay: { class: 'min-w-[340px]' },\n};\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nconst mergedPt = computed(() => {\n const merged: Record<string, unknown> = { ...DEFAULT_PT };\n for (const [key, value] of Object.entries(props.pt ?? {})) {\n const base = merged[key];\n merged[key] =\n isPlainObject(base) && isPlainObject(value)\n ? { ...base, ...value }\n : value;\n }\n return merged;\n});\n\ndefineExpose({\n show: () => selectRef.value?.show(),\n hide: () => selectRef.value?.hide(),\n});\n</script>\n\n<template>\n <Select\n v-bind=\"$attrs\"\n ref=\"selectRef\"\n v-model=\"model\"\n :options=\"filteredOptions as TextureOption[]\"\n option-label=\"label\"\n option-value=\"code\"\n :filter=\"props.filter\"\n :filter-fields=\"['label', 'code']\"\n :placeholder=\"text(props.labels.placeholder)\"\n :append-to=\"props.appendTo\"\n :pt=\"mergedPt\"\n >\n <template #option=\"{ option }: { option: TextureOption }\">\n <div class=\"flex items-center gap-2.5 py-0.5\">\n <WellTextureThumbnail :code=\"option.code\" :size=\"48\" />\n <div class=\"flex flex-col min-w-0\">\n <span class=\"font-mono text-[13px] font-semibold leading-tight\">{{\n option.code\n }}</span>\n <span class=\"text-[11px] opacity-65 truncate max-w-60\">{{\n option.label\n }}</span>\n </div>\n </div>\n </template>\n <template #value=\"{ value: selectedCode, placeholder }\">\n <div v-if=\"selectedCode != null\" class=\"flex items-center gap-1.5\">\n <WellTextureThumbnail\n :code=\"selectedCode as string | number\"\n :size=\"28\"\n />\n <span class=\"font-mono text-[11px]\">{{ selectedCode }}</span>\n </div>\n <span v-else class=\"text-content-400 text-[11px]\">{{ placeholder }}</span>\n </template>\n <template v-if=\"showPendingLabel\" #footer>\n <div class=\"flex items-center gap-1 px-2 py-1\">\n <Checkbox\n v-model=\"showPending\"\n binary\n size=\"small\"\n :input-id=\"toggleId\"\n />\n <label\n :for=\"toggleId\"\n class=\"text-[10px] text-content-400 cursor-pointer select-none\"\n >\n {{ showPendingLabel }}\n </label>\n </div>\n </template>\n </Select>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,IAAM,IAAQ,GAmBR,IAAQ,EAA2C,GAAA,aAAE,EAErD,IAAO,GAAa,EACpB,IAAW,GAAO,EAClB,IAAY,EAAwC,KAAK,EACzD,IAAc,EAAI,GAAM,EAExB,IAAmB,QAAe,EAAK,EAAM,OAAO,YAAY,CAAC,EAEjE,IAAkB,QACtB,EAAY,QACR,EAAM,UACN,EAAM,QAAQ,QAAO,MAAU,CAAC,EAAO,QAAQ,CACpD,EAEK,IAAsC;GAC1C,OAAO;GACP,QAAQ;GACR,SAAS,EAAE,OAAO,iBAAiB;GACpC;EAED,SAAS,EAAc,GAAkD;AACvE,UAAO,OAAO,KAAU,cAAY,KAAkB,CAAC,MAAM,QAAQ,EAAM;;EAG7E,IAAM,IAAW,QAAe;GAC9B,IAAM,IAAkC,EAAE,GAAG,GAAY;AACzD,QAAK,IAAM,CAAC,GAAK,MAAU,OAAO,QAAQ,EAAM,MAAM,EAAE,CAAC,EAAE;IACzD,IAAM,IAAO,EAAO;AACpB,MAAO,KACL,EAAc,EAAK,IAAI,EAAc,EAAK,GACtC;KAAE,GAAG;KAAM,GAAG;KAAM,GACpB;;AAER,UAAO;IACP;SAEF,EAAa;GACX,YAAY,EAAU,OAAO,MAAM;GACnC,YAAY,EAAU,OAAO,MAAM;GACpC,CAAC,kBAIA,EAoDS,EAAA,EAAA,EApDT,EACUA,EAmDD,QAnDO;YACV;GAAJ,KAAI;eACK,EAAA;mDAAK,QAAA;GACb,SAAS,EAAA;GACV,gBAAa;GACb,gBAAa;GACZ,QAAQ,EAAM;GACd,iBAAe,CAAA,SAAA,OAAiB;GAChC,aAAa,EAAA,EAAI,CAAC,EAAM,OAAO,YAAW;GAC1C,aAAW,EAAM;GACjB,IAAI,EAAA;;GAEM,QAAM,GAWT,EAXa,gBAAM,CACzB,EAUM,OAVN,GAUM,CATJ,EAAuD,GAAA;IAAhC,MAAM,EAAO;IAAO,MAAM;0BACjD,EAOM,OAPN,GAOM,CANJ,EAES,QAFT,GAES,EADP,EAAO,KAAI,EAAA,EAAA,EAEb,EAES,QAFT,GAES,EADP,EAAO,MAAK,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;GAKT,OAAK,GAOR,EAAA,OAPmB,GAAc,qBAAW,CACvC,KAAY,QAK8B,GAAA,EAErD,EAA0E,QAA1E,GAA0E,EAArB,EAAW,EAAA,EAAA,KAPzC,GAAA,EAAvB,EAMM,OANN,GAMM,CALJ,EAGE,GAAA;IAFC,MAAM;IACN,MAAM;0BAET,EAA6D,QAA7D,GAA6D,EAAtB,EAAY,EAAA,EAAA,CAAA,CAAA,EAEW,CAAA;;MAElD,EAAA,QAAA;SAAmB;eAc3B,CAbN,EAaM,OAbN,GAaM,CAZJ,EAKE,EAAA,EAAA,EAAA;gBAJS,EAAA;oDAAW,QAAA;IACpB,QAAA;IACA,MAAK;IACJ,YAAU,EAAA,EAAQ;4CAErB,EAKQ,SAAA;IAJL,KAAK,EAAA,EAAQ;IACd,OAAM;QAEH,EAAA,MAAgB,EAAA,GAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
code: number | string | undefined;
|
|
3
|
+
size?: number;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
size: number;
|
|
7
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=WellTextureThumbnail.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WellTextureThumbnail.d.ts","sourceRoot":"","sources":["../../src/components/WellTextureThumbnail.vue"],"names":[],"mappings":"AAsSA,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AA+SJ,QAAA,MAAM,YAAY;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./WellTextureThumbnail.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/WellTextureThumbnail.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-63e788ad"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=WellTextureThumbnail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WellTextureThumbnail.js","names":[],"sources":["../../src/components/WellTextureThumbnail.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Thumbnail of an FGDC lithology texture, drawn from the texture registry\n * (loaded lazily from `@welldot/render/textures` and cached).\n */\nimport { importFgdcTextures } from '@welldot/render/textures';\nimport { computed, ref, watch } from 'vue';\n\nconst props = withDefaults(\n defineProps<{\n code: number | string | undefined;\n size?: number;\n }>(),\n { size: 48 },\n);\nlet _fgdcCache: Record<string | number, string> | null = null;\nlet _fgdcPromise: Promise<Record<string | number, string>> | null = null;\n\nfunction loadFgdcPaths(): Promise<Record<string | number, string>> {\n if (_fgdcCache) return Promise.resolve(_fgdcCache);\n if (!_fgdcPromise) {\n _fgdcPromise = importFgdcTextures().then(paths => {\n _fgdcCache = paths;\n return paths;\n });\n }\n return _fgdcPromise;\n}\n\n// Codes 607–611 use M x,y h0 path segments (zero-length = dot positions) — render as circles\nconst DOT_TEXTURE_CODES = new Set([607, 608, 609, 610, 611]);\n\nfunction parseDotCoords(pathData: string): Array<[number, number]> {\n const tokens = pathData.match(/[MmHhVvLlCcZz]|[-+]?[0-9]*\\.?[0-9]+/g) ?? [];\n const coords: Array<[number, number]> = [];\n let x = 0,\n y = 0,\n cmd = '';\n let i = 0;\n while (i < tokens.length) {\n const t = tokens[i] || '';\n if (/[MmHhVvLlCcZz]/.test(t)) {\n cmd = t;\n i++;\n continue;\n }\n const n = parseFloat(t);\n if (isNaN(n)) {\n i++;\n continue;\n }\n if (cmd === 'M') {\n const n2 = parseFloat(tokens[i + 1] ?? '');\n if (!isNaN(n2)) {\n x = n;\n y = n2;\n coords.push([x, y]);\n i += 2;\n } else i++;\n } else if (cmd === 'm') {\n const n2 = parseFloat(tokens[i + 1] ?? '');\n if (!isNaN(n2)) {\n x += n;\n y += n2;\n coords.push([x, y]);\n i += 2;\n } else i++;\n } else {\n i++;\n }\n }\n return coords;\n}\n\n// ── Hand-crafted fallbacks for codes with empty path data ─────────────────────\nconst FALLBACK_685_LINES = [20, 50, 80, 110, 140];\nconst FALLBACK_685_CURVES = [35, 65, 95, 125].map((y, i) => ({ y, i }));\n\nconst FALLBACK_718_LINES: Array<[number, number, number, number]> = [\n [10, 15, 22, 12],\n [35, 8, 45, 18],\n [65, 5, 72, 20],\n [90, 12, 100, 8],\n [120, 6, 130, 18],\n [145, 15, 148, 28],\n [5, 40, 18, 35],\n [40, 32, 52, 45],\n [70, 38, 80, 28],\n [100, 30, 112, 42],\n [135, 35, 145, 25],\n [15, 60, 25, 50],\n [50, 55, 60, 68],\n [80, 58, 90, 48],\n [110, 52, 122, 65],\n [140, 58, 148, 48],\n [8, 80, 20, 72],\n [42, 76, 55, 88],\n [72, 78, 85, 68],\n [105, 74, 115, 86],\n [138, 80, 148, 70],\n [18, 100, 30, 92],\n [48, 96, 58, 108],\n [80, 100, 92, 90],\n [112, 97, 122, 108],\n [140, 102, 150, 94],\n [10, 118, 22, 110],\n [44, 116, 56, 128],\n [76, 120, 88, 112],\n [108, 118, 120, 128],\n [138, 122, 148, 112],\n [14, 138, 26, 130],\n [48, 136, 60, 148],\n [80, 140, 90, 130],\n [110, 138, 122, 148],\n [138, 140, 148, 132],\n];\n\nconst FALLBACK_718_DOTS: Array<[number, number]> = [\n [16, 13],\n [42, 12],\n [68, 12],\n [95, 10],\n [125, 12],\n [148, 12],\n [10, 48],\n [52, 40],\n [75, 33],\n [106, 36],\n [140, 30],\n [22, 78],\n [58, 78],\n [87, 73],\n [115, 78],\n [144, 75],\n];\n\nconst pathData = ref<string | undefined>(undefined);\nconst numericCode = computed(() => Number(props.code));\n\nwatch(\n () => props.code,\n () => {\n pathData.value = undefined;\n loadFgdcPaths().then(paths => {\n const code = String(props.code);\n pathData.value = paths[code];\n });\n },\n {\n immediate: true,\n },\n);\n\ntype RenderMode = 'fallback685' | 'fallback718' | 'spacer' | 'dots' | 'path';\n\nconst renderMode = computed<RenderMode>(() => {\n const code = numericCode.value;\n if (!pathData.value) {\n if (code === 685) return 'fallback685';\n if (code === 718) return 'fallback718';\n return 'spacer';\n }\n if (DOT_TEXTURE_CODES.has(code)) return 'dots';\n return 'path';\n});\n\nconst dotCoords = computed<Array<[number, number]>>(() => {\n if (renderMode.value !== 'dots' || !pathData.value) return [];\n return parseDotCoords(pathData.value);\n});\n</script>\n\n<template>\n <svg\n v-if=\"renderMode === 'fallback685'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 150 150\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"texture-svg\"\n aria-hidden=\"true\"\n >\n <line\n v-for=\"y in FALLBACK_685_LINES\"\n :key=\"y\"\n x1=\"0\"\n :y1=\"y\"\n x2=\"150\"\n :y2=\"y\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-dasharray=\"18 6\"\n />\n <path\n v-for=\"{ y, i } in FALLBACK_685_CURVES\"\n :key=\"y\"\n :d=\"`M0,${y} C25,${y - 8 + i * 2} 50,${y + 8 - i * 2} 75,${y} S125,${y - 6} 150,${y}`\"\n stroke=\"currentColor\"\n stroke-width=\"0.7\"\n fill=\"none\"\n />\n </svg>\n\n <!-- Fallback 718: scattered granite crystal shapes -->\n <svg\n v-else-if=\"renderMode === 'fallback718'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 150 150\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"texture-svg\"\n aria-hidden=\"true\"\n >\n <line\n v-for=\"([x1, y1, x2, y2], i) in FALLBACK_718_LINES\"\n :key=\"i\"\n :x1=\"x1\"\n :y1=\"y1\"\n :x2=\"x2\"\n :y2=\"y2\"\n stroke=\"currentColor\"\n stroke-width=\"1\"\n />\n <circle\n v-for=\"([cx, cy], i) in FALLBACK_718_DOTS\"\n :key=\"i\"\n :cx=\"cx\"\n :cy=\"cy\"\n r=\"1.8\"\n fill=\"currentColor\"\n />\n </svg>\n\n <!-- Dot textures (607–611): h0 path segments rendered as circles -->\n <svg\n v-else-if=\"renderMode === 'dots'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 150 150\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"texture-svg\"\n aria-hidden=\"true\"\n >\n <circle\n v-for=\"([cx, cy], i) in dotCoords\"\n :key=\"i\"\n :cx=\"cx\"\n :cy=\"cy\"\n r=\"2.2\"\n fill=\"currentColor\"\n />\n </svg>\n\n <!-- Standard stroke path -->\n <svg\n v-else-if=\"renderMode === 'path'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 150 150\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"texture-svg\"\n aria-hidden=\"true\"\n >\n <path\n :d=\"pathData\"\n stroke=\"currentColor\"\n stroke-width=\"0.8\"\n fill=\"none\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>\n\n <!-- Loading spacer -->\n <div v-else :style=\"{ width: `${size}px`, height: `${size}px` }\" />\n</template>\n\n<style scoped>\n.texture-svg {\n display: block;\n flex-shrink: 0;\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-radius: 3px;\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeStyle as a, openBlock as o, ref as s, renderList as c, unref as l, watch as u } from "vue";
|
|
2
|
+
import { importFgdcTextures as d } from "@welldot/render/textures";
|
|
3
|
+
//#region src/components/WellTextureThumbnail.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var f = ["width", "height"], p = ["y1", "y2"], m = ["d"], h = ["width", "height"], g = [
|
|
5
|
+
"x1",
|
|
6
|
+
"y1",
|
|
7
|
+
"x2",
|
|
8
|
+
"y2"
|
|
9
|
+
], _ = ["cx", "cy"], v = ["width", "height"], y = ["cx", "cy"], b = ["width", "height"], x = ["d"], S = /* @__PURE__ */ i({
|
|
10
|
+
__name: "WellTextureThumbnail",
|
|
11
|
+
props: {
|
|
12
|
+
code: {},
|
|
13
|
+
size: { default: 48 }
|
|
14
|
+
},
|
|
15
|
+
setup(i) {
|
|
16
|
+
let S = i, C = null, w = null;
|
|
17
|
+
function T() {
|
|
18
|
+
return C ? Promise.resolve(C) : (w || (w = d().then((e) => (C = e, e))), w);
|
|
19
|
+
}
|
|
20
|
+
let E = new Set([
|
|
21
|
+
607,
|
|
22
|
+
608,
|
|
23
|
+
609,
|
|
24
|
+
610,
|
|
25
|
+
611
|
|
26
|
+
]);
|
|
27
|
+
function D(e) {
|
|
28
|
+
let t = e.match(/[MmHhVvLlCcZz]|[-+]?[0-9]*\.?[0-9]+/g) ?? [], n = [], r = 0, i = 0, a = "", o = 0;
|
|
29
|
+
for (; o < t.length;) {
|
|
30
|
+
let e = t[o] || "";
|
|
31
|
+
if (/[MmHhVvLlCcZz]/.test(e)) {
|
|
32
|
+
a = e, o++;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
let s = parseFloat(e);
|
|
36
|
+
if (isNaN(s)) {
|
|
37
|
+
o++;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (a === "M") {
|
|
41
|
+
let e = parseFloat(t[o + 1] ?? "");
|
|
42
|
+
isNaN(e) ? o++ : (r = s, i = e, n.push([r, i]), o += 2);
|
|
43
|
+
} else if (a === "m") {
|
|
44
|
+
let e = parseFloat(t[o + 1] ?? "");
|
|
45
|
+
isNaN(e) ? o++ : (r += s, i += e, n.push([r, i]), o += 2);
|
|
46
|
+
} else o++;
|
|
47
|
+
}
|
|
48
|
+
return n;
|
|
49
|
+
}
|
|
50
|
+
let O = [
|
|
51
|
+
20,
|
|
52
|
+
50,
|
|
53
|
+
80,
|
|
54
|
+
110,
|
|
55
|
+
140
|
|
56
|
+
], k = [
|
|
57
|
+
35,
|
|
58
|
+
65,
|
|
59
|
+
95,
|
|
60
|
+
125
|
|
61
|
+
].map((e, t) => ({
|
|
62
|
+
y: e,
|
|
63
|
+
i: t
|
|
64
|
+
})), A = [
|
|
65
|
+
[
|
|
66
|
+
10,
|
|
67
|
+
15,
|
|
68
|
+
22,
|
|
69
|
+
12
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
35,
|
|
73
|
+
8,
|
|
74
|
+
45,
|
|
75
|
+
18
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
65,
|
|
79
|
+
5,
|
|
80
|
+
72,
|
|
81
|
+
20
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
90,
|
|
85
|
+
12,
|
|
86
|
+
100,
|
|
87
|
+
8
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
120,
|
|
91
|
+
6,
|
|
92
|
+
130,
|
|
93
|
+
18
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
145,
|
|
97
|
+
15,
|
|
98
|
+
148,
|
|
99
|
+
28
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
5,
|
|
103
|
+
40,
|
|
104
|
+
18,
|
|
105
|
+
35
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
40,
|
|
109
|
+
32,
|
|
110
|
+
52,
|
|
111
|
+
45
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
70,
|
|
115
|
+
38,
|
|
116
|
+
80,
|
|
117
|
+
28
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
100,
|
|
121
|
+
30,
|
|
122
|
+
112,
|
|
123
|
+
42
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
135,
|
|
127
|
+
35,
|
|
128
|
+
145,
|
|
129
|
+
25
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
15,
|
|
133
|
+
60,
|
|
134
|
+
25,
|
|
135
|
+
50
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
50,
|
|
139
|
+
55,
|
|
140
|
+
60,
|
|
141
|
+
68
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
80,
|
|
145
|
+
58,
|
|
146
|
+
90,
|
|
147
|
+
48
|
|
148
|
+
],
|
|
149
|
+
[
|
|
150
|
+
110,
|
|
151
|
+
52,
|
|
152
|
+
122,
|
|
153
|
+
65
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
140,
|
|
157
|
+
58,
|
|
158
|
+
148,
|
|
159
|
+
48
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
8,
|
|
163
|
+
80,
|
|
164
|
+
20,
|
|
165
|
+
72
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
42,
|
|
169
|
+
76,
|
|
170
|
+
55,
|
|
171
|
+
88
|
|
172
|
+
],
|
|
173
|
+
[
|
|
174
|
+
72,
|
|
175
|
+
78,
|
|
176
|
+
85,
|
|
177
|
+
68
|
|
178
|
+
],
|
|
179
|
+
[
|
|
180
|
+
105,
|
|
181
|
+
74,
|
|
182
|
+
115,
|
|
183
|
+
86
|
|
184
|
+
],
|
|
185
|
+
[
|
|
186
|
+
138,
|
|
187
|
+
80,
|
|
188
|
+
148,
|
|
189
|
+
70
|
|
190
|
+
],
|
|
191
|
+
[
|
|
192
|
+
18,
|
|
193
|
+
100,
|
|
194
|
+
30,
|
|
195
|
+
92
|
|
196
|
+
],
|
|
197
|
+
[
|
|
198
|
+
48,
|
|
199
|
+
96,
|
|
200
|
+
58,
|
|
201
|
+
108
|
|
202
|
+
],
|
|
203
|
+
[
|
|
204
|
+
80,
|
|
205
|
+
100,
|
|
206
|
+
92,
|
|
207
|
+
90
|
|
208
|
+
],
|
|
209
|
+
[
|
|
210
|
+
112,
|
|
211
|
+
97,
|
|
212
|
+
122,
|
|
213
|
+
108
|
|
214
|
+
],
|
|
215
|
+
[
|
|
216
|
+
140,
|
|
217
|
+
102,
|
|
218
|
+
150,
|
|
219
|
+
94
|
|
220
|
+
],
|
|
221
|
+
[
|
|
222
|
+
10,
|
|
223
|
+
118,
|
|
224
|
+
22,
|
|
225
|
+
110
|
|
226
|
+
],
|
|
227
|
+
[
|
|
228
|
+
44,
|
|
229
|
+
116,
|
|
230
|
+
56,
|
|
231
|
+
128
|
|
232
|
+
],
|
|
233
|
+
[
|
|
234
|
+
76,
|
|
235
|
+
120,
|
|
236
|
+
88,
|
|
237
|
+
112
|
|
238
|
+
],
|
|
239
|
+
[
|
|
240
|
+
108,
|
|
241
|
+
118,
|
|
242
|
+
120,
|
|
243
|
+
128
|
|
244
|
+
],
|
|
245
|
+
[
|
|
246
|
+
138,
|
|
247
|
+
122,
|
|
248
|
+
148,
|
|
249
|
+
112
|
|
250
|
+
],
|
|
251
|
+
[
|
|
252
|
+
14,
|
|
253
|
+
138,
|
|
254
|
+
26,
|
|
255
|
+
130
|
|
256
|
+
],
|
|
257
|
+
[
|
|
258
|
+
48,
|
|
259
|
+
136,
|
|
260
|
+
60,
|
|
261
|
+
148
|
|
262
|
+
],
|
|
263
|
+
[
|
|
264
|
+
80,
|
|
265
|
+
140,
|
|
266
|
+
90,
|
|
267
|
+
130
|
|
268
|
+
],
|
|
269
|
+
[
|
|
270
|
+
110,
|
|
271
|
+
138,
|
|
272
|
+
122,
|
|
273
|
+
148
|
|
274
|
+
],
|
|
275
|
+
[
|
|
276
|
+
138,
|
|
277
|
+
140,
|
|
278
|
+
148,
|
|
279
|
+
132
|
|
280
|
+
]
|
|
281
|
+
], j = [
|
|
282
|
+
[16, 13],
|
|
283
|
+
[42, 12],
|
|
284
|
+
[68, 12],
|
|
285
|
+
[95, 10],
|
|
286
|
+
[125, 12],
|
|
287
|
+
[148, 12],
|
|
288
|
+
[10, 48],
|
|
289
|
+
[52, 40],
|
|
290
|
+
[75, 33],
|
|
291
|
+
[106, 36],
|
|
292
|
+
[140, 30],
|
|
293
|
+
[22, 78],
|
|
294
|
+
[58, 78],
|
|
295
|
+
[87, 73],
|
|
296
|
+
[115, 78],
|
|
297
|
+
[144, 75]
|
|
298
|
+
], M = s(void 0), N = t(() => Number(S.code));
|
|
299
|
+
u(() => S.code, () => {
|
|
300
|
+
M.value = void 0, T().then((e) => {
|
|
301
|
+
M.value = e[String(S.code)];
|
|
302
|
+
});
|
|
303
|
+
}, { immediate: !0 });
|
|
304
|
+
let P = t(() => {
|
|
305
|
+
let e = N.value;
|
|
306
|
+
return M.value ? E.has(e) ? "dots" : "path" : e === 685 ? "fallback685" : e === 718 ? "fallback718" : "spacer";
|
|
307
|
+
}), F = t(() => P.value !== "dots" || !M.value ? [] : D(M.value));
|
|
308
|
+
return (t, s) => P.value === "fallback685" ? (o(), n("svg", {
|
|
309
|
+
key: 0,
|
|
310
|
+
width: i.size,
|
|
311
|
+
height: i.size,
|
|
312
|
+
viewBox: "0 0 150 150",
|
|
313
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
314
|
+
class: "texture-svg",
|
|
315
|
+
"aria-hidden": "true"
|
|
316
|
+
}, [(o(), n(e, null, c(O, (e) => r("line", {
|
|
317
|
+
key: e,
|
|
318
|
+
x1: "0",
|
|
319
|
+
y1: e,
|
|
320
|
+
x2: "150",
|
|
321
|
+
y2: e,
|
|
322
|
+
stroke: "currentColor",
|
|
323
|
+
"stroke-width": "1.5",
|
|
324
|
+
"stroke-dasharray": "18 6"
|
|
325
|
+
}, null, 8, p)), 64)), (o(!0), n(e, null, c(l(k), ({ y: e, i: t }) => (o(), n("path", {
|
|
326
|
+
key: e,
|
|
327
|
+
d: `M0,${e} C25,${e - 8 + t * 2} 50,${e + 8 - t * 2} 75,${e} S125,${e - 6} 150,${e}`,
|
|
328
|
+
stroke: "currentColor",
|
|
329
|
+
"stroke-width": "0.7",
|
|
330
|
+
fill: "none"
|
|
331
|
+
}, null, 8, m))), 128))], 8, f)) : P.value === "fallback718" ? (o(), n("svg", {
|
|
332
|
+
key: 1,
|
|
333
|
+
width: i.size,
|
|
334
|
+
height: i.size,
|
|
335
|
+
viewBox: "0 0 150 150",
|
|
336
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
337
|
+
class: "texture-svg",
|
|
338
|
+
"aria-hidden": "true"
|
|
339
|
+
}, [(o(), n(e, null, c(A, ([e, t, n, i], a) => r("line", {
|
|
340
|
+
key: a,
|
|
341
|
+
x1: e,
|
|
342
|
+
y1: t,
|
|
343
|
+
x2: n,
|
|
344
|
+
y2: i,
|
|
345
|
+
stroke: "currentColor",
|
|
346
|
+
"stroke-width": "1"
|
|
347
|
+
}, null, 8, g)), 64)), (o(), n(e, null, c(j, ([e, t], n) => r("circle", {
|
|
348
|
+
key: n,
|
|
349
|
+
cx: e,
|
|
350
|
+
cy: t,
|
|
351
|
+
r: "1.8",
|
|
352
|
+
fill: "currentColor"
|
|
353
|
+
}, null, 8, _)), 64))], 8, h)) : P.value === "dots" ? (o(), n("svg", {
|
|
354
|
+
key: 2,
|
|
355
|
+
width: i.size,
|
|
356
|
+
height: i.size,
|
|
357
|
+
viewBox: "0 0 150 150",
|
|
358
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
359
|
+
class: "texture-svg",
|
|
360
|
+
"aria-hidden": "true"
|
|
361
|
+
}, [(o(!0), n(e, null, c(F.value, ([e, t], r) => (o(), n("circle", {
|
|
362
|
+
key: r,
|
|
363
|
+
cx: e,
|
|
364
|
+
cy: t,
|
|
365
|
+
r: "2.2",
|
|
366
|
+
fill: "currentColor"
|
|
367
|
+
}, null, 8, y))), 128))], 8, v)) : P.value === "path" ? (o(), n("svg", {
|
|
368
|
+
key: 3,
|
|
369
|
+
width: i.size,
|
|
370
|
+
height: i.size,
|
|
371
|
+
viewBox: "0 0 150 150",
|
|
372
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
373
|
+
class: "texture-svg",
|
|
374
|
+
"aria-hidden": "true"
|
|
375
|
+
}, [r("path", {
|
|
376
|
+
d: M.value,
|
|
377
|
+
stroke: "currentColor",
|
|
378
|
+
"stroke-width": "0.8",
|
|
379
|
+
fill: "none",
|
|
380
|
+
"vector-effect": "non-scaling-stroke"
|
|
381
|
+
}, null, 8, x)], 8, b)) : (o(), n("div", {
|
|
382
|
+
key: 4,
|
|
383
|
+
style: a({
|
|
384
|
+
width: `${i.size}px`,
|
|
385
|
+
height: `${i.size}px`
|
|
386
|
+
})
|
|
387
|
+
}, null, 4));
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
//#endregion
|
|
391
|
+
export { S as default };
|
|
392
|
+
|
|
393
|
+
//# sourceMappingURL=WellTextureThumbnail.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WellTextureThumbnail.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/WellTextureThumbnail.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Thumbnail of an FGDC lithology texture, drawn from the texture registry\n * (loaded lazily from `@welldot/render/textures` and cached).\n */\nimport { importFgdcTextures } from '@welldot/render/textures';\nimport { computed, ref, watch } from 'vue';\n\nconst props = withDefaults(\n defineProps<{\n code: number | string | undefined;\n size?: number;\n }>(),\n { size: 48 },\n);\nlet _fgdcCache: Record<string | number, string> | null = null;\nlet _fgdcPromise: Promise<Record<string | number, string>> | null = null;\n\nfunction loadFgdcPaths(): Promise<Record<string | number, string>> {\n if (_fgdcCache) return Promise.resolve(_fgdcCache);\n if (!_fgdcPromise) {\n _fgdcPromise = importFgdcTextures().then(paths => {\n _fgdcCache = paths;\n return paths;\n });\n }\n return _fgdcPromise;\n}\n\n// Codes 607–611 use M x,y h0 path segments (zero-length = dot positions) — render as circles\nconst DOT_TEXTURE_CODES = new Set([607, 608, 609, 610, 611]);\n\nfunction parseDotCoords(pathData: string): Array<[number, number]> {\n const tokens = pathData.match(/[MmHhVvLlCcZz]|[-+]?[0-9]*\\.?[0-9]+/g) ?? [];\n const coords: Array<[number, number]> = [];\n let x = 0,\n y = 0,\n cmd = '';\n let i = 0;\n while (i < tokens.length) {\n const t = tokens[i] || '';\n if (/[MmHhVvLlCcZz]/.test(t)) {\n cmd = t;\n i++;\n continue;\n }\n const n = parseFloat(t);\n if (isNaN(n)) {\n i++;\n continue;\n }\n if (cmd === 'M') {\n const n2 = parseFloat(tokens[i + 1] ?? '');\n if (!isNaN(n2)) {\n x = n;\n y = n2;\n coords.push([x, y]);\n i += 2;\n } else i++;\n } else if (cmd === 'm') {\n const n2 = parseFloat(tokens[i + 1] ?? '');\n if (!isNaN(n2)) {\n x += n;\n y += n2;\n coords.push([x, y]);\n i += 2;\n } else i++;\n } else {\n i++;\n }\n }\n return coords;\n}\n\n// ── Hand-crafted fallbacks for codes with empty path data ─────────────────────\nconst FALLBACK_685_LINES = [20, 50, 80, 110, 140];\nconst FALLBACK_685_CURVES = [35, 65, 95, 125].map((y, i) => ({ y, i }));\n\nconst FALLBACK_718_LINES: Array<[number, number, number, number]> = [\n [10, 15, 22, 12],\n [35, 8, 45, 18],\n [65, 5, 72, 20],\n [90, 12, 100, 8],\n [120, 6, 130, 18],\n [145, 15, 148, 28],\n [5, 40, 18, 35],\n [40, 32, 52, 45],\n [70, 38, 80, 28],\n [100, 30, 112, 42],\n [135, 35, 145, 25],\n [15, 60, 25, 50],\n [50, 55, 60, 68],\n [80, 58, 90, 48],\n [110, 52, 122, 65],\n [140, 58, 148, 48],\n [8, 80, 20, 72],\n [42, 76, 55, 88],\n [72, 78, 85, 68],\n [105, 74, 115, 86],\n [138, 80, 148, 70],\n [18, 100, 30, 92],\n [48, 96, 58, 108],\n [80, 100, 92, 90],\n [112, 97, 122, 108],\n [140, 102, 150, 94],\n [10, 118, 22, 110],\n [44, 116, 56, 128],\n [76, 120, 88, 112],\n [108, 118, 120, 128],\n [138, 122, 148, 112],\n [14, 138, 26, 130],\n [48, 136, 60, 148],\n [80, 140, 90, 130],\n [110, 138, 122, 148],\n [138, 140, 148, 132],\n];\n\nconst FALLBACK_718_DOTS: Array<[number, number]> = [\n [16, 13],\n [42, 12],\n [68, 12],\n [95, 10],\n [125, 12],\n [148, 12],\n [10, 48],\n [52, 40],\n [75, 33],\n [106, 36],\n [140, 30],\n [22, 78],\n [58, 78],\n [87, 73],\n [115, 78],\n [144, 75],\n];\n\nconst pathData = ref<string | undefined>(undefined);\nconst numericCode = computed(() => Number(props.code));\n\nwatch(\n () => props.code,\n () => {\n pathData.value = undefined;\n loadFgdcPaths().then(paths => {\n const code = String(props.code);\n pathData.value = paths[code];\n });\n },\n {\n immediate: true,\n },\n);\n\ntype RenderMode = 'fallback685' | 'fallback718' | 'spacer' | 'dots' | 'path';\n\nconst renderMode = computed<RenderMode>(() => {\n const code = numericCode.value;\n if (!pathData.value) {\n if (code === 685) return 'fallback685';\n if (code === 718) return 'fallback718';\n return 'spacer';\n }\n if (DOT_TEXTURE_CODES.has(code)) return 'dots';\n return 'path';\n});\n\nconst dotCoords = computed<Array<[number, number]>>(() => {\n if (renderMode.value !== 'dots' || !pathData.value) return [];\n return parseDotCoords(pathData.value);\n});\n</script>\n\n<template>\n <svg\n v-if=\"renderMode === 'fallback685'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 150 150\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"texture-svg\"\n aria-hidden=\"true\"\n >\n <line\n v-for=\"y in FALLBACK_685_LINES\"\n :key=\"y\"\n x1=\"0\"\n :y1=\"y\"\n x2=\"150\"\n :y2=\"y\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-dasharray=\"18 6\"\n />\n <path\n v-for=\"{ y, i } in FALLBACK_685_CURVES\"\n :key=\"y\"\n :d=\"`M0,${y} C25,${y - 8 + i * 2} 50,${y + 8 - i * 2} 75,${y} S125,${y - 6} 150,${y}`\"\n stroke=\"currentColor\"\n stroke-width=\"0.7\"\n fill=\"none\"\n />\n </svg>\n\n <!-- Fallback 718: scattered granite crystal shapes -->\n <svg\n v-else-if=\"renderMode === 'fallback718'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 150 150\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"texture-svg\"\n aria-hidden=\"true\"\n >\n <line\n v-for=\"([x1, y1, x2, y2], i) in FALLBACK_718_LINES\"\n :key=\"i\"\n :x1=\"x1\"\n :y1=\"y1\"\n :x2=\"x2\"\n :y2=\"y2\"\n stroke=\"currentColor\"\n stroke-width=\"1\"\n />\n <circle\n v-for=\"([cx, cy], i) in FALLBACK_718_DOTS\"\n :key=\"i\"\n :cx=\"cx\"\n :cy=\"cy\"\n r=\"1.8\"\n fill=\"currentColor\"\n />\n </svg>\n\n <!-- Dot textures (607–611): h0 path segments rendered as circles -->\n <svg\n v-else-if=\"renderMode === 'dots'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 150 150\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"texture-svg\"\n aria-hidden=\"true\"\n >\n <circle\n v-for=\"([cx, cy], i) in dotCoords\"\n :key=\"i\"\n :cx=\"cx\"\n :cy=\"cy\"\n r=\"2.2\"\n fill=\"currentColor\"\n />\n </svg>\n\n <!-- Standard stroke path -->\n <svg\n v-else-if=\"renderMode === 'path'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 150 150\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"texture-svg\"\n aria-hidden=\"true\"\n >\n <path\n :d=\"pathData\"\n stroke=\"currentColor\"\n stroke-width=\"0.8\"\n fill=\"none\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>\n\n <!-- Loading spacer -->\n <div v-else :style=\"{ width: `${size}px`, height: `${size}px` }\" />\n</template>\n\n<style scoped>\n.texture-svg {\n display: block;\n flex-shrink: 0;\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-radius: 3px;\n}\n</style>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { WelldotUnits } from '../config';
|
|
2
|
+
import { DisplayUnitType } from '../composables/useWellUnits';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue?: number | null;
|
|
5
|
+
unitType: DisplayUnitType;
|
|
6
|
+
/** Overrides the configured display unit for this input. */
|
|
7
|
+
unit?: WelldotUnits[DisplayUnitType];
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
step?: number;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: number | null) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=WellUnitInput.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WellUnitInput.d.ts","sourceRoot":"","sources":["../../src/components/WellUnitInput.vue"],"names":[],"mappings":"AAqFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AAGrC,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,eAAe,CAAC;IAC1B,4DAA4D;IAC5D,IAAI,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAmFF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|