@simple-table/vue 3.9.1 → 3.9.2

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/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),r=require("simple-table-core");function t(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}function n(r){return t=>{const n=document.createElement("div");return e.render(e.h(r,t),n),n}}function o(r){const t=document.createElement("div");return e.render(r,t),t}function d(r){const t=document.createElement("div");e.render(r,t);const n=t.innerHTML;return e.render(null,t),n}function i(e){return"object"==typeof e||"function"==typeof e}function s(e){const{cellRenderer:r,headerRenderer:o,children:d,nestedTable:i}=e,a=t(e,["cellRenderer","headerRenderer","children","nestedTable"]),c=Object.assign({},a);if(r&&(c.cellRenderer="object"==typeof r?n(r):r),o&&(c.headerRenderer="object"==typeof o?n(o):o),d&&(c.children=d.map(s)),i){const e=Object.assign(Object.assign({},i),{rows:[]});c.nestedTable=l(e)}return c}function l(e){const{defaultHeaders:r,rows:l,footerRenderer:a,emptyStateRenderer:c,errorStateRenderer:u,loadingStateRenderer:f,tableEmptyStateRenderer:p,headerDropdown:m,columnEditorConfig:b,icons:R,rowButtons:y}=e,v=t(e,["defaultHeaders","rows","footerRenderer","emptyStateRenderer","errorStateRenderer","loadingStateRenderer","tableEmptyStateRenderer","headerDropdown","columnEditorConfig","icons","rowButtons"]),g=Object.assign(Object.assign({},v),{rows:l,defaultHeaders:r.map(s)});if(void 0!==a&&(g.footerRenderer="object"==typeof a?n(a):a),void 0!==c)if(i(c))g.emptyStateRenderer=n(c);else{const e=c;g.emptyStateRenderer=()=>o(e)}if(void 0!==u)if(i(u))g.errorStateRenderer=n(u);else{const e=u;g.errorStateRenderer=()=>o(e)}if(void 0!==f)if(i(f))g.loadingStateRenderer=n(f);else{const e=f;g.loadingStateRenderer=()=>o(e)}return void 0!==p&&(g.tableEmptyStateRenderer=null===p?null:p instanceof HTMLElement||"string"==typeof p?p:o(p)),void 0!==m&&(g.headerDropdown=n(m)),void 0!==b&&(g.columnEditorConfig=function(e){const{rowRenderer:r,customRenderer:o}=e,d=t(e,["rowRenderer","customRenderer"]);return Object.assign(Object.assign(Object.assign({},d),r?{rowRenderer:n(r)}:{}),o?{customRenderer:n(o)}:{})}(b)),void 0!==R&&(g.icons=function(e){const r={};for(const[t,n]of Object.entries(e))null!=n&&(r[t]="string"==typeof n||n instanceof HTMLElement||n instanceof SVGElement?n:d(n));return r}(R)),void 0!==y&&(g.rowButtons=y.map(e=>n(e))),g}function a(r){const t={};for(const n in r)t[e.camelize(n)]=""===r[n]||r[n];return t}"function"==typeof SuppressedError&&SuppressedError;const c=e.defineComponent({name:"SimpleTable",props:{},inheritAttrs:!1,setup(t,{attrs:n,expose:o}){const d=e.ref(null);let i=null;return e.onMounted(()=>{d.value&&(i=new r.SimpleTableVanilla(d.value,l(a(n))),i.mount())}),e.onUpdated(()=>{null==i||i.update(l(a(n)))}),e.onUnmounted(()=>{null==i||i.destroy(),i=null}),o({getAPI:()=>{var e;return null!==(e=null==i?void 0:i.getAPI())&&void 0!==e?e:null}}),()=>e.h("div",{ref:d})}});Object.defineProperty(exports,"asRows",{enumerable:!0,get:function(){return r.asRows}}),exports.SimpleTable=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("simple-table-core");function r(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function n(t,r){return n=>{const o=document.createElement("div");return e.render(e.h(r,n),o),t.register(o,()=>e.render(null,o)),o}}function o(t,r){const n=document.createElement("div");return e.render(r,n),t.register(n,()=>e.render(null,n)),n}function s(t){const r=document.createElement("div");e.render(t,r);const n=r.innerHTML;return e.render(null,r),n}function i(e){return"object"==typeof e||"function"==typeof e}function d(e,t){const{cellRenderer:o,headerRenderer:s,children:i,nestedTable:c}=e,u=r(e,["cellRenderer","headerRenderer","children","nestedTable"]),a=Object.assign({},u);if(o&&(a.cellRenderer="object"==typeof o?n(t,o):o),s&&(a.headerRenderer="object"==typeof s?n(t,s):s),i&&(a.children=i.map(e=>d(e,t))),c){const e=Object.assign(Object.assign({},c),{rows:[]});a.nestedTable=l(e,t)}return a}function l(e,t){const{defaultHeaders:l,rows:c,footerRenderer:u,emptyStateRenderer:a,errorStateRenderer:f,loadingStateRenderer:p,tableEmptyStateRenderer:m,headerDropdown:b,columnEditorConfig:R,icons:g,rowButtons:y}=e,h=r(e,["defaultHeaders","rows","footerRenderer","emptyStateRenderer","errorStateRenderer","loadingStateRenderer","tableEmptyStateRenderer","headerDropdown","columnEditorConfig","icons","rowButtons"]),v=Object.assign(Object.assign({},h),{rows:c,defaultHeaders:l.map(e=>d(e,t)),onRendererHostDiscard:t.disposeHost});if(void 0!==u&&(v.footerRenderer="object"==typeof u?n(t,u):u),void 0!==a)if(i(a))v.emptyStateRenderer=n(t,a);else{const e=a;v.emptyStateRenderer=()=>o(t,e)}if(void 0!==f)if(i(f))v.errorStateRenderer=n(t,f);else{const e=f;v.errorStateRenderer=()=>o(t,e)}if(void 0!==p)if(i(p))v.loadingStateRenderer=n(t,p);else{const e=p;v.loadingStateRenderer=()=>o(t,e)}return void 0!==m&&(v.tableEmptyStateRenderer=null===m?null:m instanceof HTMLElement||"string"==typeof m?m:o(t,m)),void 0!==b&&(v.headerDropdown=n(t,b)),void 0!==R&&(v.columnEditorConfig=function(e,t){const{rowRenderer:o,customRenderer:s}=e,i=r(e,["rowRenderer","customRenderer"]);return Object.assign(Object.assign(Object.assign({},i),o?{rowRenderer:n(t,o)}:{}),s?{customRenderer:n(t,s)}:{})}(R,t)),void 0!==g&&(v.icons=function(e){const t={};for(const[r,n]of Object.entries(e))null!=n&&(t[r]="string"==typeof n||n instanceof HTMLElement||n instanceof SVGElement?n:s(n));return t}(g)),void 0!==y&&(v.rowButtons=y.map(e=>n(t,e))),v}"function"==typeof SuppressedError&&SuppressedError;const c="data-st-mount-id";class u{constructor(){this.entries=new Map,this.nextId=0,this.disposeHost=e=>{if("function"!=typeof e.getAttribute)return;const t=[],r=e.getAttribute(c);null!==r&&t.push(r),e.querySelectorAll(`[${c}]`).forEach(e=>{const r=e.getAttribute(c);null!==r&&t.push(r)});for(const e of t){const t=this.entries.get(e);t&&(this.entries.delete(e),t())}}}register(e,t){const r="st-mount-"+this.nextId++;e.setAttribute(c,r),this.entries.set(r,t)}clear(){for(const e of this.entries.values())e();this.entries.clear()}get size(){return this.entries.size}}function a(t){const r={};for(const n in t)r[e.camelize(n)]=""===t[n]||t[n];return r}const f=e.defineComponent({name:"SimpleTable",props:{},inheritAttrs:!1,setup(r,{attrs:n,expose:o}){const s=e.ref(null);let i=null;const d=new u;return e.onMounted(()=>{s.value&&(i=new t.SimpleTableVanilla(s.value,l(a(n),d)),i.mount())}),e.onUpdated(()=>{null==i||i.update(l(a(n),d))}),e.onUnmounted(()=>{null==i||i.destroy(),i=null,d.clear()}),o({getAPI:()=>{var e;return null!==(e=null==i?void 0:i.getAPI())&&void 0!==e?e:null}}),()=>e.h("div",{ref:s})}});Object.defineProperty(exports,"asRows",{enumerable:!0,get:function(){return t.asRows}}),exports.SimpleTable=f;
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.es.js CHANGED
@@ -1,2 +1,2 @@
1
- import{render as e,h as r,defineComponent as t,ref as n,onMounted as o,onUpdated as d,onUnmounted as s,camelize as i}from"vue";import{SimpleTableVanilla as l}from"simple-table-core";export{asRows}from"simple-table-core";function c(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}function a(t){return n=>{const o=document.createElement("div");return e(r(t,n),o),o}}function u(r){const t=document.createElement("div");return e(r,t),t}function f(r){const t=document.createElement("div");e(r,t);const n=t.innerHTML;return e(null,t),n}function p(e){return"object"==typeof e||"function"==typeof e}function m(e){const{cellRenderer:r,headerRenderer:t,children:n,nestedTable:o}=e,d=c(e,["cellRenderer","headerRenderer","children","nestedTable"]),s=Object.assign({},d);if(r&&(s.cellRenderer="object"==typeof r?a(r):r),t&&(s.headerRenderer="object"==typeof t?a(t):t),n&&(s.children=n.map(m)),o){const e=Object.assign(Object.assign({},o),{rows:[]});s.nestedTable=R(e)}return s}function R(e){const{defaultHeaders:r,rows:t,footerRenderer:n,emptyStateRenderer:o,errorStateRenderer:d,loadingStateRenderer:s,tableEmptyStateRenderer:i,headerDropdown:l,columnEditorConfig:R,icons:b,rowButtons:y}=e,g=c(e,["defaultHeaders","rows","footerRenderer","emptyStateRenderer","errorStateRenderer","loadingStateRenderer","tableEmptyStateRenderer","headerDropdown","columnEditorConfig","icons","rowButtons"]),v=Object.assign(Object.assign({},g),{rows:t,defaultHeaders:r.map(m)});if(void 0!==n&&(v.footerRenderer="object"==typeof n?a(n):n),void 0!==o)if(p(o))v.emptyStateRenderer=a(o);else{const e=o;v.emptyStateRenderer=()=>u(e)}if(void 0!==d)if(p(d))v.errorStateRenderer=a(d);else{const e=d;v.errorStateRenderer=()=>u(e)}if(void 0!==s)if(p(s))v.loadingStateRenderer=a(s);else{const e=s;v.loadingStateRenderer=()=>u(e)}return void 0!==i&&(v.tableEmptyStateRenderer=null===i?null:i instanceof HTMLElement||"string"==typeof i?i:u(i)),void 0!==l&&(v.headerDropdown=a(l)),void 0!==R&&(v.columnEditorConfig=function(e){const{rowRenderer:r,customRenderer:t}=e,n=c(e,["rowRenderer","customRenderer"]);return Object.assign(Object.assign(Object.assign({},n),r?{rowRenderer:a(r)}:{}),t?{customRenderer:a(t)}:{})}(R)),void 0!==b&&(v.icons=function(e){const r={};for(const[t,n]of Object.entries(e))null!=n&&(r[t]="string"==typeof n||n instanceof HTMLElement||n instanceof SVGElement?n:f(n));return r}(b)),void 0!==y&&(v.rowButtons=y.map(e=>a(e))),v}function b(e){const r={};for(const t in e)r[i(t)]=""===e[t]||e[t];return r}"function"==typeof SuppressedError&&SuppressedError;const y=t({name:"SimpleTable",props:{},inheritAttrs:!1,setup(e,{attrs:t,expose:i}){const c=n(null);let a=null;return o(()=>{c.value&&(a=new l(c.value,R(b(t))),a.mount())}),d(()=>{null==a||a.update(R(b(t)))}),s(()=>{null==a||a.destroy(),a=null}),i({getAPI:()=>{var e;return null!==(e=null==a?void 0:a.getAPI())&&void 0!==e?e:null}}),()=>r("div",{ref:c})}});export{y as SimpleTable};
1
+ import{render as e,h as t,defineComponent as r,ref as n,onMounted as o,onUpdated as s,onUnmounted as i,camelize as l}from"vue";import{SimpleTableVanilla as c}from"simple-table-core";export{asRows}from"simple-table-core";function d(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function a(r,n){return o=>{const s=document.createElement("div");return e(t(n,o),s),r.register(s,()=>e(null,s)),s}}function u(t,r){const n=document.createElement("div");return e(r,n),t.register(n,()=>e(null,n)),n}function f(t){const r=document.createElement("div");e(t,r);const n=r.innerHTML;return e(null,r),n}function p(e){return"object"==typeof e||"function"==typeof e}function m(e,t){const{cellRenderer:r,headerRenderer:n,children:o,nestedTable:s}=e,i=d(e,["cellRenderer","headerRenderer","children","nestedTable"]),l=Object.assign({},i);if(r&&(l.cellRenderer="object"==typeof r?a(t,r):r),n&&(l.headerRenderer="object"==typeof n?a(t,n):n),o&&(l.children=o.map(e=>m(e,t))),s){const e=Object.assign(Object.assign({},s),{rows:[]});l.nestedTable=b(e,t)}return l}function b(e,t){const{defaultHeaders:r,rows:n,footerRenderer:o,emptyStateRenderer:s,errorStateRenderer:i,loadingStateRenderer:l,tableEmptyStateRenderer:c,headerDropdown:b,columnEditorConfig:R,icons:g,rowButtons:y}=e,h=d(e,["defaultHeaders","rows","footerRenderer","emptyStateRenderer","errorStateRenderer","loadingStateRenderer","tableEmptyStateRenderer","headerDropdown","columnEditorConfig","icons","rowButtons"]),v=Object.assign(Object.assign({},h),{rows:n,defaultHeaders:r.map(e=>m(e,t)),onRendererHostDiscard:t.disposeHost});if(void 0!==o&&(v.footerRenderer="object"==typeof o?a(t,o):o),void 0!==s)if(p(s))v.emptyStateRenderer=a(t,s);else{const e=s;v.emptyStateRenderer=()=>u(t,e)}if(void 0!==i)if(p(i))v.errorStateRenderer=a(t,i);else{const e=i;v.errorStateRenderer=()=>u(t,e)}if(void 0!==l)if(p(l))v.loadingStateRenderer=a(t,l);else{const e=l;v.loadingStateRenderer=()=>u(t,e)}return void 0!==c&&(v.tableEmptyStateRenderer=null===c?null:c instanceof HTMLElement||"string"==typeof c?c:u(t,c)),void 0!==b&&(v.headerDropdown=a(t,b)),void 0!==R&&(v.columnEditorConfig=function(e,t){const{rowRenderer:r,customRenderer:n}=e,o=d(e,["rowRenderer","customRenderer"]);return Object.assign(Object.assign(Object.assign({},o),r?{rowRenderer:a(t,r)}:{}),n?{customRenderer:a(t,n)}:{})}(R,t)),void 0!==g&&(v.icons=function(e){const t={};for(const[r,n]of Object.entries(e))null!=n&&(t[r]="string"==typeof n||n instanceof HTMLElement||n instanceof SVGElement?n:f(n));return t}(g)),void 0!==y&&(v.rowButtons=y.map(e=>a(t,e))),v}"function"==typeof SuppressedError&&SuppressedError;const R="data-st-mount-id";class g{constructor(){this.entries=new Map,this.nextId=0,this.disposeHost=e=>{if("function"!=typeof e.getAttribute)return;const t=[],r=e.getAttribute(R);null!==r&&t.push(r),e.querySelectorAll(`[${R}]`).forEach(e=>{const r=e.getAttribute(R);null!==r&&t.push(r)});for(const e of t){const t=this.entries.get(e);t&&(this.entries.delete(e),t())}}}register(e,t){const r="st-mount-"+this.nextId++;e.setAttribute(R,r),this.entries.set(r,t)}clear(){for(const e of this.entries.values())e();this.entries.clear()}get size(){return this.entries.size}}function y(e){const t={};for(const r in e)t[l(r)]=""===e[r]||e[r];return t}const h=r({name:"SimpleTable",props:{},inheritAttrs:!1,setup(e,{attrs:r,expose:l}){const d=n(null);let a=null;const u=new g;return o(()=>{d.value&&(a=new c(d.value,b(y(r),u)),a.mount())}),s(()=>{null==a||a.update(b(y(r),u))}),i(()=>{null==a||a.destroy(),a=null,u.clear()}),l({getAPI:()=>{var e;return null!==(e=null==a?void 0:a.getAPI())&&void 0!==e?e:null}}),()=>t("div",{ref:d})}});export{h as SimpleTable};
2
2
  //# sourceMappingURL=index.es.js.map
@@ -19,3 +19,5 @@ export declare const AUTO_SIZE_OUTLIER_PERCENTILE = 95;
19
19
  export declare const AUTO_SIZE_OUTLIER_THRESHOLD = 0.5;
20
20
  export declare const AUTO_SIZE_MIN_SAMPLE_FOR_CLIP = 20;
21
21
  export declare const AUTO_SIZE_WIDTH_BUFFER = 2;
22
+ /** Extra padding reserved around header icons (sort / collapse) during auto-size. */
23
+ export declare const AUTO_SIZE_HEADER_ICON_PADDING = 4;
@@ -2,6 +2,8 @@ import { AbsoluteBodyCell, CellRegistryEntry, CellRenderContext } from "./types"
2
2
  import { CellLiveRef, cellLiveRefMap } from "./cellLiveRef";
3
3
  export { cellLiveRefMap };
4
4
  export type { CellLiveRef };
5
+ /** Drop the content memo so the next `updateBodyCellElement` rebuilds. */
6
+ export declare const invalidateBodyCellContentMemo: (cellElement: HTMLElement) => void;
5
7
  export declare const untrackCellByRow: (rowId: string, cellElement: HTMLElement) => void;
6
8
  export declare const unregisterCellFromRegistry: (cellElement: HTMLElement, cellRegistry?: Map<string, CellRegistryEntry>) => void;
7
9
  export declare const createBodyCellElement: (cell: AbsoluteBodyCell, context: CellRenderContext) => HTMLElement;
@@ -25,4 +25,4 @@ export declare const addTrackedEventListener: (element: HTMLElement, event: stri
25
25
  /** Header tooltips are portaled under .simple-table-root; remove them when header DOM is torn down
26
26
  * without pointer leave (e.g. sort/filter invalidates context cache and removes header cells). */
27
27
  export declare const removeFloatingHeaderTooltips: (fromElement: HTMLElement) => void;
28
- export declare const cleanupHeaderCellRendering: (container?: HTMLElement) => void;
28
+ export declare const cleanupHeaderCellRendering: (container?: HTMLElement, onHostDiscard?: ((host: HTMLElement) => void) | undefined) => void;
@@ -96,5 +96,11 @@ export interface HeaderRenderContext {
96
96
  * driving the unfold animation.
97
97
  */
98
98
  animationCoordinator?: AnimationCoordinator;
99
+ /**
100
+ * Called immediately before a header host (or its label content) is permanently
101
+ * discarded so adapters can tear down renderer subtrees (e.g. React portals).
102
+ * Mirrors {@link CellRenderContext.onRendererHostDiscard}.
103
+ */
104
+ onRendererHostDiscard?: (host: HTMLElement) => void;
99
105
  }
100
106
  export {};
@@ -96,4 +96,10 @@ export declare const calculateHeaderContentWidth: (accessor: Accessor, options?:
96
96
  * column), so sorting later does not push the label into ellipsis.
97
97
  */
98
98
  sortIcon?: string | HTMLElement | SVGSVGElement;
99
+ /**
100
+ * The table's resolved expand/collapse icon. Used to reserve space on
101
+ * collapsible headers when the header cell is virtualized out of the
102
+ * horizontal band (so the icon is not in the DOM to measure directly).
103
+ */
104
+ expandIcon?: string | HTMLElement | SVGSVGElement;
99
105
  }) => number;
@@ -9,6 +9,13 @@ export interface HorizontalScrollbarProps {
9
9
  tableBodyContainerRef: HTMLDivElement;
10
10
  editColumns: boolean;
11
11
  sectionScrollController?: SectionScrollController | null;
12
+ /**
13
+ * When true, skip the DOM scrollWidth check and always build the scrollbar.
14
+ * Used after the caller has already verified content overflow (e.g. empty
15
+ * tables where the header scrollport is sized to content and reports no
16
+ * DOM overflow even though columns exceed the viewport).
17
+ */
18
+ forceScrollable?: boolean;
12
19
  }
13
20
  export declare const createHorizontalScrollbar: (props: HorizontalScrollbarProps) => HTMLElement | null;
14
21
  /**
@@ -0,0 +1,18 @@
1
+ export declare class MountRegistry {
2
+ private entries;
3
+ private nextId;
4
+ /**
5
+ * Register a dispose callback for a mount container. Tags the container so
6
+ * {@link disposeHost} can find it when core discards an ancestor host.
7
+ */
8
+ register(container: HTMLElement, dispose: () => void): void;
9
+ /**
10
+ * Tear down mounts owned by a host element core is permanently discarding.
11
+ * Collects `host` itself plus every descendant tagged with {@link MOUNT_ID_ATTR}.
12
+ */
13
+ disposeHost: (host: HTMLElement) => void;
14
+ /** Dispose every tracked mount (used on table teardown). */
15
+ clear(): void;
16
+ /** Test helper — number of live mounts. */
17
+ get size(): number;
18
+ }
@@ -1,3 +1,4 @@
1
1
  import type { SimpleTableConfig } from "simple-table-core";
