@proteos/sdk 0.55.0 → 0.57.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.
@@ -1078,6 +1078,8 @@ var FilterElementSchema = zod.z.object({
1078
1078
  "in",
1079
1079
  "not_in",
1080
1080
  "contains",
1081
+ "not_contains",
1082
+ "contains_all",
1081
1083
  "starts_with",
1082
1084
  "ends_with",
1083
1085
  "empty",
@@ -1092,6 +1094,19 @@ var FilterGroupSchema = zod.z.lazy(
1092
1094
  })
1093
1095
  );
1094
1096
  var SIZE_VALUE_STRING_RE = /^(\d+\/\d+|\d+px|\d+%|auto|fill)$/;
1097
+ var LENGTH_VALUE_RE = /^(\d+px|\d+%)$/;
1098
+ function isLengthValue(text) {
1099
+ return LENGTH_VALUE_RE.test(text);
1100
+ }
1101
+ var LengthValueSchema = zod.z.string().regex(LENGTH_VALUE_RE, "must match Npx or N%");
1102
+ var STYLE_SIZE_VALUE_RE = /^(\d+px|\d+%|auto|fill)$/;
1103
+ function isStyleSizeValue(text) {
1104
+ return STYLE_SIZE_VALUE_RE.test(text);
1105
+ }
1106
+ var StyleSizeValueSchema = zod.z.string().regex(
1107
+ STYLE_SIZE_VALUE_RE,
1108
+ 'must match Npx, N%, "auto", or "fill"'
1109
+ );
1095
1110
  var SizeValueSchema = zod.z.union([
1096
1111
  zod.z.number().min(0).max(1).describe("Fraction in [0, 1]"),
1097
1112
  zod.z.string().regex(SIZE_VALUE_STRING_RE, 'must match n/m, Npx, N%, "auto", or "fill"')
@@ -1104,6 +1119,7 @@ var GapSchema = zod.z.enum(["xs", "sm", "md", "lg"]);
1104
1119
  var SizingPropsSchema = zod.z.object({
1105
1120
  width: SizeValueSchema.optional(),
1106
1121
  height: SizeValueSchema.optional(),
1122
+ min_height: LengthValueSchema.optional(),
1107
1123
  grow: zod.z.number().optional(),
1108
1124
  shrink: zod.z.number().optional(),
1109
1125
  align: AlignSchema.optional()
@@ -1120,6 +1136,7 @@ var commonPropsShape = {
1120
1136
  read_only_when: FilterGroupSchema.optional(),
1121
1137
  width: SizeValueSchema.optional(),
1122
1138
  height: SizeValueSchema.optional(),
1139
+ min_height: LengthValueSchema.optional(),
1123
1140
  grow: zod.z.number().optional(),
1124
1141
  shrink: zod.z.number().optional(),
1125
1142
  align: AlignSchema.optional(),
@@ -1145,8 +1162,11 @@ var LayoutElementType = {
1145
1162
  RecordFilter: "record_filter",
1146
1163
  List: "list",
1147
1164
  WorkflowTrigger: "workflow_trigger",
1148
- SchedulingPicker: "scheduling_picker"
1165
+ SchedulingPicker: "scheduling_picker",
1166
+ Calendar: "calendar"
1149
1167
  };
1168
+ var CALENDAR_VIEW_KINDS = ["day", "week", "month", "agenda"];
1169
+ var CALENDAR_MAX_OVERLAY_USERS = 8;
1150
1170
  var LayoutTabSchema = zod.z.lazy(
1151
1171
  () => zod.z.object({
1152
1172
  id: zod.z.string().min(1),
@@ -1281,6 +1301,17 @@ var LayoutElementSchema = zod.z.lazy(
1281
1301
  host_user_id: zod.z.string().min(1).optional(),
1282
1302
  contact_id: zod.z.string().optional(),
1283
1303
  is_header_hidden: zod.z.boolean().optional()
1304
+ }),
1305
+ zod.z.object({
1306
+ type: zod.z.literal("calendar"),
1307
+ ...commonPropsShape,
1308
+ user_id: zod.z.string().min(1),
1309
+ default_view: zod.z.enum(CALENDAR_VIEW_KINDS).optional(),
1310
+ views: zod.z.array(zod.z.enum(CALENDAR_VIEW_KINDS)).min(1).optional(),
1311
+ date: zod.z.string().optional(),
1312
+ is_record_scoped: zod.z.boolean().optional(),
1313
+ overlay_user_ids: zod.z.array(zod.z.string().min(1)).max(CALENDAR_MAX_OVERLAY_USERS).optional(),
1314
+ is_hosted_create_allowed: zod.z.boolean().optional()
1284
1315
  })
1285
1316
  ])
1286
1317
  );
@@ -1307,11 +1338,17 @@ var PAGE_BACKGROUND_TOKENS = [
1307
1338
  "danger",
1308
1339
  "info"
1309
1340
  ];
1341
+ var PAGE_BACKGROUND_COLOR_RE = /^(#[0-9a-fA-F]{3,8}|(rgb|rgba|hsl|hsla|oklch|oklab)\([0-9a-zA-Z.,%/ +-]+\))$/;
1342
+ function isPageBackground(text) {
1343
+ const value = text.trim();
1344
+ if (value.length === 0 || value.length > 64) return false;
1345
+ return PAGE_BACKGROUND_TOKENS.includes(value) || PAGE_BACKGROUND_COLOR_RE.test(value);
1346
+ }
1310
1347
  var PageStyleSchema = zod.z.object({
1311
- background: zod.z.string().optional(),
1312
- max_width: SizeValueSchema.optional(),
1313
- padding_x: SizeValueSchema.optional(),
1314
- padding_y: SizeValueSchema.optional()
1348
+ background: zod.z.string().refine(isPageBackground, "must be a design token or a hex / rgb / hsl / oklch / oklab color").optional(),
1349
+ max_width: StyleSizeValueSchema.optional(),
1350
+ padding_x: StyleSizeValueSchema.optional(),
1351
+ padding_y: StyleSizeValueSchema.optional()
1315
1352
  });
1316
1353
  var PageLayoutSchema = zod.z.object({
1317
1354
  version: zod.z.literal(1),
@@ -1765,6 +1802,10 @@ var DesignReferenceSchema = AuditFieldsSchema.extend({
1765
1802
  description: zod.z.string(),
1766
1803
  content: zod.z.string().optional()
1767
1804
  });
1805
+ var CURRENT_USER = "$current_user";
1806
+ function isCurrentUser(value) {
1807
+ return value === CURRENT_USER;
1808
+ }
1768
1809
  var CURRENT_USER_DEFAULT = { type: "current_user" };
1769
1810
  function isCurrentUserDefault(value) {
1770
1811
  if (!value || typeof value !== "object" || Array.isArray(value)) return false;
@@ -1872,6 +1913,9 @@ exports.AppSchema = AppSchema;
1872
1913
  exports.AttributeSchema = AttributeSchema;
1873
1914
  exports.AuditFieldsSchema = AuditFieldsSchema;
1874
1915
  exports.BUILT_IN_CONTROLS = BUILT_IN_CONTROLS;
1916
+ exports.CALENDAR_MAX_OVERLAY_USERS = CALENDAR_MAX_OVERLAY_USERS;
1917
+ exports.CALENDAR_VIEW_KINDS = CALENDAR_VIEW_KINDS;
1918
+ exports.CURRENT_USER = CURRENT_USER;
1875
1919
  exports.CURRENT_USER_DEFAULT = CURRENT_USER_DEFAULT;
1876
1920
  exports.ColumnSchema = ColumnSchema;
1877
1921
  exports.ComponentSchema = ComponentSchema;
@@ -1892,6 +1936,7 @@ exports.FilterGroupSchema = FilterGroupSchema;
1892
1936
  exports.LayoutElementSchema = LayoutElementSchema;
1893
1937
  exports.LayoutElementType = LayoutElementType;
1894
1938
  exports.LayoutTabSchema = LayoutTabSchema;
1939
+ exports.LengthValueSchema = LengthValueSchema;
1895
1940
  exports.ListExtensionColumnPlacementSchema = ListExtensionColumnPlacementSchema;
1896
1941
  exports.ListExtensionSchema = ListExtensionSchema;
1897
1942
  exports.ListSchema = ListSchema;
@@ -1906,6 +1951,7 @@ exports.MenuItemType = MenuItemType;
1906
1951
  exports.MetaClient = MetaClient;
1907
1952
  exports.ModuleSchema = ModuleSchema;
1908
1953
  exports.OnDeleteActionSchema = OnDeleteActionSchema;
1954
+ exports.PAGE_BACKGROUND_COLOR_RE = PAGE_BACKGROUND_COLOR_RE;
1909
1955
  exports.PAGE_BACKGROUND_TOKENS = PAGE_BACKGROUND_TOKENS;
1910
1956
  exports.PAGE_EXTENSION_ANCHOR_MAIN = PAGE_EXTENSION_ANCHOR_MAIN;
1911
1957
  exports.PAGE_EXTENSION_ANCHOR_SIDE_PANEL = PAGE_EXTENSION_ANCHOR_SIDE_PANEL;
@@ -1925,6 +1971,7 @@ exports.RelationAttributeMetaSchema = RelationAttributeMetaSchema;
1925
1971
  exports.ResponseMetaSchema = ResponseMetaSchema;
1926
1972
  exports.SizeValueSchema = SizeValueSchema;
1927
1973
  exports.SortConfigSchema = SortConfigSchema;
1974
+ exports.StyleSizeValueSchema = StyleSizeValueSchema;
1928
1975
  exports.UserAttributeMetaSchema = UserAttributeMetaSchema;
1929
1976
  exports.UserRefSchema = UserRefSchema;
1930
1977
  exports.VariableSchema = VariableSchema;
@@ -1938,9 +1985,13 @@ exports.currencySymbolSide = currencySymbolSide;
1938
1985
  exports.formatAmount = formatAmount;
1939
1986
  exports.formatMoney = formatMoney;
1940
1987
  exports.isBuiltInControl = isBuiltInControl;
1988
+ exports.isCurrentUser = isCurrentUser;
1941
1989
  exports.isCurrentUserDefault = isCurrentUserDefault;
1990
+ exports.isLengthValue = isLengthValue;
1991
+ exports.isPageBackground = isPageBackground;
1942
1992
  exports.isPlatformAttributeName = isPlatformAttributeName;
1943
1993
  exports.isReservedAttributeName = isReservedAttributeName;
1994
+ exports.isStyleSizeValue = isStyleSizeValue;
1944
1995
  exports.isTitleQueryable = isTitleQueryable;
1945
1996
  exports.localeNumberSeparators = localeNumberSeparators;
1946
1997
  exports.lookupCompatibleControls = lookupCompatibleControls;
@@ -1955,5 +2006,5 @@ exports.parseRelationMeta = parseRelationMeta;
1955
2006
  exports.parseUserMeta = parseUserMeta;
1956
2007
  exports.platformAttributes = platformAttributes;
1957
2008
  exports.titleTemplateVariables = titleTemplateVariables;
1958
- //# sourceMappingURL=chunk-3UBIL3WV.cjs.map
1959
- //# sourceMappingURL=chunk-3UBIL3WV.cjs.map
2009
+ //# sourceMappingURL=chunk-2EB3P4AR.cjs.map
2010
+ //# sourceMappingURL=chunk-2EB3P4AR.cjs.map