@ai-matrx/records 0.77.2 → 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.
- package/CHANGELOG.md +6 -0
- package/dist/app-table/index.cjs +4 -4
- package/dist/app-table/index.cjs.map +1 -1
- package/dist/app-table/index.js +4 -4
- package/dist/app-table/index.js.map +1 -1
- package/dist/core/index.cjs +8 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +8 -6
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/memory/index.cjs +4 -1
- package/dist/memory/index.cjs.map +1 -1
- package/dist/memory/index.js +4 -1
- package/dist/memory/index.js.map +1 -1
- package/dist/react/index.cjs +8 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +8 -6
- package/dist/react/index.js.map +1 -1
- package/dist/templates/index.cjs +4 -2
- package/dist/templates/index.cjs.map +1 -1
- package/dist/templates/index.js +4 -2
- package/dist/templates/index.js.map +1 -1
- package/package.json +4 -4
package/dist/react/index.js
CHANGED
|
@@ -10557,6 +10557,7 @@ function useStoreTable(table, options = {}) {
|
|
|
10557
10557
|
}
|
|
10558
10558
|
|
|
10559
10559
|
// src/app-table/graduate.ts
|
|
10560
|
+
import { isUuidShape as isUuidShape5 } from "@ai-matrx/kit/uuid";
|
|
10560
10561
|
var TO_CUSTOM_FIELDS = "custom_fields";
|
|
10561
10562
|
var TO_ASSOCIATION = "association";
|
|
10562
10563
|
var GRADUATION_BASE_COLUMNS = [
|
|
@@ -10616,10 +10617,9 @@ function graduationProblems(fields, graduation) {
|
|
|
10616
10617
|
}
|
|
10617
10618
|
return problems;
|
|
10618
10619
|
}
|
|
10619
|
-
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
10620
10620
|
function idsOf(value) {
|
|
10621
10621
|
const list = Array.isArray(value) ? value : value === null || value === void 0 ? [] : [value];
|
|
10622
|
-
return list.filter((v) => typeof v === "string" &&
|
|
10622
|
+
return list.filter((v) => typeof v === "string" && isUuidShape5(v));
|
|
10623
10623
|
}
|
|
10624
10624
|
function graduatedRow(fields, graduation, snapshot) {
|
|
10625
10625
|
const row = {
|
|
@@ -11083,7 +11083,7 @@ function allowsOtherValues(field2) {
|
|
|
11083
11083
|
}
|
|
11084
11084
|
|
|
11085
11085
|
// src/retype.ts
|
|
11086
|
-
import { isUuidShape as
|
|
11086
|
+
import { isUuidShape as isUuidShape6 } from "@ai-matrx/kit/uuid";
|
|
11087
11087
|
var TRUE_WORDS2 = /* @__PURE__ */ new Set(["true", "t", "yes", "y", "1", "on", "x", "\u2713", "\u2714"]);
|
|
11088
11088
|
var FALSE_WORDS2 = /* @__PURE__ */ new Set(["false", "f", "no", "n", "0", "off", "\u2610"]);
|
|
11089
11089
|
function valueConverts(to, value) {
|
|
@@ -11104,7 +11104,7 @@ function valueConverts(to, value) {
|
|
|
11104
11104
|
return text2.trim() !== "" && /^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i.test(text2.trim());
|
|
11105
11105
|
case "list":
|
|
11106
11106
|
case "relation":
|
|
11107
|
-
return typeof value === "string" &&
|
|
11107
|
+
return typeof value === "string" && isUuidShape6(text2);
|
|
11108
11108
|
default:
|
|
11109
11109
|
return false;
|
|
11110
11110
|
}
|
|
@@ -11555,6 +11555,9 @@ function scopeChip(scope) {
|
|
|
11555
11555
|
return scope.title ? `About: ${scope.title}` : "About: this record";
|
|
11556
11556
|
}
|
|
11557
11557
|
|
|
11558
|
+
// src/table-kind.ts
|
|
11559
|
+
import { isLowercaseUuidShape } from "@ai-matrx/kit/uuid";
|
|
11560
|
+
|
|
11558
11561
|
// src/table-kind-mapping.json
|
|
11559
11562
|
var table_kind_mapping_default = {
|
|
11560
11563
|
about: "THE ONE MAPPING from a store Field to a kind's three schemas (KINDS-GLUE wave 3 \xA72). Hand-written here; aidream copies it verbatim to packages/matrx-graph/matrx_graph/table_kind_mapping.json (scripts/generate_table_kind_mapping.py --check). Both languages derive from this file only: @ai-matrx/records src/table-kind.ts and matrx_graph.table_kinds. Keys of `kinds` are the store's field kinds (custom.field_kinds() plus the formula `system` kinds custom.field_kind_of answers). Stored mode only: `column_source_default` is custom.table_column_source's answer when the facts carry none (silence means the doctrine: Field rows are the columns); `platform_keys` mirrors custom.record_platform_keys() with each key's shape (parent_id: custom.containment_parent's uuid cast; icon: the record's own @ai-matrx/icons name, a string or null); `stored_patterns` mirror custom.validate_values' relation id regex and, for dates, refuse a string the timestamptz cast can never read (no digits, not a special word) while never refusing one it can.",
|
|
@@ -11633,14 +11636,13 @@ var table_kind_mapping_default = {
|
|
|
11633
11636
|
|
|
11634
11637
|
// src/table-kind.ts
|
|
11635
11638
|
var TABLE_KIND_PREFIX = "table:";
|
|
11636
|
-
var UUID2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
11637
11639
|
var KIND_KEY = "__kind";
|
|
11638
11640
|
var M = table_kind_mapping_default;
|
|
11639
11641
|
function tableKindMapping() {
|
|
11640
11642
|
return M;
|
|
11641
11643
|
}
|
|
11642
11644
|
function isTableKind(slug) {
|
|
11643
|
-
return typeof slug === "string" && slug.startsWith(TABLE_KIND_PREFIX) &&
|
|
11645
|
+
return typeof slug === "string" && slug.startsWith(TABLE_KIND_PREFIX) && isLowercaseUuidShape(slug.slice(TABLE_KIND_PREFIX.length));
|
|
11644
11646
|
}
|
|
11645
11647
|
function tableKindSlug(tableId) {
|
|
11646
11648
|
const slug = `${TABLE_KIND_PREFIX}${String(tableId).trim().toLowerCase()}`;
|