@gridsheet/vue-core 2.0.0-0.rc.2 → 2.0.0-rc.5-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.
@@ -1,5 +1,5 @@
1
- import { HubType, CellsByAddressType, OptionsType, TableRef } from '@gridsheet/preact-core';
2
1
  import { Ref } from 'vue';
2
+ import { CellsByAddressType, OptionsType, HubType, Connector } from '@gridsheet/preact-core';
3
3
 
4
4
  interface RefObject<T> {
5
5
  readonly current: T | null;
@@ -17,8 +17,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
17
17
  type: () => HubType | Ref<HubType>;
18
18
  default: null;
19
19
  };
20
- tableRef: {
21
- type: () => RefObject<TableRef | null>;
20
+ connector: {
21
+ type: () => RefObject<Connector | null>;
22
22
  default: null;
23
23
  };
24
24
  options: {
@@ -48,8 +48,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
48
48
  type: () => HubType | Ref<HubType>;
49
49
  default: null;
50
50
  };
51
- tableRef: {
52
- type: () => RefObject<TableRef | null>;
51
+ connector: {
52
+ type: () => RefObject<Connector | null>;
53
53
  default: null;
54
54
  };
55
55
  options: {
@@ -67,7 +67,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
67
67
  }>> & Readonly<{}>, {
68
68
  sheetName: string;
69
69
  hub: HubType | Ref<HubType, HubType>;
70
- tableRef: RefObject<any>;
70
+ connector: RefObject<Connector | null>;
71
71
  options: OptionsType;
72
72
  className: string;
73
73
  style: any;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { render as c, h as i, GridSheet as f, createHub as s } from "@gridsheet/preact-core";
1
+ import { render as i, h as s, GridSheet as f, createHub as d } from "@gridsheet/preact-core";
2
2
  export * from "@gridsheet/preact-core";
3
- import { defineComponent as d, ref as h, onMounted as b, isRef as l, watch as o, onBeforeUnmount as m, createElementBlock as p, openBlock as _, shallowRef as v } from "vue";
4
- const y = d({
3
+ import { defineComponent as h, ref as b, onMounted as m, isRef as c, watch as a, onBeforeUnmount as p, createElementBlock as _, openBlock as v, shallowRef as y } from "vue";
4
+ const O = h({
5
5
  name: "GridSheet",
6
6
  props: {
7
7
  initialCells: {
@@ -16,7 +16,7 @@ const y = d({
16
16
  type: Object,
17
17
  default: null
18
18
  },
19
- tableRef: {
19
+ connector: {
20
20
  type: Object,
21
21
  default: null
22
22
  },
@@ -34,58 +34,59 @@ const y = d({
34
34
  }
35
35
  },
36
36
  setup(e) {
37
- const r = h(null);
37
+ const r = b(null);
38
38
  let t = null;
39
39
  function u() {
40
+ const { tableRef: o, ...l } = e;
40
41
  return {
41
- ...e,
42
- hub: l(e.hub) ? e.hub.value : e.hub
42
+ ...l,
43
+ hub: c(e.hub) ? e.hub.value : e.hub
43
44
  };
44
45
  }
45
46
  function n() {
46
- r.value && (t = r.value, c(
47
- i(f, u()),
47
+ r.value && (t = r.value, i(
48
+ s(f, u()),
48
49
  t
49
50
  ));
50
51
  }
51
- return b(() => {
52
- n(), l(e.hub) ? o(
52
+ return m(() => {
53
+ n(), c(e.hub) ? a(
53
54
  () => e.hub.value,
54
55
  n,
55
56
  { deep: !1 }
56
- ) : o(
57
+ ) : a(
57
58
  () => e.hub,
58
59
  n,
59
60
  { deep: !1 }
60
61
  );
61
- }), m(() => {
62
+ }), p(() => {
62
63
  t && (t.innerHTML = "");
63
64
  }), {
64
65
  container: r
65
66
  };
66
67
  }
67
- }), O = (e, r) => {
68
+ }), j = (e, r) => {
68
69
  const t = e.__vccOpts || e;
69
70
  for (const [u, n] of r)
70
71
  t[u] = n;
71
72
  return t;
72
- }, j = { ref: "container" };
73
- function S(e, r, t, u, n, a) {
74
- return _(), p("div", j, null, 512);
73
+ }, S = { ref: "container" };
74
+ function g(e, r, t, u, n, o) {
75
+ return v(), _("div", S, null, 512);
75
76
  }
76
- const x = /* @__PURE__ */ O(y, [["render", S]]);
77
- function G(e = {}) {
78
- const r = s(e), t = v(r), { wire: u } = t.value;
79
- function n(a) {
80
- Object.assign(u, a), u.ready && requestAnimationFrame(() => t.value = { ...t.value });
77
+ const G = /* @__PURE__ */ j(O, [["render", g]]);
78
+ function k(e = {}) {
79
+ const r = d(e), t = y(r), { wire: u } = t.value;
80
+ function n(o) {
81
+ Object.assign(u, o), u.ready && requestAnimationFrame(() => t.value = { ...t.value });
81
82
  }
82
- return u.transmit = n, o(
83
+ return u.transmit = n, a(
83
84
  () => e,
84
- (a) => n(a),
85
+ (o) => n(o),
85
86
  { deep: !0 }
86
87
  ), t;
87
88
  }
88
89
  export {
89
- x as GridSheet,
90
- G as useHub
90
+ G as GridSheet,
91
+ k as useHub
91
92
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsheet/vue-core",
3
- "version": "2.0.0-0.rc.2",
3
+ "version": "2.0.0-rc.5-0",
4
4
  "description": "Spreadsheet component for Vue 3",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "vue": "^3.3.0"
20
20
  },
21
21
  "dependencies": {
22
- "@gridsheet/preact-core": "^2.0.0-rc.2"
22
+ "@gridsheet/preact-core": "^2.0.0-rc.5"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@vitejs/plugin-vue": "^5.2.4",