@stonecrop/beam 0.4.36 → 0.4.37

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.
@@ -79,7 +79,7 @@ export const isPortActive = async (host, port) => {
79
79
  return true;
80
80
  }
81
81
  }
82
- catch (error) {
82
+ catch {
83
83
  return false;
84
84
  }
85
85
  };
@@ -1,4 +1,5 @@
1
1
  import type { IClientOptions } from 'mqtt';
2
+ import { CSSProperties } from 'vue';
2
3
  /**
3
4
  * @public
4
5
  */
@@ -21,7 +22,7 @@ export type ListViewItem = {
21
22
  /**
22
23
  * @public
23
24
  */
24
- export type BeamColor = RGB | RGBA | HEX | HSL | HSLA | string;
25
+ export type BeamColor = RGB | RGBA | HEX | HSL | HSLA | CSSProperties['color'];
25
26
  /**
26
27
  * @public
27
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAE1C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,CAAC,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAID;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,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E,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;AAE9E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,GAAG,GAAG,OAAO,MAAM,KAAK,MAAM,KAAK,MAAM,GAAG,CAAA;AAExD;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG,QAAQ,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,GAAG,CAAA;AAErE;;;GAGG;AACH,MAAM,MAAM,GAAG,GAAG,OAAO,MAAM,KAAK,MAAM,MAAM,MAAM,IAAI,CAAA;AAE1D;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG,OAAO,MAAM,KAAK,MAAM,MAAM,MAAM,OAAO,MAAM,EAAE,CAAA;AAEtE;;;GAGG;AACH,MAAM,MAAM,GAAG,GAAG,IAAI,MAAM,EAAE,CAAA;AAE9B;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IAClD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/beam",
3
- "version": "0.4.36",
3
+ "version": "0.4.37",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": {
@@ -37,30 +37,30 @@
37
37
  "src/*"
38
38
  ],
39
39
  "dependencies": {
40
- "@vueuse/components": "^13.6.0",
41
- "@vueuse/core": "^13.6.0",
40
+ "@vueuse/components": "^14.0.0",
41
+ "@vueuse/core": "^14.0.0",
42
42
  "mqtt": "^5.13.1",
43
43
  "onscan.js": "^1.5.2",
44
44
  "vue": "^3.5.22"
45
45
  },
46
46
  "devDependencies": {
47
- "@microsoft/api-documenter": "^7.26.31",
48
- "@rushstack/heft": "^0.74.2",
49
- "@typescript-eslint/eslint-plugin": "^7.18.0",
50
- "@typescript-eslint/parser": "^7.18.0",
47
+ "@eslint/js": "^9.38.0",
48
+ "@microsoft/api-documenter": "^7.27.3",
49
+ "@rushstack/heft": "^1.1.3",
51
50
  "@vitejs/plugin-vue": "^6.0.1",
52
- "@vitest/coverage-istanbul": "^3.2.4",
53
- "@vitest/ui": "^3.2.4",
51
+ "@vitest/coverage-istanbul": "^4.0.5",
52
+ "@vitest/ui": "^4.0.5",
54
53
  "@vue/test-utils": "^2.4.6",
55
- "cypress": "^14.5.3",
56
- "eslint": "^8.57.1",
57
- "eslint-config-prettier": "^8.10.0",
58
- "eslint-plugin-vue": "^9.33.0",
54
+ "eslint": "^9.38.0",
55
+ "eslint-config-prettier": "^10.1.8",
56
+ "eslint-plugin-vue": "^10.5.1",
57
+ "globals": "^16.4.0",
59
58
  "sass": "^1.89.2",
60
59
  "typescript": "^5.9.3",
60
+ "typescript-eslint": "^8.46.2",
61
61
  "vite-plugin-lib-inject-css": "^2.2.2",
62
62
  "vite": "^7.1.1",
63
- "vitest": "^3.2.4",
63
+ "vitest": "^4.0.5",
64
64
  "vue-router": "^4.6.3",
65
65
  "stonecrop-rig": "0.2.22"
66
66
  },
@@ -76,7 +76,7 @@
76
76
  "build": "heft build && vite build && rushx docs",
77
77
  "dev": "vite",
78
78
  "docs": "cd ../common/autoinstallers/doc-tools && node generate-docs.mjs beam",
79
- "lint": "eslint . --ext .ts,.vue",
79
+ "lint": "eslint .",
80
80
  "preview": "vite preview",
81
81
  "test": "vitest run --coverage.enabled false",
82
82
  "test:watch": "vitest watch",
@@ -1,16 +1,16 @@
1
1
  <template>
2
2
  <div class="beam_metadata_arrow">
3
- <div class="beam_metadata_arrow-body" :style="{ background: color || '#c4c4c4' }"></div>
3
+ <div class="beam_metadata_arrow-body" :style="{ background: color }"></div>
4
4
  <div class="beam_metadata_arrow-head">
5
5
  <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.74 7.78">
6
- <polygon points="6.74 3.89 0 0 0 7.78 6.74 3.89" style="fill: #c4c4c4" :style="{ fill: color || '#c4c4c4' }" />
6
+ <polygon points="6.74 3.89 0 0 0 7.78 6.74 3.89" style="fill: #c4c4c4" :style="{ fill: color }" />
7
7
  </svg>
8
8
  </div>
9
9
  </div>
10
10
  </template>
11
11
 
12
12
  <script setup lang="ts">
13
- const { color } = defineProps<{ color?: string }>()
13
+ const { color = '#c4c4c4' } = defineProps<{ color?: string }>()
14
14
  </script>
15
15
 
16
16
  <style scoped>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="beam_filters">
3
- <div @click="isFilterExpanded = !isFilterExpanded" class="beam_filters-heading">
3
+ <div class="beam_filters-heading" @click="isFilterExpanded = !isFilterExpanded">
4
4
  <ToggleArrow :open="isFilterExpanded" />
5
5
  <BeamHeading>Filter</BeamHeading>
6
6
  </div>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div v-on-click-outside="() => (isMenuOpen = false)" class="beam_filter-container">
3
3
  <BeamHeading class="beam_filter-option-heading">{{ title }}</BeamHeading>
4
- <div @click="isMenuOpen = !isMenuOpen" class="beam_filter-option">
4
+ <div class="beam_filter-option" @click="isMenuOpen = !isMenuOpen">
5
5
  <div class="beam_filter-option-select">
6
6
  <div class="beam_filter-arrow">
7
7
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35.36 70.71">
@@ -13,12 +13,12 @@
13
13
  </div>
14
14
  </div>
15
15
 
16
- <ul ref="menu" v-if="isMenuOpen" class="beam_filter-select-menu">
16
+ <ul v-if="isMenuOpen" ref="menu" class="beam_filter-select-menu">
17
17
  <li
18
18
  v-for="choice in choices"
19
+ :key="choice.value"
19
20
  :class="{ selected: label == choice.label }"
20
21
  :data-value="choice.value"
21
- :key="choice.value"
22
22
  class="beam_filter-select-option"
23
23
  @click="selectChoice(choice)">
24
24
  {{ choice.label }}
@@ -36,7 +36,7 @@ import { BeamFilterChoice } from '../types'
36
36
 
37
37
  const emit = defineEmits<{ select: [choice: BeamFilterChoice] }>()
38
38
 
39
- const { title = 'title', choices = [] } = defineProps<{
39
+ const { choices, title = 'title' } = defineProps<{
40
40
  choices: BeamFilterChoice[]
41
41
  title?: string
42
42
  }>()
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <portal to="beam_modal_outlet">
3
- <div class="beam_modal" v-show="showModal">
3
+ <div v-show="showModal" class="beam_modal">
4
4
  <BeamBtn @click="$emit('closemodal')">Close Modal</BeamBtn>
5
5
  <slot @closemodal="$emit('closemodal')" @confirmmodal="$emit('confirmmodal')"></slot>
6
6
  </div>
@@ -8,6 +8,7 @@
8
8
  </template>
9
9
 
10
10
  <script setup lang="ts">
11
+ defineEmits<{ closemodal: []; confirmmodal: [] }>()
11
12
  defineProps<{ showModal: boolean }>()
12
13
  </script>
13
14
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <label class="container">
3
- <input type="checkbox" v-model="value" tabindex="-1" />
3
+ <input v-model="value" type="checkbox" tabindex="-1" />
4
4
  <div class="checkmark" tabindex="0"></div>
5
5
  </label>
6
6
  </template>
@@ -24,7 +24,7 @@ const {
24
24
  editable = true,
25
25
  uom = '',
26
26
  } = defineProps<{
27
- denominator: number
27
+ denominator?: number
28
28
  debounce?: number
29
29
  editable?: HTMLAttributes['contenteditable']
30
30
  uom?: string
@@ -27,7 +27,7 @@ const getOutput = computed(() => {
27
27
  })
28
28
 
29
29
  const getColor = (color: BeamColor) => {
30
- return color.substr(0, 2) == '--' ? `var(${color})` : color
30
+ return color?.substring(0, 2) == '--' ? `var(${color})` : color
31
31
  }
32
32
  </script>
33
33
 
@@ -1,7 +1,5 @@
1
1
  <template>
2
- <div
3
- class="two-column"
4
- :style="{ justifyContent: justifyContent || 'space-between', alignItems: alignItems || 'flex-start' }">
2
+ <div class="two-column" :style="{ justifyContent, alignItems }">
5
3
  <div class="column column-left">
6
4
  <slot name="left"></slot>
7
5
  </div>
@@ -12,9 +10,11 @@
12
10
  </template>
13
11
 
14
12
  <script setup lang="ts">
15
- const { justifyContent, alignItems } = defineProps<{
16
- justifyContent?: string
17
- alignItems?: string
13
+ import type { CSSProperties } from 'vue'
14
+
15
+ const { justifyContent = 'space-between', alignItems = 'flex-start' } = defineProps<{
16
+ justifyContent?: CSSProperties['justifyContent']
17
+ alignItems?: CSSProperties['alignItems']
18
18
  }>()
19
19
  </script>
20
20
 
@@ -95,7 +95,7 @@ export const isPortActive = async (host: string, port: number) => {
95
95
  // If we get here, there might be something running on the port
96
96
  return true
97
97
  }
98
- } catch (error) {
98
+ } catch {
99
99
  return false
100
100
  }
101
101
  }
@@ -1,4 +1,5 @@
1
1
  import type { IClientOptions } from 'mqtt'
2
+ import { CSSProperties } from 'vue'
2
3
 
3
4
  /**
4
5
  * @public
@@ -20,12 +21,10 @@ export type ListViewItem = {
20
21
  route?: string
21
22
  }
22
23
 
23
- // TODO: the `string` at the end should be replaced by `DataType.Color`
24
- // in the `csstype` lib but import seems to be missing
25
24
  /**
26
25
  * @public
27
26
  */
28
- export type BeamColor = RGB | RGBA | HEX | HSL | HSLA | string
27
+ export type BeamColor = RGB | RGBA | HEX | HSL | HSLA | CSSProperties['color']
29
28
 
30
29
  /**
31
30
  * @public