2
2
  import type { SimpleTableVueProps } from "./types";
3
- export declare function buildVanillaConfig(config: SimpleTableVueProps): SimpleTableConfig;
3
+ import type { MountRegistry } from "./MountRegistry";
4
+ export declare function buildVanillaConfig(config: SimpleTableVueProps, registry: MountRegistry): SimpleTableConfig;
@@ -1,17 +1,20 @@
1
1
  import { type Component, type VNode } from "vue";
2
+ import type { MountRegistry } from "../MountRegistry";
2
3
  /**
3
4
  * Wraps a Vue 3 component into a function that returns an HTMLElement, matching
4
5
  * the vanilla renderer contract expected by simple-table-core.
5
6
  *
6
7
  * Uses Vue 3's low-level render() + h() which is synchronous, so the element
7
8
  * is fully populated before it is returned to the vanilla rendering pipeline.
9
+ * The mount is registered so core's `onRendererHostDiscard` can unmount it
10
+ * (including any `<Teleport>` / floating UI) when the host is discarded.
8
11
  */
9
- export declare function wrapVueRenderer<P extends object>(component: Component): (props: P) => HTMLElement;
12
+ export declare function wrapVueRenderer<P extends object>(registry: MountRegistry, component: Component): (props: P) => HTMLElement;
10
13
  /**
11
14
  * Renders a static VNode into an HTMLElement.
12
15
  * Used for props like tableEmptyStateRenderer that are not called with arguments.
13
16
  */
