@proteos/sdk 0.54.0 → 0.55.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.
@@ -1270,7 +1270,7 @@ var LayoutElementSchema = zod.z.lazy(
1270
1270
  zod.z.object({
1271
1271
  type: zod.z.literal("text"),
1272
1272
  ...commonPropsShape,
1273
- variant: zod.z.enum(["heading", "subheading", "body", "caption", "callout"]),
1273
+ variant: zod.z.enum(["heading", "subheading", "body", "caption", "callout", "block-title"]),
1274
1274
  content: zod.z.string().min(1)
1275
1275
  }),
1276
1276
  zod.z.object({
@@ -1319,6 +1319,37 @@ var PageLayoutSchema = zod.z.object({
1319
1319
  side_panel: PageLayoutSidePanelSchema.optional(),
1320
1320
  style: PageStyleSchema.optional()
1321
1321
  });
1322
+
1323
+ // src/meta/record-title.ts
1324
+ var RECORD_TITLE_FIELD = "record_title";
1325
+ function isReservedAttributeName(name) {
1326
+ return name === RECORD_TITLE_FIELD;
1327
+ }
1328
+ function isTitleQueryable(template) {
1329
+ if (!template?.includes("{{")) return false;
1330
+ if (template.includes("{%") || template.includes("%}")) return false;
1331
+ let rest = template;
1332
+ while (rest !== "") {
1333
+ const open = rest.indexOf("{{");
1334
+ if (open < 0) return !rest.includes("}}");
1335
+ if (rest.slice(0, open).includes("}}")) return false;
1336
+ rest = rest.slice(open + 2);
1337
+ const close = rest.indexOf("}}");
1338
+ if (close < 0) return false;
1339
+ if (!/^[a-z][a-z0-9_]*$/.test(rest.slice(0, close).trim())) return false;
1340
+ rest = rest.slice(close + 2);
1341
+ }
1342
+ return true;
1343
+ }
1344
+ function titleTemplateVariables(template) {
1345
+ if (!template || !isTitleQueryable(template)) return [];
1346
+ const out = [];
1347
+ for (const match of template.matchAll(/\{\{\s*([a-z][a-z0-9_]*)\s*\}\}/g)) {
1348
+ const name = match[1];
1349
+ if (name && !out.includes(name)) out.push(name);
1350
+ }
1351
+ return out;
1352
+ }
1322
1353
  var ResponseMetaSchema = zod.z.object({
1323
1354
  page: zod.z.number(),
1324
1355
  page_size: zod.z.number(),
@@ -1889,6 +1920,7 @@ exports.PageLayoutSidePanelSchema = PageLayoutSidePanelSchema;
1889
1920
  exports.PageSchema = PageSchema;
1890
1921
  exports.PageStyleSchema = PageStyleSchema;
1891
1922
  exports.PrincipalRefSchema = PrincipalRefSchema;
1923
+ exports.RECORD_TITLE_FIELD = RECORD_TITLE_FIELD;
1892
1924
  exports.RelationAttributeMetaSchema = RelationAttributeMetaSchema;
1893
1925
  exports.ResponseMetaSchema = ResponseMetaSchema;
1894
1926
  exports.SizeValueSchema = SizeValueSchema;
@@ -1908,6 +1940,8 @@ exports.formatMoney = formatMoney;
1908
1940
  exports.isBuiltInControl = isBuiltInControl;
1909
1941
  exports.isCurrentUserDefault = isCurrentUserDefault;
1910
1942
  exports.isPlatformAttributeName = isPlatformAttributeName;
1943
+ exports.isReservedAttributeName = isReservedAttributeName;
1944
+ exports.isTitleQueryable = isTitleQueryable;
1911
1945
  exports.localeNumberSeparators = localeNumberSeparators;
1912
1946
  exports.lookupCompatibleControls = lookupCompatibleControls;
1913
1947
  exports.lookupControls = lookupControls;
@@ -1920,5 +1954,6 @@ exports.parsePrincipalMeta = parsePrincipalMeta;
1920
1954
  exports.parseRelationMeta = parseRelationMeta;
1921
1955
  exports.parseUserMeta = parseUserMeta;
1922
1956
  exports.platformAttributes = platformAttributes;
1923
- //# sourceMappingURL=chunk-KMNEQP3G.cjs.map
1924
- //# sourceMappingURL=chunk-KMNEQP3G.cjs.map
1957
+ exports.titleTemplateVariables = titleTemplateVariables;
1958
+ //# sourceMappingURL=chunk-3UBIL3WV.cjs.map
1959
+ //# sourceMappingURL=chunk-3UBIL3WV.cjs.map