@toolbox-web/grid-vue 0.7.1 → 0.9.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.
Files changed (106) hide show
  1. package/features/clipboard.d.ts +0 -19
  2. package/features/clipboard.d.ts.map +1 -1
  3. package/features/clipboard.js +1 -3
  4. package/features/clipboard.js.map +1 -1
  5. package/features/column-virtualization.d.ts +0 -19
  6. package/features/column-virtualization.d.ts.map +1 -1
  7. package/features/column-virtualization.js +1 -3
  8. package/features/column-virtualization.js.map +1 -1
  9. package/features/context-menu.d.ts +0 -19
  10. package/features/context-menu.d.ts.map +1 -1
  11. package/features/context-menu.js +1 -3
  12. package/features/context-menu.js.map +1 -1
  13. package/features/editing.d.ts +0 -19
  14. package/features/editing.d.ts.map +1 -1
  15. package/features/editing.js +1 -3
  16. package/features/editing.js.map +1 -1
  17. package/features/export.d.ts.map +1 -1
  18. package/features/export.js +18 -20
  19. package/features/export.js.map +1 -1
  20. package/features/filtering.js +4 -4
  21. package/features/grouping-columns.d.ts +9 -0
  22. package/features/grouping-columns.d.ts.map +1 -1
  23. package/features/grouping-columns.js +22 -3
  24. package/features/grouping-columns.js.map +1 -1
  25. package/features/grouping-rows.d.ts +9 -0
  26. package/features/grouping-rows.d.ts.map +1 -1
  27. package/features/grouping-rows.js +21 -2
  28. package/features/grouping-rows.js.map +1 -1
  29. package/features/index.js +17 -18
  30. package/features/index.js.map +1 -1
  31. package/features/master-detail.d.ts +0 -22
  32. package/features/master-detail.d.ts.map +1 -1
  33. package/features/master-detail.js +1 -3
  34. package/features/master-detail.js.map +1 -1
  35. package/features/multi-sort.d.ts +0 -19
  36. package/features/multi-sort.d.ts.map +1 -1
  37. package/features/multi-sort.js +1 -4
  38. package/features/multi-sort.js.map +1 -1
  39. package/features/pinned-columns.d.ts +0 -22
  40. package/features/pinned-columns.d.ts.map +1 -1
  41. package/features/pinned-columns.js +1 -3
  42. package/features/pinned-columns.js.map +1 -1
  43. package/features/pinned-rows.d.ts +0 -21
  44. package/features/pinned-rows.d.ts.map +1 -1
  45. package/features/pinned-rows.js +26 -3
  46. package/features/pinned-rows.js.map +1 -1
  47. package/features/pivot.d.ts +0 -23
  48. package/features/pivot.d.ts.map +1 -1
  49. package/features/pivot.js +1 -3
  50. package/features/pivot.js.map +1 -1
  51. package/features/print.d.ts.map +1 -1
  52. package/features/print.js +9 -11
  53. package/features/print.js.map +1 -1
  54. package/features/reorder-columns.d.ts +1 -0
  55. package/features/reorder-columns.d.ts.map +1 -0
  56. package/features/reorder-columns.js +2 -0
  57. package/features/reorder-columns.js.map +1 -0
  58. package/features/reorder-rows.d.ts +1 -0
  59. package/features/reorder-rows.d.ts.map +1 -0
  60. package/features/reorder-rows.js +2 -0
  61. package/features/reorder-rows.js.map +1 -0
  62. package/features/reorder.d.ts +3 -17
  63. package/features/reorder.d.ts.map +1 -1
  64. package/features/reorder.js +1 -3
  65. package/features/reorder.js.map +1 -1
  66. package/features/responsive.d.ts +0 -23
  67. package/features/responsive.d.ts.map +1 -1
  68. package/features/responsive.js +1 -3
  69. package/features/responsive.js.map +1 -1
  70. package/features/row-reorder.d.ts +3 -17
  71. package/features/row-reorder.d.ts.map +1 -1
  72. package/features/row-reorder.js +1 -3
  73. package/features/row-reorder.js.map +1 -1
  74. package/features/selection.d.ts.map +1 -1
  75. package/features/selection.js +20 -22
  76. package/features/selection.js.map +1 -1
  77. package/features/server-side.d.ts +0 -21
  78. package/features/server-side.d.ts.map +1 -1
  79. package/features/server-side.js +1 -3
  80. package/features/server-side.js.map +1 -1
  81. package/features/tree.d.ts +0 -22
  82. package/features/tree.d.ts.map +1 -1
  83. package/features/tree.js +1 -3
  84. package/features/tree.js.map +1 -1
  85. package/features/undo-redo.d.ts.map +1 -1
  86. package/features/undo-redo.js +10 -12
  87. package/features/undo-redo.js.map +1 -1
  88. package/features/visibility.d.ts +0 -19
  89. package/features/visibility.d.ts.map +1 -1
  90. package/features/visibility.js +1 -3
  91. package/features/visibility.js.map +1 -1
  92. package/index.js +545 -395
  93. package/index.js.map +1 -1
  94. package/lib/TbwGrid.vue.d.ts +5 -1
  95. package/lib/TbwGrid.vue.d.ts.map +1 -1
  96. package/lib/feature-props.d.ts +12 -4
  97. package/lib/feature-props.d.ts.map +1 -1
  98. package/lib/feature-registry.d.ts +6 -51
  99. package/lib/feature-registry.d.ts.map +1 -1
  100. package/lib/vue-column-config.d.ts +20 -3
  101. package/lib/vue-column-config.d.ts.map +1 -1
  102. package/lib/vue-grid-adapter.d.ts +34 -0
  103. package/lib/vue-grid-adapter.d.ts.map +1 -1
  104. package/package.json +1 -1
  105. package/chunks/feature-registry-BgEOysSJ.js +0 -38
  106. package/chunks/feature-registry-BgEOysSJ.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Feature Registry for @toolbox-web/grid-vue
