@ai-matrx/records 0.77.2 → 0.78.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 (70) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/app-table/index.cjs +94 -5
  3. package/dist/app-table/index.cjs.map +1 -1
  4. package/dist/app-table/index.d.cts +7 -7
  5. package/dist/app-table/index.d.ts +7 -7
  6. package/dist/app-table/index.js +94 -5
  7. package/dist/app-table/index.js.map +1 -1
  8. package/dist/{client-DZ3UcU4_.d.cts → client-BExNR0TK.d.cts} +5 -5
  9. package/dist/{client-ZIxyAOdh.d.ts → client-Byn_UthM.d.ts} +5 -5
  10. package/dist/core/index.cjs +98 -7
  11. package/dist/core/index.cjs.map +1 -1
  12. package/dist/core/index.d.cts +11 -11
  13. package/dist/core/index.d.ts +11 -11
  14. package/dist/core/index.js +98 -7
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/data/index.cjs +90 -1
  17. package/dist/data/index.cjs.map +1 -1
  18. package/dist/data/index.d.cts +6 -6
  19. package/dist/data/index.d.ts +6 -6
  20. package/dist/data/index.js +90 -1
  21. package/dist/data/index.js.map +1 -1
  22. package/dist/{declareTable-BYZdFrt5.d.cts → declareTable-CgrEusy8.d.cts} +4 -4
  23. package/dist/{declareTable-DGSJMqGx.d.ts → declareTable-DWOh53eK.d.ts} +4 -4
  24. package/dist/{field-D7I9yck6.d.ts → field-B2bvpqcE.d.ts} +1 -1
  25. package/dist/{field-BTW7h7Wh.d.cts → field-t9aefszx.d.cts} +1 -1
  26. package/dist/index.cjs +6 -2
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +7 -7
  29. package/dist/index.d.ts +7 -7
  30. package/dist/index.js +6 -2
  31. package/dist/index.js.map +1 -1
  32. package/dist/memory/index.cjs +6 -1
  33. package/dist/memory/index.cjs.map +1 -1
  34. package/dist/memory/index.d.cts +6 -6
  35. package/dist/memory/index.d.ts +6 -6
  36. package/dist/memory/index.js +6 -1
  37. package/dist/memory/index.js.map +1 -1
  38. package/dist/{ports-CaYEF1dG.d.ts → ports-Ch4Ym0tj.d.ts} +7 -1
  39. package/dist/{ports-PpvsH1cQ.d.cts → ports-Cjl-IjFa.d.cts} +7 -1
  40. package/dist/react/index.cjs +98 -7
  41. package/dist/react/index.cjs.map +1 -1
  42. package/dist/react/index.d.cts +16 -0
  43. package/dist/react/index.d.ts +16 -0
  44. package/dist/react/index.js +98 -7
  45. package/dist/react/index.js.map +1 -1
  46. package/dist/realtime/index.d.cts +2 -2
  47. package/dist/realtime/index.d.ts +2 -2
  48. package/dist/{record-B7iwye2k.d.cts → record-Ba1F1CNS.d.cts} +10 -0
  49. package/dist/{record-B7iwye2k.d.ts → record-Ba1F1CNS.d.ts} +10 -0
  50. package/dist/{subscription-BWaRPLyo.d.ts → subscription-CccP6N93.d.ts} +1 -1
  51. package/dist/{subscription-Br30ZwIt.d.cts → subscription-DGCrwwSR.d.cts} +1 -1
  52. package/dist/{table-kind-Da21ZLdJ.d.ts → table-kind-BMWi8G37.d.ts} +3 -3
  53. package/dist/{table-kind-HAQ6WNxZ.d.cts → table-kind-BoelIMjr.d.cts} +3 -3
  54. package/dist/templates/index.cjs +6 -2
  55. package/dist/templates/index.cjs.map +1 -1
  56. package/dist/templates/index.d.cts +9 -9
  57. package/dist/templates/index.d.ts +9 -9
  58. package/dist/templates/index.js +6 -2
  59. package/dist/templates/index.js.map +1 -1
  60. package/dist/{types-DrJLOqVi.d.ts → types-CiHdoATO.d.ts} +2 -2
  61. package/dist/{types-DWZ5_3by.d.ts → types-CtyMwJvy.d.ts} +2 -2
  62. package/dist/{types-DYoWzHwJ.d.cts → types-D-Mhiodh.d.cts} +2 -2
  63. package/dist/{types-LvxsZ6Zv.d.cts → types-euaQwxnB.d.cts} +2 -2
  64. package/dist/use-cases/index.cjs.map +1 -1
  65. package/dist/use-cases/index.d.cts +5 -5
  66. package/dist/use-cases/index.d.ts +5 -5
  67. package/dist/use-cases/index.js.map +1 -1
  68. package/dist/{validate-j0WQoC3C.d.ts → validate-B-p3YPgA.d.ts} +1 -1
  69. package/dist/{validate-CRdXE73G.d.cts → validate-COvMcv8z.d.cts} +1 -1
  70. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  import * as _ai_matrx_realtime from '@ai-matrx/realtime';
