@rozie-ui/data-table-lit 0.2.5 → 0.2.7

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/index.d.cts CHANGED
@@ -8,7 +8,7 @@ declare class DataTable extends DataTable_base {
8
8
  /**
9
9
  * The row data — `model: true`, so a committed cell/row edit writes a **fresh** array back through `r-model:data` (uncontrolled fallback `dataDefault`). A stable reference per Rozie's setup-once model — fed directly into table-core (never map/cloned in the watcher).
10
10
  * @example
11
- * <DataTable r-model:data="rows" :columns="cols" />
11
+ * <rozie-data-table .data=${rows} @data-change=${…} .columns=${cols}></rozie-data-table>
12
12
  */
13
13
  _data_attr: any[];
14
14
  private _dataControllable;
@@ -674,7 +674,7 @@ declare class Column extends Column_base {
674
674
  /**
675
675
  * The row field this column reads (table-core `accessorKey`). The plain accessor value renders when the `#cell` slot falls through.
676
676
  * @example
677
- * <Column field="email" header="Email" />
677
+ * <rozie-column field="email" header="Email"></rozie-column>
678
678
  */
679
679
  field: string;
680
680
  /**
package/dist/index.d.mts CHANGED
@@ -8,7 +8,7 @@ declare class DataTable extends DataTable_base {
8
8
  /**
9
9
  * The row data — `model: true`, so a committed cell/row edit writes a **fresh** array back through `r-model:data` (uncontrolled fallback `dataDefault`). A stable reference per Rozie's setup-once model — fed directly into table-core (never map/cloned in the watcher).
10
10
  * @example
11
- * <DataTable r-model:data="rows" :columns="cols" />
11
+ * <rozie-data-table .data=${rows} @data-change=${…} .columns=${cols}></rozie-data-table>
12
12
  */
13
13
  _data_attr: any[];
14
14
  private _dataControllable;
@@ -674,7 +674,7 @@ declare class Column extends Column_base {
674
674
  /**
675
675
  * The row field this column reads (table-core `accessorKey`). The plain accessor value renders when the `#cell` slot falls through.
676
676
  * @example
677
- * <Column field="email" header="Email" />
677
+ * <rozie-column field="email" header="Email"></rozie-column>
678
678
  */
679
679
  field: string;
680
680
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rozie-ui/data-table-lit",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  "src"
46
46
  ],
47
47
  "dependencies": {
48
- "@rozie/runtime-lit": "0.6.0"
48
+ "@rozie/runtime-lit": "0.7.1"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "lit": "^3.2",
@@ -54,7 +54,7 @@
54
54
  "@preact/signals-core": "^1.3.0",
55
55
  "@tanstack/table-core": "^8.21",
56
56
  "@tanstack/virtual-core": "^3",
57
- "@rozie-ui/popover-lit": "^0.1.0"
57
+ "@rozie-ui/popover-lit": "^0.1.0 || ^0.2.0"
58
58
  },
59
59
  "peerDependenciesMeta": {
60
60
  "lit": {
package/src/Column.ts CHANGED
@@ -18,7 +18,7 @@ export default class Column extends SignalWatcher(LitElement) {
18
18
  /**
19
19
  * The row field this column reads (table-core `accessorKey`). The plain accessor value renders when the `#cell` slot falls through.
20
20
  * @example
21
- * <Column field="email" header="Email" />
21
+ * <rozie-column field="email" header="Email"></rozie-column>
22
22
  */
23
23
  @property({ type: String, reflect: true }) field: string = '';
24
24
  /**
@@ -81,9 +81,6 @@ private get registry() { return this.__rozieCtxConsumer_data_table_columns.value
81
81
  firstUpdated(): void {
82
82
  this.reg = this.registry;
83
83
 
84
- // idempotency flag so a reactive late-context registration (Lit async first paint,
85
- // REQ-30) and the $onMount registration never double-register the column.
86
-
87
84
  this._disconnectCleanups.push((() => {
88
85
  if (this.reg) this.reg.unregisterColumn(this.colId());
89
86
  }));
@@ -128,10 +125,22 @@ private get registry() { return this.__rozieCtxConsumer_data_table_columns.value
128
125
  `;
129
126
  }
130
127
 
128
+ // $inject is typed `unknown` (Phase 36 D-4: no rich type synthesis yet), which the
129
+ // STRICT BUNDLED-LEAF tsc rejects on `.registerColumn(...)` (TS2339). The .rozie-native
130
+ // fix is the null-let → `any` typeNeutralize idiom: alias the injected API through a
131
+ // MODULE-SCOPE `let reg = null` (typeNeutralize types it `any`). Module-scope (not
132
+ // hook-local) so the alias is in scope from the Solid teardown — which the Solid
133
+ // emitter hoists into a sibling onCleanup() OUTSIDE the mount closure. ZERO emitter
134
+ // change.
131
135
  reg: any = null;
132
136
 
137
+ // idempotency flag so a reactive late-context registration (Lit async first paint,
138
+ // REQ-30) and the $onMount registration never double-register the column.
133
139
  registered = false;
134
140
 
141
+ // the column SPEC builder — shared by the $onMount register and the late-context
142
+ // $onUpdate below. Carries METADATA ONLY (no cell/header render callbacks — D-A moved
143
+ // per-cell rendering to the parent's #cell/#header scoped slot, dispatched by columnId).
135
144
  colId = () => this.id !== '' ? this.id : this.field;
136
145
 
137
146
  buildSpec = () => ({