@ai-matrx/records-ui 0.3.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.3.2
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records-ui/v0.3.1..npm/records-ui/v0.3.2 -- apps/shared/records-ui`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.4.0
10
+
11
+ **`recordsDataSource` honours the schema the CALLER named, and the two page
12
+ assemblies get their first headless proof.**
13
+
14
+ 0.3.1's adapter routes every `rpc` to one fixed schema (`custom` by default).
15
+ That is right for the store's own doors and wrong for the trust doors:
16
+ `@ai-matrx/records`' `trustDoor` says `iam` out loud — the external principal and
17
+ the publish binding live there — and a fixed-schema adapter sends them to
18
+ `custom`, where PostgREST answers PGRST202 naming a schema the caller never
19
+ asked for. The adapter now reads `options.schema` per call and falls back to the
20
+ second argument (still `custom`) only when a call says nothing, which no caller
21
+ in `@ai-matrx/records` does. The port already specified this: "A host binding
22
+ supabase-js routes this to `client.schema(options.schema).rpc(fn, args)`".
23
+
24
+ `TablesHome` and `TablePage` shipped in 0.3.1 with no assertion of their own.
25
+ Three now run against the live store in `demo/smoke.test.tsx`: the four lanes
26
+ drawn by name with a real table in one of them and `New table` offered; the
27
+ table page's records plus its five admin rails, with the settings rail really
28
+ opening the panel; and the same page giving a plain member the records and NONE
29
+ of the administering controls — absent, not disabled.
30
+
31
+ **Consumer action:** none. `recordsDataSource(client)` is unchanged at the call
32
+ site; a host that deliberately wants a different fallback passes it second.
33
+
3
34
  ## 0.3.1
4
35
 
5
36
  Ships the canonical `TablesHome`, `TablePage`, `RecordsMount`, and table-creation helpers
package/dist/index.cjs CHANGED
@@ -5677,11 +5677,16 @@ function RecordsMount({
5677
5677
  function personActor(userId) {
5678
5678
  return userId ? { actor: "user", user_id: userId } : { actor: "user" };
5679
5679
  }
5680
- function recordsDataSource(client, schema = "custom") {
5680
+ function recordsDataSource(client, fallbackSchema = "custom") {
5681
5681
  const supabase = client;
5682
5682
  return {
5683
- rpc: (fn, args) => supabase.schema(schema).rpc(fn, args),
5684
- schema: (name) => supabase.schema(name)
5683
+ rpc(fn, args, options) {
5684
+ const on = supabase.schema(options?.schema ?? fallbackSchema);
5685
+ return on.rpc(fn, args);
5686
+ },
5687
+ schema(name) {
5688
+ return supabase.schema(name);
5689
+ }
5685
5690
  };
5686
5691
  }
5687
5692