3
3
  *
4
- * This module provides a synchronous registry for plugin factories.
5
- * Features are registered via side-effect imports, enabling tree-shaking
6
- * while maintaining the clean prop-based API.
4
+ * Delegates to the core registry at `@toolbox-web/grid/features/registry`.
5
+ * This module re-exports core functions so existing feature modules continue
6
+ * to work without changing their import paths.
7
7
  *
8
8
  * @example
9
9
  * ```typescript
@@ -15,55 +15,10 @@
15
15
  * <TbwGrid :selection="'range'" :filtering="{ debounceMs: 200 }" />
16
16
  * ```
17
17
  */
18
+ export { clearFeatureRegistry, createPluginFromFeature, getFeatureFactory, getRegisteredFeatures, isFeatureRegistered, registerFeature } from '@toolbox-web/grid/features/registry';
19
+ export type { PluginFactory } from '@toolbox-web/grid/features/registry';
18
20
  /**
19
21
  * Feature names supported by the TbwGrid component.
20
22
  */
21
- export type FeatureName = 'selection' | 'editing' | 'clipboard' | 'contextMenu' | 'multiSort' | 'sorting' | 'filtering' | 'reorder' | 'visibility' | 'pinnedColumns' | 'groupingColumns' | 'columnVirtualization' | 'rowReorder' | 'groupingRows' | 'pinnedRows' | 'tree' | 'masterDetail' | 'responsive' | 'undoRedo' | 'export' | 'print' | 'pivot' | 'serverSide';
22
- /**
23
- * Plugin factory function type.
24
- * Takes configuration and returns a plugin instance.
25
- */
26
- export type PluginFactory<TConfig = unknown> = (config: TConfig) => unknown;
27
- /**
28
- * Register a feature's plugin factory.
29
- * Called by side-effect feature imports.
30
- *
31
- * @param name - The feature name (matches the prop name on TbwGrid)
32
- * @param factory - Function that creates the plugin instance
33
- *
34
- * @example
35
- * ```ts
36
- * // features/selection.ts
37
- * import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';
38
- * import { registerFeature } from '../lib/feature-registry';
39
- *
40
- * registerFeature('selection', (config) => new SelectionPlugin(config));
41
- * ```
42
- */
43
- export declare function registerFeature<TConfig = unknown>(name: FeatureName, factory: PluginFactory<TConfig>): void;
44
- /**
45
- * Check if a feature is registered.
46
- */
47
- export declare function isFeatureRegistered(name: FeatureName): boolean;
48
- /**
49
- * Get all registered feature names.
50
- */
51
- export declare function getRegisteredFeatures(): FeatureName[];
52
- /**
53
- * Get the factory for a feature, if registered.
54
- */
55
- export declare function getFeatureFactory(name: FeatureName): PluginFactory | undefined;
56
- /**
57
- * Create a plugin from a feature prop.
58
- * Returns undefined if the feature is not registered (with a console warning).
59
- *
60
- * @param name - Feature name
61
- * @param config - Configuration value from the prop
62
- */
63
- export declare function createPluginFromFeature(name: FeatureName, config: unknown): unknown | undefined;
64
- /**
65
- * Clear the feature registry.
66
- * @internal - for testing only
67
- */
68
- export declare function clearFeatureRegistry(): void;
23
+ export type FeatureName = 'selection' | 'editing' | 'clipboard' | 'contextMenu' | 'multiSort' | 'sorting' | 'filtering' | 'reorderColumns' | 'reorder' | 'visibility' | 'pinnedColumns' | 'groupingColumns' | 'columnVirtualization' | 'reorderRows' | 'rowReorder' | 'groupingRows' | 'pinnedRows' | 'tree' | 'masterDetail' | 'responsive' | 'undoRedo' | 'export' | 'print' | 'pivot' | 'serverSide';
69
24
  //# sourceMappingURL=feature-registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/feature-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,SAAS,GACT,WAAW,GACX,aAAa,GACb,WAAW,GACX,SAAS,GACT,WAAW,GACX,SAAS,GACT,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,sBAAsB,GACtB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,MAAM,GACN,cAAc,GACd,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,OAAO,GACP,OAAO,GACP,YAAY,CAAC;AAEjB;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,OAAO,GAAG,OAAO,IAAI,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;AAuB5E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,CAK3G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAE9D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAErD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS,CAE9E;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAgB/F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C"}
