@ai-matrx/records 0.77.1 → 0.77.3

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 (46) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/app-table/index.cjs +7 -6
  3. package/dist/app-table/index.cjs.map +1 -1
  4. package/dist/app-table/index.d.cts +3 -3
  5. package/dist/app-table/index.d.ts +3 -3
  6. package/dist/app-table/index.js +7 -6
  7. package/dist/app-table/index.js.map +1 -1
  8. package/dist/{client-BcGGEpNi.d.cts → client-DZ3UcU4_.d.cts} +1 -1
  9. package/dist/{client-BbzLb-sB.d.ts → client-ZIxyAOdh.d.ts} +1 -1
  10. package/dist/core/index.cjs +12 -8
  11. package/dist/core/index.cjs.map +1 -1
  12. package/dist/core/index.d.cts +4 -4
  13. package/dist/core/index.d.ts +4 -4
  14. package/dist/core/index.js +12 -8
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/data/index.cjs +4 -3
  17. package/dist/data/index.cjs.map +1 -1
  18. package/dist/data/index.d.cts +2 -2
  19. package/dist/data/index.d.ts +2 -2
  20. package/dist/data/index.js +4 -3
  21. package/dist/data/index.js.map +1 -1
  22. package/dist/{declareTable-COEPJpke.d.cts → declareTable-BYZdFrt5.d.cts} +2 -2
  23. package/dist/{declareTable-Dxq0Aega.d.ts → declareTable-DGSJMqGx.d.ts} +2 -2
  24. package/dist/index.cjs +8 -4
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +8 -4
  29. package/dist/index.js.map +1 -1
  30. package/dist/memory/index.cjs +4 -1
  31. package/dist/memory/index.cjs.map +1 -1
  32. package/dist/memory/index.js +4 -1
  33. package/dist/memory/index.js.map +1 -1
  34. package/dist/react/index.cjs +13 -9
  35. package/dist/react/index.cjs.map +1 -1
  36. package/dist/react/index.d.cts +6 -1
  37. package/dist/react/index.d.ts +6 -1
  38. package/dist/react/index.js +13 -9
  39. package/dist/react/index.js.map +1 -1
  40. package/dist/{table-kind-C5jsmotR.d.ts → table-kind-Da21ZLdJ.d.ts} +6 -1
  41. package/dist/{table-kind-DrVhYZbX.d.cts → table-kind-HAQ6WNxZ.d.cts} +6 -1
  42. package/dist/templates/index.cjs +4 -2
  43. package/dist/templates/index.cjs.map +1 -1
  44. package/dist/templates/index.js +4 -2
  45. package/dist/templates/index.js.map +1 -1
  46. package/package.json +4 -4
@@ -2590,7 +2590,12 @@ interface InboundDeclared {
2590
2590
  }
2591
2591
 
2592
2592
  /** `public.permission_level`, in the store's own order. */
2593
- type PermissionLevel = "viewer" | "commenter" | "editor" | "admin";
2593
+ /**
2594
+ * `edit_content` (Notion's "Can edit content") sits between `commenter` and `editor`: it may change
2595
+ * the rows and page content of a thing, never its structure (columns, views, settings) or its
2596
+ * sharing — those stay with `editor` and `admin`.
2597
+ */
2598
+ type PermissionLevel = "viewer" | "commenter" | "edit_content" | "editor" | "admin";
2594
2599
  /** The order the store writes them in, lowest first. */
2595
2600
  declare const PERMISSION_LEVELS: readonly PermissionLevel[];
2596
2601
  /** Whether `held` is the same rung as `needed` or a higher one. Nothing held is never enough. */
@@ -2590,7 +2590,12 @@ interface InboundDeclared {
2590
2590
  }
2591
2591
 
2592
2592
  /** `public.permission_level`, in the store's own order. */
2593
- type PermissionLevel = "viewer" | "commenter" | "editor" | "admin";
2593
+ /**
2594
+ * `edit_content` (Notion's "Can edit content") sits between `commenter` and `editor`: it may change
2595
+ * the rows and page content of a thing, never its structure (columns, views, settings) or its
2596
+ * sharing — those stay with `editor` and `admin`.
2597
+ */
2598
+ type PermissionLevel = "viewer" | "commenter" | "edit_content" | "editor" | "admin";
2594
2599
  /** The order the store writes them in, lowest first. */
2595
2600
  declare const PERMISSION_LEVELS: readonly PermissionLevel[];
2596
2601
  /** Whether `held` is the same rung as `needed` or a higher one. Nothing held is never enough. */
@@ -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, "''")}'`;
@@ -3601,7 +3604,6 @@ var sortedJson = (v) => JSON.stringify(Object.keys(v).sort().map((k) => [k, v[k]
3601
3604
  var filled = (v) => storeText(v) !== null && storeText(v) !== "" && !(Array.isArray(v) && v.length === 0);
3602
3605
  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
3606
  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
3607
  function attachmentProblems(raw, assets) {
3606
3608
  const out = [];
3607
3609
  const say = (at, says) => out.push({ at, says });
@@ -3617,7 +3619,7 @@ function attachmentProblems(raw, assets) {
3617
3619
  if (!a.key || !/^[A-Za-z0-9_.-]+$/.test(a.key)) return say(`${at}.key`, "Each picture has a key (letters, digits, _ . -).");
3618
3620
  if (keys.has(a.key)) say(`${at}.key`, `"${a.key}" is listed twice.`);
3619
3621
  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.`);
3622
+ if (!a.fileId || !(0, import_uuid.isUuidShape)(a.fileId)) say(`${at}.fileId`, `"${a.key}" needs the file id from templates/ASSETS.json.`);
3621
3623
  if (!a.name || !a.mime || typeof a.bytes !== "number") say(at, `"${a.key}" copies name, mime and bytes from templates/ASSETS.json.`);
3622
3624
  if (library) {
3623
3625
  const asset = library.get(a.key);