@ai-matrx/records 0.77.1 → 0.77.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 +6 -0
- package/dist/app-table/index.cjs +3 -2
- package/dist/app-table/index.cjs.map +1 -1
- package/dist/app-table/index.d.cts +3 -3
- package/dist/app-table/index.d.ts +3 -3
- package/dist/app-table/index.js +3 -2
- package/dist/app-table/index.js.map +1 -1
- package/dist/{client-BcGGEpNi.d.cts → client-DZ3UcU4_.d.cts} +1 -1
- package/dist/{client-BbzLb-sB.d.ts → client-ZIxyAOdh.d.ts} +1 -1
- package/dist/core/index.cjs +4 -2
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +4 -2
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +4 -3
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.d.cts +2 -2
- package/dist/data/index.d.ts +2 -2
- package/dist/data/index.js +4 -3
- package/dist/data/index.js.map +1 -1
- package/dist/{declareTable-COEPJpke.d.cts → declareTable-BYZdFrt5.d.cts} +2 -2
- package/dist/{declareTable-Dxq0Aega.d.ts → declareTable-DGSJMqGx.d.ts} +2 -2
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +5 -3
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +6 -1
- package/dist/react/index.d.ts +6 -1
- package/dist/react/index.js +5 -3
- package/dist/react/index.js.map +1 -1
- package/dist/{table-kind-C5jsmotR.d.ts → table-kind-Da21ZLdJ.d.ts} +6 -1
- package/dist/{table-kind-DrVhYZbX.d.cts → table-kind-HAQ6WNxZ.d.cts} +6 -1
- package/package.json +3 -3
package/dist/react/index.d.cts
CHANGED
|
@@ -6081,7 +6081,12 @@ declare function emptyArchiveLine(lane: ArchiveLane): string;
|
|
|
6081
6081
|
declare function sameDocument(a: RecordDocument, b: RecordDocument): boolean;
|
|
6082
6082
|
|
|
6083
6083
|
/** `public.permission_level`, in the store's own order. */
|
|
6084
|
-
|
|
6084
|
+
/**
|
|
6085
|
+
* `edit_content` (Notion's "Can edit content") sits between `commenter` and `editor`: it may change
|
|
6086
|
+
* the rows and page content of a thing, never its structure (columns, views, settings) or its
|
|
6087
|
+
* sharing — those stay with `editor` and `admin`.
|
|
6088
|
+
*/
|
|
6089
|
+
type PermissionLevel = "viewer" | "commenter" | "edit_content" | "editor" | "admin";
|
|
6085
6090
|
/** The order the store writes them in, lowest first. */
|
|
6086
6091
|
declare const PERMISSION_LEVELS: readonly PermissionLevel[];
|
|
6087
6092
|
/** Whether `held` is the same rung as `needed` or a higher one. Nothing held is never enough. */
|
package/dist/react/index.d.ts
CHANGED
|
@@ -6081,7 +6081,12 @@ declare function emptyArchiveLine(lane: ArchiveLane): string;
|
|
|
6081
6081
|
declare function sameDocument(a: RecordDocument, b: RecordDocument): boolean;
|
|
6082
6082
|
|
|
6083
6083
|
/** `public.permission_level`, in the store's own order. */
|
|
6084
|
-
|
|
6084
|
+
/**
|
|
6085
|
+
* `edit_content` (Notion's "Can edit content") sits between `commenter` and `editor`: it may change
|
|
6086
|
+
* the rows and page content of a thing, never its structure (columns, views, settings) or its
|
|
6087
|
+
* sharing — those stay with `editor` and `admin`.
|
|
6088
|
+
*/
|
|
6089
|
+
type PermissionLevel = "viewer" | "commenter" | "edit_content" | "editor" | "admin";
|
|
6085
6090
|
/** The order the store writes them in, lowest first. */
|
|
6086
6091
|
declare const PERMISSION_LEVELS: readonly PermissionLevel[];
|
|
6087
6092
|
/** Whether `held` is the same rung as `needed` or a higher one. Nothing held is never enough. */
|
package/dist/react/index.js
CHANGED
|
@@ -707,14 +707,16 @@ function moveConsequence(home, to) {
|
|
|
707
707
|
var PERMISSION_LEVELS = [
|
|
708
708
|
"viewer",
|
|
709
709
|
"commenter",
|
|
710
|
+
"edit_content",
|
|
710
711
|
"editor",
|
|
711
712
|
"admin"
|
|
712
713
|
];
|
|
713
714
|
var ORDINAL = {
|
|
714
715
|
viewer: 1,
|
|
715
716
|
commenter: 2,
|
|
716
|
-
|
|
717
|
-
|
|
717
|
+
edit_content: 3,
|
|
718
|
+
editor: 4,
|
|
719
|
+
admin: 5
|
|
718
720
|
};
|
|
719
721
|
function atLeast(held, needed) {
|
|
720
722
|
if (!held) return false;
|
|
@@ -9850,7 +9852,7 @@ function createTableDataPort({ client, aliases }) {
|
|
|
9850
9852
|
const levels = await seat(binding).myLevels({ ids: [binding.tableId] });
|
|
9851
9853
|
level = levels.ok ? levels.data[0]?.level ?? null : null;
|
|
9852
9854
|
}
|
|
9853
|
-
const may = atLeast(level, "
|
|
9855
|
+
const may = atLeast(level, "edit_content");
|
|
9854
9856
|
out.push({ alias, label: binding.label ?? table.data?.name ?? alias, kind: "table", canCreate: may, canUpdate: may });
|
|
9855
9857
|
}
|
|
9856
9858
|
return { ok: true, data: out };
|