2
2
  import { RealtimeManager, ChannelSpec } from '@ai-matrx/realtime';
3
- import { R as RecordsRealtimePort } from '../ports-PpvsH1cQ.cjs';
4
- import '../record-B7iwye2k.cjs';
3
+ import { R as RecordsRealtimePort } from '../ports-Cjl-IjFa.cjs';
4
+ import '../record-Ba1F1CNS.cjs';
5
5
 
6
6
  /**
7
7
  * The topic is a CONTRACT WITH THE DATABASE (a Postgres trigger writes it, an RLS policy parses it),
@@ -1,7 +1,7 @@
1
1
  import * as _ai_matrx_realtime from '@ai-matrx/realtime';
2
2
  import { RealtimeManager, ChannelSpec } from '@ai-matrx/realtime';
3
- import { R as RecordsRealtimePort } from '../ports-CaYEF1dG.js';
4
- import '../record-B7iwye2k.js';
3
+ import { R as RecordsRealtimePort } from '../ports-Ch4Ym0tj.js';
4
+ import '../record-Ba1F1CNS.js';
5
5
 
6
6
  /**
7
7
  * The topic is a CONTRACT WITH THE DATABASE (a Postgres trigger writes it, an RLS policy parses it),
@@ -1501,6 +1501,11 @@ declare const STORE_DOORS: readonly [{
1501
1501
  readonly args: "p_organization_id uuid DEFAULT NULL::uuid";
1502
1502
  readonly returns: "TABLE(kind text, organization_id uuid, organization_name text, item_id uuid, table_id uuid, table_name text, item_row jsonb)";
1503
1503
  readonly security: "definer";
1504
+ }, {
1505
+ readonly name: "data_home_slim";
1506
+ readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_app_tables boolean DEFAULT false";
1507
+ readonly returns: "jsonb";
1508
+ readonly security: "invoker";
1504
1509
  }, {
1505
1510
  readonly name: "data_home_tables";
1506
1511
  readonly args: "p_organization_id uuid DEFAULT NULL::uuid";
@@ -4401,6 +4406,11 @@ declare const STORE_DOORS: readonly [{
4401
4406
  readonly args: "p_table_id uuid, p_to_organization_id uuid, p_expected_version integer DEFAULT NULL::integer";
4402
4407
  readonly returns: "jsonb";
4403
4408
  readonly security: "definer";
4409
+ }, {
4410
+ readonly name: "table_page_bundle";
4411
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid";
4412
+ readonly returns: "jsonb";
4413
+ readonly security: "invoker";
4404
4414
  }, {
4405
4415
  readonly name: "table_placement";
4406
4416
  readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb, p_is_kernel boolean DEFAULT false";
@@ -1501,6 +1501,11 @@ declare const STORE_DOORS: readonly [{
1501
1501
  readonly args: "p_organization_id uuid DEFAULT NULL::uuid";
1502
1502
  readonly returns: "TABLE(kind text, organization_id uuid, organization_name text, item_id uuid, table_id uuid, table_name text, item_row jsonb)";
1503
1503
  readonly security: "definer";
1504
+ }, {
1505
+ readonly name: "data_home_slim";
1506
+ readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_app_tables boolean DEFAULT false";
1507
+ readonly returns: "jsonb";
1508
+ readonly security: "invoker";
1504
1509
  }, {
1505
1510
  readonly name: "data_home_tables";
1506
1511
  readonly args: "p_organization_id uuid DEFAULT NULL::uuid";
@@ -4401,6 +4406,11 @@ declare const STORE_DOORS: readonly [{
4401
4406
  readonly args: "p_table_id uuid, p_to_organization_id uuid, p_expected_version integer DEFAULT NULL::integer";
4402
4407
  readonly returns: "jsonb";
4403
4408
  readonly security: "definer";
4409
+ }, {
4410
+ readonly name: "table_page_bundle";
4411
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid";
4412
+ readonly returns: "jsonb";
4413
+ readonly security: "invoker";
4404
4414
  }, {
4405
4415
  readonly name: "table_placement";
4406
4416
  readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb, p_is_kernel boolean DEFAULT false";
@@ -1,4 +1,4 @@
1
- import { U as Uuid, w as RuleNodeKind, x as RuleUse, f as Timestamp, H as HiddenFieldNotice } from './record-B7iwye2k.js';
1
+ import { U as Uuid, w as RuleNodeKind, x as RuleUse, f as Timestamp, H as HiddenFieldNotice } from './record-Ba1F1CNS.js';
2
2
 
3
3
  /**
4
4
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
@@ -1,4 +1,4 @@
1
- import { U as Uuid, w as RuleNodeKind, x as RuleUse, f as Timestamp, H as HiddenFieldNotice } from './record-B7iwye2k.cjs';
1
+ import { U as Uuid, w as RuleNodeKind, x as RuleUse, f as Timestamp, H as HiddenFieldNotice } from './record-Ba1F1CNS.cjs';
2
2
 
3
3
  /**
4
4
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
@@ -1,6 +1,6 @@
1
- import { m as ReadRow, f as Timestamp, U as Uuid, g as RecordDocument, d as RelationFlavor, O as OnDelete, al as RelationBinding, e as RelationCardinality, h as RecordsResult, q as StoredRecord, v as ParityFieldType, T as TableType, a as TableDisplay, S as StorageMode, aw as TableOrigin, R as RecordsError } from './record-B7iwye2k.js';
2
- import { b as RecordsDataSource } from './ports-CaYEF1dG.js';
3
- import { b as Field } from './field-D7I9yck6.js';
1
+ import { m as ReadRow, f as Timestamp, U as Uuid, g as RecordDocument, d as RelationFlavor, O as OnDelete, al as RelationBinding, e as RelationCardinality, h as RecordsResult, q as StoredRecord, v as ParityFieldType, T as TableType, a as TableDisplay, S as StorageMode, aw as TableOrigin, R as RecordsError } from './record-Ba1F1CNS.js';
2
+ import { b as RecordsDataSource } from './ports-Ch4Ym0tj.js';
3
+ import { b as Field } from './field-B2bvpqcE.js';
4
4
 
5
5
  /**
6
6
  * THE TWO LANES THE ARCHIVED-ITEMS LAW NAMES (Arman, 2026-09-09) — the same
@@ -1,6 +1,6 @@
1
- import { m as ReadRow, f as Timestamp, U as Uuid, g as RecordDocument, d as RelationFlavor, O as OnDelete, al as RelationBinding, e as RelationCardinality, h as RecordsResult, q as StoredRecord, v as ParityFieldType, T as TableType, a as TableDisplay, S as StorageMode, aw as TableOrigin, R as RecordsError } from './record-B7iwye2k.cjs';
2
- import { b as RecordsDataSource } from './ports-PpvsH1cQ.cjs';
3
- import { b as Field } from './field-BTW7h7Wh.cjs';
1
+ import { m as ReadRow, f as Timestamp, U as Uuid, g as RecordDocument, d as RelationFlavor, O as OnDelete, al as RelationBinding, e as RelationCardinality, h as RecordsResult, q as StoredRecord, v as ParityFieldType, T as TableType, a as TableDisplay, S as StorageMode, aw as TableOrigin, R as RecordsError } from './record-Ba1F1CNS.cjs';
2
+ import { b as RecordsDataSource } from './ports-Cjl-IjFa.cjs';
3
+ import { b as Field } from './field-t9aefszx.cjs';
4
4
 
5
5
  /**
6
6
  * THE TWO LANES THE ARCHIVED-ITEMS LAW NAMES (Arman, 2026-09-09) — the same
@@ -489,6 +489,9 @@ function footprintOf(spec) {
489
489
  }
490
490
  var CATALOGUE_STATUSES = ["planned", "authoring", "checking", "waiting_on_lane_10", "ready", "published", "retired"];
491
491
 
492
+ // src/templates/validate.ts
493
+ var import_uuid = require("@ai-matrx/kit/uuid");
494
+
492
495
  // src/templates/confidential.ts
493
496
  var TABLE_KERNEL_ID = "11111111-0000-4000-8000-000000000001";
494
497
  var sqlText = (s) => `'${s.replace(/'/g, "''")}'`;
@@ -932,6 +935,7 @@ var STORE_DOORS = [
932
935
  { name: "data_home", args: "p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_app_tables boolean DEFAULT false", returns: "jsonb", security: "definer" },
933
936
  { name: "data_home_changed_by", args: "p_asks jsonb", returns: "TABLE(organization_id uuid, id uuid, at timestamp with time zone, who text)", security: "definer" },
934
937
  { name: "data_home_items", args: "p_organization_id uuid DEFAULT NULL::uuid", returns: "TABLE(kind text, organization_id uuid, organization_name text, item_id uuid, table_id uuid, table_name text, item_row jsonb)", security: "definer" },
938
+ { name: "data_home_slim", args: "p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_app_tables boolean DEFAULT false", returns: "jsonb", security: "invoker" },
935
939
  { name: "data_home_tables", args: "p_organization_id uuid DEFAULT NULL::uuid", returns: "TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone, mine boolean, shared_with_me boolean, kept_by_the_app boolean, kind text, team boolean, system boolean, created_by uuid)", security: "definer" },
936
940
  { name: "data_home_tables", args: "p_organization_id uuid, p_include_app_tables boolean", returns: "TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone, mine boolean, shared_with_me boolean, kept_by_the_app boolean, kind text, team boolean, system boolean, created_by uuid)", security: "invoker" },
937
941
  { name: "declared_conversation", args: "", returns: "uuid", security: "invoker" },
@@ -1512,6 +1516,7 @@ var STORE_DOORS = [
1512
1516
  { name: "table_list_everywhere", args: "p_organization_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
1513
1517
  { name: "table_list_everywhere", args: "p_organization_id uuid, p_include_app_tables boolean", returns: "jsonb", security: "invoker" },
1514
1518
  { name: "table_move", args: "p_table_id uuid, p_to_organization_id uuid, p_expected_version integer DEFAULT NULL::integer", returns: "jsonb", security: "definer" },
1519
+ { name: "table_page_bundle", args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "invoker" },
1515
1520
  { name: "table_placement", args: "p_organization_id uuid, p_table_id uuid, p_data jsonb, p_is_kernel boolean DEFAULT false", returns: "jsonb", security: "invoker" },
1516
1521
  { name: "table_record_ceiling", args: "", returns: "integer", security: "invoker" },
1517
1522
  { name: "table_record_ceiling", args: "p_organization_id uuid", returns: "integer", security: "invoker" },
@@ -3601,7 +3606,6 @@ var sortedJson = (v) => JSON.stringify(Object.keys(v).sort().map((k) => [k, v[k]
3601
3606
  var filled = (v) => storeText(v) !== null && storeText(v) !== "" && !(Array.isArray(v) && v.length === 0);
3602
3607
  var THING_NAME = /^(section|class|course|period|room|bay|item|job|role|team|pool|machine|program|plan|service|procedure|product|group|neighborhood|listing|grant|deal|bid|engagement|matter|account|company|route|site|location|project|event|campaign|unit|vehicle|truck|table|field|view|form)_name$/;
3603
3608
  var FILE_VALUE_RE = /^@file:([A-Za-z0-9_.-]+)$/;
3604
- var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
3605
3609
  function attachmentProblems(raw, assets) {
3606
3610
  const out = [];
3607
3611
  const say = (at, says) => out.push({ at, says });
@@ -3617,7 +3621,7 @@ function attachmentProblems(raw, assets) {
3617
3621
  if (!a.key || !/^[A-Za-z0-9_.-]+$/.test(a.key)) return say(`${at}.key`, "Each picture has a key (letters, digits, _ . -).");
3618
3622
  if (keys.has(a.key)) say(`${at}.key`, `"${a.key}" is listed twice.`);
3619
3623
  keys.add(a.key);
3620
- if (!a.fileId || !UUID_RE.test(a.fileId)) say(`${at}.fileId`, `"${a.key}" needs the file id from templates/ASSETS.json.`);
3624
+ if (!a.fileId || !(0, import_uuid.isUuidShape)(a.fileId)) say(`${at}.fileId`, `"${a.key}" needs the file id from templates/ASSETS.json.`);
3621
3625
  if (!a.name || !a.mime || typeof a.bytes !== "number") say(at, `"${a.key}" copies name, mime and bytes from templates/ASSETS.json.`);
3622
3626
  if (library) {
3623
3627
  const asset = library.get(a.key);