1
+ {"version":3,"file":"feature-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/feature-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,oBAAoB,EAAE,uBAAuB,EAAE,iBAAiB,EAChE,qBAAqB,EAAE,mBAAmB,EAAE,eAAe,EAC5D,MAAM,qCAAqC,CAAC;AAE7C,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,SAAS,GACT,WAAW,GACX,aAAa,GACb,WAAW,GACX,SAAS,GACT,WAAW,GACX,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,sBAAsB,GACtB,aAAa,GACb,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,MAAM,GACN,cAAc,GACd,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,OAAO,GACP,OAAO,GACP,YAAY,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ColumnConfig as BaseColumnConfig, GridConfig as BaseGridConfig, CellRenderContext, ColumnEditorContext } from '@toolbox-web/grid';
1
+ import { ColumnConfig as BaseColumnConfig, GridConfig as BaseGridConfig, CellRenderContext, ColumnEditorContext, HeaderCellContext, HeaderLabelContext, LoadingContext } from '@toolbox-web/grid';
2
2
  import { Component, VNode } from 'vue';
3
3
  /**
4
4
  * Vue render function or component for cell rendering.
@@ -77,7 +77,7 @@ export type VueCellEditor<TRow = unknown, TValue = unknown> = CellEditor<TRow, T
77
77
  * ];
78
78
  * ```
79
79
  */
80
- export interface ColumnConfig<TRow = unknown, TValue = unknown> extends Omit<BaseColumnConfig<TRow>, 'renderer' | 'editor'> {
80
+ export interface ColumnConfig<TRow = unknown, TValue = unknown> extends Omit<BaseColumnConfig<TRow>, 'renderer' | 'editor' | 'headerRenderer' | 'headerLabelRenderer'> {
81
81
  /**
82
82
  * Vue component or render function for custom cell rendering.
83
83
  * Receives CellRenderContext with value, row, column, and indexes.
@@ -88,6 +88,16 @@ export interface ColumnConfig<TRow = unknown, TValue = unknown> extends Omit<Bas
88
88
  * Receives ColumnEditorContext with value, row, commit, and cancel functions.
89
89
  */
90
90
  editor?: CellEditor<TRow, TValue>;
91
+ /**
92
+ * Vue component or render function for custom header cell rendering.
93
+ * Receives HeaderCellContext with column, value, sortState, filterActive, and helper functions.
94
+ */
95
+ headerRenderer?: ((ctx: HeaderCellContext<TRow>) => VNode) | Component;
96
+ /**
97
+ * Vue component or render function for custom header label rendering.
98
+ * Receives HeaderLabelContext with column and value.
99
+ */
100
+ headerLabelRenderer?: ((ctx: HeaderLabelContext<TRow>) => VNode) | Component;
91
101
  }
92
102
  /**
93
103
  * @deprecated Use `ColumnConfig` instead.
@@ -117,11 +127,18 @@ export type VueColumnConfig<TRow = unknown, TValue = unknown> = ColumnConfig<TRo
117
127
  * };
118
128
  * ```
119
129
  */
120
- export interface GridConfig<TRow = unknown> extends Omit<BaseGridConfig<TRow>, 'columns'> {
130
+ export interface GridConfig<TRow = unknown> extends Omit<BaseGridConfig<TRow>, 'columns' | 'loadingRenderer'> {
121
131
  /**
122
132
  * Column definitions with Vue renderer/editor support.
123
133
  */
124
134
  columns?: ColumnConfig<TRow>[];
135
+ /**
136
+ * Custom loading renderer - can be:
137
+ * - A vanilla function `(ctx: LoadingContext) => HTMLElement | string`
138
+ * - A Vue component with a `size` prop
139
+ * - A Vue render function `(ctx: LoadingContext) => VNode`
140
+ */
141
+ loadingRenderer?: BaseGridConfig<TRow>['loadingRenderer'] | ((ctx: LoadingContext) => VNode) | Component;
125
142
  }
126
143
  /**
127
144
  * @deprecated Use `GridConfig` instead.
@@ -1 +1 @@
1
- {"version":3,"file":"vue-column-config.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/vue-column-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,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M,aAAa,CAAC,IAAI,GAAG,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC"}
@@ -145,6 +145,40 @@ export declare class GridAdapter implements FrameworkAdapter {
145
145
  * @internal
146
146
  */
147
147
  private createConfigVNodeEditor;
148
+ /**
149
+ * Creates a DOM-returning header renderer from a Vue component class.
150
+ * Used for config-based headerRenderer (not slot-based).
151
+ * @internal
152
+ */
153
+ private createConfigComponentHeaderRenderer;
154
+ /**
155
+ * Creates a DOM-returning header renderer from a VNode-returning render function.
156
+ * Used for config-based headerRenderer (not slot-based).
157
+ * @internal
158
+ */
159
+ private createConfigVNodeHeaderRenderer;
160
+ /**
161
+ * Creates a DOM-returning header label renderer from a Vue component class.
162
+ * Used for config-based headerLabelRenderer (not slot-based).
163
+ * @internal
164
+ */
165
+ private createConfigComponentHeaderLabelRenderer;
166
+ /**
167
+ * Creates a DOM-returning header label renderer from a VNode-returning render function.
168
+ * Used for config-based headerLabelRenderer (not slot-based).
169
+ * @internal
170
+ */
171
+ private createConfigVNodeHeaderLabelRenderer;
172
+ /**
173
+ * Creates a DOM-returning loading renderer from a Vue component class.
174
+ * @internal
175
+ */
176
+ private createComponentLoadingRenderer;
177
+ /**
178
+ * Creates a DOM-returning loading renderer from a VNode-returning render function.
179
+ * @internal
180
+ */
181
+ private createVNodeLoadingRenderer;
148
182
  /**
149
183
  * Sets the type defaults map for this adapter.
150
184
  * Called by TbwGrid when it receives type defaults from context.
@@ -1 +1 @@
1
- {"version":3,"file":"vue-grid-adapter.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/vue-grid-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,WAAW,IAAI,eAAe,EAC9B,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAoC,KAAK,S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G;IACH,kBAAkB,CAAC,IAAI,GAAG,OAAO,EAC/B,aAAa,EAAE,OAAO,GACrB,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,GAAG,SAAS;IAiC7D;;;OAGG;IACH,0BAA0B,CAAC,IAAI,GAAG,OAAO,EACvC,WAAW,EAAE,OAAO,GACnB,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,GAAG,SAAS;IAmC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,cAAc,CAAC,IAAI,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,SAAS;IAgC/E;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAoB1B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;;;;;OAMG;IACH,OAAO,CAAC,yBAAyB;IAqBjC;;OAEG;IACH,OAAO,IAAI,IAAI;IAqBf;;;;OAIG;IACH,OAAO,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;IAerC;;;OAGG;IACH,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;CAcvC;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,oBAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolbox-web/grid-vue",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "description": "Vue 3 adapter for @toolbox-web/grid data grid component",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -1,38 +0,0 @@
1
- const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
2
- function n(e, t) {
3
- r.set(e, {
4
- factory: t,
5
- name: e
6
- });
7
- }
8
- function o(e) {
9
- return r.has(e);
10
- }
11
- function u() {
12
- return Array.from(r.keys());
13
- }
14
- function i(e) {
15
- return r.get(e)?.factory;
16
- }
17
- function c(e, t) {
18
- const s = r.get(e);
19
- if (!s) {
20
- a.has(e) || (a.add(e), console.warn(
21
- `[TbwGrid] Feature "${e}" is not registered. Import '@toolbox-web/grid-vue/features/${e}' to enable it.`
22
- ));
23
- return;
24
- }
25
- return s.factory(t);
26
- }
27
- function f() {
28
- r.clear(), a.clear();
29
- }
30
- export {
31
- f as a,
32
- u as b,
33
- c,
34
- i as g,
35
- o as i,
36
- n as r
37
- };
38
- //# sourceMappingURL=feature-registry-BgEOysSJ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature-registry-BgEOysSJ.js","sources":["../../../../libs/grid-vue/src/lib/feature-registry.ts"],"sourcesContent":["/**\n * Feature Registry for @toolbox-web/grid-vue\n *\n * This module provides a synchronous registry for plugin factories.\n * Features are registered via side-effect imports, enabling tree-shaking\n * while maintaining the clean prop-based API.\n *\n * @example\n * ```typescript\n * // Import features you need (side-effect imports)\n * import '@toolbox-web/grid-vue/features/selection';\n * import '@toolbox-web/grid-vue/features/filtering';\n *\n * // Props work automatically - no async loading, no HTTP requests\n * <TbwGrid :selection=\"'range'\" :filtering=\"{ debounceMs: 200 }\" />\n * ```\n */\n\n/**\n * Feature names supported by the TbwGrid component.\n */\nexport type FeatureName =\n | 'selection'\n | 'editing'\n | 'clipboard'\n | 'contextMenu'\n | 'multiSort'\n | 'sorting' // @deprecated - use 'multiSort' instead\n | 'filtering'\n | 'reorder'\n | 'visibility'\n | 'pinnedColumns'\n | 'groupingColumns'\n | 'columnVirtualization'\n | 'rowReorder'\n | 'groupingRows'\n | 'pinnedRows'\n | 'tree'\n | 'masterDetail'\n | 'responsive'\n | 'undoRedo'\n | 'export'\n | 'print'\n | 'pivot'\n | 'serverSide';\n\n/**\n * Plugin factory function type.\n * Takes configuration and returns a plugin instance.\n */\nexport type PluginFactory<TConfig = unknown> = (config: TConfig) => unknown;\n\n/**\n * Registry entry containing the factory and metadata.\n */\ninterface RegistryEntry {\n factory: PluginFactory;\n /** Feature name for debugging */\n name: string;\n}\n\n/**\n * Central registry mapping feature names to their plugin factories.\n * Populated by side-effect feature imports.\n */\nconst featureRegistry = new Map<FeatureName, RegistryEntry>();\n\n/**\n * Set of features that have been used without being registered.\n * Used to show helpful warnings only once per feature.\n */\nconst warnedFeatures = new Set<string>();\n\n/**\n * Register a feature's plugin factory.\n * Called by side-effect feature imports.\n *\n * @param name - The feature name (matches the prop name on TbwGrid)\n * @param factory - Function that creates the plugin instance\n *\n * @example\n * ```ts\n * // features/selection.ts\n * import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';\n * import { registerFeature } from '../lib/feature-registry';\n *\n * registerFeature('selection', (config) => new SelectionPlugin(config));\n * ```\n */\nexport function registerFeature<TConfig = unknown>(name: FeatureName, factory: PluginFactory<TConfig>): void {\n featureRegistry.set(name, {\n factory: factory as PluginFactory,\n name,\n });\n}\n\n/**\n * Check if a feature is registered.\n */\nexport function isFeatureRegistered(name: FeatureName): boolean {\n return featureRegistry.has(name);\n}\n\n/**\n * Get all registered feature names.\n */\nexport function getRegisteredFeatures(): FeatureName[] {\n return Array.from(featureRegistry.keys());\n}\n\n/**\n * Get the factory for a feature, if registered.\n */\nexport function getFeatureFactory(name: FeatureName): PluginFactory | undefined {\n return featureRegistry.get(name)?.factory;\n}\n\n/**\n * Create a plugin from a feature prop.\n * Returns undefined if the feature is not registered (with a console warning).\n *\n * @param name - Feature name\n * @param config - Configuration value from the prop\n */\nexport function createPluginFromFeature(name: FeatureName, config: unknown): unknown | undefined {\n const entry = featureRegistry.get(name);\n\n if (!entry) {\n // Only warn once per feature\n if (!warnedFeatures.has(name)) {\n warnedFeatures.add(name);\n console.warn(\n `[TbwGrid] Feature \"${name}\" is not registered. ` +\n `Import '@toolbox-web/grid-vue/features/${name}' to enable it.`,\n );\n }\n return undefined;\n }\n\n return entry.factory(config);\n}\n\n/**\n * Clear the feature registry.\n * @internal - for testing only\n */\nexport function clearFeatureRegistry(): void {\n featureRegistry.clear();\n warnedFeatures.clear();\n}\n"],"names":["featureRegistry","warnedFeatures","registerFeature","name","factory","isFeatureRegistered","getRegisteredFeatures","getFeatureFactory","createPluginFromFeature","config","entry","clearFeatureRegistry"],"mappings":"AAiEA,MAAMA,wBAAsB,IAAA,GAMtBC,wBAAqB,IAAA;AAkBpB,SAASC,EAAmCC,GAAmBC,GAAuC;AAC3G,EAAAJ,EAAgB,IAAIG,GAAM;AAAA,IACxB,SAAAC;AAAA,IACA,MAAAD;AAAA,EAAA,CACD;AACH;AAKO,SAASE,EAAoBF,GAA4B;AAC9D,SAAOH,EAAgB,IAAIG,CAAI;AACjC;AAKO,SAASG,IAAuC;AACrD,SAAO,MAAM,KAAKN,EAAgB,KAAA,CAAM;AAC1C;AAKO,SAASO,EAAkBJ,GAA8C;AAC9E,SAAOH,EAAgB,IAAIG,CAAI,GAAG;AACpC;AASO,SAASK,EAAwBL,GAAmBM,GAAsC;AAC/F,QAAMC,IAAQV,EAAgB,IAAIG,CAAI;AAEtC,MAAI,CAACO,GAAO;AAEV,IAAKT,EAAe,IAAIE,CAAI,MAC1BF,EAAe,IAAIE,CAAI,GACvB,QAAQ;AAAA,MACN,sBAAsBA,CAAI,+DACkBA,CAAI;AAAA,IAAA;AAGpD;AAAA,EACF;AAEA,SAAOO,EAAM,QAAQD,CAAM;AAC7B;AAMO,SAASE,IAA6B;AAC3C,EAAAX,EAAgB,MAAA,GAChBC,EAAe,MAAA;AACjB;"}