@stonecrop/beam 0.2.63 → 0.2.65

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.
@@ -1,5 +1,11 @@
1
1
  import mqtt from 'mqtt';
2
2
  import { onMounted, onUnmounted, ref } from 'vue';
3
+ /**
4
+ * Use MQTT stream
5
+ * @param options - MQTT stream options
6
+ * @returns MQTT stream messages
7
+ * @beta
8
+ */
3
9
  export const useMqttStream = (options) => {
4
10
  const client = ref(null);
5
11
  const messages = ref({});
@@ -1,9 +1,11 @@
1
- import { type IClientOptions } from 'mqtt';
2
- interface IMqttStream extends IClientOptions {
3
- topics?: string[];
4
- }
1
+ import { IMqttStream } from '@/types';
2
+ /**
3
+ * Use MQTT stream
4
+ * @param options - MQTT stream options
5
+ * @returns MQTT stream messages
6
+ * @beta
7
+ */
5
8
  export declare const useMqttStream: (options?: IMqttStream) => {
6
9
  messages: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
7
10
  };
8
- export {};
9
11
  //# sourceMappingURL=mqtt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mqtt.d.ts","sourceRoot":"","sources":["../../../src/composables/mqtt.ts"],"names":[],"mappings":"AAAA,OAAa,EAAmB,KAAK,cAAc,EAAE,MAAM,MAAM,CAAA;AAGjE,UAAU,WAAY,SAAQ,cAAc;IAC3C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB;AAED,eAAO,MAAM,aAAa,aAAc,WAAW;;CAiClD,CAAA"}
1
+ {"version":3,"file":"mqtt.d.ts","sourceRoot":"","sources":["../../../src/composables/mqtt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,aAAa,aAAc,WAAW;;CAiClD,CAAA"}
@@ -22,7 +22,7 @@ import ScanInput from '@/components/ScanInput.vue';
22
22
  import SplitColumn from '@/components/SplitColumn.vue';
23
23
  import ToggleArrow from '@/components/ToggleArrow.vue';
24
24
  import { useMqttStream } from '@/composables/mqtt';
25
- export type { ListViewItem } from '@/types';
25
+ export type { IMqttStream, ListViewItem } from '@/types';
26
26
  import 'themes/beam.css';
27
27
  /**
28
28
  * Install all Beam components
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,OAAO,MAAM,0BAA0B,CAAA;AAC9C,OAAO,cAAc,MAAM,iCAAiC,CAAA;AAC5D,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,gBAAgB,MAAM,mCAAmC,CAAA;AAChE,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAC9D,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,OAAO,MAAM,0BAA0B,CAAA;AAC9C,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EAAE,YAAY,EAAE,MA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AO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,iBAAiB,CAAA;AAExB;;;;GAIG;AACH,iBAAS,OAAO,CAAC,GAAG,EAAE,GAAG,QAuBxB;AAED,OAAO,EACN,YAAY,EACZ,SAAS,EACT,OAAO,EACP,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,eAAe,EACf,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,WAAW,EACX,WAAW,EACX,OAAO,EACP,aAAa,GACb,CAAA"}
@@ -1,3 +1,7 @@
1
+ import type { IClientOptions } from 'mqtt';
2
+ /**
3
+ * @beta
4
+ */
1
5
  export type ListViewItem = {
2
6
  description: string;
3
7
  label: string;
@@ -13,4 +17,11 @@ export type ListViewItem = {
13
17
  linkComponent?: string;
14
18
  route?: string;
15
19
  };
20
+ /**
21
+ * MQTT stream options
22
+ * @public
23
+ */
24
+ export interface IMqttStream extends IClientOptions {
25
+ topics?: string[];
26
+ }
16
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IAEb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,EAAE,MAAM,CAAA;KACX,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA"}
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,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IAEb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,EAAE,MAAM,CAAA;KACX,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IAClD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB"}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.47.9"
8
+ "packageVersion": "7.48.0"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/beam",
3
- "version": "0.2.63",
3
+ "version": "0.2.65",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": {
@@ -32,11 +32,11 @@
32
32
  "@vueuse/core": "^11.1.0",
33
33
  "mqtt": "^5.10.1",
34
34
  "onscan.js": "^1.5.2",
35
- "vue": "^3.5.6"
35
+ "vue": "^3.5.11"
36
36
  },
37
37
  "devDependencies": {
38
- "@microsoft/api-documenter": "^7.25.3",
39
- "@rushstack/heft": "^0.67.2",
38
+ "@microsoft/api-documenter": "^7.26.2",
39
+ "@rushstack/heft": "^0.68.6",
40
40
  "@typescript-eslint/eslint-plugin": "^7.14.1",
41
41
  "@typescript-eslint/parser": "^7.14.1",
42
42
  "@vitejs/plugin-vue": "^5.1.3",
@@ -48,7 +48,7 @@
48
48
  "eslint-config-prettier": "^8.8.0",
49
49
  "eslint-plugin-vue": "^9.11.1",
50
50
  "sass": "^1.75.0",
51
- "typescript": "^5.5.2",
51
+ "typescript": "^5.6.3",
52
52
  "vite-plugin-lib-inject-css": "^2.1.1",
53
53
  "vite": "^5.4.5",
54
54
  "vitest": "^2.1.1",
@@ -1,10 +1,14 @@
1
- import mqtt, { type MqttClient, type IClientOptions } from 'mqtt'
1
+ import mqtt, { type MqttClient } from 'mqtt'
2
2
  import { onMounted, onUnmounted, ref } from 'vue'
3
3
 
4
- interface IMqttStream extends IClientOptions {
5
- topics?: string[]
6
- }
4
+ import { IMqttStream } from '@/types'
7
5
 
6
+ /**
7
+ * Use MQTT stream
8
+ * @param options - MQTT stream options
9
+ * @returns MQTT stream messages
10
+ * @beta
11
+ */
8
12
  export const useMqttStream = (options?: IMqttStream) => {
9
13
  const client = ref<MqttClient>(null)
10
14
  const messages = ref<Record<string, string[]>>({})
package/src/index.ts CHANGED
@@ -23,7 +23,7 @@ import ScanInput from '@/components/ScanInput.vue'
23
23
  import SplitColumn from '@/components/SplitColumn.vue'
24
24
  import ToggleArrow from '@/components/ToggleArrow.vue'
25
25
  import { useMqttStream } from '@/composables/mqtt'
26
- export type { ListViewItem } from '@/types'
26
+ export type { IMqttStream, ListViewItem } from '@/types'
27
27
  import 'themes/beam.css'
28
28
 
29
29
  /**
@@ -1,3 +1,8 @@
1
+ import type { IClientOptions } from 'mqtt'
2
+
3
+ /**
4
+ * @beta
5
+ */
1
6
  export type ListViewItem = {
2
7
  description: string
3
8
  label: string
@@ -14,3 +19,11 @@ export type ListViewItem = {
14
19
  linkComponent?: string
15
20
  route?: string
16
21
  }
22
+
23
+ /**
24
+ * MQTT stream options
25
+ * @public
26
+ */
27
+ export interface IMqttStream extends IClientOptions {
28
+ topics?: string[]
29
+ }