tsviewer 1.0.31 → 1.0.33

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/README.md CHANGED
@@ -14,7 +14,7 @@ yarn add tsviewer
14
14
 
15
15
  ## **🚀 Usage**
16
16
 
17
- ### **1. Import the Component and Styles**
17
+ ### **1. Import the Component, Styles and Pinia store module**
18
18
 
19
19
  In your Vue 3 component or layout setup:
20
20
 
@@ -27,16 +27,14 @@ import 'tsviewer/style'
27
27
 
28
28
  Before rendering `<tsviewer />`, you must initialize it by calling `fetchAndSetActiveViewer()` from the store. This ensures the viewer has the correct context.
29
29
 
30
- You need to provide two string parameters:
30
+ You need to provide the following string parameter:
31
31
  - **packageId**: The unique identifier for the package to load.
32
- - **packageType**: The type or category of the package.
33
32
 
34
33
  ```javascript
35
34
  const viewerStore = useViewerStore()
36
35
 
37
36
  await viewerStore.fetchAndSetActiveViewer({
38
37
  packageId: packageId.value,
39
- packageType: packageType.value
40
38
  })
41
39
  ```
42
40
 
@@ -61,7 +59,6 @@ import { useViewerStore, TSViewer } from 'tsviewer'
61
59
  import 'tsviewer/style'
62
60
 
63
61
  const packageId = ref('your-package-id')
64
- const packageType = ref('your-package-type')
65
62
  const isViewerReady = ref(false)
66
63
 
67
64
  const viewerStore = useViewerStore()
@@ -69,18 +66,13 @@ const viewerStore = useViewerStore()
69
66
  onMounted(async () => {
70
67
  await viewerStore.fetchAndSetActiveViewer({
71
68
  packageId: packageId.value,
72
- packageType: packageType.value
73
69
  })
74
70
  isViewerReady.value = true
75
71
  })
76
72
  </script>
77
73
 
78
74
  <template>
79
- <TSViewer v-if="isViewerReady" />
80
- </template>
81
-
82
- <template>
83
- <tsviewer />
75
+ <tsviewer v-if="isViewerReady"/>
84
76
  </template>
