@proteos/sdk 0.56.0 → 0.57.1

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.
@@ -1094,6 +1094,19 @@ var FilterGroupSchema = zod.z.lazy(
1094
1094
  })
1095
1095
  );
1096
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
+ );
1097
1110
  var SizeValueSchema = zod.z.union([
1098
1111
  zod.z.number().min(0).max(1).describe("Fraction in [0, 1]"),
1099
1112
  zod.z.string().regex(SIZE_VALUE_STRING_RE, 'must match n/m, Npx, N%, "auto", or "fill"')
@@ -1106,6 +1119,7 @@ var GapSchema = zod.z.enum(["xs", "sm", "md", "lg"]);
1106
1119
  var SizingPropsSchema = zod.z.object({
1107
1120
  width: SizeValueSchema.optional(),
1108
1121
  height: SizeValueSchema.optional(),
1122
+ min_height: LengthValueSchema.optional(),
1109
1123
  grow: zod.z.number().optional(),
1110
1124
  shrink: zod.z.number().optional(),
1111
1125
  align: AlignSchema.optional()
@@ -1122,6 +1136,7 @@ var commonPropsShape = {
1122
1136
  read_only_when: FilterGroupSchema.optional(),
1123
1137
  width: SizeValueSchema.optional(),
1124
1138
  height: SizeValueSchema.optional(),
1139
+ min_height: LengthValueSchema.optional(),
1125
1140
  grow: zod.z.number().optional(),
1126
1141
  shrink: zod.z.number().optional(),
1127
1142
  align: AlignSchema.optional(),
@@ -1147,8 +1162,11 @@ var LayoutElementType = {
1147
1162
  RecordFilter: "record_filter",
1148
1163
  List: "list",
1149
1164
  WorkflowTrigger: "workflow_trigger",
1150
- SchedulingPicker: "scheduling_picker"
1165
+ SchedulingPicker: "scheduling_picker",
1166
+ Calendar: "calendar"
1151
1167
  };
1168
+ var CALENDAR_VIEW_KINDS = ["day", "week", "month", "agenda"];
1169
+ var CALENDAR_MAX_OVERLAY_USERS = 8;
1152
1170
  var LayoutTabSchema = zod.z.lazy(
1153
1171
  () => zod.z.object({
1154
1172
  id: zod.z.string().min(1),
@@ -1283,6 +1301,17 @@ var LayoutElementSchema = zod.z.lazy(
1283
1301
  host_user_id: zod.z.string().min(1).optional(),
1284
1302
  contact_id: zod.z.string().optional(),
1285
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()
1286
1315
  })
1287
1316
  ])
1288
1317
  );
@@ -1309,11 +1338,17 @@ var PAGE_BACKGROUND_TOKENS = [
1309
1338
  "danger",
1310
1339
  "info"
1311
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
+ }
1312
1347
  var PageStyleSchema = zod.z.object({
1313
- background: zod.z.string().optional(),
1314
- max_width: SizeValueSchema.optional(),
1315
- padding_x: SizeValueSchema.optional(),
1316
- 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()
1317
1352
  });
1318
1353
  var PageLayoutSchema = zod.z.object({
1319
1354
  version: zod.z.literal(1),
@@ -1767,6 +1802,10 @@ var DesignReferenceSchema = AuditFieldsSchema.extend({
1767
1802
  description: zod.z.string(),
1768
1803
  content: zod.z.string().optional()
1769
1804
  });
1805
+ var CURRENT_USER = "$current_user";
1806
+ function isCurrentUser(value) {
1807
+ return value === CURRENT_USER;
1808
+ }
1770
1809
  var CURRENT_USER_DEFAULT = { type: "current_user" };
1771
1810
  function isCurrentUserDefault(value) {
1772
1811
  if (!value || typeof value !== "object" || Array.isArray(value)) return false;
@@ -1874,6 +1913,9 @@ exports.AppSchema = AppSchema;
1874
1913
  exports.AttributeSchema = AttributeSchema;
1875
1914
  exports.AuditFieldsSchema = AuditFieldsSchema;
1876
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;
1877
1919
  exports.CURRENT_USER_DEFAULT = CURRENT_USER_DEFAULT;
1878
1920
  exports.ColumnSchema = ColumnSchema;
1879
1921
  exports.ComponentSchema = ComponentSchema;
@@ -1894,6 +1936,7 @@ exports.FilterGroupSchema = FilterGroupSchema;
1894
1936
  exports.LayoutElementSchema = LayoutElementSchema;
1895
1937
  exports.LayoutElementType = LayoutElementType;
1896
1938
  exports.LayoutTabSchema = LayoutTabSchema;
1939
+ exports.LengthValueSchema = LengthValueSchema;
1897
1940
  exports.ListExtensionColumnPlacementSchema = ListExtensionColumnPlacementSchema;
1898
1941
  exports.ListExtensionSchema = ListExtensionSchema;
1899
1942
  exports.ListSchema = ListSchema;
@@ -1908,6 +1951,7 @@ exports.MenuItemType = MenuItemType;
1908
1951
  exports.MetaClient = MetaClient;
1909
1952
  exports.ModuleSchema = ModuleSchema;
1910
1953
  exports.OnDeleteActionSchema = OnDeleteActionSchema;
1954
+ exports.PAGE_BACKGROUND_COLOR_RE = PAGE_BACKGROUND_COLOR_RE;
1911
1955
  exports.PAGE_BACKGROUND_TOKENS = PAGE_BACKGROUND_TOKENS;
1912
1956
  exports.PAGE_EXTENSION_ANCHOR_MAIN = PAGE_EXTENSION_ANCHOR_MAIN;
1913
1957
  exports.PAGE_EXTENSION_ANCHOR_SIDE_PANEL = PAGE_EXTENSION_ANCHOR_SIDE_PANEL;
@@ -1927,6 +1971,7 @@ exports.RelationAttributeMetaSchema = RelationAttributeMetaSchema;
1927
1971
  exports.ResponseMetaSchema = ResponseMetaSchema;
1928
1972
  exports.SizeValueSchema = SizeValueSchema;
1929
1973
  exports.SortConfigSchema = SortConfigSchema;
1974
+ exports.StyleSizeValueSchema = StyleSizeValueSchema;
1930
1975
  exports.UserAttributeMetaSchema = UserAttributeMetaSchema;
1931
1976
  exports.UserRefSchema = UserRefSchema;
1932
1977
  exports.VariableSchema = VariableSchema;
@@ -1940,9 +1985,13 @@ exports.currencySymbolSide = currencySymbolSide;
1940
1985
  exports.formatAmount = formatAmount;
1941
1986
  exports.formatMoney = formatMoney;
1942
1987
  exports.isBuiltInControl = isBuiltInControl;
1988
+ exports.isCurrentUser = isCurrentUser;
1943
1989
  exports.isCurrentUserDefault = isCurrentUserDefault;
1990
+ exports.isLengthValue = isLengthValue;
1991
+ exports.isPageBackground = isPageBackground;
1944
1992
  exports.isPlatformAttributeName = isPlatformAttributeName;
1945
1993
  exports.isReservedAttributeName = isReservedAttributeName;
1994
+ exports.isStyleSizeValue = isStyleSizeValue;
1946
1995
  exports.isTitleQueryable = isTitleQueryable;
1947
1996
  exports.localeNumberSeparators = localeNumberSeparators;
1948
1997
  exports.lookupCompatibleControls = lookupCompatibleControls;
@@ -1957,5 +2006,5 @@ exports.parseRelationMeta = parseRelationMeta;
1957
2006
  exports.parseUserMeta = parseUserMeta;
1958
2007
  exports.platformAttributes = platformAttributes;
1959
2008
  exports.titleTemplateVariables = titleTemplateVariables;
1960
- //# sourceMappingURL=chunk-OVCAR2R5.cjs.map
1961
- //# sourceMappingURL=chunk-OVCAR2R5.cjs.map
2009
+ //# sourceMappingURL=chunk-2EB3P4AR.cjs.map
2010
+ //# sourceMappingURL=chunk-2EB3P4AR.cjs.map