14
- export declare function wrapVueNode(node: VNode): HTMLElement;
17
+ export declare function wrapVueNode(registry: MountRegistry, node: VNode): HTMLElement;
15
18
  /**
16
19
  * Converts a VNode to an HTML string.
17
20
  * Used for icon props where vanilla expects string | HTMLElement | SVGSVGElement.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-table/vue",
3
- "version": "3.9.1",
3
+ "version": "3.9.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/types/vue/src/index.d.ts",
@@ -28,18 +28,20 @@
28
28
  "vue": ">=3.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "simple-table-core": "3.9.1"
31
+ "simple-table-core": "3.9.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@rollup/plugin-alias": "4.0.0",
35
35
  "@rollup/plugin-node-resolve": "^15.3.0",
36
36
  "@vue/runtime-core": "^3.0.0",
37
+ "jsdom": "^24.1.3",
37
38
  "rollup": "^2.79.2",
38
39
  "rollup-plugin-delete": "^2.1.0",
39
40
  "rollup-plugin-peer-deps-external": "^2.2.4",
40
41
  "rollup-plugin-terser": "^7.0.2",
41
42
  "rollup-plugin-typescript2": "^0.37.0",
42
43
  "typescript": "^4.9.5",
44
+ "vitest": "^2.1.9",
43
45
  "vue": "^3.0.0"
44
46
  },
45
47
  "description": "Vue 3 adapter for simple-table-core — use the Simple Table data grid with full Vue component support for renderers.",
@@ -95,6 +97,7 @@
95
97
  "scripts": {
96
98
  "build": "rollup -c",
97
99
  "preview": "rollup -c -w",
100
+ "test": "vitest run",
98
101
  "version:patch": "npm version patch && git push && git push --tags",
99
102
  "version:minor": "npm version minor && git push && git push --tags",
100
103
  "version:major": "npm version major && git push && git push --tags"