85
77
  ```
86
78
 
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as t, openBlock as s, normalizeClass as i, createCommentVNode as n, renderSlot as a, Fragment as f, createTextVNode as u, toDisplayString as l } from "vue";
2
- import { g as d } from "./index-BXlfFRwy.mjs";
2
+ import { g as d } from "./index-BZlDr3yB.mjs";
3
3
  const c = {
4
4
  name: "BfLibraryButton",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as o, openBlock as h, createElementVNode as n } from "vue";
2
- import { g as r } from "./index-BXlfFRwy.mjs";
2
+ import { g as r } from "./index-BZlDr3yB.mjs";
3
3
  const i = {
4
4
  name: "IconSelection",
5
5
  props: {
@@ -1,8 +1,8 @@
1
1
  import { ref as C, computed as W, watch as ee, onMounted as te, createElementBlock as ne, openBlock as oe, normalizeStyle as ae, unref as q, nextTick as ie } from "vue";
2
- import { o as re, m as se, u as _, p as V, h as N, j as H, i as P, g as le } from "./index-BXlfFRwy.mjs";
2
+ import { o as re, m as se, u as _, p as V, h as N, j as H, i as P, g as le } from "./index-BZlDr3yB.mjs";
3
3
  import { storeToRefs as x } from "pinia";
4
- import { f as ce, h as ue } from "./TSViewerCanvas-7tyEpUbF.mjs";
5
- import { p as z } from "./pathOr-1B5szOyh.mjs";
4
+ import { f as ce, h as ue } from "./TSViewerCanvas-DdXL6ec8.mjs";
5
+ import { p as z } from "./pathOr-B7jLfMU4.mjs";
6
6
  import { g as de } from "./_commonjsHelpers-DaMA6jEr.mjs";
7
7
  const I = (t, u) => {
8
8
  let c;
@@ -3,9 +3,9 @@ import { E as yn } from "./el-overlay-_Fd7WVZL.mjs";
3
3
  import { u as Ha, h as bn, i as gn, c as kn, j as wn, k as za, d as ja, l as Sn, e as qa, m as Dn, o as Cn, E as Mn, g as rt, n as $n, p as Pn, q as Vn, r as _n, T as Tn, C as ca, s as On, t as Yn, f as In, a as Rn, b as xn } from "./el-input-DNjlHApm.mjs";
4
4
  import { a as Zt } from "./el-button-B2d_HO4x.mjs";
5
5
  import { defineComponent as $e, ref as X, createElementBlock as Q, openBlock as I, normalizeStyle as Gt, normalizeClass as $, unref as e, renderSlot as me, createElementVNode as j, mergeProps as Jt, useAttrs as ha, inject as Re, computed as K, watch as De, nextTick as Ie, onBeforeUnmount as Za, provide as Nt, createBlock as ce, withCtx as le, withModifiers as He, createCommentVNode as se, resolveDynamicComponent as Qe, toDisplayString as fe, onMounted as Ga, Fragment as we, renderList as Pe, createTextVNode as Ge, withDirectives as Ye, createVNode as Z, Transition as An, withKeys as ze, useSlots as ya, toRef as je, vShow as Ze, getCurrentInstance as Ja, reactive as Nn, defineAsyncComponent as Fn } from "vue";
6
- import { g as En, u as Ln, p as Pa } from "./index-BXlfFRwy.mjs";
6
+ import { g as En, u as Ln, p as Pa } from "./index-BZlDr3yB.mjs";
7
7
  import { storeToRefs as Bn } from "pinia";
8
- import { I as Un } from "./IconSelection-Bs00CxIF.mjs";
8
+ import { I as Un } from "./IconSelection-DLam7boT.mjs";
9
9
  import { g as Xe } from "./_commonjsHelpers-DaMA6jEr.mjs";
10
10
  import { v as Va } from "./index-ClxLs_jS.mjs";
11
11
  var Ft = { exports: {} }, Kn = Ft.exports, _a;
@@ -4242,7 +4242,7 @@ const Tl = Wa(_l), Ol = { slot: "body" }, Yl = { class: "select-wrapper" }, Il =
4242
4242
  },
4243
4243
  emits: ["closeWindow", "createUpdateAnnotation"],
4244
4244
  setup(n, { emit: l }) {
4245
- const a = Fn(() => import("./BFLibraryButton-Cogtl8Vh.mjs")), t = n, d = X(!1);
4245
+ const a = Fn(() => import("./BFLibraryButton-CUTVuQul.mjs")), t = n, d = X(!1);
4246
4246
  De(() => t.visible, (_) => {
4247
4247
  if (d.value = _, !_) return;
4248
4248
  const M = u.value.start / 1e3, O = u.value.end / 1e3;
@@ -1,14 +1,14 @@
1
1
  import "./base-CIy5gWpu.mjs";
2
2
  import { E as F } from "./el-overlay-_Fd7WVZL.mjs";
3
- import { I as g } from "./IconSelection-Bs00CxIF.mjs";
3
+ import { I as g } from "./IconSelection-DLam7boT.mjs";
4
4
  import { a as y, b as k } from "./el-input-DNjlHApm.mjs";
5
5
  import { E as S } from "./el-input-number-CAzspsnM.mjs";
6
6
  import { resolveComponent as P, createBlock as u, openBlock as o, withCtx as i, createElementVNode as s, createVNode as r, createElementBlock as a, toDisplayString as c, createTextVNode as d, createCommentVNode as p, Fragment as _, renderList as v } from "vue";
7
- import { g as N } from "./index-BXlfFRwy.mjs";
7
+ import { g as N } from "./index-BZlDr3yB.mjs";
8
8
  const H = {
9
9
  name: "TimeseriesFilterModal",
10
10
  components: {
11
- "bf-library-button": () => import("./BFLibraryButton-Cogtl8Vh.mjs"),
11
+ "bf-library-button": () => import("./BFLibraryButton-CUTVuQul.mjs"),
12
12
  IconSelection: g
13
13
  },
14
14
  mixins: [],
@@ -1,5 +1,5 @@
1
1
  import { ref as v, computed as N, watch as U, nextTick as E, onMounted as Ne, createElementBlock as Ie, openBlock as $e, createElementVNode as x, toDisplayString as K, normalizeStyle as Q } from "vue";
2
- import { _ as ve, a as Se, b as Y, c as Ue, d as ge, e as Ve, f as Oe, k as Le, g as Xe, u as je, h as de, i as fe, j as he } from "./index-BXlfFRwy.mjs";
2
+ import { _ as ve, a as Se, b as Y, c as Ue, d as ge, e as Ve, f as Oe, k as Le, g as Xe, u as je, h as de, i as fe, j as he } from "./index-BZlDr3yB.mjs";
3
3
  function me(g, c, l) {
4
4
  return function() {
5
5
  for (var t = [], p = 0, u = g, k = 0; k < c.length || p < arguments.length; ) {
@@ -1,6 +1,6 @@
1
1
  import { ref, onUnmounted, readonly, reactive, computed, watch, onMounted, createElementBlock, openBlock, createElementVNode, renderSlot, normalizeStyle, defineAsyncComponent, nextTick, createVNode, withCtx, unref } from "vue";
2
2
  import { storeToRefs } from "pinia";
3
- import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, h as useToken, p as propOr, g as _export_sfc, u as useViewerStore, m as propEq } from "./index-BXlfFRwy.mjs";
3
+ import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, h as useToken, p as propOr, g as _export_sfc, u as useViewerStore, m as propEq } from "./index-BZlDr3yB.mjs";
4
4
  import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./_commonjsHelpers-DaMA6jEr.mjs";
5
5
  var head = /* @__PURE__ */ nth(0), XFind = /* @__PURE__ */ function() {
6
6
  function f(c, v) {
@@ -5137,7 +5137,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
5137
5137
  ), (Y = i.value) != null && Y.content.id)
5138
5138
  try {
5139
5139
  console.log("🔄 Opening WebSocket connection for package:", i.value.content.id), await a(
5140
- r.config.timeSeriesPublicUrl,
5140
+ r.config.timeseriesDiscoverApi,
5141
5141
  i.value.content.id,
5142
5142
  U
5143
5143
  ), console.log("✅ WebSocket connection established"), xe();
@@ -5194,7 +5194,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
5194
5194
  }, null, 12, _hoisted_3$1)
5195
5195
  ]));
5196
5196
  }
5197
- }, TSPlotCanvas = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-109a56ec"]]), _hoisted_1 = { class: "timeseries-viewer-canvas" }, _hoisted_2 = { id: "canvasWrapper" }, _hoisted_3 = ["width", "height"], _hoisted_4 = ["width", "height"], _hoisted_5 = ["width", "height"], _hoisted_6 = ["width", "height"], _sfc_main = {
5197
+ }, TSPlotCanvas = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4be24234"]]), _hoisted_1 = { class: "timeseries-viewer-canvas" }, _hoisted_2 = { id: "canvasWrapper" }, _hoisted_3 = ["width", "height"], _hoisted_4 = ["width", "height"], _hoisted_5 = ["width", "height"], _hoisted_6 = ["width", "height"], _sfc_main = {
5198
5198
  __name: "TSViewerCanvas",
5199
5199
  props: {
5200
5200
  windowHeight: Number,
@@ -5222,7 +5222,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
5222
5222
  ],
5223
5223
  setup(f, { expose: c, emit: v }) {
5224
5224
  const u = defineAsyncComponent(
5225
- () => import("./TSAnnotationCanvas-HQV-UW-j.mjs")
5225
+ () => import("./TSAnnotationCanvas-DF-8it3n.mjs")
5226
5226
  ), o = f, i = v, e = useViewerStore(), { viewerChannels: r, viewerAnnotations: t, viewerActiveTool: n, viewerSelectedChannels: d } = storeToRefs(e), s = ref(null), l = ref(null), a = ref(null), h = ref(null), m = ref(null), R = ref(null);
5227
5227
  reactive({});
5228
5228
  const g = ref(0), y = ref(0), O = ref(0), b = ref(1), k = ref(!1), I = ref(!1), M = ref("pointer");
@@ -2,8 +2,8 @@ import "./base-CIy5gWpu.mjs";
2
2
  import { E as _ } from "./el-overlay-_Fd7WVZL.mjs";
3
3
  import { g as f, a as y, b as h } from "./el-input-DNjlHApm.mjs";
4
4
  import { createElementBlock as F, openBlock as s, renderSlot as S, resolveComponent as A, createBlock as u, withCtx as a, createElementVNode as l, createVNode as r, createTextVNode as i, Fragment as E, renderList as k, normalizeStyle as D, toDisplayString as L } from "vue";
5
- import { g as C } from "./index-BXlfFRwy.mjs";
6
- import V from "./BFLibraryButton-Cogtl8Vh.mjs";
5
+ import { g as C } from "./index-BZlDr3yB.mjs";
6
+ import V from "./BFLibraryButton-CUTVuQul.mjs";
7
7
  const w = {
8
8
  name: "CircleIcon",
9
9
  props: {
@@ -3,7 +3,7 @@ import { E as j, a as G, b as X } from "./el-input-DNjlHApm.mjs";
3
3
  import { E as J, a as K } from "./el-button-B2d_HO4x.mjs";
4
4
  import { E as Q } from "./el-input-number-CAzspsnM.mjs";
5
5
  import { createElementBlock as g, openBlock as r, createElementVNode as t, ref as h, computed as k, onMounted as W, createVNode as l, createBlock as w, createCommentVNode as y, withCtx as u, resolveDynamicComponent as Y, Fragment as tt, renderList as et } from "vue";
6
- import { g as m } from "./index-BXlfFRwy.mjs";
6
+ import { g as m } from "./index-BZlDr3yB.mjs";
7
7
  const nt = {
8
8
  name: "IconPreviousPage",
9
9
  props: {
@@ -1,9 +1,9 @@
1
1
  import "./base-CIy5gWpu.mjs";
2
2
  import { E as k } from "./el-overlay-_Fd7WVZL.mjs";
3
3
  import { createElementBlock as a, openBlock as i, normalizeClass as T, createCommentVNode as f, createElementVNode as s, renderSlot as d, toDisplayString as u, resolveComponent as B, createBlock as A, withCtx as c, createVNode as r, Fragment as x, createTextVNode as h } from "vue";
4
- import { g as _, p as V } from "./index-BXlfFRwy.mjs";
5
- import N from "./BFLibraryButton-Cogtl8Vh.mjs";
6
- import { p as C } from "./pathOr-1B5szOyh.mjs";
4
+ import { g as _, p as V } from "./index-BZlDr3yB.mjs";
5
+ import N from "./BFLibraryButton-CUTVuQul.mjs";
6
+ import { p as C } from "./pathOr-B7jLfMU4.mjs";
7
7
  const U = {
8
8
  name: "DialogBody",
9
9
  setup(e, { slots: t }) {