@inf-monkeys-tech/monkeys 1.0.35 → 1.0.36

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.
@@ -10875,11 +10875,100 @@ var AssetVariantsSchema = z12.object({
10875
10875
  light: z12.string().optional(),
10876
10876
  dark: z12.string().optional()
10877
10877
  }).strict();
10878
+ var LEGACY_CURRENT_USER_MENU_ITEM_IDS = ["dark-mode", "language", "settings", "logout"];
10879
+ var CURRENT_USER_MENU_CONTROL_REFS = ["dark-mode", "language"];
10880
+ var CURRENT_USER_MENU_ACTION_REFS = ["logout"];
10881
+ var CurrentUserMenuIdentifierSchema = z12.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/, "Expected a stable current-user menu identifier.");
10882
+ var CurrentUserMenuDisplayTextSchema = z12.union([
10883
+ z12.string().trim().min(1),
10884
+ z12.record(z12.string().trim().min(1), z12.string().trim().min(1)).refine((value) => Object.keys(value).length > 0, "Localized menu text must contain at least one locale.")
10885
+ ]);
10886
+ var CurrentUserMenuNavigationItemSchema = z12.object({
10887
+ id: CurrentUserMenuIdentifierSchema,
10888
+ kind: z12.literal("navigation"),
10889
+ ref: CurrentUserMenuIdentifierSchema
10890
+ }).strict();
10891
+ var CurrentUserMenuControlItemSchema = z12.object({
10892
+ id: CurrentUserMenuIdentifierSchema,
10893
+ kind: z12.literal("control"),
10894
+ ref: z12.enum(CURRENT_USER_MENU_CONTROL_REFS)
10895
+ }).strict();
10896
+ var CurrentUserMenuActionItemSchema = z12.object({
10897
+ id: CurrentUserMenuIdentifierSchema,
10898
+ kind: z12.literal("action"),
10899
+ ref: z12.enum(CURRENT_USER_MENU_ACTION_REFS),
10900
+ tone: z12.enum(["default", "danger"]).optional()
10901
+ }).strict();
10902
+ var CurrentUserMenuItemSchema = z12.discriminatedUnion("kind", [
10903
+ CurrentUserMenuNavigationItemSchema,
10904
+ CurrentUserMenuControlItemSchema,
10905
+ CurrentUserMenuActionItemSchema
10906
+ ]);
10907
+ var CurrentUserMenuSectionSchema = z12.object({
10908
+ id: CurrentUserMenuIdentifierSchema,
10909
+ label: CurrentUserMenuDisplayTextSchema.optional(),
10910
+ dividerBefore: z12.boolean().optional(),
10911
+ items: z12.array(CurrentUserMenuItemSchema)
10912
+ }).strict();
10913
+ var CurrentUserMenuConfigSchema = z12.object({
10914
+ version: z12.literal(1),
10915
+ sections: z12.array(CurrentUserMenuSectionSchema).max(20)
10916
+ }).strict().superRefine((value, context) => {
10917
+ const sectionIds = /* @__PURE__ */ new Set();
10918
+ const itemIds = /* @__PURE__ */ new Set();
10919
+ let itemCount = 0;
10920
+ value.sections.forEach((section, sectionIndex) => {
10921
+ if (sectionIds.has(section.id)) {
10922
+ context.addIssue({
10923
+ code: "custom",
10924
+ message: `Duplicate current-user menu section id ${section.id}.`,
10925
+ path: ["sections", sectionIndex, "id"]
10926
+ });
10927
+ }
10928
+ sectionIds.add(section.id);
10929
+ itemCount += section.items.length;
10930
+ section.items.forEach((item, itemIndex) => {
10931
+ if (itemIds.has(item.id)) {
10932
+ context.addIssue({
10933
+ code: "custom",
10934
+ message: `Duplicate current-user menu item id ${item.id}.`,
10935
+ path: ["sections", sectionIndex, "items", itemIndex, "id"]
10936
+ });
10937
+ }
10938
+ itemIds.add(item.id);
10939
+ });
10940
+ });
10941
+ if (itemCount > 100) {
10942
+ context.addIssue({
10943
+ code: "custom",
10944
+ message: "Current-user menu supports at most 100 items.",
10945
+ path: ["sections"]
10946
+ });
10947
+ }
10948
+ });
10949
+ var LegacyCurrentUserMenuProfileSchema = z12.array(z12.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
10950
+ const seen = /* @__PURE__ */ new Set();
10951
+ value.forEach((item, index) => {
10952
+ if (seen.has(item)) {
10953
+ context.addIssue({
10954
+ code: "custom",
10955
+ message: `Duplicate legacy current-user menu item ${item}.`,
10956
+ path: [index]
10957
+ });
10958
+ }
10959
+ seen.add(item);
10960
+ });
10961
+ });
10962
+ var CurrentUserMenuProfileSchema = z12.union([
10963
+ z12.literal("*"),
10964
+ LegacyCurrentUserMenuProfileSchema,
10965
+ CurrentUserMenuConfigSchema
10966
+ ]);
10878
10967
  var ThemeHeadbarSchema = z12.object({
10879
10968
  theme: z12.enum(["card", "glassy", "ghost"]).optional(),
10880
10969
  navPosition: z12.enum(["left", "center", "right"]).optional(),
10881
10970
  actions: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]).optional(),
10882
- profile: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]).optional(),
10971
+ profile: CurrentUserMenuProfileSchema.optional(),
10883
10972
  showTeamQuota: z12.boolean().optional()
10884
10973
  }).strict();
10885
10974
  var TenantHeadbarModuleLeafSchema = z12.object({
@@ -12298,6 +12387,14 @@ export {
12298
12387
  ConductorWorkflowDefinitionSchema,
12299
12388
  ContractMetadataSchema,
12300
12389
  ContractPortSchema,
12390
+ CurrentUserMenuActionItemSchema,
12391
+ CurrentUserMenuConfigSchema,
12392
+ CurrentUserMenuControlItemSchema,
12393
+ CurrentUserMenuDisplayTextSchema,
12394
+ CurrentUserMenuItemSchema,
12395
+ CurrentUserMenuNavigationItemSchema,
12396
+ CurrentUserMenuProfileSchema,
12397
+ CurrentUserMenuSectionSchema,
12301
12398
  DataContinuityEnvelopeSchema,
12302
12399
  DomainCommandDefinitionSchema,
12303
12400
  DomainCommandSchema,